/* 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).
#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
/* Insert a BFD into the cache. */
-static INLINE void
-insert (abfd)
- bfd *abfd;
+static void
+insert (bfd *abfd)
{
if (bfd_last_cache == NULL)
{
/* 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;
recently used cacheable BFD and close it. */
static bfd_boolean
-close_one ()
+close_one (void)
{
register bfd *kill;
/* 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;
*/
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)
*/
bfd_boolean
-bfd_cache_close (abfd)
- bfd *abfd;
+bfd_cache_close (bfd *abfd)
{
if (abfd->iostream == NULL
|| (abfd->flags & BFD_IN_MEMORY) != 0)
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 *>>
*/
FILE *
-bfd_open_file (abfd)
- bfd *abfd;
+bfd_open_file (bfd *abfd)
{
abfd->cacheable = TRUE; /* Allow it to be closed later. */
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
*/
FILE *
-bfd_cache_lookup_worker (abfd)
- bfd *abfd;
+bfd_cache_lookup_worker (bfd *abfd)
{
if ((abfd->flags & BFD_IN_MEMORY) != 0)
abort ();