TIP: Click on subject to list as thread! ANSI
echo: locsysop
to: Paul Edwards
from: Bob Lawrence
date: 1996-12-15 07:39:12
subject: TIC

PE> I'd prefer you just read the title from filearea.ctl

  Can you send me a sample of the format? But I need other info
for TIC anyway, like passwords and that....

 PE> and dispensed with the graphics headers

  The headers are the darling part... why dispense with them?

 PE> , and got the descriptions from files.bbs (BTW, the files.bbs
 PE> allows you to use wildcards, so that you can go FNEWS*.*
 PE> fidonews etc). You can use patmat() from OZPD to do this. 

  I don't care about files.bbs and I can't read C code, but I can
write it okay. My code will work in UNIX which was the whoile point, I
thought. I prefer to ignore files.bbs and possible errors, and use the
source itself: the directory with the actual files. I got it working 
really well yesterday... quick! Now all I have to do is build in some
really obscure bugs like a professional C programmer.

 BL> Is there a clever way to look for a particular line in a file?

 PE> No. If you had enough memory you could read it all in and do a
 PE> strchr() on '\n' as the fastest way of getting to the nth line.

  My memory sucks, but the computer's is alright so I use that. With 
FILES.TXT split into sections it'll fit in the heap okay. It goes 
against the grain to keep hopping up and down the list, looking, but
it's pretty fast anyway.

 PE> If you kept the description list sorted, then you could do a
 PE> binary search for an exact match.

  It *will* be sorted, from the last run through, but if a new file
has been added it could be out of step. I have to keep going back to
the start each time. I suppose I could try to be cunning and start at
the place I left off the last time... good idea! Most of the time that
will be faster.

 PE> But forget about that, it'll all be in cache anyway, and most
 PE> of my stuff is done with wildcards.

  Cache takes away the challenge. I have no idea what you mean by
wildcards. It reads *every* file in the directory.

Regards,
Bob
 

 
___ Blue Wave/QWK v2.12
@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™.