Convert to C90 and a few tweaks.
[deliverable/binutils-gdb.git] / bfd / cache.c
index 98a1c72e88437141498d60169c9e6071b465f99d..b3091659984c4c91d31ded8a49443b97f1fe76f1 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD library -- caching of file descriptors.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001, 2002
+   Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
 
@@ -40,10 +40,7 @@ SECTION
 #include "sysdep.h"
 #include "libbfd.h"
 
-static void insert PARAMS ((bfd *));
-static void snip PARAMS ((bfd *));
-static bfd_boolean close_one PARAMS ((void));
-static bfd_boolean bfd_cache_delete PARAMS ((bfd *));
+static bfd_boolean bfd_cache_delete (bfd *);
 
 /*
 INTERNAL_FUNCTION
@@ -95,9 +92,8 @@ bfd *bfd_last_cache;
 
 /* Insert a BFD into the cache.  */
 
-static INLINE void
-insert (abfd)
-     bfd *abfd;
+static void
+insert (bfd *abfd)
 {
   if (bfd_last_cache == NULL)
     {
@@ -116,9 +112,8 @@ insert (abfd)
 
 /* Remove a BFD from the cache.  */
 
-static INLINE void
-snip (abfd)
-     bfd *abfd;
+static void
+snip (bfd *abfd)
 {
   abfd->lru_prev->lru_next = abfd->lru_next;
   abfd->lru_next->lru_prev = abfd->lru_prev;
@@ -134,7 +129,7 @@ snip (abfd)
    recently used cacheable BFD and close it.  */
 
 static bfd_boolean
-close_one ()
+close_one (void)
 {
   register bfd *kill;
 
@@ -168,8 +163,7 @@ close_one ()
 /* Close a BFD and remove it from the cache.  */
 
 static bfd_boolean
-bfd_cache_delete (abfd)
-     bfd *abfd;
+bfd_cache_delete (bfd *abfd)
 {
   bfd_boolean ret;
 
@@ -201,8 +195,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_cache_init (abfd)
-     bfd *abfd;
+bfd_cache_init (bfd *abfd)
 {
   BFD_ASSERT (abfd->iostream != NULL);
   if (open_files >= BFD_CACHE_MAX_OPEN)
@@ -232,8 +225,7 @@ RETURNS
 */
 
 bfd_boolean
-bfd_cache_close (abfd)
-     bfd *abfd;
+bfd_cache_close (bfd *abfd)
 {
   if (abfd->iostream == NULL
       || (abfd->flags & BFD_IN_MEMORY) != 0)
@@ -247,7 +239,7 @@ INTERNAL_FUNCTION
        bfd_open_file
 
 SYNOPSIS
-       FILE* bfd_open_file(bfd *abfd);
+       FILE* bfd_open_file (bfd *abfd);
 
 DESCRIPTION
        Call the OS to open a file for @var{abfd}.  Return the <<FILE *>>
@@ -258,8 +250,7 @@ DESCRIPTION
 */
 
 FILE *
-bfd_open_file (abfd)
-     bfd *abfd;
+bfd_open_file (bfd *abfd)
 {
   abfd->cacheable = TRUE;      /* Allow it to be closed later.  */
 
@@ -331,7 +322,7 @@ INTERNAL_FUNCTION
        bfd_cache_lookup_worker
 
 SYNOPSIS
-       FILE *bfd_cache_lookup_worker(bfd *abfd);
+       FILE *bfd_cache_lookup_worker (bfd *abfd);
 
 DESCRIPTION
        Called when the macro <<bfd_cache_lookup>> fails to find a
@@ -342,8 +333,7 @@ DESCRIPTION
 */
 
 FILE *
-bfd_cache_lookup_worker (abfd)
-     bfd *abfd;
+bfd_cache_lookup_worker (bfd *abfd)
 {
   if ((abfd->flags & BFD_IN_MEMORY) != 0)
     abort ();
This page took 0.037895 seconds and 4 git commands to generate.