cvs commit: src/usr.bin/chat Makefile chat.c
Chris Pressey
cpressey at crater.dragonflybsd.org
Fri Dec 31 16:14:18 PST 2004
cpressey 2004/12/31 16:13:49 PST
DragonFly src repository
Modified files:
usr.bin/chat Makefile chat.c
Log:
Use real getopt() handling instead of the hand-rolled and IOCCC-worthy
"Micro getopt()" macros. In the process, clean up the option-handling
code:
- Sort the options in the switch statement;
- Plug piddling memory leaks when processing repeated options by
freeing strings before allocating them for a second time;
- Die with a fatal error if the requested report file cannot be
opened for appending;
- Don't call init() before usage() (to prevent the usage message
being mangled by changes to the terminal settings;)
- Raise WARNS to 6.
Revision Changes Path
1.4 +1 -0 src/usr.bin/chat/Makefile
1.11 +51 -61 src/usr.bin/chat/chat.c
http://www.dragonflybsd.org/cvsweb/src/usr.bin/chat/Makefile.diff?r1=1.3&r2=1.4&f=u
http://www.dragonflybsd.org/cvsweb/src/usr.bin/chat/chat.c.diff?r1=1.10&r2=1.11&f=u
More information about the Commits
mailing list