From 95c86dce98818a6ad325e8a608b83e379ad38741 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sun, 29 Jun 2003 10:06:40 +0000 Subject: Convert to C90 and a few tweaks. --- bfd/cache.c | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) (limited to 'bfd/cache.c') diff --git a/bfd/cache.c b/bfd/cache.c index 98a1c72e88..b309165998 100644 --- a/bfd/cache.c +++ b/bfd/cache.c @@ -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 <> @@ -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 <> 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 (); -- cgit v1.2.1