home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / GETOPTSL.H < prev    next >
C/C++ Source or Header  |  1997-07-05  |  914b  |  39 lines

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /*
  4. **  GETOPTS.H
  5. **
  6. **  public domain by Bob Stout
  7. */
  8.  
  9. #ifndef GETOPTS__H
  10. #define GETOPTS__H
  11.  
  12. #include <stdlib.h>                       /* For size_t           */
  13. #include "sniptype.h"
  14.  
  15. typedef enum {
  16.       Error_Tag = -1,
  17.       Boolean_Tag,
  18.       Word_Tag,
  19.       DWord_Tag,
  20.       Double_Tag,
  21.       String_Tag
  22.       } TAG_TYPE;
  23.  
  24. struct Option_Tag {
  25.       int         letter;                 /* Option switch        */
  26.       TAG_TYPE    type;                   /* Type of option       */
  27.       void       *buf;                    /* Storage location     */
  28.       size_t      siz;                    /* Size of buffer (used
  29.                                              only for strings     */
  30. };
  31.  
  32. extern struct Option_Tag options[];
  33. extern int    xargc;
  34. extern char  *xargv[];
  35.  
  36. int getopts_lite(int, char *[]);
  37.  
  38. #endif /* GETOPTS__H */
  39.