AT2k Design BBS Message Area
Casually read the BBS message area using an easy to use interface. Messages are categorized exactly like they are on the BBS. You may post new messages or reply to existing messages! You are not logged in. Login here for full access privileges. |
Previous Message | Next Message | Back to Computer Support/Help/Discussion... <-- <--- | Return to Home Page |
|
||||||
From | To | Subject | Date/Time | |||
Nick Andre | All | Frommax source code |
July 26, 2023 5:45 PM * |
|||
I forget who asked me for this... Sean? Freepascal util to convert Maximum FILES.BBS to a more standard format. Enjoy... program frommax; uses dos; (* ConstStr is a function that returns a string of char, N many times. *) function conststr(c : char; n : byte) : string; var s : string; begin if n<0 then n:=0; s[0]:=chr(n); fillchar(s[1],n,c); conststr:=s; end; var bbsfilein,bbsfileout : text; c : char; x : integer; (* Think of X as the cursor column position on a line and assume an 80 *) (* column display. We first open files and then begin a loop to read one *) (* character at a time. As the character is read, X is incremented. When *) (* we reach column 60, we write a CR+LF and 13 spaces and set X to 13. *) (* *) (* If you do not want to filter leading blank-spaces on the description *) (* lines, remove the "Repeat until" block. *) begin writeln('FROMMAX: Convert Maximus FILES.BBS to "standard" FILES.NEW'; writeln;assign(bbsfilein,'FILES.BBS'; (*$I-*) reset(bbsfilein); if ioresult=0 then begin assign(bbsfileout,'FILES.NEW'; (*$I-*) rewrite(bbsfileout); if ioresult=0 then begin x:=0; while not eof(bbsfilein) do begin x:=x+1; read(bbsfilein,c); if (x=14) and (c=chr(32)) then begin repeat read(bbsfilein,c); until (c<>chr(32)); end; if (c=chr(13)) or (c=chr(10)) then x:=0; if x<61 then write(bbsfileout,c); if (x=60) then begin write(bbsfileout,chr(13)+chr(10)+conststr(' ',13)); x:=13; end; end; close(bbsfilein);writeln('Done.'; end else writeln('Error writing FILES.NEW'; end else writeln('Error loading FILES.BBS'; close(bbsfileout); end. Nick --- Renegade vY2Ka2 * Origin: Joey, do you like movies about gladiators? (618:500/24) |
||||||
|
Previous Message | Next Message | Back to Computer Support/Help/Discussion... <-- <--- | Return to Home Page |
Execution Time: 0.0162 seconds If you experience any problems with this website or need help, contact the webmaster. VADV-PHP Copyright © 2002-2024 Steve Winn, Aspect Technologies. All Rights Reserved. Virtual Advanced Copyright © 1995-1997 Roland De Graaf. |