~ubuntu-branches/ubuntu/saucy/gengetopt/saucy-proposed

« back to all changes in this revision

Viewing changes to tests/default_values_cmd.c.test

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2013-05-09 12:48:17 UTC
  • mfrom: (16.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130509124817-ex5jkvyh7cu8o22c
Tags: 2.22.6-2
* Upload to unstable.
* Fix VCS URLs.
* Bump Standards.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
const char *gengetopt_args_info_usage = "Usage: default_values [OPTIONS]... [FILES]...";
31
31
 
 
32
const char *gengetopt_args_info_versiontext = "";
 
33
 
32
34
const char *gengetopt_args_info_description = "";
33
35
 
34
36
const char *gengetopt_args_info_help[] = {
37
39
  "  -f, --foo=INT               foo option  (default=`15000')",
38
40
  "  -b, --bar=STRING            bar option  (default=`this is a default')",
39
41
  "  -F, --foo-opt[=INT]         foo option with optional arg  (default=`15000')",
40
 
  "  -B, --bar-opt[=STRING]      bar option with optional arg  (default=`this is a \n                                default')",
 
42
  "  -B, --bar-opt[=STRING]      bar option with optional arg  (default=`this is a\n                                default')",
41
43
  "      --foofloat=FLOAT        foo float option  (default=`15000')",
42
44
  "      --foodouble=DOUBLE      foo double option  (default=`15000')",
43
45
  "  -p, --pi=DOUBLE             PI option  (default=`3.1415926536')",
44
 
  "  -s, --timeout=123456789012  number of seconds after the scanning is cancelled \n                                if no progress is shown at all.  \n                                (default=`120')",
 
46
  "  -s, --timeout=123456789012  number of seconds after the scanning is cancelled\n                                if no progress is shown at all.\n                                (default=`120')",
45
47
    0
46
48
};
47
49
 
127
129
  printf ("%s %s\n",
128
130
     (strlen(DEFAULT_VALUES_CMD_PARSER_PACKAGE_NAME) ? DEFAULT_VALUES_CMD_PARSER_PACKAGE_NAME : DEFAULT_VALUES_CMD_PARSER_PACKAGE),
129
131
     DEFAULT_VALUES_CMD_PARSER_VERSION);
 
132
 
 
133
  if (strlen(gengetopt_args_info_versiontext) > 0)
 
134
    printf("\n%s\n", gengetopt_args_info_versiontext);
130
135
}
131
136
 
132
137
static void print_help_common(void) {
494
499
{
495
500
  int c;        /* Character of the parsed option.  */
496
501
 
497
 
  int error = 0;
 
502
  int error_occurred = 0;
498
503
  struct gengetopt_args_info local_args_info;
499
504
  
500
505
  int override;
672
677
 
673
678
  default_values_cmd_parser_release (&local_args_info);
674
679
 
675
 
  if ( error )
 
680
  if ( error_occurred )
676
681
    return (EXIT_FAILURE);
677
682
 
678
683
  if (optind < argc)