summaryrefslogtreecommitdiff
path: root/binutils/nlmheader.y
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/nlmheader.y
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/nlmheader.y')
-rw-r--r--binutils/nlmheader.y76
1 files changed, 30 insertions, 46 deletions
diff --git a/binutils/nlmheader.y b/binutils/nlmheader.y
index 8aef16834f..64101dbf3b 100644
--- a/binutils/nlmheader.y
+++ b/binutils/nlmheader.y
@@ -1,5 +1,5 @@
%{/* nlmheader.y - parse NLM header specification keywords.
- Copyright 1993, 1994, 1995, 1997, 1998, 2001, 2002
+ Copyright 1993, 1994, 1995, 1997, 1998, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -91,22 +91,21 @@ static char *symbol_prefix;
#define yyerror(msg) nlmheader_error (msg);
/* Local functions. */
-static int yylex PARAMS ((void));
-static void nlmlex_file_push PARAMS ((const char *));
-static bfd_boolean nlmlex_file_open PARAMS ((const char *));
-static int nlmlex_buf_init PARAMS ((void));
-static char nlmlex_buf_add PARAMS ((int));
-static long nlmlex_get_number PARAMS ((const char *));
-static void nlmheader_identify PARAMS ((void));
-static void nlmheader_warn PARAMS ((const char *, int));
-static void nlmheader_error PARAMS ((const char *));
-static struct string_list * string_list_cons PARAMS ((char *,
- struct string_list *));
-static struct string_list * string_list_append PARAMS ((struct string_list *,
- struct string_list *));
-static struct string_list * string_list_append1 PARAMS ((struct string_list *,
- char *));
-static char *xstrdup PARAMS ((const char *));
+static int yylex (void);
+static void nlmlex_file_push (const char *);
+static bfd_boolean nlmlex_file_open (const char *);
+static int nlmlex_buf_init (void);
+static char nlmlex_buf_add (int);
+static long nlmlex_get_number (const char *);
+static void nlmheader_identify (void);
+static void nlmheader_warn (const char *, int);
+static void nlmheader_error (const char *);
+static struct string_list * string_list_cons (char *, struct string_list *);
+static struct string_list * string_list_append (struct string_list *,
+ struct string_list *);
+static struct string_list * string_list_append1 (struct string_list *,
+ char *);
+static char *xstrdup (const char *);
%}
@@ -537,8 +536,7 @@ static struct input current;
/* Start the lexer going on the main input file. */
bfd_boolean
-nlmlex_file (name)
- const char *name;
+nlmlex_file (const char *name)
{
current.next = NULL;
return nlmlex_file_open (name);
@@ -547,8 +545,7 @@ nlmlex_file (name)
/* Start the lexer going on a subsidiary input file. */
static void
-nlmlex_file_push (name)
- const char *name;
+nlmlex_file_push (const char *name)
{
struct input *push;
@@ -566,8 +563,7 @@ nlmlex_file_push (name)
/* Start lexing from a file. */
static bfd_boolean
-nlmlex_file_open (name)
- const char *name;
+nlmlex_file_open (const char *name)
{
current.file = fopen (name, "r");
if (current.file == NULL)
@@ -640,7 +636,7 @@ static int lex_pos;
((void) (lex_buf != NULL ? lex_pos = 0 : nlmlex_buf_init ()))
static int
-nlmlex_buf_init ()
+nlmlex_buf_init (void)
{
lex_size = 10;
lex_buf = xmalloc (lex_size + 1);
@@ -658,8 +654,7 @@ nlmlex_buf_init ()
: nlmlex_buf_add (c)))
static char
-nlmlex_buf_add (c)
- int c;
+nlmlex_buf_add (int c)
{
if (lex_pos >= lex_size)
{
@@ -674,7 +669,7 @@ nlmlex_buf_add (c)
code. */
static int
-yylex ()
+yylex (void)
{
int c;
@@ -857,8 +852,7 @@ tail_recurse:
/* Get a number from a string. */
static long
-nlmlex_get_number (s)
- const char *s;
+nlmlex_get_number (const char *s)
{
long ret;
char *send;
@@ -875,7 +869,7 @@ nlmlex_get_number (s)
number. */
static void
-nlmheader_identify ()
+nlmheader_identify (void)
{
static int done;
@@ -890,9 +884,7 @@ nlmheader_identify ()
/* Issue a warning. */
static void
-nlmheader_warn (s, imax)
- const char *s;
- int imax;
+nlmheader_warn (const char *s, int imax)
{
nlmheader_identify ();
fprintf (stderr, "%s:%d: %s", current.name, current.lineno, s);
@@ -904,8 +896,7 @@ nlmheader_warn (s, imax)
/* Report an error. */
static void
-nlmheader_error (s)
- const char *s;
+nlmheader_error (const char *s)
{
nlmheader_warn (s, -1);
++parse_errors;
@@ -914,9 +905,7 @@ nlmheader_error (s)
/* Add a string to a string list. */
static struct string_list *
-string_list_cons (s, l)
- char *s;
- struct string_list *l;
+string_list_cons (char *s, struct string_list *l)
{
struct string_list *ret;
@@ -929,9 +918,7 @@ string_list_cons (s, l)
/* Append a string list to another string list. */
static struct string_list *
-string_list_append (l1, l2)
- struct string_list *l1;
- struct string_list *l2;
+string_list_append (struct string_list *l1, struct string_list *l2)
{
register struct string_list **pp;
@@ -944,9 +931,7 @@ string_list_append (l1, l2)
/* Append a string to a string list. */
static struct string_list *
-string_list_append1 (l, s)
- struct string_list *l;
- char *s;
+string_list_append1 (struct string_list *l, char *s)
{
struct string_list *n;
register struct string_list **pp;
@@ -963,8 +948,7 @@ string_list_append1 (l, s)
/* Duplicate a string in memory. */
static char *
-xstrdup (s)
- const char *s;
+xstrdup (const char *s)
{
unsigned long len;
char *ret;