Add prototypes for static functions.
[binutils-gdb.git] / bfd / evax-emh.c
index 2b5000622224ab67aefd9cbf7575799b8cde717d..79a63d2adbb35edb3e14b334d9e2fb3279c27b6d 100644 (file)
@@ -1,5 +1,5 @@
 /* evax-emh.c -- BFD back-end for ALPHA EVAX (openVMS/Alpha) files.
-   Copyright 1996, 1997 Free Software Foundation, Inc.
+   Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
 
    EMH record handling functions
    and
@@ -22,7 +22,6 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#include <stdio.h>
 #include <ctype.h>
 
 #include "bfd.h"
@@ -137,7 +136,6 @@ get_vms_time_string ()
 {
   static unsigned char tbuf[18];
 #ifndef VMS
-#include <sys/types.h>
 #include <time.h>
 
   char *pnt;
@@ -202,12 +200,9 @@ _bfd_evax_write_emh (abfd)
 
       char *fname, *fout, *fptr;
 
-      fname = strdup (bfd_get_filename (abfd));
-      if (fname == 0)
-       {
-         bfd_set_error (bfd_error_no_memory);
-         return -1;
-       }
+      fptr = bfd_get_filename (abfd);
+      fname = (char *) alloca (strlen (fptr) + 1);
+      strcpy (fname, fptr);
       fout = strrchr (fname, ']');
       if (fout == 0)
        fout = strchr (fname, ':');
@@ -234,7 +229,6 @@ _bfd_evax_write_emh (abfd)
            *fptr = 0;
        }
       _bfd_evax_output_counted (abfd, fout);
-      free (fname);
     }
   else
     _bfd_evax_output_counted (abfd, "NONAME");
@@ -323,7 +317,7 @@ _bfd_evax_slurp_eeom (abfd)
   PRIV(eeom_data).eeom_b_comcod = *(evax_rec + 8);
   if (PRIV(eeom_data).eeom_b_comcod > 1)
     {
-      (*_bfd_error_handler) ("Object module NOT error-free !\n");
+      (*_bfd_error_handler) (_("Object module NOT error-free !\n"));
       bfd_set_error (bfd_error_bad_value);
       return -1;
     }