TIP: Click on subject to list as thread! ANSI
echo: locsysop
to: Paul Edwards
from: Bob Lawrence
date: 1996-10-29 08:46:28
subject: Special Requests

BL> I have no idea what your files.20 format may be, but if it
 BL> creates a text file with length in that file, then it must be
 BL> possible to find the entry in the original format... whatever
 BL> it is that causes "archived" to appear in the output.

 PE> No, "I" just specify the name of the file and the description.
 PE> The file-list-generator finds out the size etc itself. At that
 PE> point I decided to go with a "DELETE THIS FILE" description as
 PE> the easiest option for me.

  That's alright! All you have to do is strip "-- archived --" lines
from FILE.TXT, save the name from that line, and use the name to strip
that entry from files.20. You could even keep a list of the names of
the files you've wiped in a separate file.

 PE> DOWNSORT was not written by me. It is a native OS/2 program. I
 PE> am happy to replace it with your native OS/2 program that does
 PE> the same thing, only better. You just haven't sent it to me,
 PE> yet. 

  Gee! You mean write a one-page utility in C... like the big boys!!

 PE> ??? I think you need to look up fgets() and strstr(). Anyway,
 PE> that's not where I want it fixed. 

  Oh! fgets(), fputs() and strstr()! It's a beauty! All this and
strtok() too! What 's your problem, then? This is shit easy. All you
need is a file name you can use instead of "DELETE THIS FUCKING FILE".

 PE> I'll post files.20 here for you... 

 PE> MS180396.PRN  Microsol price list
 PE> MS180396.WRI  Microsol price list
 PE> MUF17.ZIP [00] Microsoft DOS undocumented features

  Ahh! So that's what the FILES.20 means... it just does the "20"
section. Too easy... scan FILES.TXT fo find the "-- archived --"
markers in the "20" sectipon, use strstr() to list the file names in
an array, and then remove those lines from files.20. That way, all we
have to do is send a zero-length file like before.

... [later]

  Seeing you're so uncreative, I did it for you. Borland reckons it's
ANSI C so you ought to be able to compile it for OS/2. I've erased
your original message, and I can't remember what you did in you BAT
file, so you'll have to rewrite that for yourself.

  nullzero.c takes the full path of FILES.TXT as a command line
parameter and only looks in Special Requests. NULLZERO.EXE goes in the
same directory as FILES.20 and creates the modified file as TEMP.20.
It leaves FILES.TXT as it is, the same as your BAT file.

  All you have to do is erase your zero-length files, run DOWNSORT
to create FILES.TXT, run  NULLZERO c:\arseup\files.txt and then erase
the old files.20 and rename temp.20 to files.20 in your BAT file.

btw, the EXE is twice the size of the Pascal version and it runs a bit
slower.

section 1 of 1 of file nullzero.zip  

begin 644 nullzero.zip
M4$L#!!0````(`(X]72'6\JWR-0(``",%```*````3E5,3%I%4D\N0YU3W6K;
M,!2^=B#OBC*89E-%"(6R09C!HZ,U{at}$H%##S0*MYR$
M-U?+JSEW'J]-F-`5:%S9AGHU&:{at}.#A%=Z/E]R6D)3H-$EIFPHHA
M,,QNC83$'78U)0$A809<:29)55N"0D-CPRB"V0R^?)O/O1KNY6"/F3$8="{at}+
M/J=2*{at}L.Z4W&{at}SS![5C'[O"*8[.CAFS#;$E<[V+`?L4HL\813H#!
MUU^&O^!.,RK2'!;LQY:5M{at}P;$(^=N$*2J':]!Q{at}.<<`T$T]L#<,A)OO``&.L
M>FS"P!>"3SW2\Q66U)K"W
M{at}W]?0:X,$%'M+PBX!(F?P2`"-[.#D=7#%JMF/N6CJ.?#];:%QEH=K+N[\'I.
M$7##&&E!IX>#`V][O*9(]X\AYA]02P$"%``4````"`"./5TAUO*M\C4"```C
M!0``"{at}`````````!`"``````````3E5,3%I%4D\N0U!+!08``````0`!`#{at}`
(``!=`{at}````"+
`
end
sum -r/size 34856/973 section (from "begin" to "end")
sum -r/size 51738/683 entire input file

Regards,
Bob
@EOT:

---
* Origin: Precision Nonsense, Sydney (3:711/934.12)
SEEN-BY: 711/934 712/610
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.