Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. /* last review : october 29th, 2002 */
  2.  
  3. #ifndef _GETOPT_H_
  4. #define _GETOPT_H_
  5.  
  6. typedef struct option
  7. {
  8.         const char *name;
  9.         int has_arg;
  10.         int *flag;
  11.         int val;
  12. }option_t;
  13.  
  14. #define NO_ARG  0
  15. #define REQ_ARG 1
  16. #define OPT_ARG 2
  17.  
  18. extern int opterr;
  19. extern int optind;
  20. extern int optopt;
  21. extern int optreset;
  22. extern char *optarg;
  23.  
  24. extern int getopt(int nargc, char *const *nargv, const char *ostr);
  25. extern int getopt_long(int argc, char * const argv[], const char *optstring,
  26.                         const struct option *longopts, int totlen);
  27. extern void reset_options_reading();
  28.  
  29. #endif                          /* _GETOPT_H_ */
  30.