* app.c: Fix formatting.
[deliverable/binutils-gdb.git] / gas / as.c
index 48ab5c49639d067613e44754bdece048782da1d9..83fbf1a2eaf8f0c0cc38112f6daba36865210546 100644 (file)
--- a/gas/as.c
+++ b/gas/as.c
@@ -1,5 +1,6 @@
 /* as.c - GAS main program.
-   Copyright (C) 1987, 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+   Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+   1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -40,6 +41,7 @@
 #include "output-file.h"
 #include "sb.h"
 #include "macro.h"
+#include "dwarf2dbg.h"
 
 #ifdef HAVE_ITBL_CPU
 #include "itbl-ops.h"
@@ -68,7 +70,7 @@ static char *listing_filename = NULL;
 
 /* Type of debugging to generate.  */
 
-enum debug_info_type debug_type = DEBUG_NONE;
+enum debug_info_type debug_type = DEBUG_UNSPECIFIED;
 
 /* Maximum level of macro nesting.  */
 int max_macro_nest = 100;
@@ -206,7 +208,7 @@ print_version_id ()
 
 #ifdef BFD_ASSEMBLER
   fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s"),
-          VERSION, TARGET_ALIAS, BFD_VERSION);
+          VERSION, TARGET_ALIAS, BFD_VERSION_STRING);
 #else
   fprintf (stderr, _("GNU assembler version %s (%s)"), VERSION, TARGET_ALIAS);
 #endif
@@ -230,7 +232,6 @@ Options:\n\
                          m      include macro expansions\n\
                          n      omit forms processing\n\
                          s      include symbols\n\
-                         L      include line debug statistics (if applicable)\n\
                          =FILE  list to FILE (must be last sub-option)\n"));
 
   fprintf (stream, _("\
@@ -400,7 +401,7 @@ parse_args (pargc, pargv)
 #define OPTION_LISTING_LHS_WIDTH (OPTION_STD_BASE + 9)
     {"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH},
 #define OPTION_LISTING_LHS_WIDTH2 (OPTION_STD_BASE + 10)
-    {"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2},
+    {"listing-lhs-width2", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2},
 #define OPTION_LISTING_RHS_WIDTH (OPTION_STD_BASE + 11)
     {"listing-rhs-width", required_argument, NULL, OPTION_LISTING_RHS_WIDTH},
 #define OPTION_LISTING_CONT_LINES (OPTION_STD_BASE + 12)
@@ -499,8 +500,8 @@ parse_args (pargc, pargv)
          break;
 
        case OPTION_TARGET_HELP:
-          md_show_usage (stdout);
-          exit (EXIT_SUCCESS);
+         md_show_usage (stdout);
+         exit (EXIT_SUCCESS);
 
        case OPTION_HELP:
          show_usage (stdout);
@@ -523,8 +524,12 @@ parse_args (pargc, pargv)
 
        case OPTION_VERSION:
          /* This output is intended to follow the GNU standards document.  */
+#ifdef BFD_ASSEMBLER
+         printf (_("GNU assembler %s\n"), BFD_VERSION_STRING);
+#else
          printf (_("GNU assembler %s\n"), VERSION);
-         printf (_("Copyright 2000 Free Software Foundation, Inc.\n"));
+#endif
+         printf (_("Copyright 2002 Free Software Foundation, Inc.\n"));
          printf (_("\
 This program is free software; you may redistribute it under the terms of\n\
 the GNU General Public License.  This program has absolutely no warranty.\n"));
@@ -586,7 +591,7 @@ the GNU General Public License.  This program has absolutely no warranty.\n"));
 
            if (optarg == NULL)
              {
-               as_warn (_("No file name following -t option\n"));
+               as_warn (_("no file name following -t option"));
                break;
              }
 
@@ -601,11 +606,8 @@ the GNU General Public License.  This program has absolutely no warranty.\n"));
               internal table.  */
            itbl_files->name = xstrdup (optarg);
            if (itbl_parse (itbl_files->name) != 0)
-             {
-               fprintf (stderr, _("Failed to read instruction table %s\n"),
-                        itbl_files->name);
-               exit (EXIT_SUCCESS);
-             }
+             as_fatal (_("failed to read instruction table %s\n"),
+                       itbl_files->name);
          }
          break;
 
@@ -764,10 +766,16 @@ the GNU General Public License.  This program has absolutely no warranty.\n"));
 
   *pargc = new_argc;
   *pargv = new_argv;
+
+#ifdef md_after_parse_args
+  md_after_parse_args ();
+#endif
 }
 
 static long start_time;
 
+int main PARAMS ((int, char **));
+
 int
 main (argc, argv)
      int argc;
@@ -781,18 +789,15 @@ main (argc, argv)
 
 #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
   setlocale (LC_MESSAGES, "");
+#endif
+#if defined (HAVE_SETLOCALE)
+  setlocale (LC_CTYPE, "");
 #endif
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
   if (debug_memory)
-    {
-#ifdef BFD_ASSEMBLER
-      extern long _bfd_chunksize;
-      _bfd_chunksize = 64;
-#endif
-      chunksize = 64;
-    }
+    chunksize = 64;
 
 #ifdef HOST_SPECIAL_INIT
   HOST_SPECIAL_INIT (argc, argv);
@@ -885,6 +890,10 @@ main (argc, argv)
   md_end ();
 #endif
 
+  /* If we've been collecting dwarf2 .debug_line info, either for
+     assembly debugging or on behalf of the compiler, emit it now.  */
+  dwarf2_finish ();
+
   if (seen_at_least_1_file ()
       && (flag_always_generate_output || had_errors () == 0))
     keep_it = 1;
This page took 0.027568 seconds and 4 git commands to generate.