Use real getopt() handling instead of the hand-rolled and IOCCC-worthy
authorChris Pressey <cpressey@dragonflybsd.org>
Sat, 1 Jan 2005 00:13:49 +0000 (00:13 +0000)
committerChris Pressey <cpressey@dragonflybsd.org>
Sat, 1 Jan 2005 00:13:49 +0000 (00:13 +0000)
commit58554f95a3a5cea205bff782be2490b255a419f0
tree7870c6f33b8d0b7eb1a79c58588b23cbf560f57a
parent558b8e00e4766a511825830d37c16f9dae5faa38
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.
usr.bin/chat/Makefile
usr.bin/chat/chat.c