From 18e9f72aee2448887ca46a6619f10a87519b37a9 Mon Sep 17 00:00:00 2001 From: Piers Cornwell Date: Mon, 21 Aug 2000 21:46:45 +0000 Subject: [PATCH] Alter some options, and beautify. 2000-08-21 Piers Cornwell * app/main.c: Alter some options, and beautify. * gimp.1.in: Document the new options. --- ChangeLog | 6 +++++ app/main.c | 65 +++++++++++++++++++++++++++------------------------ gimp-1.2.1.in | 10 ++++---- gimp.1.in | 10 ++++---- 4 files changed, 51 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce4a396f27..f7328054b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-08-21 Piers Cornwell + + * app/main.c: Alter some options, and beautify. + + * gimp.1.in: Document the new options. + Mon Aug 21 14:09:55 PDT 2000 Manish Singh * tools/pdbgen/pdb/unit.pdb: added get_number_of_built_in_units diff --git a/app/main.c b/app/main.c index 60b831b928..4d168e2ba4 100644 --- a/app/main.c +++ b/app/main.c @@ -154,13 +154,13 @@ main (int argc, for (i = 1; i < argc; i++) { if ((strcmp (argv[i], "--no-interface") == 0) || - (strcmp (argv[i], "-n") == 0)) + (strcmp (argv[i], "-i") == 0)) { no_interface = TRUE; argv[i] = NULL; } else if ((strcmp (argv[i], "--batch") == 0) || - (strcmp (argv[i], "-b") == 0)) + (strcmp (argv[i], "-b") == 0)) { argv[i] = NULL; for (j = 0, i++ ; i < argc; j++, i++) @@ -187,7 +187,7 @@ main (int argc, } } else if ((strcmp (argv[i], "--gimprc") == 0) || - (strcmp (argv[i], "-g") == 0)) + (strcmp (argv[i], "-g") == 0)) { if (argc <= ++i) { @@ -200,28 +200,31 @@ main (int argc, } } else if ((strcmp (argv[i], "--help") == 0) || - (strcmp (argv[i], "-h") == 0)) + (strcmp (argv[i], "-h") == 0)) { show_help = TRUE; argv[i] = NULL; } - else if (strcmp (argv[i], "--version") == 0 || - strcmp (argv[i], "-v") == 0) + else if ((strcmp (argv[i], "--version") == 0) || + (strcmp (argv[i], "-v") == 0)) { show_version = TRUE; argv[i] = NULL; } - else if (strcmp (argv[i], "--no-data") == 0) + else if ((strcmp (argv[i], "--no-data") == 0) || + (strcmp (argv[i], "-d") == 0)) { no_data = TRUE; argv[i] = NULL; } - else if (strcmp (argv[i], "--no-splash") == 0) + else if ((strcmp (argv[i], "--no-splash") == 0) || + (strcmp (argv[i], "-s") == 0)) { no_splash = TRUE; argv[i] = NULL; } - else if (strcmp (argv[i], "--no-splash-image") == 0) + else if ((strcmp (argv[i], "--no-splash-image") == 0) || + (strcmp (argv[i], "-S") == 0)) { no_splash_image = TRUE; argv[i] = NULL; @@ -241,13 +244,14 @@ main (int argc, use_debug_handler = TRUE; argv[i] = NULL; } - else if (strcmp (argv[i], "--console-messages") == 0) + else if ((strcmp (argv[i], "--console-messages") == 0) || + (strcmp (argv[i], "-c") == 0)) { console_messages = TRUE; argv[i] = NULL; } else if ((strcmp (argv[i], "--restore-session") == 0) || - (strcmp (argv[i], "-r") == 0)) + (strcmp (argv[i], "-r") == 0)) { restore_session = TRUE; argv[i] = NULL; @@ -278,7 +282,8 @@ main (int argc, */ else if (argv[i][0] == '-') { - show_help = TRUE; + g_print (_("\nInvalid option.\n")); + show_help = TRUE; } } @@ -297,26 +302,26 @@ main (int argc, if (show_help) { - g_print (_("Usage: %s [option ...] [files ...]\n"), argv[0]); - g_print (_("Valid options are:\n")); - g_print (_(" -h --help Output this help.\n")); - g_print (_(" -v --version Output version info.\n")); - g_print (_(" -b --batch Run in batch mode.\n")); - g_print (_(" -g --gimprc Use an alternate gimprc file.\n")); - g_print (_(" -n --no-interface Run without a user interface.\n")); - g_print (_(" -r --restore-session Try to restore saved session.\n")); - g_print (_(" --no-data Do not load patterns, gradients, palettes, brushes.\n")); - g_print (_(" --verbose Show startup messages.\n")); - g_print (_(" --no-splash Do not show the startup window.\n")); - g_print (_(" --no-splash-image Do not add an image to the startup window.\n")); - g_print (_(" --no-shm Do not use shared memory between GIMP and its plugins.\n")); - g_print (_(" --no-xshm Do not use the X Shared Memory extension.\n")); - g_print (_(" --console-messages Display warnings to console instead of a dialog box.\n")); - g_print (_(" --debug-handlers Enable debugging signal handlers for non-fatal signals.\n")); - g_print (" --enable-stack-trace {never|query|always}\n"); - g_print (_(" Debugging mode for fatal signals.\n")); + g_print (_("\nUsage: %s [option ... ] [file ... ]\n\n"), argv[0]); + g_print (_("Options:\n")); + g_print (_(" -b, --batch Run in batch mode.\n")); + g_print (_(" -c, --console-messages Display warnings to console instead of a dialog box.\n")); + g_print (_(" -d, --no-data Do not load brushes, gradients, palettes, patterns.\n")); + g_print (_(" -i, --no-interface Run without a user interface.\n")); + g_print (_(" -g, --gimprc Use an alternate gimprc file.\n")); + g_print (_(" -h, --help Output this help.\n")); + g_print (_(" -r, --restore-session Try to restore saved session.\n")); + g_print (_(" -s, --no-splash Do not show the startup window.\n")); + g_print (_(" -S, --no-splash-image Do not add an image to the startup window.\n")); + g_print (_(" -v, --version Output version information.\n")); + g_print (_(" --verbose Show startup messages.\n")); + g_print (_(" --no-shm Do not use shared memory between GIMP and plugins.\n")); + g_print (_(" --no-xshm Do not use the X Shared Memory extension.\n")); + g_print (_(" --debug-handlers Enable non-fatal debugging signal handlers.\n")); g_print (_(" --display Use the designated X display.\n")); g_print (_(" --system-gimprc Use an alternate system gimprc file.\n")); + g_print (" --enable-stack-trace \n"); + g_print (_(" Debugging mode for fatal signals.\n\n")); } if (show_version || show_help) diff --git a/gimp-1.2.1.in b/gimp-1.2.1.in index ad457d7eb9..a7c31d2ecf 100644 --- a/gimp-1.2.1.in +++ b/gimp-1.2.1.in @@ -47,13 +47,13 @@ can be executed by one of the Gimp scripting extensions. Use an alternative gimprc instead of the default one. Useful in cases where plugins paths or machine specs may be different. .TP 8 -.B \-n, \-\-no-interface +.B \-i, \-\-no-interface Run without a user interface. .TP 8 .B \-r, \-\-restore\-session Try to restore saved session. .TP 8 -.B \-\-no\-data +.B \-d, \-\-no\-data Do not load patterns, gradients, palettes, or brushes. Often useful in non-interactive situations where startup time is to be minimized. .TP 8 @@ -74,16 +74,16 @@ This will result in slower performance than with X shared memory enabled. .B \-\-display \fIdisplay\fP Use the designated X display. .TP 8 -.B \-\-no\-splash +.B \-s, \-\-no\-splash Do not show the splash screen. .TP 8 -.B \-\-no\-splash\-image +.B \-S, \-\-no\-splash\-image Do not show the splash screen image as part of the splash screen. .TP 8 .B \-\-debug\-handlers Enable debugging signal handlers. .TP 8 -.B \-\-console\-messages +.B \-c, \-\-console\-messages Do not popup dialog boxes on errors or warnings. Print the messages on the console instead. .TP 8 diff --git a/gimp.1.in b/gimp.1.in index ad457d7eb9..a7c31d2ecf 100644 --- a/gimp.1.in +++ b/gimp.1.in @@ -47,13 +47,13 @@ can be executed by one of the Gimp scripting extensions. Use an alternative gimprc instead of the default one. Useful in cases where plugins paths or machine specs may be different. .TP 8 -.B \-n, \-\-no-interface +.B \-i, \-\-no-interface Run without a user interface. .TP 8 .B \-r, \-\-restore\-session Try to restore saved session. .TP 8 -.B \-\-no\-data +.B \-d, \-\-no\-data Do not load patterns, gradients, palettes, or brushes. Often useful in non-interactive situations where startup time is to be minimized. .TP 8 @@ -74,16 +74,16 @@ This will result in slower performance than with X shared memory enabled. .B \-\-display \fIdisplay\fP Use the designated X display. .TP 8 -.B \-\-no\-splash +.B \-s, \-\-no\-splash Do not show the splash screen. .TP 8 -.B \-\-no\-splash\-image +.B \-S, \-\-no\-splash\-image Do not show the splash screen image as part of the splash screen. .TP 8 .B \-\-debug\-handlers Enable debugging signal handlers. .TP 8 -.B \-\-console\-messages +.B \-c, \-\-console\-messages Do not popup dialog boxes on errors or warnings. Print the messages on the console instead. .TP 8