home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Mail / appnmail-1.8-Solaris / mailapp-utilities / optutil.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-04  |  797 b   |  28 lines

  1. /*+++*
  2.  *  title:    optutil.h
  3.  *  RCS         optutil.h,v 1.1 1996/12/01 17:03:27 tom Exp
  4.  *  abstract:    command-line option handling support stuff.
  5.  *  author:    Tom Hageman, The Netherlands <tom@basil.icce.rug.nl>
  6.  *  created:    November 1996
  7.  *  modified:    
  8.  *---*/
  9.  
  10. #define EXIT_USAGE    2
  11.  
  12. // dummy exit codes -- the calling process never sees these.
  13. #define EXIT_HELP    (-2)
  14. #define EXIT_VERSION    (-3)
  15.  
  16. //extern int getopt(int ac,char *av[],char *opts);
  17. //extern int optind;
  18. //extern char *optarg;
  19.  
  20. const char *basename(const char *path);
  21.  
  22. extern const char *_progname;
  23.  
  24. static inline void set_progname(const char *name)  { _progname=basename(name); }
  25. static inline const char *progname()               { return _progname; }
  26.  
  27. void handle_usage_help_version(int what, const char *usage, const char *help);
  28.