cvs commit: src/usr.bin/chat Makefile chat.c

Chris Pressey cpressey at
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 
  Use real getopt() handling instead of the hand-rolled and IOCCC-worthy
  "Micro getopt()" macros.  In the process, clean up the option-handling
  - 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

More information about the Commits mailing list