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

« back to all changes in this revision

Viewing changes to tests/test_conf_parser.c

  • 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:
18
18
  struct test_conf_parser_cmd_parser_params *params;
19
19
  
20
20
  /* initialize the parameters structure */
21
 
  params = test_conf_parser_cmd_parser_params_init();
 
21
  params = test_conf_parser_cmd_parser_params_create();
22
22
 
23
23
  /* call the command line parser */
24
24
  if (test_conf_parser_cmd_parser (argc, argv, &args_info) != 0) {
29
29
  /* 
30
30
     override command line options,
31
31
     but do not initialize args_info, check for required options.
32
 
     NOTICE: we might skip the 0 assignment, since the fields of the structure
33
 
     are already initialized to 0. 
 
32
     NOTICE: we must NOT skip the 0 assignment to initialize,
 
33
     since its default value is 1 and override defaults to 0
 
34
     while check_required is already set to its default value, 1
34
35
  */
35
36
  params->initialize = 0;
36
37
  params->override = 1;
37
 
  params->check_required = 1;
38
38
 
39
39
  /* call the config file parser */
40
40
  if (test_conf_parser_cmd_parser_config_file