OSDN Git Service

* config/avr/avr-protos.h (avr_output_addr_vec_elt): Prototype.
[pf3gnuchains/gcc-fork.git] / gcc / mips-tfile.c
index 39f3bc6..ff24ce8 100644 (file)
@@ -2,8 +2,9 @@
    contain debugging information specified by the GNU compiler
    in the form of comments (the mips assembler does not support
    assembly access to debug information).
-   Copyright (C) 1991, 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
-   Contributed by Michael Meissner, meissner@osf.org
+   Copyright (C) 1991, 1993, 1994, 1995, 1997, 1998,
+   1999, 2000 Free Software Foundation, Inc.
+   Contributed by Michael Meissner (meissner@cygnus.com).
    
 This file is part of GNU CC.
 
@@ -600,12 +601,9 @@ Boston, MA 02111-1307, USA.  */
 \f
 
 #include "config.h"
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#include <stdio.h>
+#include "system.h"
+#include "version.h"
+#include "intl.h"
 
 #ifndef __SABER__
 #define saber_stop()
@@ -615,36 +613,11 @@ Boston, MA 02111-1307, USA.  */
 #define __LINE__ 0
 #endif
 
-#ifdef __STDC__
-typedef void *PTR_T;
-typedef const void *CPTR_T;
-#define __proto(x) x
-#ifndef VPROTO
-#define PVPROTO(ARGS)          ARGS
-#define VPROTO(ARGS)            ARGS
-#define VA_START(va_list,var)  va_start(va_list,var)
-#endif
-#else
-
-#if defined(_STDIO_H_) || defined(__STDIO_H__)         /* Ultrix 4.0, SGI */
-typedef void *PTR_T;
-typedef void *CPTR_T;
-
-#else
-typedef char *PTR_T;                                   /* Ultrix 3.1 */
-typedef char *CPTR_T;
-#endif
-
-#define __proto(x) ()
-#define const
-#ifndef VPROTO
-#define PVPROTO(ARGS)          ()
-#define VPROTO(ARGS)            (va_alist) va_dcl
-#define VA_START(va_list,var)  va_start(va_list)
-#endif
-#endif
+#define __proto(x) PARAMS(x)
+typedef PTR PTR_T;
+typedef const PTR_T CPTR_T;
 
-/* Do to size_t being defined in sys/types.h and different
+/* Due to size_t being defined in sys/types.h and different
    in stddef.h, we have to do this by hand.....  Note, these
    types are correct for MIPS based systems, and may not be
    correct for other systems.  Ultrix 4.0 and Silicon Graphics
@@ -663,23 +636,12 @@ typedef char *CPTR_T;
    so they can't be static.  */
 
 extern void    pfatal_with_name
-                               __proto((char *));
-extern void    fancy_abort     __proto((void));
-       void    botch           __proto((const char *));
-extern PTR_T   xmalloc         __proto((Size_t));
-extern PTR_T   xcalloc         __proto((Size_t, Size_t));
-extern PTR_T   xrealloc        __proto((PTR_T, Size_t));
-extern void    xfree           __proto((PTR_T));
-
-#ifdef HAVE_VPRINTF
-extern void    fatal           PVPROTO((const char *format, ...));
-extern void    error           PVPROTO((const char *format, ...));
-#else
-/* We must not provide any prototype here, even if ANSI C.  */
-extern void    fatal           __proto(());
-extern void    error           __proto(());
-#endif
+                               __proto((const char *)) ATTRIBUTE_NORETURN;
+extern void    fancy_abort     __proto((void)) ATTRIBUTE_NORETURN;
+       void    botch           __proto((const char *)) ATTRIBUTE_NORETURN;
 
+extern void    fatal           PARAMS ((const char *format, ...)) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+extern void    error           PARAMS ((const char *format, ...)) ATTRIBUTE_PRINTF_1;
 \f
 #ifndef MIPS_DEBUGGING_INFO
 
@@ -687,8 +649,8 @@ static int   line_number;
 static int      cur_line_start;
 static int      debug;
 static int      had_errors;
-static char    *progname;
-static char    *input_name;
+static const char *progname;
+static const char *input_name;
 
 int
 main ()
@@ -705,13 +667,7 @@ main ()
 #undef rindex
 #undef index
 
-#include <sys/types.h>
-#include <string.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <errno.h>
 #include <signal.h>
-#include <sys/stat.h>
 
 #ifndef CROSS_COMPILE
 #include <a.out.h>
@@ -719,7 +675,7 @@ main ()
 #include "mips/a.out.h"
 #endif /* CROSS_COMPILE */
 
-#if defined (USG) || defined (NO_STAB_H)
+#if defined (USG) || !defined (HAVE_STAB_H)
 #include "gstab.h"  /* If doing DBX on sysV, use our own stab.h.  */
 #else
 #include <stab.h>  /* On BSD, use the system's stab.h.  */
@@ -731,23 +687,6 @@ main ()
 #define STAB_CODE_TYPE int
 #endif
 
-#ifdef _OSF_SOURCE
-#define HAS_STDLIB_H
-#define HAS_UNISTD_H
-#endif
-
-#ifdef HAS_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#ifdef HAS_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifndef errno
-extern int errno;                      /* MIPS errno.h doesn't declare this */
-#endif
-
 #ifndef MALLOC_CHECK
 #ifdef __SABER__
 #define MALLOC_CHECK
@@ -755,10 +694,10 @@ extern int errno;                 /* MIPS errno.h doesn't declare this */
 #endif
 
 #define IS_ASM_IDENT(ch) \
-  (isalnum (ch) || (ch) == '_' || (ch) == '.' || (ch) == '$')
+  (ISALNUM (ch) || (ch) == '_' || (ch) == '.' || (ch) == '$')
 
 \f
