~ubuntu-branches/ubuntu/hardy/gengetopt/hardy

« back to all changes in this revision

Viewing changes to tests/test_groups_cmd.h.test

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-01-29 14:55:40 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080129145540-bkah1bl330gpelmh
Tags: 2.22-1ubuntu1
* Merge with Debian; remaining changes:
  - Fix build failures with g++-4.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#include "config.h"
14
14
#endif
15
15
 
 
16
#include <stdio.h> /* for FILE */
 
17
 
16
18
#ifdef __cplusplus
17
19
extern "C" {
18
20
#endif /* __cplusplus */
47
49
  const char *optc_help; /**< @brief string c help description.  */
48
50
  const char *optd_help; /**< @brief string d help description.  */
49
51
  
50
 
  int help_given ;      /**< @brief Whether help was given.  */
51
 
  int version_given ;   /**< @brief Whether version was given.  */
 
52
  unsigned int help_given ;     /**< @brief Whether help was given.  */
 
53
  unsigned int version_given ;  /**< @brief Whether version was given.  */
52
54
  unsigned int opta_given ;     /**< @brief Whether opta was given.  */
53
55
  int opta_group ; /**< @brief Whether opta's was updated.  */
54
 
  int optA_given ;      /**< @brief Whether optA was given.  */
 
56
  unsigned int optA_given ;     /**< @brief Whether optA was given.  */
55
57
  unsigned int optAmul_given ;  /**< @brief Whether optAmul was given.  */
56
58
  int optAmul_group ; /**< @brief Whether optAmul's was updated.  */
57
 
  int optb_given ;      /**< @brief Whether optb was given.  */
58
 
  int optc_given ;      /**< @brief Whether optc was given.  */
59
 
  int optd_given ;      /**< @brief Whether optd was given.  */
 
59
  unsigned int optb_given ;     /**< @brief Whether optb was given.  */
 
60
  unsigned int optc_given ;     /**< @brief Whether optc was given.  */
 
61
  unsigned int optd_given ;     /**< @brief Whether optd was given.  */
60
62
 
61
63
  char **inputs ; /**< @brief unamed options (options without names) */
62
64
  unsigned inputs_num ; /**< @brief unamed options number */
68
70
struct test_groups_cmd_parser_params
69
71
{
70
72
  int override; /**< @brief whether to override possibly already present options (default 0) */
71
 
  int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 0) */
72
 
  int check_required; /**< @brief whether to check that all required options were provided (default 0) */
 
73
  int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
 
74
  int check_required; /**< @brief whether to check that all required options were provided (default 1) */
73
75
  int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
 
76
  int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
74
77
} ;
75
78
 
76
79
/** @brief the purpose string of the program */
118
121
  struct test_groups_cmd_parser_params *params);
119
122
 
120
123
/**
 
124
 * Save the contents of the option struct into an already open FILE stream.
 
125
 * @param outfile the stream where to dump options
 
126
 * @param args_info the option struct to dump
 
127
 * @return 0 if everything went fine, NON 0 if an error took place
 
128
 */
 
129
int test_groups_cmd_parser_dump(FILE *outfile,
 
130
  struct gengetopt_args_info *args_info);
 
131
 
 
132
/**
121
133
 * Save the contents of the option struct into a (text) file.
122
134
 * This file can be read by the config file parser (if generated by gengetopt)
123
135
 * @param filename the file where to save
137
149
void test_groups_cmd_parser_print_version(void);
138
150
 
139
151
/**
 
152
 * Initializes all the fields a test_groups_cmd_parser_params structure 
 
153
 * to their default values
 
154
 * @param params the structure to initialize
 
155
 */
 
156
void test_groups_cmd_parser_params_init(struct test_groups_cmd_parser_params *params);
 
157
 
 
158
/**
140
159
 * Allocates dynamically a test_groups_cmd_parser_params structure and initializes
141
 
 * all its fields to 0
142
 
 * @return the initialized test_groups_cmd_parser_params structure
 
160
 * all its fields to their default values
 
161
 * @return the created and initialized test_groups_cmd_parser_params structure
143
162
 */
144
 
struct test_groups_cmd_parser_params *test_groups_cmd_parser_params_init();
 
163
struct test_groups_cmd_parser_params *test_groups_cmd_parser_params_create(void);
145
164
 
146
165
/**
147
166
 * Initializes the passed gengetopt_args_info structure's fields