diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-04-22 12:48:28 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-04-22 12:48:28 +0000 |
commit | 5fe3a1415d2bcde0bc95658bbdaab36bdce2fbcd (patch) | |
tree | f4d80a45ad78c304d49168418901fdde096a9ba8 /src/main.c | |
parent | eb53f5e4b9291c6793b7826826db26bc2311fff0 (diff) | |
download | cflow-5fe3a1415d2bcde0bc95658bbdaab36bdce2fbcd.tar.gz cflow-5fe3a1415d2bcde0bc95658bbdaab36bdce2fbcd.tar.bz2 |
Add gettext markers
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 100 |
1 files changed, 52 insertions, 48 deletions
@@ -35,19 +35,19 @@ static struct argp_option options[] = { { NULL, 0, NULL, 0, - "General options:", GROUP_ID }, - { "depth", 'd', "NUMBER", 0, - "set the depth at which the flowgraph is cut off.", GROUP_ID+1 }, - { "include", 'i', "SPEC", 0, - "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 }, - { "format", 'f', "NAME", 0, - "use given output format NAME. Valid names are gnu (default) and posix", + N_("General options:"), GROUP_ID }, + { "depth", 'd', N_("NUMBER"), 0, + N_("Set the depth at which the flowgraph is cut off."), GROUP_ID+1 }, + { "include", 'i', N_("SPEC"), 0, + 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 }, + { "format", 'f', N_("NAME"), 0, + N_("Use given output format NAME. Valid names are gnu (default) and posix"), GROUP_ID+1 }, { "reverse", 'r', NULL, 0, - "Print reverse call tree", GROUP_ID+1 }, + N_("Print reverse call tree"), GROUP_ID+1 }, { "xref", 'x', NULL, 0, - "produce cross-reference listing only", GROUP_ID+1 }, + N_("Produce cross-reference listing only"), GROUP_ID+1 }, { "print", 'P', "OPT", 0, - "Set printing option to OPT. Valid OPT values are: xref (or cross-ref), tree. Any unambiguous abbreviation of the above is also accepted", + N_("Set printing option to OPT. Valid OPT values are: xref (or cross-ref), tree. Any unambiguous abbreviation of the above is also accepted"), GROUP_ID+1 }, { "output", 'o', "FILE", 0, - "set output file name (default -, meaning stdout)", + N_("Set output file name (default -, meaning stdout)"), GROUP_ID+1 }, @@ -56,24 +56,24 @@ static struct argp_option options[] = { { NULL, 0, NULL, 0, - "Parser control:", GROUP_ID }, - { "use-indentation", 'S', "BOOL", OPTION_ARG_OPTIONAL, - "rely on indentation", GROUP_ID+1 }, + N_("Parser control:"), GROUP_ID }, + { "use-indentation", 'S', N_("BOOL"), OPTION_ARG_OPTIONAL, + N_("Rely on indentation"), GROUP_ID+1 }, { "ansi", 'a', NULL, 0, - "Assume input to be written in ANSI C", GROUP_ID+1 }, + N_("Assume input to be written in ANSI C"), GROUP_ID+1 }, { "pushdown", 'p', "NUMBER", 0, - "set initial token stack size to NUMBER", GROUP_ID+1 }, + N_("Set initial token stack size to NUMBER"), GROUP_ID+1 }, { "symbol", 's', "SYM:TYPE", 0, - "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 }, - { "main", 'm', "NAME", 0, - "Assume main function to be called NAME", GROUP_ID+1 }, + 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 }, + { "main", 'm', N_("NAME"), 0, + N_("Assume main function to be called NAME"), GROUP_ID+1 }, { "define", 'D', "NAME[=DEFN]", 0, - "Predefine NAME as a macro.", GROUP_ID+1 }, + N_("Predefine NAME as a macro"), GROUP_ID+1 }, { "undefine", 'U', "NAME", 0, - "Cancel any previous definition of NAME", GROUP_ID+1 }, + N_("Cancel any previous definition of NAME"), GROUP_ID+1 }, { "include-dir", 'I', "DIR", 0, - "Add the directory dir to the list of directories to be searched for header files.", GROUP_ID+1 }, + N_("Add the directory dir to the list of directories to be searched for header files."), GROUP_ID+1 }, { "preprocess", OPT_PREPROCESS, "COMMAND", OPTION_ARG_OPTIONAL, - "Run the specified preprocessor command", GROUP_ID+1 }, + N_("Run the specified preprocessor command"), GROUP_ID+1 }, { "cpp", 0, NULL, OPTION_ALIAS, NULL, GROUP_ID+1 }, { "no-preprocess", OPT_NO_PREPROCESS, NULL, 0, - "Do not preprocess the sources", GROUP_ID+1 }, + N_("Do not preprocess the sources"), GROUP_ID+1 }, { "no-cpp", 0, NULL, OPTION_ALIAS, NULL, GROUP_ID+1 }, @@ -82,13 +82,13 @@ static struct argp_option options[] = { { NULL, 0, NULL, 0, - "Output control:", GROUP_ID }, - { "number", 'n', "BOOL", OPTION_ARG_OPTIONAL, - "Print line numbers", GROUP_ID+1 }, + N_("Output control:"), GROUP_ID }, + { "number", 'n', N_("BOOL"), OPTION_ARG_OPTIONAL, + N_("Print line numbers"), GROUP_ID+1 }, { "print-level", 'l', NULL, 0, - "Print nesting level along with the call tree", GROUP_ID+1 }, + N_("Print nesting level along with the call tree"), GROUP_ID+1 }, { "level-indent", OPT_LEVEL_INDENT, "STRING", 0, - "Use STRING when indenting to each new level", GROUP_ID+1 }, + N_("Use STRING when indenting to each new level"), GROUP_ID+1 }, { "tree", 'T', NULL, 0, - "Draw tree", GROUP_ID+1 }, + N_("Draw tree"), GROUP_ID+1 }, { "brief", 'b', "BOOL", OPTION_ARG_OPTIONAL, - "brief output", GROUP_ID+1 }, + N_("Brief output"), GROUP_ID+1 }, #undef GROUP_ID @@ -96,9 +96,9 @@ static struct argp_option options[] = { { NULL, 0, NULL, 0, - "Informational options:", GROUP_ID }, + N_("Informational options:"), GROUP_ID }, { "verbose", 'v', NULL, 0, - "be verbose on output", GROUP_ID+1 }, + N_("Be verbose on output"), GROUP_ID+1 }, { "license", 'L', 0, 0, - "Print license and exit", GROUP_ID+1 }, + N_("Print license and exit"), GROUP_ID+1 }, { "debug", OPT_DEBUG, "NUMBER", OPTION_ARG_OPTIONAL, - "set debugging level", GROUP_ID+1 }, + N_("Set debugging level"), GROUP_ID+1 }, #undef GROUP_ID @@ -107,3 +107,3 @@ static struct argp_option options[] = { -char *cflow_license_text = +char *cflow_license_text = N_( " GNU cflow is free software; you can redistribute it and/or modify\n" @@ -120,3 +120,3 @@ char *cflow_license_text = " along with GNU cflow; if not, write to the Free Software\n" -" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n"; +" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n"); @@ -213,3 +213,3 @@ symbol_override(const char *str) if (type == 0) { - error(0, 0, "unknown symbol type: %s", ptr+1); + error(0, 0, _("unknown symbol type: %s"), ptr+1); return; @@ -242,3 +242,3 @@ set_print_option(char *str) if (opt == 0) { - error(0, 0, "unknown print option: %s", str); + error(0, 0, _("unknown print option: %s"), str); return; @@ -364,3 +364,3 @@ parse_level_string(const char *str, char **return_ptr) if (*p == 0) { - error(1, 0, "level indent string too long"); + error(1, 0, _("level indent string too long")); return; @@ -373,3 +373,3 @@ parse_level_string(const char *str, char **return_ptr) if (*p == 0) { - error(1, 0, "level indent string is too long"); + error(1, 0, _("level indent string is too long")); return; @@ -401,3 +401,3 @@ set_level_indent(const char *str) if (*p == 0) { - error(1, 0, "level-indent syntax"); + error(1, 0, _("level-indent syntax")); return; @@ -425,3 +425,3 @@ set_level_indent(const char *str) default: - error(1, 0, "unknown level indent option: %s", str); + error(1, 0, _("unknown level indent option: %s"), str); } @@ -456,3 +456,3 @@ parse_opt (int key, char *arg, struct argp_state *state) case 'L': - printf("License for %s:\n\n", argp_program_version); + printf(_("License for %s:\n\n"), argp_program_version); printf("%s", cflow_license_text); @@ -485,3 +485,3 @@ parse_opt (int key, char *arg, struct argp_state *state) if (select_output_driver(arg)) - argp_error(state, "%s: No such output driver", optarg); + argp_error(state, _("%s: No such output driver"), optarg); else if (strcmp(arg, "posix") == 0) @@ -557,3 +557,3 @@ static struct argp argp = { parse_opt, - "[FILE]...", + N_("[FILE]..."), doc, @@ -606,3 +606,3 @@ xalloc_die(void) { - error(1, ENOMEM, "Exiting"); + error(1, ENOMEM, _("Exiting")); } @@ -630,2 +630,6 @@ main(int argc, char **argv) + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + register_output("gnu", gnu_output_handler, NULL); @@ -641,3 +645,3 @@ main(int argc, char **argv) if (!arglist) - error(1, 0, "no input files"); + error(1, 0, _("no input files")); |