aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-04-22 12:48:28 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-04-22 12:48:28 +0000
commit5fe3a1415d2bcde0bc95658bbdaab36bdce2fbcd (patch)
treef4d80a45ad78c304d49168418901fdde096a9ba8 /src/main.c
parenteb53f5e4b9291c6793b7826826db26bc2311fff0 (diff)
downloadcflow-5fe3a1415d2bcde0bc95658bbdaab36bdce2fbcd.tar.gz
cflow-5fe3a1415d2bcde0bc95658bbdaab36bdce2fbcd.tar.bz2
Add gettext markers
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c100
1 files changed, 52 insertions, 48 deletions
<
diff --git a/src/main.c b/src/main.c
index f6a9d8d..be34831 100644
--- a/src/main.c
+++ b/src/main.c
@@ -33,79 +33,79 @@ static char doc[] = "";
33static struct argp_option options[] = { 33static struct argp_option options[] = {
34#define GROUP_ID 0 34#define GROUP_ID 0
35 { NULL, 0, NULL, 0, 35 { NULL, 0, NULL, 0,
36 "General options:", GROUP_ID }, 36 N_("General options:"), GROUP_ID },
37 { "depth", 'd', "NUMBER", 0, 37 { "depth", 'd', N_("NUMBER"), 0,
38 "set the depth at which the flowgraph is cut off.", GROUP_ID+1 }, 38 N_("Set the depth at which the flowgraph is cut off."), GROUP_ID+1 },
39 { "include", 'i', "SPEC", 0, 39 { "include", 'i', N_("SPEC"), 0,
40 "Increase the number of included symbols. SPEC is a string consisting of the following characters: x (include external and static data symbols), and _ (include names that begin with an underscore). If SPEC starts with ^, its meaning is reversed", GROUP_ID+1 }, 40 N_("Increase the number of included symbols. SPEC is a string consisting of the following characters: x (include external and static data symbols), and _ (include names that begin with an underscore). If SPEC starts with ^, its meaning is reversed"), GROUP_ID+1 },
41 { "format", 'f', "NAME", 0, 41 { "format", 'f', N_("NAME"), 0,
42 "use given output format NAME. Valid names are gnu (default) and posix", 42 N_("Use given output format NAME. Valid names are gnu (default) and posix"),
43 GROUP_ID+1 }, 43 GROUP_ID+1 },
44 { "reverse", 'r', NULL, 0, 44 { "reverse", 'r', NULL, 0,
45 "Print reverse call tree", GROUP_ID+1 }, 45 N_("Print reverse call tree"), GROUP_ID+1 },
46 { "xref", 'x', NULL, 0, 46 { "xref", 'x', NULL, 0,
47 "produce cross-reference listing only", GROUP_ID+1 }, 47 N_("Produce cross-reference listing only"), GROUP_ID+1 },
48 { "print", 'P', "OPT", 0, 48 { "print", 'P', "OPT", 0,
49 "Set printing option to OPT. Valid OPT values are: xref (or cross-ref), tree. Any unambiguous abbreviation of the above is also accepted", 49 N_("Set printing option to OPT. Valid OPT values are: xref (or cross-ref), tree. Any unambiguous abbreviation of the above is also accepted"),
50 GROUP_ID+1 }, 50 GROUP_ID+1 },
51 { "output", 'o', "FILE", 0, 51 { "output", 'o', "FILE", 0,
52 "set output file name (default -, meaning stdout)", 52 N_("Set output file name (default -, meaning stdout)"),
53 GROUP_ID+1 }, 53 GROUP_ID+1 },
54#undef GROUP_ID 54#undef GROUP_ID
55#define GROUP_ID 10 55#define GROUP_ID 10
56 { NULL, 0, NULL, 0, 56 { NULL, 0, NULL, 0,
57 "Parser control:", GROUP_ID }, 57 N_("Parser control:"), GROUP_ID },
58 { "use-indentation", 'S', "BOOL", OPTION_ARG_OPTIONAL, 58 { "use-indentation", 'S', N_("BOOL"), OPTION_ARG_OPTIONAL,
59 "rely on indentation", GROUP_ID+1 }, 59 N_("Rely on indentation"), GROUP_ID+1 },
60 { "ansi", 'a', NULL, 0, 60 { "ansi", 'a', NULL, 0,
61 "Assume input to be written in ANSI C", GROUP_ID+1 }, 61 N_("Assume input to be written in ANSI C"), GROUP_ID+1 },
62 { "pushdown", 'p', "NUMBER", 0, 62 { "pushdown", 'p', "NUMBER", 0,
63 "set initial token stack size to NUMBER", GROUP_ID+1 }, 63 N_("Set initial token stack size to NUMBER"), GROUP_ID+1 },
64 { "symbol", 's', "SYM:TYPE", 0, 64 { "symbol", 's', "SYM:TYPE", 0,
65 "make cflow believe the symbol SYM is of type TYPE. Valid types are: keyword (or kw), modifier, identifier, type, wrapper. Any unambiguous abbreviation of the above is also accepted", GROUP_ID+1 }, 65 N_("Make cflow believe the symbol SYM is of type TYPE. Valid types are: keyword (or kw), modifier, identifier, type, wrapper. Any unambiguous abbreviation of the above is also accepted"), GROUP_ID+1 },
66 { "main", 'm', "NAME", 0, 66 { "main", 'm', N_("NAME"), 0,
67 "Assume main function to be called NAME", GROUP_ID+1 }, 67 N_("Assume main function to be called NAME"), GROUP_ID+1 },
68 { "define", 'D', "NAME[=DEFN]", 0, 68 { "define", 'D', "NAME[=DEFN]", 0,
69 "Predefine NAME as a macro.", GROUP_ID+1 }, 69 N_("Predefine NAME as a macro"), GROUP_ID+1 },
70 { "undefine", 'U', "NAME", 0, 70 { "undefine", 'U', "NAME", 0,
71 "Cancel any previous definition of NAME", GROUP_ID+1 }, 71 N_("Cancel any previous definition of NAME"), GROUP_ID+1 },
72 { "include-dir", 'I', "DIR", 0, 72 { "include-dir", 'I', "DIR", 0,
73 "Add the directory dir to the list of directories to be searched for header files.", GROUP_ID+1 }, 73 N_("Add the directory dir to the list of directories to be searched for header files."), GROUP_ID+1 },
74 { "preprocess", OPT_PREPROCESS, "COMMAND", OPTION_ARG_OPTIONAL, 74 { "preprocess", OPT_PREPROCESS, "COMMAND", OPTION_ARG_OPTIONAL,
75 "Run the specified preprocessor command", GROUP_ID+1 }, 75 N_("Run the specified preprocessor command"), GROUP_ID+1 },
76 { "cpp", 0, NULL, OPTION_ALIAS, NULL, GROUP_ID+1 }, 76 { "cpp", 0, NULL, OPTION_ALIAS, NULL, GROUP_ID+1 },
77 { "no-preprocess", OPT_NO_PREPROCESS, NULL, 0, 77 { "no-preprocess", OPT_NO_PREPROCESS, NULL, 0,
78 "Do not preprocess the sources", GROUP_ID+1 }, 78 N_("Do not preprocess the sources"), GROUP_ID+1 },
79 { "no-cpp", 0, NULL, OPTION_ALIAS, NULL, GROUP_ID+1 }, 79 { "no-cpp", 0, NULL, OPTION_ALIAS, NULL, GROUP_ID+1 },
80#undef GROUP_ID 80#undef GROUP_ID
81#define GROUP_ID 20 81#define GROUP_ID 20
82 { NULL, 0, NULL, 0, 82 { NULL, 0, NULL, 0,
83 "Output control:", GROUP_ID }, 83 N_("Output control:"), GROUP_ID },
84 { "number", 'n', "BOOL", OPTION_ARG_OPTIONAL, 84 { "number", 'n', N_("BOOL"), OPTION_ARG_OPTIONAL,
85 "Print line numbers", GROUP_ID+1 }, 85 N_("Print line numbers"), GROUP_ID+1 },
86 { "print-level", 'l', NULL, 0, 86 { "print-level", 'l', NULL, 0,
87 "Print nesting level along with the call tree", GROUP_ID+1 }, 87 N_("Print nesting level along with the call tree"), GROUP_ID+1 },
88 { "level-indent", OPT_LEVEL_INDENT, "STRING", 0, 88 { "level-indent", OPT_LEVEL_INDENT, "STRING", 0,
89 "Use STRING when indenting to each new level", GROUP_ID+1 }, 89 N_("Use STRING when indenting to each new level"), GROUP_ID+1 },
90 { "tree", 'T', NULL, 0, 90 { "tree", 'T', NULL, 0,
91 "Draw tree", GROUP_ID+1 }, 91 N_("Draw tree"), GROUP_ID+1 },
92 { "brief", 'b', "BOOL", OPTION_ARG_OPTIONAL, 92 { "brief", 'b', "BOOL", OPTION_ARG_OPTIONAL,
93 "brief output", GROUP_ID+1 }, 93 N_("Brief output"), GROUP_ID+1 },
94#undef GROUP_ID 94#undef GROUP_ID
95#define GROUP_ID 30 95#define GROUP_ID 30
96 { NULL, 0, NULL, 0, 96 { NULL, 0, NULL, 0,
97 "Informational options:", GROUP_ID }, 97 N_("Informational options:"), GROUP_ID },
98 { "verbose", 'v', NULL, 0, 98 { "verbose", 'v', NULL, 0,
99 "be verbose on output", GROUP_ID+1 }, 99 N_("Be verbose on output"), GROUP_ID+1 },
100 { "license", 'L', 0, 0, 100 { "license", 'L', 0, 0,
101 "Print license and exit", GROUP_ID+1 }, 101 N_("Print license and exit"), GROUP_ID+1 },
102 { "debug", OPT_DEBUG, "NUMBER", OPTION_ARG_OPTIONAL, 102 { "debug", OPT_DEBUG, "NUMBER", OPTION_ARG_OPTIONAL,
103 "set debugging level", GROUP_ID+1 }, 103 N_("Set debugging level"), GROUP_ID+1 },
104#undef GROUP_ID 104#undef GROUP_ID
105 { 0, } 105 { 0, }
106}; 106};
107 107
108char *cflow_license_text = 108char *cflow_license_text = N_(
109" GNU cflow is free software; you can redistribute it and/or modify\n" 109" GNU cflow is free software; you can redistribute it and/or modify\n"
110" it under the terms of the GNU General Public License as published by\n" 110" it under the terms of the GNU General Public License as published by\n"
111" the Free Software Foundation; either version 2 of the License, or\n" 111" the Free Software Foundation; either version 2 of the License, or\n"
@@ -118,7 +118,7 @@ char *cflow_license_text =
118"\n" 118"\n"
119" You should have received a copy of the GNU General Public License\n" 119" You should have received a copy of the GNU General Public License\n"
120" along with GNU cflow; if not, write to the Free Software\n" 120" along with GNU cflow; if not, write to the Free Software\n"
121" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n"; 121" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n");
122 122
123/* Structure representing various arguments of command line options */ 123/* Structure representing various arguments of command line options */
124struct option_type { 124struct option_type {
@@ -211,7 +211,7 @@ symbol_override(const char *str)
211 if (*ptr == ':') { 211 if (*ptr == ':') {
212 type = find_option_type(symbol_optype, ptr+1, 0); 212 type = find_option_type(symbol_optype, ptr+1, 0);
213 if (type == 0) { 213 if (type == 0) {
214 error(0, 0, "unknown symbol type: %s", ptr+1); 214 error(0, 0, _("unknown symbol type: %s"), ptr+1);
215 return; 215 return;
216 } 216 }
217 } else 217 } else
@@ -240,7 +240,7 @@ set_print_option(char *str)
240 240
241 opt = find_option_type(print_optype, str, 0); 241 opt = find_option_type(print_optype, str, 0);
242 if (opt == 0) { 242 if (opt == 0) {
243 error(0, 0, "unknown print option: %s", str); 243 error(0, 0, _("unknown print option: %s"), str);
244 return; 244 return;
245 } 245 }
246 print_option |= opt; 246 print_option |= opt;
@@ -362,7 +362,7 @@ parse_level_string(const char *str, char **return_ptr)
362 for (i = 1; i < num; i++) { 362 for (i = 1; i < num; i++) {
363 *p++ = c; 363 *p++ = c;
364 if (*p == 0) { 364 if (*p == 0) {
365 error(1, 0, "level indent string too long"); 365 error(1, 0, _("level indent string too long"));
366 return; 366 return;
367 } 367 }
368 } 368 }
@@ -371,7 +371,7 @@ parse_level_string(const char *str, char **return_ptr)
371 copy: 371 copy:
372 *p++ = *str++; 372 *p++ = *str++;
373 if (*p == 0) { 373 if (*p == 0) {
374 error(1, 0, "level indent string is too long"); 374 error(1, 0, _("level indent string is too long"));
375 return; 375 return;
376 } 376 }
377 } 377 }
@@ -399,7 +399,7 @@ set_level_indent(const char *str)
399 p = str; 399 p = str;
400 while (*p != '=') { 400 while (*p != '=') {
401 if (*p == 0) { 401 if (*p == 0) {
402 error(1, 0, "level-indent syntax"); 402 error(1, 0, _("level-indent syntax"));
403 return; 403 return;
404 } 404 }
405 p++; 405 p++;
@@ -423,7 +423,7 @@ set_level_indent(const char *str)
423 parse_level_string(p, &level_end[1]); 423 parse_level_string(p, &level_end[1]);
424 break; 424 break;
425 default: 425 default:
426 error(1, 0, "unknown level indent option: %s", str); 426 error(1, 0, _("unknown level indent option: %s"), str);
427 } 427 }
428} 428}
429 429
@@ -454,7 +454,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
454 debug = arg ? atoi(arg) : 1; 454 debug = arg ? atoi(arg) : 1;
455 break; 455 break;
456 case 'L': 456 case 'L':
457 printf("License for %s:\n\n", argp_program_version); 457 printf(_("License for %s:\n\n"), argp_program_version);
458 printf("%s", cflow_license_text); 458 printf("%s", cflow_license_text);
459 exit(0); 459 exit(0);
460 case 'P': 460 case 'P':
@@ -483,7 +483,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
483 break; 483 break;
484 case 'f': 484 case 'f':
485 if (select_output_driver(arg)) 485 if (select_output_driver(arg))
486 argp_error(state, "%s: No such output driver", optarg); 486 argp_error(state, _("%s: No such output driver"), optarg);
487 else if (strcmp(arg, "posix") == 0) 487 else if (strcmp(arg, "posix") == 0)
488 brief_listing = print_line_numbers = 1; 488 brief_listing = print_line_numbers = 1;
489 break; 489 break;