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

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /************************************************************************/
  4. /*                                                                      */
  5. /*  MFLFILES Header file                                                */
  6. /*                                                                      */
  7. /*  Function prototypes for file system access functions.               */
  8. /*                                                                      */
  9. /*  Original Copyright 1990-96 by Robert B. Stout as part of            */
  10. /*  the MicroFirm Function Library (MFL)                                */
  11. /*                                                                      */
  12. /*  The user is granted a free limited license to use this source file  */
  13. /*  to create royalty-free programs, subject to the terms of the        */
  14. /*  license restrictions specified in the LICENSE.MFL file.             */
  15. /*                                                                      */
  16. /************************************************************************/
  17.  
  18. #ifndef GETOPTS_H
  19. #define GETOPTS_H
  20.  
  21. #include <stdio.h>
  22. #include "sniptype.h"
  23. #include "extkword.h"
  24.  
  25. #if __cplusplus
  26.  extern "C" {
  27. #endif
  28.  
  29. /************************************************************************/
  30. /*                                                                      */
  31. /*  Process command line options and wildcard arguments                 */
  32. /*                                                                      */
  33. /************************************************************************/
  34.  
  35. typedef enum {
  36.       Error_Tag,
  37.       Boolean_Tag,
  38.       Int_Tag,
  39.       Short_Tag,
  40.       Long_Tag,
  41.       Byte_Tag,
  42.       Word_Tag,
  43.       DWord_Tag,
  44.       Float_Tag,
  45.       DFloat_Tag,
  46.       String_Tag
  47.       } TAG_TYPE;
  48.  
  49. struct Option_Tag {
  50.       int         letter;                 /* Option switch              */
  51.       Boolean_T   case_sense;             /* TRUE = case sensitive      */
  52.       TAG_TYPE    type;                   /* Type of option             */
  53.       void       *buf;                    /* Storage location           */
  54.       char       *min;                    /* Minimum value (string)     */
  55.       char       *max;                    /* Maximum value (string)     */
  56.       char       *Default;                /* Default value (string)     */
  57. };
  58.  
  59. extern struct Option_Tag options[];
  60.  
  61. extern int        xargc;
  62. extern char      *xargv[];
  63. extern Boolean_T  getopts_range_err;
  64. extern Boolean_T  xargs_on;
  65.  
  66. int    getopts(int, char *[]);
  67. double getopts_eval(char *str);
  68.  
  69. #if __cplusplus
  70.  }
  71. #endif
  72.  
  73. #endif /* GETOPTS_H */
  74.