Welcome, Guest. Please login or register.

Author Topic: Adding to a growing file in the filesystem with C...  (Read 2451 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Adding to a growing file in the filesystem with C...
« on: April 12, 2005, 07:47:06 PM »
What's up dudes8-) . Been long since I read filesystem stuff so I'd like some advice.
In the program I'm doing there's an option to make it add info to a log if some kinds of actions happen. No prob, I thought, just make an Amiga linked list and add a new node to it when new info is needed. But, theoretically at least, if I leave it up running for a week, the list might use all spare RAM. So I just need a way to save a bunch of nodes to the HD from time to time, when a certain limit is reached. The problem is, I want to keep it all on the same file.
And by the way, even if this is possbile the file will be fragmented if another file is written between two updates right ?
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Adding to a growing file in the filesystem with C...
« Reply #1 on: April 14, 2005, 07:26:48 PM »
The fragmentation is not really a problem, but I prefer to not leave the file open. I guess I just need a way to append data to the file and the DOS library already provides functions to do that but I don't remember... (Me thinks I got to read the filesystem DOS functions again...)
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Adding to a growing file in the filesystem with C...
« Reply #2 on: April 15, 2005, 02:07:24 PM »
Cool! I'll try those, seems really easy...
\\"We made Amiga, they {bleep}ed it up\\"