Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

There's coffee in that nebula! -- Capt. Kathryn Janeway, Star Trek: Voyager, "The Cloud"


dovenet / Synchronet Baja / Syntax

SubjectAuthor
* SyntaxDesotoFireflite
+* SyntaxMRO
|`- SyntaxDesotoFireflite
`* SyntaxDigital Man
 `- SyntaxDesotoFireflite

1
Syntax

<62260B90.45.dove-syncbaja@valhalla.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=82&group=DOVE-Net.Synchronet_Baja#82

  copy link   Newsgroups: DOVE-Net.Synchronet_Baja
From: desotofireflite@VERT/VALHALLA (DesotoFireflite)
To: All
Subject: Syntax
Message-ID: <62260B90.45.dove-syncbaja@valhalla.synchro.net>
Date: Mon, 7 Mar 2022 01:41:36 -0500
X-Comment-To: All
Path: rocksolidbbs.com!not-for-mail
Organization: Valhalla Home Services
Newsgroups: DOVE-Net.Synchronet_Baja
X-FTN-PID: Synchronet 3.19c-Win32 master/528edd9f4 Mar 3 2022 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20220307061559-0800 41e0
WhenExported: 20220307105761-0800 41e0
ExportedFrom: VERT bajaprog 4432
WhenImported: 20220307084136-0500 412c
WhenExported: 20220307091549-0500 412c
ExportedFrom: VALHALLA dove-syncbaja 45
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: DesotoFireflite - Mon, 7 Mar 2022 06:41 UTC

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.

Thanks

SysOp: C.G. Learn, AKA: DesotoFireflite
Valhalla Home Services! - (Synchronet) - bbs.valhallabbs.com
Valhalla II! - (GAP) - bbs.valhallabbs.com:24
Valhalla III! - (RemoteAccess) - bbs.valhallabbs.com:5023
Valhalla IIII! - (Dungeons & Dragons BBS) - bbs.valhallabbs.com:26
Valhalla Home Services Web! - http://bbs.valhallabbs.com
A Gamers Paradise - Over 150 Registered Online Game Doors!
Home Of Odin's Maze Game Server!

--- Don't You Know, Can't You See, Don't You Understand!
■ Synchronet ■ Valhalla Home Services ■ USA ■ http://valhalla.synchro.net

Syntax

<6226252C.2542.syncbaja@bbses.info>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=83&group=DOVE-Net.Synchronet_Baja#83

  copy link   Newsgroups: DOVE-Net.Synchronet_Baja
From: mro@VERT/BBSESINF (MRO)
To: DesotoFireflite
Subject: Syntax
Message-ID: <6226252C.2542.syncbaja@bbses.info>
Date: Mon, 7 Mar 2022 02:30:52 -0600
X-Comment-To: DesotoFireflite
Path: rocksolidbbs.com!not-for-mail
Organization: bbses.info
Newsgroups: DOVE-Net.Synchronet_Baja
In-Reply-To: <62260B90.45.dove-syncbaja@valhalla.synchro.net>
References: <62260B90.45.dove-syncbaja@valhalla.synchro.net>
X-FTN-PID: Synchronet 3.18b-Win32 Sep 20 2020 MSC 1927
X-FTN-CHRS: CP437 2
WhenImported: 20220307074549-0800 41e0
WhenExported: 20220307105761-0800 41e0
ExportedFrom: VERT bajaprog 4433
WhenImported: 20220307093052-0600 4168
WhenExported: 20220307094543-0600 4168
ExportedFrom: BBSESINF syncbaja 2542
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: MRO - Mon, 7 Mar 2022 08:30 UTC

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.

i probably could have done this like 15 or more years ago with baja, but I can't process the way to do it now.

what i would do (which requires no brain power) is to cat your new line to a new file, then cat your current list to that file, then move that file over your info.lst

or if your list file has a date or something sortable, you could just sort the file.
---
■ Synchronet ■ ::: BBSES.info - free BBS services :::

Syntax

<622639C1.4434.bajaprog@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=84&group=DOVE-Net.Synchronet_Baja#84

  copy link   Newsgroups: DOVE-Net.Synchronet_Baja
From: digital.man@VERT (Digital Man)
To: DesotoFireflite
Subject: Syntax
Message-ID: <622639C1.4434.bajaprog@vert.synchro.net>
Date: Mon, 7 Mar 2022 01:58:41 -0800
X-Comment-To: DesotoFireflite
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Baja
In-Reply-To: <62260B90.45.dove-syncbaja@valhalla.synchro.net>
References: <62260B90.45.dove-syncbaja@valhalla.synchro.net>
X-FTN-PID: Synchronet 3.19c-Win32 master/bb18309c7 Mar 2 2022 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20220307085841-0800 41e0
WhenExported: 20220307105761-0800 41e0
ExportedFrom: VERT bajaprog 4434
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Mon, 7 Mar 2022 09:58 UTC

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

Syntax

<62264B80.48.dove-syncbaja@valhalla.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=85&group=DOVE-Net.Synchronet_Baja#85

  copy link   Newsgroups: DOVE-Net.Synchronet_Baja
From: desotofireflite@VERT/VALHALLA (DesotoFireflite)
To: Digital Man
Subject: Syntax
Message-ID: <62264B80.48.dove-syncbaja@valhalla.synchro.net>
Date: Mon, 7 Mar 2022 06:14:24 -0500
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Valhalla Home Services
Newsgroups: DOVE-Net.Synchronet_Baja
In-Reply-To: <622639C1.4434.bajaprog@vert.synchro.net>
References: <622639C1.4434.bajaprog@vert.synchro.net>
X-FTN-PID: Synchronet 3.19c-Win32 master/528edd9f4 Mar 3 2022 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20220307101555-0800 41e0
WhenExported: 20220307105761-0800 41e0
ExportedFrom: VERT bajaprog 4435
WhenImported: 20220307131424-0500 412c
WhenExported: 20220307131549-0500 412c
ExportedFrom: VALHALLA dove-syncbaja 48
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: DesotoFireflite - Mon, 7 Mar 2022 11:14 UTC

Re: Syntax
By: Digital Man to DesotoFireflite on Mon Mar 07 2022 08:58 am

DM> Re: Syntax
DM> 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.

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

Ok, Thanks, that was what I was afraid off... Looks like I have some work to do. <BFG>

SysOp: C.G. Learn, AKA: DesotoFireflite
Valhalla Home Services! - (Synchronet) - bbs.valhallabbs.com
Valhalla II! - (GAP) - bbs.valhallabbs.com:24
Valhalla III! - (RemoteAccess) - bbs.valhallabbs.com:5023
Valhalla IIII! - (Dungeons & Dragons BBS) - bbs.valhallabbs.com:26
Valhalla Home Services Web! - http://bbs.valhallabbs.com
A Gamers Paradise - Over 150 Registered Online Game Doors!
Home Of Odin's Maze Game Server!

--- CAT (n.), Furry keyboard cover.
■ Synchronet ■ Valhalla Home Services ■ USA ■ http://valhalla.synchro.net

Syntax

<62264C91.49.dove-syncbaja@valhalla.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=86&group=DOVE-Net.Synchronet_Baja#86

  copy link   Newsgroups: DOVE-Net.Synchronet_Baja
From: desotofireflite@VERT/VALHALLA (DesotoFireflite)
To: MRO
Subject: Syntax
Message-ID: <62264C91.49.dove-syncbaja@valhalla.synchro.net>
Date: Mon, 7 Mar 2022 06:18:57 -0500
X-Comment-To: MRO
Path: rocksolidbbs.com!not-for-mail
Organization: Valhalla Home Services
Newsgroups: DOVE-Net.Synchronet_Baja
In-Reply-To: <6226252C.2542.syncbaja@bbses.info>
References: <6226252C.2542.syncbaja@bbses.info>
X-FTN-PID: Synchronet 3.19c-Win32 master/528edd9f4 Mar 3 2022 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20220307111555-0800 41e0
WhenExported: 20220307165758-0800 41e0
ExportedFrom: VERT bajaprog 4436
WhenImported: 20220307131857-0500 412c
WhenExported: 20220307141549-0500 412c
ExportedFrom: VALHALLA dove-syncbaja 49
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: DesotoFireflite - Mon, 7 Mar 2022 11:18 UTC

Re: Syntax
By: MRO to DesotoFireflite on Mon Mar 07 2022 09:30 am

MR> Re: Syntax
MR> 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.

MR> i probably could have done this like 15 or more years ago with baja, but I
MR> can't process the way to do it now.

I hear you, at 70, I'm loosing a lot of my skill set also. <BFG>

MR> what i would do (which requires no brain power) is to cat your new line to
MR> a new file, then cat your current list to that file, then move that file
MR> over your info.lst

MR> or if your list file has a date or something sortable, you could just sort
MR> the file.

Both good ideas, but I like the sort issue best. I may be able to pull that off, but I will have to look at the file first.

Thanks

SysOp: C.G. Learn, AKA: DesotoFireflite
Valhalla Home Services! - (Synchronet) - bbs.valhallabbs.com
Valhalla II! - (GAP) - bbs.valhallabbs.com:24
Valhalla III! - (RemoteAccess) - bbs.valhallabbs.com:5023
Valhalla IIII! - (Dungeons & Dragons BBS) - bbs.valhallabbs.com:26
Valhalla Home Services Web! - http://bbs.valhallabbs.com
A Gamers Paradise - Over 150 Registered Online Game Doors!
Home Of Odin's Maze Game Server!

--- The truth will set you free. But first it'll piss you off.
■ Synchronet ■ Valhalla Home Services ■ USA ■ http://valhalla.synchro.net

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor