--------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F4200038 Date: 03/29/98 From: GEORGE WHITE Time: 11:27am \/To: BOB STOUT (Read 2 times) Subj: SNIPPETS filelist() Hi Bob, I've just been checking the SNIPPETS filelist.c code and found a problem with the test harness :-(. I suspect an extranious "=" crept in behind your back :-). If there are no matches in Get_FileList() or a malloc() fails Get_FileList() returns 0 and leaves list pointer uninitialised or set to NULL respectively. This causes a null pointer assignment error under Borland C when Free_FileList() gets called incorrectly. To show usage correctly change: nFiles = Get_FileList(plist, argv + 1, argc - 1, _A_FILE); if (nFiles >= 0) { to nFiles = Get_FileList(plist, argv + 1, argc - 1, _A_FILE); if (nFiles > 0) /* Only if files found and no other error */ { Get_FileList() has no way of returning a negative number as coded, so the error reporting "else" condition cannot be reached without the change... George ps Did you get the email from me about atotm() ? pps Was this a test "bug" in a "Find the Bug" competition :-) * SLMR 2.1a * Wastebasket: Something to throw things near. --- Maximus/2 3.01 * Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F4200039 Date: 03/30/98 From: TOM TORFS Time: 10:09pm \/To: BRIAN MCCLOUD (Read 2 times) Subj: obfuscated C Brian McCloud wrote in a message to All: BM> Can some of you send me (or tell me where to find) good examples of BM> "obfuscated" C code? Go have a look at: http://reality.sgi.com/csp/ioccc Alternatively, send an email to judges@toad.com with subject "send all winners" to get all previous International Obfuscated C Coding Contest winners. greetings, Tom tomtorfs@village.uunet.be --- timEd/2 1.10+ * Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F4200040 Date: 03/30/98 From: TOM TORFS Time: 10:12pm \/To: DAVID VAN HOOSE (Read 2 times) Subj: -getch() David Van Hoose wrote in a message to Roger Scudder: DVH> cprintf() is not borland specific. It is in _ALL_ C libraries. Not at all. Maybe the compilers you've encountered all implement some form of cprintf(), but that's no reason to conclude that all C libraries do, because they don't. Besides, even on those systems that do implement cprintf(), its behaviour often differs. greetings, Tom tomtorfs@village.uunet.be --- timEd/2 1.10+ * Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F4200041 Date: 03/30/98 From: TOM TORFS Time: 10:23pm \/To: JUHA-MATTI TAPIO (Read 2 times) Subj: free'ing memory Juha-Matti Tapio wrote in a message to All: JT> Since it's good coding practise to free() everything allocated with JT> malloc(), should I also free() those blocks of memory which are JT> allocated by other functions (such as fopen())? No, with possible exception of hideous language extensions like strdup(), all memory allocated by standard library functions (e.g. fopen()) should be freed by other standard library functions (e.g. fclose()), never directly. greetings, Tom tomtorfs@village.uunet.be --- timEd/2 1.10+ * Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F4200042 Date: 03/30/98 From: TOM TORFS Time: 10:25pm \/To: RICHARD VETO (Read 2 times) Subj: Programming Richard Veto wrote in a message to All: RV> This inventory is an array within the player structure. The RV> problem is, the inventory can have armor, weapons, wands, rings; RV> each of which are different structures. How do I link all those RV> structures to reflect in the player inventory? Do I use a union? That seems like a good way to do this, yes. You could also do some juggling with void pointers, but that way you'll lose all type information. greetings, Tom tomtorfs@village.uunet.be --- timEd/2 1.10+ * Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F4200043 Date: 03/30/98 From: TOM TORFS Time: 10:26pm \/To: RUSS WUERTZ (Read 2 times) Subj: ASP Russ Wuertz wrote in a message to All: RW> What struggling programmers and their small companies need is RW> some organization to take over support of their programs RW> Is there any Association now that does such a thing? Why RW> don't you start one up? Discuss this elsewhere, please. It is off-topic here. greetings, Tom tomtorfs@village.uunet.be --- timEd/2 1.10+ * Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F4200044 Date: 03/30/98 From: TOM TORFS Time: 10:28pm \/To: DAVID VAN HOOSE (Read 2 times) Subj: MIDI David Van Hoose wrote in a message to Herman Schonfeld: DVH> Whoever wrote this is a complete moron for three reasons. That was uncalled for. I won't tolerate this sort of personal attack. I trust you won't repeat it. Others, please don't react in public to such statements. greetings, Tom tomtorfs@village.uunet.be --- timEd/2 1.10+ * Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F4200045 Date: 03/30/98 From: TOM TORFS Time: 10:34pm \/To: ALL (Read 2 times) Subj: Off-topic: MIDI Jasen Betts wrote in a message to ADAM MAJER: AM> PS If you don't like windows because it's owned by Microsoft, you can't AM> like dos either. It's owned by Microsoft too. Dos was actually the AM> software package that started Microsoft :) JB> No Miscrosoft BASIC was the start of microsoft, (and I, also, don't JB> like that either) This thread is off-topic. Please end it or move it elsewhere. Thanks for your cooperation. greetings, Tom tomtorfs@village.uunet.be --- timEd/2 1.10+ * Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F4200046 Date: 03/30/98 From: TOM TORFS Time: 10:34pm \/To: ALL (Read 2 times) Subj: administrative info Hello All! As requested by someone, from now on all messages from me as moderator will be clearly marked as such, to avoid confusion. Also as requested by that same person - who probably knows what's best from his own experience - off-topic threads will from now on be dealt with in the echo (so that all participants are aware the thread is off-topic), and by the principal moderator (=me) only, since often people from different zones participate in an off-topic thread. greetings, Tom tomtorfs@village.uunet.be --- timEd/2 1.10+ * Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F4200047 Date: 03/31/98 From: MARC STEPHEN Time: 05:23pm \/To: TOM TORFS (Read 2 times) Subj: music wat the? --- * Origin: RemoteAccess (64-3-3493236) V32B V42B CHCH,New Zealand (3:770/116)