aboutsummaryrefslogtreecommitdiff
path: root/bfd/cache.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-06-29 10:06:40 +0000
committerAlan Modra <amodra@gmail.com>2003-06-29 10:06:40 +0000
commitc58b95236ce4c9345c4fa76e7ef16762e5229380 (patch)
tree332a115744ba45143797b861b78058e6f42fb995 /bfd/cache.c
parent58611256d83c4bd2c27a88982d8449c99fdd154f (diff)
downloadgdb-c58b95236ce4c9345c4fa76e7ef16762e5229380.zip
gdb-c58b95236ce4c9345c4fa76e7ef16762e5229380.tar.gz
gdb-c58b95236ce4c9345c4fa76e7ef16762e5229380.tar.bz2
Convert to C90 and a few tweaks.
Diffstat (limited to 'bfd/cache.c')
-rw-r--r--bfd/cache.c38
1 files changed, 14 insertions, 24 deletions
diff --git a/bfd/cache.c b/bfd/cache.c
index 98a1c72..b309165 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 <<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 ();