Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] (PR#11167) no output on bad -p option
Home

[Freeciv-Dev] (PR#11167) no output on bad -p option

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#11167) no output on bad -p option
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 27 Nov 2004 10:35:39 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=11167 >

Here's a patch.  It's for 2.0 but can easily be updated for the dev version.

jason

Index: client/civclient.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v
retrieving revision 1.197.2.6
diff -u -r1.197.2.6 civclient.c
--- client/civclient.c  19 Nov 2004 01:32:42 -0000      1.197.2.6
+++ client/civclient.c  27 Nov 2004 18:34:52 -0000
@@ -237,6 +237,10 @@
       sz_strlcpy(sound_plugin_name, option);
    else if ((option = get_option("--port",argv,&i,argc))) {
      if(sscanf(option, "%d", &server_port) != 1) {
+       fc_fprintf(stderr,
+                 _("Invalid port \"%s\" specified with --port option.\n"),
+                 option);
+       fc_fprintf(stderr, _("Try using --help.\n"));
         exit(EXIT_FAILURE);
      }
    } else if ((option = get_option("--server",argv,&i,argc)))
@@ -246,6 +250,10 @@
    else if ((option = get_option("--debug",argv,&i,argc))) {
       loglevel=log_parse_level_str(option);
       if (loglevel==-1) {
+       fc_fprintf(stderr,
+                  _("Invalid debug level \"%s\" specified with --debug "
+                    "option.\n"), option);
+       fc_fprintf(stderr, _("Try using --help.\n"));
         exit(EXIT_FAILURE);
       }
    } else if ((option = get_option("--tiles", argv, &i, argc)))

[Prev in Thread] Current Thread [Next in Thread]