Added/Updated Danish translation.
[binutils-gdb.git] / binutils / wrstabs.c
index e428174f5b2e38c9b5c58da3008821f6c3c54030..5d0dc3bd30dd29a0054cd4a85116319c6ee167ec 100644 (file)
@@ -1,5 +1,5 @@
 /* wrstabs.c -- Output stabs debugging information
-   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@cygnus.com>.
 
    This file is part of GNU Binutils.
    information.  */
 
 #include <stdio.h>
-#include <ctype.h>
 #include <assert.h>
 
 #include "bfd.h"
 #include "bucomm.h"
 #include "libiberty.h"
+#include "safe-ctype.h"
 #include "debug.h"
 #include "budbg.h"
 
@@ -363,8 +363,8 @@ stab_write_symbol (info, type, desc, value, string)
       h = string_hash_lookup (&info->strhash, string, true, true);
       if (h == NULL)
        {
-         fprintf (stderr, _("string_hash_lookup failed: %s\n"),
-                  bfd_errmsg (bfd_get_error ()));
+         non_fatal (_("string_hash_lookup failed: %s"),
+                    bfd_errmsg (bfd_get_error ()));
          return false;
        }
       if (h->index != -1)
@@ -505,8 +505,8 @@ write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
   if (! bfd_hash_table_init (&info.strhash.table, string_hash_newfunc)
       || ! bfd_hash_table_init (&info.typedef_hash.table, string_hash_newfunc))
     {
-      fprintf (stderr, "bfd_hash_table_init_failed: %s\n",
-              bfd_errmsg (bfd_get_error ()));
+      non_fatal ("bfd_hash_table_init_failed: %s",
+                bfd_errmsg (bfd_get_error ()));
       return false;
     }
 
@@ -663,7 +663,7 @@ stab_int_type (p, size, unsignedp)
 
   if (size <= 0 || (size > sizeof (long) && size != 8))
     {
-      fprintf (stderr, _("stab_int_type: bad size %u\n"), size);
+      non_fatal (_("stab_int_type: bad size %u"), size);
       return false;
     }
 
@@ -795,7 +795,7 @@ stab_bool_type (p, size)
     case 2:
       index = -22;
       break;
-      
+
     default:
     case 4:
       index = -16;
@@ -963,7 +963,7 @@ stab_modify_type (info, mod, size, cache, cache_alloc)
     }
 
   return true;
-}  
+}
 
 /* Push a pointer type.  */
 
@@ -984,7 +984,7 @@ static boolean
 stab_function_type (p, argcount, varargs)
      PTR p;
      int argcount;
-     boolean varargs;
+     boolean varargs ATTRIBUTE_UNUSED;
 {
   struct stab_write_handle *info = (struct stab_write_handle *) p;
   int i;
@@ -1368,7 +1368,6 @@ stab_get_struct_index (info, tag, id, kind, psize)
 /* Start outputting a struct.  We ignore the tag, and handle it in
    stab_tag.  */
 
-/*ARGSUSED*/
 static boolean
 stab_start_struct_type (p, tag, id, structp, size)
      PTR p;
@@ -1464,9 +1463,8 @@ stab_struct_field (p, name, bitpos, bitsize, visibility)
     {
       bitsize = size * 8;
       if (bitsize == 0)
-       fprintf (stderr,
-                _("%s: warning: unknown size for field `%s' in struct\n"),
-                bfd_get_filename (info->abfd), name);
+       non_fatal (_("%s: warning: unknown size for field `%s' in struct"),
+                  bfd_get_filename (info->abfd), name);
     }
 
   sprintf (n, "%s%s:%s%s,%ld,%ld;", info->type_stack->fields, name, vis, s,
@@ -2025,8 +2023,8 @@ stab_typdef (p, name)
   h = string_hash_lookup (&info->typedef_hash, name, true, false);
   if (h == NULL)
     {
-      fprintf (stderr, _("string_hash_lookup failed: %s\n"),
-              bfd_errmsg (bfd_get_error ()));
+      non_fatal (_("string_hash_lookup failed: %s"),
+                bfd_errmsg (bfd_get_error ()));
       return false;
     }
 
@@ -2173,7 +2171,7 @@ stab_variable (p, name, kind, val)
       kindstr = "";
 
       /* Make sure that this is a type reference or definition.  */
-      if (! isdigit ((unsigned char) *s))
+      if (! ISDIGIT (*s))
        {
          char *n;
          long index;
@@ -2380,10 +2378,9 @@ stab_end_block (p, addr)
 
 /* End a function.  */
 
-/*ARGSUSED*/
 static boolean
 stab_end_function (p)
-     PTR p;
+     PTR p ATTRIBUTE_UNUSED;
 {
   return true;
 }