-/* Redefinition of of storage classes as an enumeration for better
+/* Redefinition of storage classes as an enumeration for better
    debugging.  */
 
 typedef enum sc {
@@ -966,7 +905,7 @@ enum alloc_type {
    grow linearly, and which are written in the object file as sequential
    pages.  On systems with a BSD malloc that define USE_MALLOC, the
    MAX_CLUSTER_PAGES should be 1 less than a power of two, since malloc
-   adds it's overhead, and rounds up to the next power of 2.  Pages are
+   adds its overhead, and rounds up to the next power of 2.  Pages are
    linked together via a linked list.
 
    If PAGE_SIZE is > 4096, the string length in the shash_t structure
@@ -1141,6 +1080,37 @@ typedef struct efdr {
 static efdr_t init_file = 
 {
   {                    /* FDR structure */
+#ifdef __alpha
+    0,                 /* adr:         memory address of beginning of file */
+    0,                 /* cbLineOffset: byte offset from header for this file ln's */
+    0,                 /* cbLine:      size of lines for this file */
+    0,                 /* cbSs:        number of bytes in the ss */
+    0,                 /* rss:         file name (of source, if known) */
+    0,                 /* issBase:     file's string space */
+    0,                 /* isymBase:    beginning of symbols */
+    0,                 /* csym:        count file's of symbols */
+    0,                 /* ilineBase:   file's line symbols */
+    0,                 /* cline:       count of file's line symbols */
+    0,                 /* ioptBase:    file's optimization entries */
+    0,                 /* copt:        count of file's optimization entries */
+    0,                 /* ipdFirst:    start of procedures for this file */
+    0,                 /* cpd:         count of procedures for this file */
+    0,                 /* iauxBase:    file's auxiliary entries */
+    0,                 /* caux:        count of file's auxiliary entries */
+    0,                 /* rfdBase:     index into the file indirect table */
+    0,                 /* crfd:        count file indirect entries */
+    langC,             /* lang:        language for this file */
+    1,                 /* fMerge:      whether this file can be merged */
+    0,                 /* fReadin:     true if read in (not just created) */
+#ifdef HOST_WORDS_BIG_ENDIAN
+    1,                 /* fBigendian:  if 1, compiled on big endian machine */
+#else
+    0,                 /* fBigendian:  if 1, compiled on big endian machine */
+#endif
+    0,                 /* fTrim:       whether the symbol table was trimmed */
+    GLEVEL_2,          /* glevel:      level this file was compiled with */
+    0,                 /* reserved:    reserved for future use */
+#else
     0,                 /* adr:         memory address of beginning of file */
     0,                 /* rss:         file name (of source, if known) */
     0,                 /* issBase:     file's string space */
@@ -1169,6 +1139,7 @@ static efdr_t init_file =
     0,                 /* reserved:    reserved for future use */
     0,                 /* cbLineOffset: byte offset from header for this file ln's */
     0,                 /* cbLine:      size of lines for this file */
+#endif
   },
 
   (FDR *) 0,           /* orig_fdr:    original file header pointer */
@@ -1218,7 +1189,7 @@ typedef union page {
 
 /* Structure holding allocation information for small sized structures.  */
 typedef struct alloc_info {
-  char         *alloc_name;    /* name of this allocation type (must be first) */
+  const char   *alloc_name;    /* name of this allocation type (must be first) */
   page_t       *cur_page;      /* current page being allocated from */
   small_free_t  free_list;     /* current free list if any */
   int           unallocated;   /* number of elements unallocated on page */
@@ -1615,7 +1586,7 @@ static long       max_file_offset = 0;            /* maximum file offset */
 static FILE    *object_stream  = (FILE *) 0;   /* file desc. to output .o */
 static FILE    *obj_in_stream  = (FILE *) 0;   /* file desc. to input .o */
 static char    *progname       = (char *) 0;   /* program name for errors */
-static char    *input_name     = "stdin";      /* name of input file */
+static const char *input_name  = "stdin";      /* name of input file */
 static char    *object_name    = (char *) 0;   /* tmp. name of object file */
 static char    *obj_in_name    = (char *) 0;   /* name of input object file */
 static char    *cur_line_start = (char *) 0;   /* current line read in */
@@ -1707,8 +1678,8 @@ STATIC void       update_headers  __proto((void));
 
 STATIC void    write_varray    __proto((varray_t *, off_t, const char *));
 STATIC void    write_object    __proto((void));
-STATIC char    *st_to_string   __proto((st_t));
-STATIC char    *sc_to_string   __proto((sc_t));
+STATIC const char *st_to_string        __proto((st_t));
+STATIC const char *sc_to_string        __proto((sc_t));
 STATIC char    *read_line      __proto((void));
 STATIC void    parse_input     __proto((void));
 STATIC void    mark_stabs      __proto((const char *));
@@ -1725,7 +1696,7 @@ STATIC void       parse_stabn     __proto((const char *));
 STATIC page_t  *read_seek      __proto((Size_t, off_t, const char *));
 STATIC void    copy_object     __proto((void));
 
-STATIC void    catch_signal    __proto((int));
+STATIC void    catch_signal    __proto((int)) ATTRIBUTE_NORETURN;
 STATIC page_t  *allocate_page  __proto((void));
 
 STATIC page_t  *allocate_multiple_pages
@@ -1755,29 +1726,12 @@ STATIC void       free_thead            __proto((thead_t *));
 STATIC char     *local_index           __proto((const char *, int));
 STATIC char     *local_rindex          __proto((const char *, int));
 
-#ifndef __alpha
-extern char  *sbrk                     __proto((int));
-extern void   free                     __proto((PTR_T));
-#endif
 extern char  *mktemp                   __proto((char *));
 extern long   strtol                   __proto((const char *, char **, int));
 
 extern char *optarg;
 extern int   optind;
 extern int   opterr;
-extern char *version_string;
-#ifndef NO_SYS_SIGLIST
-#ifndef SYS_SIGLIST_DECLARED
-extern char *sys_siglist[NSIG + 1];
-#endif
-#endif
-
-#ifndef SEEK_SET       /* Symbolic constants for the "fseek" function: */
-#define        SEEK_SET 0      /* Set file pointer to offset */
-#define        SEEK_CUR 1      /* Set file pointer to its current value plus offset */
-#define        SEEK_END 2      /* Set file pointer to the size of the file plus offset */
-#endif
-
 \f
 /* List of assembler pseudo ops and beginning sequences that need
    special actions.  Someday, this should be a hash table, and such,
@@ -1864,7 +1818,7 @@ hash_string (text, hash_len, hash_tbl, ret_hash_index)
     *ret_hash_index = hi;
 
   for (ptr = hash_tbl[hi]; ptr != (shash_t *) 0; ptr = ptr->next)
-    if (hash_len == ptr->len
+    if ((symint_t) hash_len == ptr->len
        && first_ch == ptr->string[0]
        && memcmp ((CPTR_T) text, (CPTR_T) ptr->string, hash_len) == 0)
       break;
@@ -1889,7 +1843,7 @@ add_string (vp, hash_tbl, start, end_p1, ret_hash)
   register shash_t *hash_ptr;
   symint_t hi;
 
-  if (len >= PAGE_USIZE)
+  if (len >= (Ptrdiff_t) PAGE_USIZE)
     fatal ("String too big (%ld bytes)", (long) len);
 
   hash_ptr = hash_string (start, len, hash_tbl, &hi);
@@ -1897,7 +1851,7 @@ add_string (vp, hash_tbl, start, end_p1, ret_hash)
     {
       register char *p;
 
-      if (vp->objects_last_page + len >= PAGE_USIZE)
+      if (vp->objects_last_page + len >= (long) PAGE_USIZE)
        {
          vp->num_allocated
            = ((vp->num_allocated + PAGE_USIZE - 1) / PAGE_USIZE) * PAGE_USIZE;
@@ -2084,8 +2038,8 @@ add_local_symbol (str_start, str_end_p1, type, storage, value, indx)
       && (debug > 2 || type == st_Block || type == st_End
          || type == st_Proc || type == st_StaticProc))
     {
-      char *sc_str = sc_to_string (storage);
-      char *st_str = st_to_string (type);
+      const char *sc_str = sc_to_string (storage);
+      const char *st_str = st_to_string (type);
       int depth = cur_file_ptr->nested_scopes + (scope_delta < 0);
 
       fprintf (stderr,
@@ -2093,11 +2047,12 @@ add_local_symbol (str_start, str_end_p1, type, storage, value, indx)
               value, depth, sc_str);
 
       if (str_start && str_end_p1 - str_start > 0)
-       fprintf (stderr, " st= %-11s name= %.*s\n", st_str, str_end_p1 - str_start, str_start);
+       fprintf (stderr, " st= %-11s name= %.*s\n",
+                st_str, (int) (str_end_p1 - str_start), str_start);
       else
        {
          Size_t len = strlen (st_str);
-         fprintf (stderr, " st= %.*s\n", len-1, st_str);
+         fprintf (stderr, " st= %.*s\n", (int) (len-1), st_str);
        }
     }
 
@@ -2123,15 +2078,16 @@ add_ext_symbol (str_start, str_end_p1, type, storage, value, indx, ifd)
 
   if (debug > 1)
     {
-      char *sc_str = sc_to_string (storage);
-      char *st_str = st_to_string (type);
+      const char *sc_str = sc_to_string (storage);
+      const char *st_str = st_to_string (type);
 
       fprintf (stderr,
               "\tesym\tv= %10ld, ifd= %2d, sc= %-12s",
               value, ifd, sc_str);
 
       if (str_start && str_end_p1 - str_start > 0)
-       fprintf (stderr, " st= %-11s name= %.*s\n", st_str, str_end_p1 - str_start, str_start);
+       fprintf (stderr, " st= %-11s name= %.*s\n",
+                st_str, (int) (str_end_p1 - str_start), str_start);
       else
        fprintf (stderr, " st= %s\n", st_str);
     }
@@ -2405,7 +2361,8 @@ get_tag (tag_start, tag_end_p1, indx, basic_type)
   tag_ptr->same_name   = hash_ptr->tag_ptr;
   tag_ptr->basic_type  = basic_type;
   tag_ptr->indx                = indx;
-  tag_ptr->ifd         = (indx == indexNil) ? -1 : cur_file_ptr->file_index;
+  tag_ptr->ifd         = (indx == indexNil
+                          ? (symint_t) -1 : cur_file_ptr->file_index);
   tag_ptr->same_block  = cur_tag_head->first_tag;
 
   cur_tag_head->first_tag = tag_ptr;
@@ -2431,7 +2388,7 @@ add_unknown_tag (ptag)
 
   if (debug > 1)
     {
-      char *agg_type   = "{unknown aggregate type}";
+      const char *agg_type = "{unknown aggregate type}";
       switch (ptag->basic_type)
        {
        case bt_Struct: agg_type = "struct";    break;
@@ -2440,8 +2397,8 @@ add_unknown_tag (ptag)
        default:                                break;
        }
 
-      fprintf (stderr, "unknown %s %.*s found\n", agg_type,
-              hash_ptr->len, name_start);
+      fprintf (stderr, "unknown %s %.*s found\n",
+              agg_type, (int) hash_ptr->len, name_start);
     }
 
   sym_index = add_local_symbol (name_start,
@@ -2525,7 +2482,8 @@ add_procedure (func_start, func_end_p1)
     }
 
   if (cur_oproc_ptr == (PDR *) 0)
-    error ("Did not find a PDR block for %.*s", func_end_p1 - func_start, func_start);
+    error ("Did not find a PDR block for %.*s",
+          (int) (func_end_p1 - func_start), func_start);
 
   /* Determine the start of symbols.  */
   new_proc_ptr->isym = file_ptr->symbols.num_allocated;
@@ -2554,7 +2512,7 @@ add_file (file_start, file_end_p1)
   register efdr_t *file_ptr;
 
   if (debug)
-    fprintf (stderr, "\tfile\t%.*s\n", len, file_start);
+    fprintf (stderr, "\tfile\t%.*s\n", (int) len, file_start);
 
   /* See if the file has already been created.  */
   for (file_ptr = first_file;
@@ -2592,7 +2550,7 @@ add_file (file_start, file_end_p1)
                  &zero_bytes[0],
                  (shash_t **) 0);
 
-      if (file_end_p1 - file_start > PAGE_USIZE-2)
+      if (file_end_p1 - file_start > (long) PAGE_USIZE-2)
        fatal ("Filename goes over one page boundary.");
 
       /* Push the start of the filename. We assume that the filename
@@ -2661,7 +2619,7 @@ add_bytes (vp, input_ptr, nitems)
 \f
 /* Convert storage class to string.  */
 
-STATIC char *
+STATIC const char *
 sc_to_string(storage_class)
      sc_t storage_class;
 {
@@ -2699,7 +2657,7 @@ sc_to_string(storage_class)
 \f
 /* Convert symbol type to string.  */
 
-STATIC char *
+STATIC const char *
 st_to_string(symbol_type)
      st_t symbol_type;
 {
@@ -2832,7 +2790,7 @@ parse_begin (start)
       return;
     }
 
-  for (end_p1 = start; (ch = *end_p1) != '\0' && !isspace (ch); end_p1++)
+  for (end_p1 = start; (ch = *end_p1) != '\0' && !ISSPACE (ch); end_p1++)
     ;
 
   hash_ptr = hash_string (start,
@@ -2842,13 +2800,15 @@ parse_begin (start)
 
   if (hash_ptr == (shash_t *) 0)
     {
-      error ("Label %.*s not found for #.begin", end_p1 - start, start);
+      error ("Label %.*s not found for #.begin",
+            (int) (end_p1 - start), start);
       return;
     }
 
   if (cur_oproc_begin == (SYMR *) 0)
     {
-      error ("Procedure table %.*s not found for #.begin", end_p1 - start, start);
+      error ("Procedure table %.*s not found for #.begin",
+            (int) (end_p1 - start), start);
       return;
     }
 
@@ -2882,7 +2842,7 @@ parse_bend (start)
       return;
     }
 
-  for (end_p1 = start; (ch = *end_p1) != '\0' && !isspace (ch); end_p1++)
+  for (end_p1 = start; (ch = *end_p1) != '\0' && !ISSPACE (ch); end_p1++)
     ;
 
   hash_ptr = hash_string (start,
@@ -2892,13 +2852,14 @@ parse_bend (start)
 
   if (hash_ptr == (shash_t *) 0)
     {
-      error ("Label %.*s not found for #.bend", end_p1 - start, start);
+      error ("Label %.*s not found for #.bend", (int) (end_p1 - start), start);
       return;
     }
 
   if (cur_oproc_begin == (SYMR *) 0)
     {
-      error ("Procedure table %.*s not found for #.bend", end_p1 - start, start);
+      error ("Procedure table %.*s not found for #.bend",
+            (int) (end_p1 - start), start);
       return;
     }
 
@@ -2992,7 +2953,7 @@ parse_def (name_start)
           (ch = *dir_end_p1) != ' ' && ch != '\t';
           dir_end_p1++)
        {
-         if (ch == '\0' || isspace (ch))
+         if (ch == '\0' || ISSPACE (ch))
            {
              error_line = __LINE__;
              saber_stop ();
@@ -3008,7 +2969,7 @@ parse_def (name_start)
       while (ch == ' ' || ch == '\t')
        ch = *++arg_start;
 
-      if (isdigit (ch) || ch == '-' || ch == '+')
+      if (ISDIGIT (ch) || ch == '-' || ch == '+')
        {
          int ch2;
          arg_number = strtol (arg_start, (char **) &arg_end_p1, 0);
@@ -3016,7 +2977,7 @@ parse_def (name_start)
            arg_was_number++;
        }
 
-      else if (ch == '\0' || isspace (ch))
+      else if (ch == '\0' || ISSPACE (ch))
        {
          error_line = __LINE__;
          saber_stop ();
@@ -3064,7 +3025,7 @@ parse_def (name_start)
                    ch = *++arg_start;
 
                  arg_was_number = 0;
-                 if (isdigit (ch) || ch == '-' || ch == '+')
+                 if (ISDIGIT (ch) || ch == '-' || ch == '+')
                    {
                      int ch2;
                      arg_number = strtol (arg_start, (char **) &arg_end_p1, 0);
@@ -3138,7 +3099,7 @@ parse_def (name_start)
                    ch = *++arg_start;
 
                  arg_was_number = 0;
-                 if (isdigit (ch) || ch == '-' || ch == '+')
+                 if (ISDIGIT (ch) || ch == '-' || ch == '+')
                    {
                      int ch2;
                      arg_number = strtol (arg_start, (char **) &arg_end_p1, 0);
@@ -3263,7 +3224,7 @@ parse_def (name_start)
                      && eptr == (EXTR *) 0)
                    {
                      fprintf (stderr, "warning, %.*s not found in original or external symbol tables, value defaults to 0\n",
-                              arg_end_p1 - arg_start,
+                              (int) (arg_end_p1 - arg_start),
                               arg_start);
                      value = 0;
                    }
@@ -3322,7 +3283,7 @@ parse_def (name_start)
 
       if (diff)
        {
-         for (j = (sizeof (t.sizes) / sizeof (t.sizes[0])) - 1; j >= 0; j--)
+         for (j = ARRAY_SIZE (t.sizes) - 1; j >= 0; j--)
            t.sizes[ j ] = ((j-diff) >= 0) ? t.sizes[ j-diff ] : 0;
 
          t.num_sizes = i + 1;
@@ -3354,7 +3315,7 @@ parse_def (name_start)
          if (tag_start == (char *) 0)
            {
              error ("No tag specified for %.*s",
-                    name_end_p1 - name_start,
+                    (int) (name_end_p1 - name_start),
                     name_start);
              return;
            }
@@ -3517,7 +3478,7 @@ parse_end (start)
     }
 
   /* Get the function name, skipping whitespace.  */
-  for (start_func = start; isspace (*start_func); start_func++)
+  for (start_func = start; ISSPACE ((unsigned char)*start_func); start_func++)
     ;
 
   ch = *start_func;
@@ -3544,7 +3505,8 @@ parse_end (start)
     value = cur_oproc_end->value;
 
   else
-    error ("Cannot find .end block for %.*s", end_func_p1 - start_func, start_func);
+    error ("Cannot find .end block for %.*s",
+          (int) (end_func_p1 - start_func), start_func);
 
   (void) add_local_symbol (start_func, end_func_p1,
                           st_End, sc_Text,
@@ -3576,7 +3538,7 @@ parse_ent (start)
       return;
     }
 
-  for (start_func = start; isspace (*start_func); start_func++)
+  for (start_func = start; ISSPACE ((unsigned char)*start_func); start_func++)
     ;
 
   ch = *start_func;
@@ -3625,7 +3587,7 @@ parse_file (start)
 
 static void
 mark_stabs (start)
-     const char *start;                        /* Start of directive (ignored) */
+  const char *start ATTRIBUTE_UNUSED;  /* Start of directive (ignored) */
 {
   if (!stabs_seen)
     {
@@ -3686,7 +3648,7 @@ parse_stabs_common (string_start, string_end, rest)
     mark_stabs ("");
 
   /* Read code from stabs.  */
-  if (!isdigit (*rest))
+  if (!ISDIGIT (*rest))
     {
       error ("Invalid .stabs/.stabn directive, code is non-numeric");
       return;
@@ -3706,7 +3668,7 @@ parse_stabs_common (string_start, string_end, rest)
       shash_t *shash_ptr;
 
       /* Skip ,0, */
-      if (p[0] != ',' || p[1] != '0' || p[2] != ',' || !isdigit (p[3]))
+      if (p[0] != ',' || p[1] != '0' || p[2] != ',' || !ISDIGIT (p[3]))
        {
          error ("Invalid line number .stabs/.stabn directive");
          return;
@@ -3714,7 +3676,7 @@ parse_stabs_common (string_start, string_end, rest)
 
       code = strtol (p+3, &p, 0);
       ch = *++p;
-      if (p[-1] != ',' || isdigit (ch) || !IS_ASM_IDENT (ch))
+      if (p[-1] != ',' || ISDIGIT (ch) || !IS_ASM_IDENT (ch))
        {
          error ("Invalid line number .stabs/.stabn directive");
          return;
@@ -3723,7 +3685,7 @@ parse_stabs_common (string_start, string_end, rest)
       dummy_symr.index = code;
       if (dummy_symr.index != code)
        {
-         error ("Line number (%d) for .stabs/.stabn directive cannot fit in index field (20 bits)",
+         error ("Line number (%lu) for .stabs/.stabn directive cannot fit in index field (20 bits)",
                 code);
 
          return;
@@ -3756,11 +3718,11 @@ parse_stabs_common (string_start, string_end, rest)
       /* Skip ,<num>,<num>, */
       if (*p++ != ',')
        goto failure;
-      for (; isdigit (*p); p++)
+      for (; ISDIGIT (*p); p++)
        ;
       if (*p++ != ',')
        goto failure;
-      for (; isdigit (*p); p++)
+      for (; ISDIGIT (*p); p++)
        ;
       if (*p++ != ',')
        goto failure;
@@ -3772,7 +3734,7 @@ parse_stabs_common (string_start, string_end, rest)
          return;
        }
 
-      if (isdigit (ch) || ch == '-')
+      if (ISDIGIT (ch) || ch == '-')
        {
          st = st_Nil;
          sc = sc_Nil;
@@ -3840,7 +3802,7 @@ parse_stabs_common (string_start, string_end, rest)
          ch = *end_p1++;
          if (ch != '\n')
            {
-             if (((!isdigit (*end_p1)) && (*end_p1 != '-'))
+             if (((!ISDIGIT (*end_p1)) && (*end_p1 != '-'))
                  || ((ch != '+') && (ch != '-')))
                {
                  error ("Invalid .stabs/.stabn directive, badly formed value");
@@ -3898,7 +3860,7 @@ STATIC void
 parse_input __proto((void))
 {
   register char *p;
-  register int i;
+  register Size_t i;
   register thead_t *ptag_head;
   register tag_t *ptag;
   register tag_t *ptag_next;
@@ -3916,16 +3878,16 @@ parse_input __proto((void))
   while ((p = read_line ()) != (char *) 0)
     {
       /* Skip leading blanks */
-      while (isspace (*p))
+      while (ISSPACE ((unsigned char)*p))
        p++;
 
       /* See if it's a directive we handle.  If so, dispatch handler.  */
-      for (i = 0; i < sizeof (pseudo_ops) / sizeof (pseudo_ops[0]); i++)
+      for (i = 0; i < ARRAY_SIZE (pseudo_ops); i++)
        if (memcmp (p, pseudo_ops[i].name, pseudo_ops[i].len) == 0
-           && isspace (p[pseudo_ops[i].len]))
+           && ISSPACE ((unsigned char)(p[pseudo_ops[i].len])))
          {
            p += pseudo_ops[i].len;     /* skip to first argument */
-           while (isspace (*p))
+           while (ISSPACE ((unsigned char)*p))
              p++;
 
            (*pseudo_ops[i].func)( p );
@@ -4156,9 +4118,13 @@ write_varray (vp, offset, str)
     return;
 
   if (debug)
-    fprintf (stderr, "\twarray\tvp = 0x%.8x, offset = %7u, size = %7u, %s\n",
-            vp, offset, vp->num_allocated * vp->object_size, str);
-
+    {
+      fputs ("\twarray\tvp = ", stderr);
+      fprintf (stderr, HOST_PTR_PRINTF, vp);
+      fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n",
+              (unsigned long) offset, vp->num_allocated * vp->object_size, str);
+    }
+  
   if (file_offset != offset
       && fseek (object_stream, (long)offset, SEEK_SET) < 0)
     pfatal_with_name (object_name);
@@ -4194,9 +4160,12 @@ write_object __proto((void))
   off_t offset;
 
   if (debug)
-    fprintf (stderr, "\n\twrite\tvp = 0x%.8x, offset = %7u, size = %7u, %s\n",
-            (PTR_T *) &symbolic_header, 0, sizeof (symbolic_header),
-            "symbolic header");
+    {
+      fputs ("\n\twrite\tvp = ", stderr);
+      fprintf (stderr, HOST_PTR_PRINTF, (PTR_T *) &symbolic_header);
+      fprintf (stderr, ", offset = %7u, size = %7lu, %s\n",
+              0, (unsigned long) sizeof (symbolic_header), "symbolic header");
+    }
 
   sys_write = fwrite ((PTR_T) &symbolic_header,
                      1,
@@ -4208,7 +4177,7 @@ write_object __proto((void))
 
   else if (sys_write != sizeof (symbolic_header))
     fatal ("Wrote %d bytes to %s, system returned %d",
-          sizeof (symbolic_header),
+          (int) sizeof (symbolic_header),
           object_name,
           sys_write);
 
@@ -4224,9 +4193,13 @@ write_object __proto((void))
        pfatal_with_name (object_name);
 
       if (debug)
-       fprintf (stderr, "\twrite\tvp = 0x%.8x, offset = %7u, size = %7u, %s\n",
-                (PTR_T *) &orig_linenum, symbolic_header.cbLineOffset,
-                symbolic_header.cbLine, "Line numbers");
+       {
+         fputs ("\twrite\tvp = ", stderr);
+         fprintf (stderr, HOST_PTR_PRINTF, (PTR_T *) &orig_linenum);
+         fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n",
+                  (long) symbolic_header.cbLineOffset,
+                  (long) symbolic_header.cbLine, "Line numbers");
+       }
 
       sys_write = fwrite ((PTR_T) orig_linenum,
                          1,
@@ -4237,8 +4210,8 @@ write_object __proto((void))
        pfatal_with_name (object_name);
 
       else if (sys_write != symbolic_header.cbLine)
-       fatal ("Wrote %d bytes to %s, system returned %d",
-              symbolic_header.cbLine,
+       fatal ("Wrote %ld bytes to %s, system returned %ld",
+              (long) symbolic_header.cbLine,
               object_name,
               sys_write);
 
@@ -4255,9 +4228,13 @@ write_object __proto((void))
        pfatal_with_name (object_name);
 
       if (debug)
-       fprintf (stderr, "\twrite\tvp = 0x%.8x, offset = %7u, size = %7u, %s\n",
-                (PTR_T *) &orig_opt_syms, symbolic_header.cbOptOffset,
-                num_write, "Optimizer symbols");
+       {
+         fputs ("\twrite\tvp = ", stderr);
+         fprintf (stderr, HOST_PTR_PRINTF, (PTR_T *) &orig_opt_syms);
+         fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n",
+                  (long) symbolic_header.cbOptOffset,
+                  num_write, "Optimizer symbols");
+       }
 
       sys_write = fwrite ((PTR_T) orig_opt_syms,
                          1,
@@ -4268,7 +4245,7 @@ write_object __proto((void))
        pfatal_with_name (object_name);
 
       else if (sys_write != num_write)
-       fatal ("Wrote %d bytes to %s, system returned %d",
+       fatal ("Wrote %ld bytes to %s, system returned %ld",
               num_write,
               object_name,
               sys_write);
@@ -4343,8 +4320,13 @@ write_object __proto((void))
           file_ptr = file_ptr->next_file)
        {
          if (debug)
-           fprintf (stderr, "\twrite\tvp = 0x%.8x, offset = %7u, size = %7u, %s\n",
-                    (PTR_T *) &file_ptr->fdr, file_offset, sizeof (FDR), "File header");
+           {
+             fputs ("\twrite\tvp = ", stderr);
+             fprintf (stderr, HOST_PTR_PRINTF, (PTR_T *) &file_ptr->fdr);
+             fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n",
+                      file_offset, (unsigned long) sizeof (FDR),
+                      "File header");
+           }
 
          sys_write = fwrite (&file_ptr->fdr,
                              1,
@@ -4356,7 +4338,7 @@ write_object __proto((void))
 
          else if (sys_write != sizeof (FDR))
            fatal ("Wrote %d bytes to %s, system returned %d",
-                  sizeof (FDR),
+                  (int) sizeof (FDR),
                   object_name,
                   sys_write);
 
@@ -4374,9 +4356,13 @@ write_object __proto((void))
        pfatal_with_name (object_name);
 
       if (debug)
-       fprintf (stderr, "\twrite\tvp = 0x%.8x, offset = %7u, size = %7u, %s\n",
-                (PTR_T *) &orig_rfds, symbolic_header.cbRfdOffset,
-                num_write, "Relative file descriptors");
+       {
+         fputs ("\twrite\tvp = ", stderr);
+         fprintf (stderr, HOST_PTR_PRINTF, (PTR_T *) &orig_rfds);
+         fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n",
+                  (long) symbolic_header.cbRfdOffset,
+                  num_write, "Relative file descriptors");
+       }
 
       sys_write = fwrite (orig_rfds,
                          1,
@@ -4386,8 +4372,8 @@ write_object __proto((void))
       if (sys_write <= 0)
        pfatal_with_name (object_name);
 
-      else if (sys_write != num_write)
-       fatal ("Wrote %d bytes to %s, system returned %d",
+      else if (sys_write != (long)num_write)
+       fatal ("Wrote %lu bytes to %s, system returned %ld",
               num_write,
               object_name,
               sys_write);
@@ -4418,8 +4404,9 @@ read_seek (size, offset, str)
     return (page_t *) 0;
 
   if (debug)
-    fprintf (stderr, "\trseek\tsize = %7u, offset = %7u, currently at %7u, %s\n",
-            size, offset, file_offset, str);
+    fprintf (stderr,
+            "\trseek\tsize = %7lu, offset = %7lu, currently at %7lu, %s\n",
+            (unsigned long) size, (unsigned long) offset, file_offset, str);
 
 #ifndef MALLOC_CHECK
   ptr = allocate_multiple_pages ((size + PAGE_USIZE - 1) / PAGE_USIZE);
@@ -4441,9 +4428,9 @@ read_seek (size, offset, str)
          if (sys_read <= 0)
            pfatal_with_name (obj_in_name);
 
-         if (sys_read != difference)
-           fatal ("Wanted to read %d bytes from %s, system returned %d",
-                  size,
+         if ((symint_t)sys_read != difference)
+           fatal ("Wanted to read %lu bytes from %s, system returned %ld",
+                  (unsigned long) size,
                   obj_in_name,
                   sys_read);
        }
@@ -4455,9 +4442,9 @@ read_seek (size, offset, str)
   if (sys_read <= 0)
     pfatal_with_name (obj_in_name);
 
-  if (sys_read != size)
-    fatal ("Wanted to read %d bytes from %s, system returned %d",
-          size,
+  if (sys_read != (long) size)
+    fatal ("Wanted to read %lu bytes from %s, system returned %ld",
+          (unsigned long) size,
           obj_in_name,
           sys_read);
 
@@ -4505,16 +4492,16 @@ copy_object __proto((void))
   else if (sys_read == 0 && feof (obj_in_stream))
     return;                    /* create a .T file sans file header */
 
-  else if (sys_read < sizeof (struct filehdr))
+  else if (sys_read < (int) sizeof (struct filehdr))
     fatal ("Wanted to read %d bytes from %s, system returned %d",
-          sizeof (struct filehdr),
+          (int) sizeof (struct filehdr),
           obj_in_name,
           sys_read);
 
 
   if (orig_file_header.f_nsyms != sizeof (HDRR))
     fatal ("%s symbolic header wrong size (%d bytes, should be %d)",
-          input_name, orig_file_header.f_nsyms, sizeof (HDRR));
+          input_name, orig_file_header.f_nsyms, (int) sizeof (HDRR));
 
 
   /* Read in the current symbolic header.  */
@@ -4529,9 +4516,9 @@ copy_object __proto((void))
   if (sys_read < 0)
     pfatal_with_name (object_name);
 
-  else if (sys_read < sizeof (struct filehdr))
+  else if (sys_read < (int) sizeof (struct filehdr))
     fatal ("Wanted to read %d bytes from %s, system returned %d",
-          sizeof (struct filehdr),
+          (int) sizeof (struct filehdr),
           obj_in_name,
           sys_read);
 
@@ -4669,8 +4656,10 @@ copy_object __proto((void))
                             (st_t) eptr->asym.st,
                             (sc_t) eptr->asym.sc,
                             eptr->asym.value,
-                            (symint_t) ((eptr->asym.index == indexNil) ? indexNil : 0),
-                            (ifd < orig_sym_hdr.ifdMax) ? remap_file_number[ ifd ] : ifd);
+                            (eptr->asym.index == indexNil
+                             ? (symint_t) indexNil : 0),
+                            ((long) ifd < orig_sym_hdr.ifdMax
+                             ? remap_file_number[ifd] : (int) ifd));
     }
 
 
@@ -4822,7 +4811,9 @@ copy_object __proto((void))
        remaining > 0;
        remaining -= num_write)
     {
-      num_write = (remaining <= sizeof (buffer)) ? remaining : sizeof (buffer);
+      num_write
+       = (remaining <= (int) sizeof (buffer))
+         ? remaining : (int) sizeof (buffer);
       sys_read = fread ((PTR_T) buffer, 1, num_write, obj_in_stream);
       if (sys_read <= 0)
        pfatal_with_name (obj_in_name);
@@ -4848,10 +4839,12 @@ copy_object __proto((void))
 \f
 /* Ye olde main program.  */
 
+extern int main PARAMS ((int, char **));
+
 int
 main (argc, argv)
      int argc;
-     char *argv[];
+     char **argv;
 {
   int iflag = 0;
   char *p = local_rindex (argv[0], '/');
@@ -4868,13 +4861,13 @@ main (argc, argv)
 #if !defined(__SABER__) && !defined(lint)
   if (sizeof (efdr_t) > PAGE_USIZE)
     fatal ("Efdr_t has a sizeof %d bytes, when it should be less than %d",
-          sizeof (efdr_t),
-          PAGE_USIZE);
+          (int) sizeof (efdr_t),
+          (int) PAGE_USIZE);
 
   if (sizeof (page_t) != PAGE_USIZE)
     fatal ("Page_t has a sizeof %d bytes, when it should be %d",
-          sizeof (page_t),
-          PAGE_USIZE);
+          (int) sizeof (page_t),
+          (int) PAGE_USIZE);
 
 #endif
 
@@ -4955,23 +4948,23 @@ main (argc, argv)
 
   if (object_name == (char *) 0 || had_errors || optind != argc - 1)
     {
-      fprintf (stderr, "Calling Sequence:\n");
-      fprintf (stderr, "\tmips-tfile [-d <num>] [-v] [-i <o-in-file>] -o <o-out-file> <s-file> (or)\n");
-      fprintf (stderr, "\tmips-tfile [-d <num>] [-v] [-I <o-in-file>] -o <o-out-file> <s-file> (or)\n");
-      fprintf (stderr, "\tmips-tfile [-d <num>] [-v] <s-file> <o-in-file> <o-out-file>\n");
+      fprintf (stderr, _("Calling Sequence:\n"));
+      fprintf (stderr, _("\tmips-tfile [-d <num>] [-v] [-i <o-in-file>] -o <o-out-file> <s-file> (or)\n"));
+      fprintf (stderr, _("\tmips-tfile [-d <num>] [-v] [-I <o-in-file>] -o <o-out-file> <s-file> (or)\n"));
+      fprintf (stderr, _("\tmips-tfile [-d <num>] [-v] <s-file> <o-in-file> <o-out-file>\n"));
       fprintf (stderr, "\n");
-      fprintf (stderr, "Debug levels are:\n");
-      fprintf (stderr, "    1\tGeneral debug + trace functions/blocks.\n");
-      fprintf (stderr, "    2\tDebug level 1 + trace externals.\n");
-      fprintf (stderr, "    3\tDebug level 2 + trace all symbols.\n");
-      fprintf (stderr, "    4\tDebug level 3 + trace memory allocations.\n");
+      fprintf (stderr, _("Debug levels are:\n"));
+      fprintf (stderr, _("    1\tGeneral debug + trace functions/blocks.\n"));
+      fprintf (stderr, _("    2\tDebug level 1 + trace externals.\n"));
+      fprintf (stderr, _("    3\tDebug level 2 + trace all symbols.\n"));
+      fprintf (stderr, _("    4\tDebug level 3 + trace memory allocations.\n"));
       return 1;
     }
 
 
   if (version)
     {
-      fprintf (stderr, "mips-tfile version %s", version_string);
+      fprintf (stderr, _("mips-tfile version %s"), version_string);
 #ifdef TARGET_VERSION
       TARGET_VERSION;
 #endif
@@ -5072,11 +5065,7 @@ catch_signal (signum)
      int signum;
 {
   (void) signal (signum, SIG_DFL);     /* just in case...  */
-#ifdef NO_SYS_SIGLIST
-  fatal ("caught signal");
-#else
-  fatal (sys_siglist[signum]);
-#endif  
+  fatal ("%s", strsignal(signum));
 }
 
 /* Print a fatal error message.  NAME is the text.
@@ -5084,7 +5073,7 @@ catch_signal (signum)
 
 void
 pfatal_with_name (msg)
-     char *msg;
+  const char *msg;
 {
   int save_errno = errno;              /* just in case....  */
   if (line_number > 0)
@@ -5116,7 +5105,7 @@ out_of_bounds (indx, max, str, prog_line)
   if (indx < max)              /* just in case */
     return 0;
 
-  fprintf (stderr, "%s, %s:%ld index %u is out of bounds for %s, max is %u, mips-tfile.c line# %d\n",
+  fprintf (stderr, "%s, %s:%ld index %lu is out of bounds for %s, max is %lu, mips-tfile.c line# %d\n",
           progname, input_name, line_number, indx, str, max, prog_line);
 
   exit (1);
@@ -5125,7 +5114,7 @@ out_of_bounds (indx, max, str, prog_line)
 
 \f
 /* Allocate a cluster of pages.  USE_MALLOC says that malloc does not
-   like sbrk's behind it's back (or sbrk isn't available).  If we use
+   like sbrk's behind its back (or sbrk isn't available).  If we use
    sbrk, we assume it gives us zeroed pages.  */
 
 #ifndef MALLOC_CHECK
@@ -5135,10 +5124,7 @@ STATIC page_t *
 allocate_cluster (npages)
      Size_t npages;
 {
-  register page_t *value = (page_t *) calloc (npages, PAGE_USIZE);
-
-  if (value == 0)
-    fatal ("Virtual memory exhausted.");
+  register page_t *value = (page_t *) xcalloc (npages, PAGE_USIZE);
 
   if (debug > 3)
     fprintf (stderr, "\talloc\tnpages = %d, value = 0x%.8x\n", npages, value);
@@ -5167,7 +5153,12 @@ allocate_cluster (npages)
     pfatal_with_name ("allocate_cluster");
 
   if (debug > 3)
-    fprintf (stderr, "\talloc\tnpages = %d, value = 0x%.8x\n", npages, ptr);
+    {
+      fprintf (stderr, "\talloc\tnpages = %lu, value = ",
+              (unsigned long) npages);
+      fprintf (stderr, HOST_PTR_PRINTF, ptr);
+      fputs ("\n", stderr);
+    }
 
   return ptr;
 }
@@ -5316,7 +5307,7 @@ free_scope (ptr)
   alloc_counts[ (int)alloc_type_scope ].free_list.f_scope = ptr;
 
 #else
-  xfree ((PTR_T) ptr);
+  free ((PTR_T) ptr);
 #endif
 
 }
@@ -5473,7 +5464,7 @@ free_tag (ptr)
   alloc_counts[ (int)alloc_type_tag ].free_list.f_tag = ptr;
 
 #else
-  xfree ((PTR_T) ptr);
+  free ((PTR_T) ptr);
 #endif
 
 }
@@ -5531,7 +5522,7 @@ free_forward (ptr)
   alloc_counts[ (int)alloc_type_forward ].free_list.f_forward = ptr;
 
 #else
-  xfree ((PTR_T) ptr);
+  free ((PTR_T) ptr);
 #endif
 
 }
@@ -5589,7 +5580,7 @@ free_thead (ptr)
   alloc_counts[ (int)alloc_type_thead ].free_list.f_thead = ptr;
 
 #else
-  xfree ((PTR_T) ptr);
+  free ((PTR_T) ptr);
 #endif
 
 }
@@ -5597,23 +5588,21 @@ free_thead (ptr)
 #endif /* MIPS_DEBUGGING_INFO */
 
 \f
-#ifdef HAVE_VPRINTF
-
 /* Output an error message and exit */
 
 /*VARARGS*/
 void
-fatal VPROTO((const char *format, ...))
+fatal VPARAMS ((const char *format, ...))
 {
-#ifndef __STDC__
-  char *format;
+#ifndef ANSI_PROTOTYPES
+  const char *format;
 #endif
   va_list ap;
 
   VA_START (ap, format);
 
-#ifndef __STDC__
-  format = va_arg (ap, char *);
+#ifndef ANSI_PROTOTYPES
+  format = va_arg (ap, const char *);
 #endif
 
   if (line_number > 0)
@@ -5633,16 +5622,16 @@ fatal VPROTO((const char *format, ...))
 
 /*VARARGS*/
 void
-error VPROTO((const char *format, ...))
+error VPARAMS ((const char *format, ...))
 {
-#ifndef __STDC__
+#ifndef ANSI_PROTOTYPES
   char *format;
 #endif
   va_list ap;
 
   VA_START (ap, format);
 
-#ifndef __STDC__
+#ifndef ANSI_PROTOTYPES
   format = va_arg (ap, char *);
 #endif
 
@@ -5662,27 +5651,6 @@ error VPROTO((const char *format, ...))
   saber_stop ();
 }
 
-#else /* not HAVE_VPRINTF */
-
-void
-fatal (msg, arg1, arg2)
-     char *msg, *arg1, *arg2;
-{
-  error (msg, arg1, arg2);
-  exit (1);
-}
-
-void
-error (msg, arg1, arg2)
-     char *msg, *arg1, *arg2;
-{
-  fprintf (stderr, "%s: ", progname);
-  fprintf (stderr, msg, arg1, arg2);
-  fprintf (stderr, "\n");
-}
-
-#endif /* not HAVE_VPRINTF */
-
 /* More 'friendly' abort that prints the line and file.
    config.h can #define abort fancy_abort if you like that sort of thing.  */
 
@@ -5700,68 +5668,7 @@ void
 botch (s)
      const char *s;
 {
-  fatal (s);
-}
-
-/* Same as `malloc' but report error if no memory available.  */
-
-PTR_T
-xmalloc (size)
-     Size_t size;
-{
-  register PTR_T value = malloc (size);
-  if (value == 0)
-    fatal ("Virtual memory exhausted.");
-
-  if (debug > 3)
-    fprintf (stderr, "\tmalloc\tptr = 0x%.8x, size = %10u\n", value, size);
-
-  return value;
-}
-
-/* Same as `calloc' but report error if no memory available.  */
-
-PTR_T
-xcalloc (size1, size2)
-     Size_t size1, size2;
-{
-  register PTR_T value = calloc (size1, size2);
-  if (value == 0)
-    fatal ("Virtual memory exhausted.");
-
-  if (debug > 3)
-    fprintf (stderr, "\tcalloc\tptr = 0x%.8x, size1 = %10u, size2 = %10u [%u]\n",
-            value, size1, size2, size1+size2);
-
-  return value;
-}
-
-/* Same as `realloc' but report error if no memory available.  */
-
-PTR_T
-xrealloc (ptr, size)
-     PTR_T ptr;
-     Size_t size;
-{
-  register PTR_T result = realloc (ptr, size);
-  if (!result)
-    fatal ("Virtual memory exhausted.");
-
-  if (debug > 3)
-    fprintf (stderr, "\trealloc\tptr = 0x%.8x, size = %10u, orig = 0x%.8x\n",
-            result, size, ptr);
-
-  return result;
-}
-
-void
-xfree (ptr)
-     PTR_T ptr;
-{
-  if (debug > 3)
-    fprintf (stderr, "\tfree\tptr = 0x%.8x\n", ptr);
-
-  free (ptr);
+  fatal ("%s", s);
 }
 
 \f