OSDN Git Service

(sparclite): Use machine independent USItype instead of explicit types.
[pf3gnuchains/gcc-fork.git] / gcc / mips-tdump.c
index ee46ec9..5f30aba 100644 (file)
@@ -33,12 +33,12 @@ typedef const void *CPTR_T;
 #define __proto(x) x
 #else
 
-#ifdef _STDIO_H_               /* Ultrix 4.0 */
+#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 *PTR_T;                                   /* Ultrix 3.1 */
 typedef char *CPTR_T;
 #endif
 
@@ -51,6 +51,12 @@ typedef char *CPTR_T;
 #define uint   unsigned int
 #define ulong  unsigned long
 
+#ifdef index
+#undef index
+#undef rindex
+#endif
+
+
 /* Do 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
@@ -60,7 +66,7 @@ typedef char *CPTR_T;
 #define ptrdiff_t      int
 
 \f
-/* Redefination of of storage classes as an enumeration for better
+/* Redefinition of of storage classes as an enumeration for better
    debugging.  */
 
 #ifndef stStaParam
@@ -108,7 +114,7 @@ typedef enum st {
   st_Local     = stLocal,      /* local variable */
   st_Label     = stLabel,      /* label */
   st_Proc      = stProc,       /*     "      "  Procedure */
-  st_Block     = stBlock,      /* beginnning of block */
+  st_Block     = stBlock,      /* beginning of block */
   st_End       = stEnd,        /* end (of anything) */
   st_Member    = stMember,     /* member (of anything  - struct/union/enum */
   st_Typedef   = stTypedef,    /* type definition */
@@ -121,7 +127,7 @@ typedef enum st {
   st_Str       = stStr,        /* string */
   st_Number    = stNumber,     /* pure number (ie. 4 NOR 2+2) */
   st_Expr      = stExpr,       /* 2+2 vs. 4 */
-  st_Type      = stType,       /* post-coersion SER */
+  st_Type      = stType,       /* post-coercion SER */
   st_Max       = stMax         /* max type+1 */
 } st_t;
 
@@ -221,7 +227,7 @@ EXTR        *e_symbols;             /* external symbols */
 LINER  *lines;                 /* line numbers */
 DNR    *dense_nums;            /* dense numbers */
 OPTR   *opt_symbols;           /* optimization symbols */
-AUXU   *aux_symbols;           /* Auxilary symbols */
+AUXU   *aux_symbols;           /* Auxiliary symbols */
 char   *aux_used;              /* map of which aux syms are used */
 FDR    *file_desc;             /* file tables */
 ulong  *rfile_desc;            /* relative file tables */
@@ -242,25 +248,11 @@ char *glevel_to_string    __proto((glevel_t));
 char *lang_to_string   __proto((lang_t));
 char *type_to_string   __proto((AUXU *, int));
 
-/* Library routines with prototypes.  */
-#if !defined(NO_LIB_PROTOTYPE) && !defined(_OSF_SOURCE) && !defined(_STDIO_H_)
-extern void    perror  __proto((const char *));
-extern char    *strcpy __proto((char *, const char *));
-extern int     strlen  __proto((const char *));
-extern int     open    __proto((const char *, int, ...));
-#endif
-
-extern int     read    __proto((int, PTR_T, size_t));
-extern int     write   __proto((int, CPTR_T, size_t));
-extern int     close   __proto((int));
-extern off_t   lseek   __proto((int, off_t, int));
 extern PTR_T   malloc  __proto((size_t));
 extern PTR_T   calloc  __proto((size_t, size_t));
 extern PTR_T   realloc __proto((PTR_T, size_t));
 extern void    free    __proto((PTR_T));
-extern void    exit    __proto((int));
 extern char    *ctime  __proto((time_t *));
-extern int     getopt  __proto((int, char **, const char *));
 
 extern char *optarg;
 extern int   optind;
@@ -636,7 +628,7 @@ type_to_string (aux_ptr, index)
     {
       /*
        * Snarf up any array bounds in the correct order.  Arrays
-       * store 5 succesive words in the aux. table:
+       * store 5 successive words in the aux. table:
        *       word 0  RNDXR to type of the bounds (ie, int)
        *       word 1  Current file descriptor index
        *       word 2  low bound
@@ -822,7 +814,7 @@ print_sym_hdr (sym_ptr)
   printf("    %-*s %11ld %11d %11d\n", width, "Optimization Symbols",
         sym_ptr->cbOptOffset, sym_ptr->ioptMax, sym_ptr->ioptMax * sizeof (OPTR));
 
-  printf("    %-*s %11ld %11d %11d\n", width, "Auxilary Symbols",
+  printf("    %-*s %11ld %11d %11d\n", width, "Auxiliary Symbols",
         sym_ptr->cbAuxOffset, sym_ptr->iauxMax, sym_ptr->iauxMax * sizeof (AUXU));
 
   printf("    %-*s %11ld %11d %11d\n", width, "Local Strings",
@@ -1358,7 +1350,7 @@ read_tfile __proto((void))
   aux_symbols = (AUXU *) read_seek ((PTR_T)0,
                                    sym_hdr.iauxMax * sizeof (AUXU),
                                    sym_hdr.cbAuxOffset,
-                                   "Auxilary symbols");
+                                   "Auxiliary symbols");
 
   if (sym_hdr.iauxMax > 0)
     {