* iconv/iconv_prog.c (main): Provide more help in case on an error.
authorUlrich Drepper <drepper@redhat.com>
Mon, 7 Feb 2005 23:20:05 +0000 (23:20 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 7 Feb 2005 23:20:05 +0000 (23:20 +0000)
ChangeLog
iconv/iconv_prog.c

index 5b62762f24d284db94be902cc67ecb6ab6e1c2e2..cc033e6be1199cb4cb80e9a91527a731950a1f3e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-02-07  Ulrich Drepper  <drepper@redhat.com>
+
+       * iconv/iconv_prog.c (main): Provide more help in case on an error.
+
 2005-02-07  Jakub Jelinek  <jakub@redhat.com>
 
        * nscd/nscd.c (termination_handler): Avoid segfault if some database
index 52ae589b374fffddc4f878ec95936fbbcfd7a8d9..5b3d35ecaaecf8ff0ba4e4febb1b3b2f2c7024f9 100644 (file)
@@ -239,26 +239,30 @@ main (int argc, char *argv[])
              if (from_wrong)
                {
                  if (to_wrong)
-                   error (EXIT_FAILURE, 0,
+                   error (0, 0,
                           _("\
 conversion from `%s' and to `%s' are not supported"),
                           from_pretty, to_pretty);
                  else
-                   error (EXIT_FAILURE, 0,
+                   error (0, 0,
                           _("conversion from `%s' is not supported"),
                           from_pretty);
                }
              else
                {
                  if (to_wrong)
-                   error (EXIT_FAILURE, 0,
+                   error (0, 0,
                           _("conversion to `%s' is not supported"),
                           to_pretty);
                  else
-                   error (EXIT_FAILURE, 0,
+                   error (0, 0,
                           _("conversion from `%s' to `%s' is not supported"),
                           from_pretty, to_pretty);
                }
+
+             argp_help (&argp, stderr, ARGP_HELP_SEE,
+                        program_invocation_short_name);
+             exit (1);
            }
          else
            error (EXIT_FAILURE, errno,