From Gerhard Tonn <TON@de.ibm.com>:
[deliverable/binutils-gdb.git] / bfd / libbfd.c
index 5aa51aee2726c358958acd09cf027342bf5aaa17..29170a0d561da230cc973c43db78522caf196ae9 100644 (file)
@@ -1,24 +1,24 @@
 /* Assorted BFD support routines, only used internally.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001
+   2000, 2001, 2002
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
-This file is part of BFD, the Binary File Descriptor library.
+   This file is part of BFD, the Binary File Descriptor library.
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-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.  */
+   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 "bfd.h"
 #include "sysdep.h"
@@ -593,7 +593,7 @@ INTERNAL_FUNCTION
        bfd_write_bigendian_4byte_int
 
 SYNOPSIS
-       void bfd_write_bigendian_4byte_int (bfd *, unsigned int);
+       boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
 
 DESCRIPTION
        Write a 4 byte integer @var{i} to the output BFD @var{abfd}, in big
@@ -601,15 +601,14 @@ DESCRIPTION
        archives.
 
 */
-void
+boolean
 bfd_write_bigendian_4byte_int (abfd, i)
      bfd *abfd;
      unsigned int i;
 {
   bfd_byte buffer[4];
   bfd_putb32 ((bfd_vma) i, buffer);
-  if (bfd_bwrite ((PTR) buffer, (bfd_size_type) 4, abfd) != 4)
-    abort ();
+  return bfd_bwrite ((PTR) buffer, (bfd_size_type) 4, abfd) == 4;
 }
 
 bfd_vma
@@ -1354,8 +1353,8 @@ _bfd_generic_get_section_contents_in_window (abfd, section, w, offset, count)
       return bfd_get_section_contents (abfd, section, w->data, offset, count);
     }
   if (offset + count > section->_raw_size
-      || (bfd_get_file_window (abfd, section->filepos + offset, count, w, true)
-         == false))
+      || ! bfd_get_file_window (abfd, section->filepos + offset, count, w,
+                               true))
     return false;
   return true;
 #else
@@ -1448,6 +1447,7 @@ _bfd_generic_verify_endian_match (ibfd, obfd)
 
 /* Give a warning at runtime if someone compiles code which calls
    old routines.  */
+
 void
 warn_deprecated (what, file, line, func)
      const char *what;
@@ -1460,11 +1460,13 @@ warn_deprecated (what, file, line, func)
 
   if (~(size_t) func & ~mask)
     {
-      fprintf (stderr, _("Deprecated %s called"), what);
+      /* Note: seperate sentances in order to allow
+        for translation into other languages.  */
       if (func)
-       fprintf (stderr, _(" at %s line %d in %s\n"), file, line, func);
+       fprintf (stderr, _("Deprecated %s called at %s line %d in %s\n"),
+                what, file, line, func);
       else
-       fprintf (stderr, "\n");
+       fprintf (stderr, _("Deprecated %s called\n"), what);
       mask |= ~(size_t) func;
     }
 }
This page took 0.02604 seconds and 4 git commands to generate.