Bash-4.3 distribution sources and documentation
[platform/upstream/bash.git] / builtins / common.c
index f02e99c..fb2b38c 100644 (file)
@@ -1,6 +1,6 @@
 /* common.c - utility functions for all builtins */
 
-/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2010 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -151,7 +151,7 @@ builtin_usage ()
 {
   if (this_command_name && *this_command_name)
     fprintf (stderr, _("%s: usage: "), this_command_name);
-  fprintf (stderr, "%s\n", current_builtin->short_doc);
+  fprintf (stderr, "%s\n", _(current_builtin->short_doc));
   fflush (stderr);
 }
 
@@ -367,7 +367,7 @@ make_builtin_argv (list, ip)
   return argv;
 }
 
-/* Remember LIST in $0 ... $9, and REST_OF_ARGS.  If DESTRUCTIVE is
+/* Remember LIST in $1 ... $9, and REST_OF_ARGS.  If DESTRUCTIVE is
    non-zero, then discard whatever the existing arguments are, else
    only discard the ones that are to be replaced. */
 void
@@ -500,7 +500,7 @@ get_exitstat (list)
   if (arg == 0 || legal_number (arg, &sval) == 0)
     {
       sh_neednumarg (list->word->word ? list->word->word : "`'");
-      return 255;
+      return EX_BADUSAGE;
     }
   no_args (list->next);
 
@@ -628,7 +628,7 @@ get_job_by_name (name, flags)
              if (this_shell_builtin)
                builtin_error (_("%s: ambiguous job spec"), name);
              else
-               report_error (_("%s: ambiguous job spec"), name);
+               internal_error (_("%s: ambiguous job spec"), name);
              return (DUP_JOB);
            }
          else