Subj : Syntax
To   : DesotoFireflite
From : Digital Man
Date : Mon Mar 07 2022 08:58 am

 Re: Syntax
 By: DesotoFireflite to All on Mon Mar 07 2022 08:41 am

> I want to be able to add to the top of a file, but I can only find out how
> to add to the bottom of a file. Currently I am using:
>
> fopen file 0_CREAT|0_WRONLY|O_APPEND "C:\SBBS\XTRN\INFO\INFO.LST"
>
> and that appends to the bottom of the list, but I want to show the newest to
> oldest, not oldest to newest.
>
> I'm assuming I just leave off the O_APPEND, but is there a correct way.

Leaving off O_APPEND will *overwrite* the portions of the file you write to. There is no standard method for "inserting" data into a file. You would have to read the file contents and re-write them with the "inserted" data first, then the old data.
--
                                           digital man (rob)

Sling Blade quote #12:
Karl (re hammer): I don't rightly know. I just kinda woke up holding it.
Norco, CA WX: 56.3�F, 34.0% humidity, 7 mph NW wind, 0.00 inches rain/24hrs

---
� Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net