| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | fconf2maximus |
Hello Wes! 22 Jun 03 10:00, you wrote to me: WG> Good work! Thanks :) Fidoconfig is quite easy to use. >> * To avoid it crashes under strcmp, because argv[i] is null */ WG> argv[argc] by definition is NULL. Change your loop invariant to "i < WG> argc", and you can remove that check. Oh you're right. But this program is just a quick and dirty one :) WG> Also, you should learn how to use getopt() to process your argument WG> vector; it's the "standard" way of doing things under UNIX, and is WG> completely portable as long as you don't rely on the getopt_long() WG> extensions (e.g. --option-name) under Linux. getopt() will documented WG> in your man pages, probably in section 2. Oh that's quite nice, it's in section 1. WG> After you open your file, it is always a very good idea to lock it! WG> flock() is moderately portable, and if you are on a platform which is WG> missing it, linking with libcompat.so from the Maximus distribution WG> will provide it. (Alternatively, you could also use sopen() in that WG> same library, but I wouldn't recommend it). Somekind of semaphore? WG> A few options exist for your style of output: WG> - open the file and block until you can overwrite it WG> - open the file, and fail if somebody else has it locked WG> - create a temp file, and move it over when you're done, after you WG> have a lock on the target. Oh ok :) That's real multiuser programming :) .... WG> ...you get the idea. BTW, no critcism here, just a guy who's been WG> around the block a few times helping out the younger generation. :) the BASIC-generation :) Regards, Bo --- GoldED+/LNX 1.1.5* Origin: The Night Express * Roennede DK * telnet geekworld.dk (2:236/100) SEEN-BY: 633/267 270 @PATH: 236/100 237/9 20/11 106/1 2000 633/267 |
|
| 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™.