home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8712 / mkmf / 1 / src / badopt.c next >
Encoding:
C/C++ Source or Header  |  1990-07-13  |  501 b   |  24 lines

  1. /* $Header: badopt.c,v 1.2 85/04/02 07:45:43 nicklin Exp $ */
  2.  
  3. /*
  4.  * Author: Peter J. Nicklin
  5.  */
  6.  
  7. /*
  8.  * badopt() places a "bad option" error message on the standard error
  9.  * output stream stderr.
  10.  */
  11. #include <stdio.h>
  12. #include "null.h"
  13.  
  14. extern char *PGN;            /* program name */
  15.  
  16. badopt(sign, c)
  17.     char c;                /* offending option */
  18.     char sign;            /* '+' or '-' sign preceding option */
  19. {
  20.     if (PGN != NULL && *PGN != '\0')
  21.         fprintf(stderr, "%s: ", PGN);
  22.     fprintf(stderr, "bad option %c%c\n", sign, c);
  23. }
  24.