aboutsummaryrefslogtreecommitdiff
path: root/gfsm/gfsm/src/programs/gfsmlabels_cmdparser.h
blob: 71f8d95595706ae62324600b49732d62606c011b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* -*- Mode: C -*-
 *
 * File: gfsmlabels_cmdparser.h
 * Description: Headers for command-line parser struct gengetopt_args_info.
 *
 * File autogenerated by optgen.perl version 0.06.
 *
 */

#ifndef gfsmlabels_cmdparser_h
#define gfsmlabels_cmdparser_h

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/*
 * moocow: Never set PACKAGE and VERSION here.
 */

struct gengetopt_args_info {
  char * labels_arg;	 /* Specify input alphabet (labels) file. (default=NULL). */
  int att_mode_flag;	 /* Parse string(s) in AT&T-compatible mode. (default=0). */
  int map_mode_flag;	 /* Output original strings in addition to label vectors. (default=0). */
  int quiet_flag;	 /* Suppress warnings about undefined symbols. (default=0). */
  char * output_arg;	 /* Specifiy output file (default=stdout). (default=-). */

  int help_given;	 /* Whether help was given */
  int version_given;	 /* Whether version was given */
  int labels_given;	 /* Whether labels was given */
  int att_mode_given;	 /* Whether att-mode was given */
  int map_mode_given;	 /* Whether map-mode was given */
  int quiet_given;	 /* Whether quiet was given */
  int output_given;	 /* Whether output was given */
  
  char **inputs;         /* unnamed arguments */
  unsigned inputs_num;   /* number of unnamed arguments */
};

/* read rc files (if any) and parse all command-line options in one swell foop */
int  cmdline_parser (int argc, char *const *argv, struct gengetopt_args_info *args_info);

/* instantiate defaults from environment variables: you must call this yourself! */
void cmdline_parser_envdefaults (struct gengetopt_args_info *args_info);

/* read a single rc-file */
void cmdline_parser_read_rcfile (const char *filename,
				    struct gengetopt_args_info *args_info,
				    int user_specified);

/* read a single rc-file (stream) */
void cmdline_parser_read_rc_stream (FILE *rcfile,
				       const char *filename,
				       struct gengetopt_args_info *args_info);

/* parse a single option */
int cmdline_parser_parse_option (char oshort, const char *olong, const char *val,
				    struct gengetopt_args_info *args_info);

/* print help message */
void cmdline_parser_print_help(void);

/* print version */
void cmdline_parser_print_version(void);

#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* gfsmlabels_cmdparser_h */