summaryrefslogtreecommitdiff
path: root/binutils/coffgrok.c
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2003-09-14 12:20:17 +0000
committerAndreas Jaeger <aj@suse.de>2003-09-14 12:20:17 +0000
commit6c005e01b64221d08aa98d200dcfb2643035a56b (patch)
tree8cefce2f9d02c8b5c079bb88dafa55ba82e611d1 /binutils/coffgrok.c
parent17b8d31fd43344c75068f41df0a4b6e3e9bf1b4e (diff)
downloadbinutils-redhat-6c005e01b64221d08aa98d200dcfb2643035a56b.tar.gz
* addr2line.c: Convert to ISO C90 prototypes, change PTR, remove
unneeded (void *) casts. * ar.c: Likewise. * arlex.l: Likewise. * arparse.y: Likewise. * arsup.c: Likewise. * binemul.c: Likewise. * binemul.h: Likewise. * bucomm.c: Likewise. * bucomm.h: Likewise. * budbg.h: Likewise. * budemang.c: Likewise. * budemang.h: Likewise. * coffdump.c: Likewise. * coffgrok.c: Likewise. * cxxfilt.c: Likewise. * debug.c: Likewise. * debug.h: Likewise. * deflex.l: Likewise. * dlltool.c: Likewise. * dlltool.h: Likewise. * dllwrap.c: Likewise. * emul_aix.c: Likewise. * filemode.c: Likewise. * ieee.c: Likewise. * nlmconv.c: Likewise. * nlmconv.h: Likewise. * nlmheader.y: Likewise. * nm.c: Likewise. * prdbg.c: Likewise. * rclex.l: Likewise. * rcparse.y: Likewise. * rdcoff.c: Likewise. * rddbg.c: Likewise. * rename.c: Likewise. * resbin.c: Likewise. * rescoff.c: Likewise. * resrc.c: Likewise. * size.c: Likewise. * srconv.c: Likewise. * stabs.c: Likewise. * strings.c: Likewise. * sysdump.c: Likewise. * sysinfo.y: Likewise. * syslex.l: Likewise. * unwind-ia64.c: Likewise. * unwind-ia64.h: Likewise. * version.c: Likewise. * windres.c: Likewise. * windres.h: Likewise. * winduni.c: Likewise. * wrstabs.c: Likewise.
Diffstat (limited to 'binutils/coffgrok.c')
-rw-r--r--binutils/coffgrok.c75
1 files changed, 32 insertions, 43 deletions
diff --git a/binutils/coffgrok.c b/binutils/coffgrok.c
index 8cab8d57eb..a6145c95a5 100644
--- a/binutils/coffgrok.c
+++ b/binutils/coffgrok.c
@@ -1,5 +1,5 @@
/* coffgrok.c
- Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002
+ Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -56,30 +56,30 @@ static struct coff_ptr_struct *rawsyms;
static int rawcount;
static bfd *abfd;
-#define PTR_SIZE 4
-#define SHORT_SIZE 2
-#define INT_SIZE 4
-#define LONG_SIZE 4
-#define FLOAT_SIZE 4
-#define DOUBLE_SIZE 8
+#define PTR_SIZE 4
+#define SHORT_SIZE 2
+#define INT_SIZE 4
+#define LONG_SIZE 4
+#define FLOAT_SIZE 4
+#define DOUBLE_SIZE 8
#define INDEXOF(p) ((struct coff_ptr_struct *)(p)-(rawsyms))
-static struct coff_scope *empty_scope PARAMS ((void));
-static struct coff_symbol *empty_symbol PARAMS ((void));
-static void push_scope PARAMS ((int));
-static void pop_scope PARAMS ((void));
-static void do_sections_p1 PARAMS ((struct coff_ofile *));
-static void do_sections_p2 PARAMS ((struct coff_ofile *));
-static struct coff_where *do_where PARAMS ((int));
-static struct coff_line *do_lines PARAMS ((int, char *));
-static struct coff_type *do_type PARAMS ((int));
-static struct coff_visible *do_visible PARAMS ((int));
-static int do_define PARAMS ((int, struct coff_scope *));
-static struct coff_ofile *doit PARAMS ((void));
+static struct coff_scope *empty_scope (void);
+static struct coff_symbol *empty_symbol (void);
+static void push_scope (int);
+static void pop_scope (void);
+static void do_sections_p1 (struct coff_ofile *);
+static void do_sections_p2 (struct coff_ofile *);
+static struct coff_where *do_where (int);
+static struct coff_line *do_lines (int, char *);
+static struct coff_type *do_type (int);
+static struct coff_visible *do_visible (int);
+static int do_define (int, struct coff_scope *);
+static struct coff_ofile *doit (void);
static struct coff_scope *
-empty_scope ()
+empty_scope (void)
{
struct coff_scope *l;
l = (struct coff_scope *) (xcalloc (sizeof (struct coff_scope), 1));
@@ -87,15 +87,14 @@ empty_scope ()
}
static struct coff_symbol *
-empty_symbol ()
+empty_symbol (void)
{
return (struct coff_symbol *) (xcalloc (sizeof (struct coff_symbol), 1));
}
/*int l;*/
static void
-push_scope (link)
- int link;
+push_scope (int link)
{
struct coff_scope *n = empty_scope ();
if (link)
@@ -119,14 +118,13 @@ push_scope (link)
}
static void
-pop_scope ()
+pop_scope (void)
{
top_scope = top_scope->parent;
}
static void
-do_sections_p1 (head)
- struct coff_ofile *head;
+do_sections_p1 (struct coff_ofile *head)
{
asection *section;
int idx;
@@ -175,8 +173,7 @@ do_sections_p1 (head)
}
static void
-do_sections_p2 (head)
- struct coff_ofile *head;
+do_sections_p2 (struct coff_ofile *head)
{
asection *section;
for (section = abfd->sections; section; section = section->next)
@@ -198,8 +195,7 @@ do_sections_p2 (head)
}
static struct coff_where *
-do_where (i)
- int i;
+do_where (int i)
{
struct internal_syment *sym = &rawsyms[i].u.syment;
struct coff_where *where =
@@ -258,9 +254,7 @@ do_where (i)
static
struct coff_line *
-do_lines (i, name)
- int i;
- char *name ATTRIBUTE_UNUSED;
+do_lines (int i, char *name ATTRIBUTE_UNUSED)
{
struct coff_line *res = (struct coff_line *) xcalloc (sizeof (struct coff_line), 1);
asection *s;
@@ -307,8 +301,7 @@ do_lines (i, name)
static
struct coff_type *
-do_type (i)
- int i;
+do_type (int i)
{
struct internal_syment *sym = &rawsyms[i].u.syment;
union internal_auxent *aux = &rawsyms[i + 1].u.auxent;
@@ -474,8 +467,7 @@ do_type (i)
}
static struct coff_visible *
-do_visible (i)
- int i;
+do_visible (int i)
{
struct internal_syment *sym = &rawsyms[i].u.syment;
struct coff_visible *visible =
@@ -539,9 +531,7 @@ do_visible (i)
}
static int
-do_define (i, b)
- int i;
- struct coff_scope *b;
+do_define (int i, struct coff_scope *b)
{
static int symbol_index;
struct internal_syment *sym = &rawsyms[i].u.syment;
@@ -601,7 +591,7 @@ do_define (i, b)
static
struct coff_ofile *
-doit ()
+doit (void)
{
int i;
int infile = 0;
@@ -728,8 +718,7 @@ doit ()
}
struct coff_ofile *
-coff_grok (inabfd)
- bfd *inabfd;
+coff_grok (bfd *inabfd)
{
long storage;
struct coff_ofile *p;