home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Mail / mailapp-utilities-2.1-MIHS / Source / optutil.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-31  |  799 b   |  29 lines

  1. /*+++*
  2.  *  title:    optutil.h
  3.  *  RCS         optutil.h,v 1.2 1997/05/31 21:52:31 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:    31 May 1997
  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. const char *basename(const char *path);
  17.  
  18. extern const char *_progname;
  19.  
  20. #if __GNUC__
  21. static inline void set_progname(const char *name)  { _progname=basename(name); }
  22. static inline const char *progname()               { return _progname; }
  23. #else
  24. void set_progname(const char *name);
  25. const char *progname();
  26. #endif
  27.  
  28. void handle_usage_help_version(int what, const char *usage, const char *help);
  29.