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

« back to all changes in this revision

Viewing changes to tests/no_multi_strings_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 */
41
43
  int multi_max; /**< @brief This is a multi option's maximum occurreces */
42
44
  const char *multi_help; /**< @brief This is a multi option help description.  */
43
45
  
44
 
  int help_given ;      /**< @brief Whether help was given.  */
45
 
  int version_given ;   /**< @brief Whether version was given.  */
46
 
  int test_given ;      /**< @brief Whether test was given.  */
 
46
  unsigned int help_given ;     /**< @brief Whether help was given.  */
 
47
  unsigned int version_given ;  /**< @brief Whether version was given.  */
 
48
  unsigned int test_given ;     /**< @brief Whether test was given.  */
47
49
  unsigned int multi_given ;    /**< @brief Whether multi was given.  */
48
50
 
49
51
  char **inputs ; /**< @brief unamed options (options without names) */
54
56
struct no_multi_strings_cmd_parser_params
55
57
{
56
58
  int override; /**< @brief whether to override possibly already present options (default 0) */
57
 
  int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 0) */
58
 
  int check_required; /**< @brief whether to check that all required options were provided (default 0) */
 
59
  int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
 
60
  int check_required; /**< @brief whether to check that all required options were provided (default 1) */
59
61
  int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
 
62
  int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
60
63
} ;
61
64
 
62
65
/** @brief the purpose string of the program */
104
107
  struct no_multi_strings_cmd_parser_params *params);
105
108
 
106
109
/**
 
110
 * Save the contents of the option struct into an already open FILE stream.
 
111
 * @param outfile the stream where to dump options
 
112
 * @param args_info the option struct to dump
 
113
 * @return 0 if everything went fine, NON 0 if an error took place
 
114
 */
 
115
int no_multi_strings_cmd_parser_dump(FILE *outfile,
 
116
  struct gengetopt_args_info *args_info);
 
117
 
 
118
/**
107
119
 * Save the contents of the option struct into a (text) file.
108
120
 * This file can be read by the config file parser (if generated by gengetopt)
109
121
 * @param filename the file where to save
123
135
void no_multi_strings_cmd_parser_print_version(void);
124
136
 
125
137
/**
 
138
 * Initializes all the fields a no_multi_strings_cmd_parser_params structure 
 
139
 * to their default values
 
140
 * @param params the structure to initialize
 
141
 */
 
142
void no_multi_strings_cmd_parser_params_init(struct no_multi_strings_cmd_parser_params *params);
 
143
 
 
144
/**
126
145
 * Allocates dynamically a no_multi_strings_cmd_parser_params structure and initializes
127
 
 * all its fields to 0
128
 
 * @return the initialized no_multi_strings_cmd_parser_params structure
 
146
 * all its fields to their default values
 
147
 * @return the created and initialized no_multi_strings_cmd_parser_params structure
129
148
 */
130
 
struct no_multi_strings_cmd_parser_params *no_multi_strings_cmd_parser_params_init();
 
149
struct no_multi_strings_cmd_parser_params *no_multi_strings_cmd_parser_params_create(void);
131
150
 
132
151
/**
133
152
 * Initializes the passed gengetopt_args_info structure's fields