This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Changes to gcc.c (display_help)


While I only had intended to mark the help text in display_help for
translation, I ended up modifiying it. First this changes printf to fputs
where possible and secondly tries to output as much text as possible in one
call instead of one printf per line. Main reason is, that translating the
help text is much easier this way.

OK to commit?

2000-06-27  Philipp Thomas  <pthomas@suse.de>

	* gcc.c (display_help): Use fputs instead of printf. Use long
	string instead of multiple printf calls. Mark help for translation.

Index: gcc.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcc.c,v
retrieving revision 1.148
diff -u -p -r1.148 gcc.c
--- gcc.c	2000/06/18 02:37:02	1.148
+++ gcc.c	2000/06/27 06:37:02
@@ -2804,49 +2804,52 @@ convert_filename (name, do_exe)
 static void
 display_help ()
 {
-  printf ("Usage: %s [options] file...\n", programname);
-  printf ("Options:\n");
-
-  printf ("  -pass-exit-codes         Exit with highest error code from a phase\n");
-  printf ("  --help                   Display this information\n");
+  printf (_("Usage: %s [options] file...\n"), programname);
+  fputs(_("\
+Options:\n\
+  -pass-exit-codes         Exit with highest error code from a phase\n\
+  --help                   Display this information\n\
+"), stdout);
   if (! verbose_flag)
-    printf ("  (Use '-v --help' to display command line options of sub-processes)\n");
-  printf ("  -dumpspecs               Display all of the built in spec strings\n");
-  printf ("  -dumpversion             Display the version of the compiler\n");
-  printf ("  -dumpmachine             Display the compiler's target processor\n");
-  printf ("  -print-search-dirs       Display the directories in the compiler's search path\n");
-  printf ("  -print-libgcc-file-name  Display the name of the compiler's companion library\n");
-  printf ("  -print-file-name=<lib>   Display the full path to library <lib>\n");
-  printf ("  -print-prog-name=<prog>  Display the full path to compiler component <prog>\n");
-  printf ("  -print-multi-directory   Display the root directory for versions of libgcc\n");
-  printf ("  -print-multi-lib         Display the mapping between command line options and\n");
-  printf ("                            multiple library search directories\n");
-  printf ("  -Wa,<options>            Pass comma-separated <options> on to the assembler\n");
-  printf ("  -Wp,<options>            Pass comma-separated <options> on to the preprocessor\n");
-  printf ("  -Wl,<options>            Pass comma-separated <options> on to the linker\n");
-  printf ("  -Xlinker <arg>           Pass <arg> on to the linker\n");
-  printf ("  -save-temps              Do not delete intermediate files\n");
-  printf ("  -pipe                    Use pipes rather than intermediate files\n");
-  printf ("  -time                    Time the execution of each subprocess\n");
-  printf ("  -specs=<file>            Override builtin specs with the contents of <file>\n");
-  printf ("  -std=<standard>          Assume that the input sources are for <standard>\n");
-  printf ("  -B <directory>           Add <directory> to the compiler's search paths\n");
-  printf ("  -b <machine>             Run gcc for target <machine>, if installed\n");
-  printf ("  -V <version>             Run gcc version number <version>, if installed\n");
-  printf ("  -v                       Display the programs invoked by the compiler\n");
-  printf ("  -E                       Preprocess only; do not compile, assemble or link\n");
-  printf ("  -S                       Compile only; do not assemble or link\n");
-  printf ("  -c                       Compile and assemble, but do not link\n");
-  printf ("  -o <file>                Place the output into <file>\n");
-  printf ("  -x <language>            Specify the language of the following input files\n");
-  printf ("                            Permissable languages include: c c++ assembler none\n");
-  printf ("                            'none' means revert to the default behaviour of\n");
-  printf ("                            guessing the language based on the file's extension\n");
-
-  printf ("\nOptions starting with -g, -f, -m, -O or -W are automatically passed on to\n");
-  printf ("the various sub-processes invoked by %s.  In order to pass other options\n",
-	  programname);
-  printf ("on to these processes the -W<letter> options must be used.\n");
+    fputs (_("  (Use '-v --help' to display command line options of sub-processes)\n"), stdout);
+  fputs (_("\
+  -dumpspecs               Display all of the built in spec strings\n\
+  -dumpversion             Display the version of the compiler\n\
+  -dumpmachine             Display the compiler's target processor\n\
+  -print-search-dirs       Display the directories in the compiler's search path\n\
+  -print-libgcc-file-name  Display the name of the compiler's companion library\n\
+  -print-file-name=<lib>   Display the full path to library <lib>\n\
+  -print-prog-name=<prog>  Display the full path to compiler component <prog>\n\
+  -print-multi-directory   Display the root directory for versions of libgcc\n\
+  -print-multi-lib         Display the mapping between command line options and\n\
+                           multiple library search directories\n\
+  -Wa,<options>            Pass comma-separated <options> on to the assembler\n\
+  -Wp,<options>            Pass comma-separated <options> on to the preprocessor\n\
+  -Wl,<options>            Pass comma-separated <options> on to the linker\n\
+  -Xlinker <arg>           Pass <arg> on to the linker\n\
+  -save-temps              Do not delete intermediate files\n\
+  -pipe                    Use pipes rather than intermediate files\n\
+  -time                    Time the execution of each subprocess\n\
+  -specs=<file>            Override builtin specs with the contents of <file>\n\
+  -std=<standard>          Assume that the input sources are for <standard>\n\
+  -B <directory>           Add <directory> to the compiler's search paths\n\
+  -b <machine>             Run gcc for target <machine>, if installed\n\
+  -V <version>             Run gcc version number <version>, if installed\n\
+  -v                       Display the programs invoked by the compiler\n\
+  -E                       Preprocess only; do not compile, assemble or link\n\
+  -S                       Compile only; do not assemble or link\n\
+  -c                       Compile and assemble, but do not link\n\
+  -o <file>                Place the output into <file>\n\
+  -x <language>            Specify the language of the following input files\n\
+                           Permissable languages include: c c++ assembler none\n\
+                           'none' means revert to the default behaviour of\n\
+                           guessing the language based on the file's extension\n\
+\n\
+"), stdout);
+  printf(_("\
+Options starting with -g, -f, -m, -O or -W are automatically passed on to\n\
+the various sub-processes invoked by %s.  In order to pass other options\n\
+on to these processes the -W<letter> options must be used.\n"), programname);
 
   /* The rest of the options are displayed by invocations of the various
      sub-processes.  */



-- 
Philipp Thomas <pthomas@suse.de>
Development, SuSE GmbH, Schanzaecker Str. 10, D-90443 Nuremberg, Germany

#define NINODE  50              /* number of in core inodes */
#define NPROC   30              /* max number of processes */
 	-- Version 7 UNIX for PDP 11, /usr/include/sys/param.h

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]