summaryrefslogtreecommitdiff
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
commit2da42df615c0489291f8d3e1ce873642755a49c6 (patch)
tree2294d219a7e8025d03f45821f383cf3692f249ed
parent4a4b3fedfec42967926860950ee4fae2f01af98e (diff)
downloadbinutils-gdb-2da42df615c0489291f8d3e1ce873642755a49c6.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.
-rw-r--r--binutils/ChangeLog55
-rw-r--r--binutils/addr2line.c45
-rw-r--r--binutils/ar.c129
-rw-r--r--binutils/arlex.l6
-rw-r--r--binutils/arparse.y10
-rw-r--r--binutils/arsup.c58
-rw-r--r--binutils/arsup.h36
-rw-r--r--binutils/binemul.c47
-rw-r--r--binutils/binemul.h42
-rw-r--r--binutils/bucomm.c56
-rw-r--r--binutils/bucomm.h59
-rw-r--r--binutils/budbg.h25
-rw-r--r--binutils/budemang.c6
-rw-r--r--binutils/budemang.h4
-rw-r--r--binutils/coffdump.c68
-rw-r--r--binutils/coffgrok.c75
-rw-r--r--binutils/cxxfilt.c42
-rw-r--r--binutils/debug.c511
-rw-r--r--binutils/debug.h237
-rw-r--r--binutils/deflex.l4
-rw-r--r--binutils/dlltool.c366
-rw-r--r--binutils/dlltool.h31
-rw-r--r--binutils/dllwrap.c63
-rw-r--r--binutils/emul_aix.c56
-rw-r--r--binutils/filemode.c21
-rw-r--r--binutils/ieee.c799
-rw-r--r--binutils/nlmconv.c171
-rw-r--r--binutils/nlmconv.h6
-rw-r--r--binutils/nlmheader.y76
-rw-r--r--binutils/nm.c302
-rw-r--r--binutils/prdbg.c482
-rw-r--r--binutils/rclex.l26
-rw-r--r--binutils/rcparse.y3
-rw-r--r--binutils/rdcoff.c100
-rw-r--r--binutils/rddbg.c63
-rw-r--r--binutils/rename.c18
-rw-r--r--binutils/resbin.c274
-rw-r--r--binutils/rescoff.c63
-rw-r--r--binutils/resrc.c366
-rw-r--r--binutils/size.c91
-rw-r--r--binutils/srconv.c286
-rw-r--r--binutils/stabs.c461
-rw-r--r--binutils/strings.c67
-rw-r--r--binutils/sysdump.c127
-rw-r--r--binutils/sysinfo.y9
-rw-r--r--binutils/syslex.l4
-rw-r--r--binutils/unwind-ia64.c217
-rw-r--r--binutils/unwind-ia64.h4
-rw-r--r--binutils/version.c7
-rw-r--r--binutils/windres.c118
-rw-r--r--binutils/windres.h114
-rw-r--r--binutils/winduni.c12
-rw-r--r--binutils/wrstabs.c450
53 files changed, 2379 insertions, 4389 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 6801f383cbf..04af201f512 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,58 @@
+2003-09-14 Andreas Jaeger <aj@suse.de>
+
+ * 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.
+
2003-09-10 James E Wilson <wilson@specifixinc.com>
* MAINTAINERS: Update my e-mail address.
diff --git a/binutils/addr2line.c b/binutils/addr2line.c
index 8ebd87e8ab9..b5f5a0c5f15 100644
--- a/binutils/addr2line.c
+++ b/binutils/addr2line.c
@@ -1,5 +1,6 @@
/* addr2line.c -- convert addresses to line number and function name
- Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
Contributed by Ulrich Lauther <Ulrich.Lauther@mchp.siemens.de>
This file is part of GNU Binutils.
@@ -58,18 +59,16 @@ static struct option long_options[] =
{0, no_argument, 0, 0}
};
-static void usage PARAMS ((FILE *, int));
-static void slurp_symtab PARAMS ((bfd *));
-static void find_address_in_section PARAMS ((bfd *, asection *, PTR));
-static void translate_addresses PARAMS ((bfd *));
-static void process_file PARAMS ((const char *, const char *));
+static void usage (FILE *, int);
+static void slurp_symtab (bfd *);
+static void find_address_in_section (bfd *, asection *, void *);
+static void translate_addresses (bfd *);
+static void process_file (const char *, const char *);
/* Print a usage message to STREAM and exit with STATUS. */
static void
-usage (stream, status)
- FILE *stream;
- int status;
+usage (FILE *stream, int status)
{
fprintf (stream, _("Usage: %s [option(s)] [addr(s)]\n"), program_name);
fprintf (stream, _(" Convert addresses into line number/file name pairs.\n"));
@@ -93,8 +92,7 @@ usage (stream, status)
/* Read in the symbol table. */
static void
-slurp_symtab (abfd)
- bfd *abfd;
+slurp_symtab (bfd *abfd)
{
long symcount;
unsigned int size;
@@ -102,9 +100,9 @@ slurp_symtab (abfd)
if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0)
return;
- symcount = bfd_read_minisymbols (abfd, FALSE, (PTR) &syms, &size);
+ symcount = bfd_read_minisymbols (abfd, FALSE, (void *) &syms, &size);
if (symcount == 0)
- symcount = bfd_read_minisymbols (abfd, TRUE /* dynamic */, (PTR) &syms, &size);
+ symcount = bfd_read_minisymbols (abfd, TRUE /* dynamic */, (void *) &syms, &size);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
@@ -123,10 +121,8 @@ static bfd_boolean found;
bfd_map_over_sections. */
static void
-find_address_in_section (abfd, section, data)
- bfd *abfd;
- asection *section;
- PTR data ATTRIBUTE_UNUSED;
+find_address_in_section (bfd *abfd, asection *section,
+ void *data ATTRIBUTE_UNUSED)
{
bfd_vma vma;
bfd_size_type size;
@@ -153,8 +149,7 @@ find_address_in_section (abfd, section, data)
file_name:line_number and optionally function name. */
static void
-translate_addresses (abfd)
- bfd *abfd;
+translate_addresses (bfd *abfd)
{
int read_stdin = (naddr == 0);
@@ -177,7 +172,7 @@ translate_addresses (abfd)
}
found = FALSE;
- bfd_map_over_sections (abfd, find_address_in_section, (PTR) NULL);
+ bfd_map_over_sections (abfd, find_address_in_section, NULL);
if (! found)
{
@@ -230,9 +225,7 @@ translate_addresses (abfd)
/* Process a file. */
static void
-process_file (file_name, target)
- const char *file_name;
- const char *target;
+process_file (const char *file_name, const char *target)
{
bfd *abfd;
char **matching;
@@ -268,12 +261,10 @@ process_file (file_name, target)
bfd_close (abfd);
}
-int main PARAMS ((int, char **));
+int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
const char *file_name;
char *target;
diff --git a/binutils/ar.c b/binutils/ar.c
index 9a6946eb0dc..95e1c665b12 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -1,6 +1,6 @@
/* ar.c - Archive modify and extract.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002
+ 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -54,54 +54,30 @@
/* Kludge declaration from BFD! This is ugly! FIXME! XXX */
struct ar_hdr *
- bfd_special_undocumented_glue PARAMS ((bfd * abfd, const char *filename));
+ bfd_special_undocumented_glue (bfd * abfd, const char *filename);
/* Static declarations */
-static void
-mri_emul PARAMS ((void));
-
-static const char *
-normalize PARAMS ((const char *, bfd *));
-
-static void
-remove_output PARAMS ((void));
-
-static void
-map_over_members PARAMS ((bfd *, void (*)(bfd *), char **, int));
-
-static void
-print_contents PARAMS ((bfd * member));
-
-static void
-delete_members PARAMS ((bfd *, char **files_to_delete));
+static void mri_emul (void);
+static const char *normalize (const char *, bfd *);
+static void remove_output (void);
+static void map_over_members (bfd *, void (*)(bfd *), char **, int);
+static void print_contents (bfd * member);
+static void delete_members (bfd *, char **files_to_delete);
#if 0
-static void
-do_quick_append PARAMS ((const char *archive_filename,
- char **files_to_append));
+static void do_quick_append
+ (const char *archive_filename, char **files_to_append);
#endif
-static void
-move_members PARAMS ((bfd *, char **files_to_move));
-
-static void
-replace_members PARAMS ((bfd *, char **files_to_replace, bfd_boolean quick));
-
-static void
-print_descr PARAMS ((bfd * abfd));
-
-static void
-write_archive PARAMS ((bfd *));
-
-static void
-ranlib_only PARAMS ((const char *archname));
-
-static void
-ranlib_touch PARAMS ((const char *archname));
-
-static void
-usage PARAMS ((int));
+static void move_members (bfd *, char **files_to_move);
+static void replace_members
+ (bfd *, char **files_to_replace, bfd_boolean quick);
+static void print_descr (bfd * abfd);
+static void write_archive (bfd *);
+static void ranlib_only (const char *archname);
+static void ranlib_touch (const char *archname);
+static void usage (int);
/** Globals and flags */
@@ -148,7 +124,7 @@ enum pos
} postype = pos_default;
static bfd **
-get_pos_bfd PARAMS ((bfd **, enum pos, const char *));
+get_pos_bfd (bfd **, enum pos, const char *);
/* For extract/delete only. If COUNTED_NAME_MODE is TRUE, we only
extract the COUNTED_NAME_COUNTER instance of that name. */
@@ -166,7 +142,7 @@ static bfd_boolean full_pathname = FALSE;
int interactive = 0;
static void
-mri_emul ()
+mri_emul (void)
{
interactive = isatty (fileno (stdin));
yyparse ();
@@ -177,11 +153,7 @@ mri_emul ()
whose name matches one in FILES. */
static void
-map_over_members (arch, function, files, count)
- bfd *arch;
- void (*function) PARAMS ((bfd *));
- char **files;
- int count;
+map_over_members (bfd *arch, void (*function)(bfd *), char **files, int count)
{
bfd *head;
int match_count;
@@ -242,8 +214,7 @@ map_over_members (arch, function, files, count)
bfd_boolean operation_alters_arch = FALSE;
static void
-usage (help)
- int help;
+usage (int help)
{
FILE *s;
@@ -303,9 +274,7 @@ usage (help)
name which we will use in an archive. */
static const char *
-normalize (file, abfd)
- const char *file;
- bfd *abfd;
+normalize (const char *file, bfd *abfd)
{
const char *filename;
@@ -351,7 +320,7 @@ static FILE *output_file = NULL;
static bfd *output_bfd = NULL;
static void
-remove_output ()
+remove_output (void)
{
if (output_filename != NULL)
{
@@ -366,12 +335,10 @@ remove_output ()
/* The option parsing should be in its own function.
It will be when I have getopt working. */
-int main PARAMS ((int, char **));
+int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
char *arg_ptr;
char c;
@@ -726,9 +693,7 @@ main (argc, argv)
}
bfd *
-open_inarch (archive_filename, file)
- const char *archive_filename;
- const char *file;
+open_inarch (const char *archive_filename, const char *file)
{
const char *target;
bfd **last_one;
@@ -825,8 +790,7 @@ open_inarch (archive_filename, file)
}
static void
-print_contents (abfd)
- bfd *abfd;
+print_contents (bfd *abfd)
{
int ncopied = 0;
char *cbuf = xmalloc (BUFSIZE);
@@ -873,8 +837,7 @@ print_contents (abfd)
Gilmore */
void
-extract_file (abfd)
- bfd *abfd;
+extract_file (bfd *abfd)
{
FILE *ostream;
char *cbuf = xmalloc (BUFSIZE);
@@ -966,9 +929,7 @@ extract_file (abfd)
/* Just do it quickly; don't worry about dups, armap, or anything like that */
static void
-do_quick_append (archive_filename, files_to_append)
- const char *archive_filename;
- char **files_to_append;
+do_quick_append (const char *archive_filename, char **files_to_append)
{
FILE *ofile, *ifile;
char *buf = xmalloc (BUFSIZE);
@@ -1080,8 +1041,7 @@ do_quick_append (archive_filename, files_to_append)
#endif /* 0 */
static void
-write_archive (iarch)
- bfd *iarch;
+write_archive (bfd *iarch)
{
bfd *obfd;
char *old_name, *new_name;
@@ -1134,10 +1094,7 @@ write_archive (iarch)
and should be a pos value. */
static bfd **
-get_pos_bfd (contents, default_pos, default_posname)
- bfd **contents;
- enum pos default_pos;
- const char *default_posname;
+get_pos_bfd (bfd **contents, enum pos default_pos, const char *default_posname)
{
bfd **after_bfd = contents;
enum pos realpos;
@@ -1173,9 +1130,7 @@ get_pos_bfd (contents, default_pos, default_posname)
}
static void
-delete_members (arch, files_to_delete)
- bfd *arch;
- char **files_to_delete;
+delete_members (bfd *arch, char **files_to_delete)
{
bfd **current_ptr_ptr;
bfd_boolean found;
@@ -1246,9 +1201,7 @@ delete_members (arch, files_to_delete)
/* Reposition existing members within an archive */
static void
-move_members (arch, files_to_move)
- bfd *arch;
- char **files_to_move;
+move_members (bfd *arch, char **files_to_move)
{
bfd **after_bfd; /* New entries go after this one */
bfd **current_ptr_ptr; /* cdr pointer into contents */
@@ -1293,10 +1246,7 @@ move_members (arch, files_to_move)
/* Ought to default to replacing in place, but this is existing practice! */
static void
-replace_members (arch, files_to_move, quick)
- bfd *arch;
- char **files_to_move;
- bfd_boolean quick;
+replace_members (bfd *arch, char **files_to_move, bfd_boolean quick)
{
bfd_boolean changed = FALSE;
bfd **after_bfd; /* New entries go after this one */
@@ -1370,8 +1320,7 @@ replace_members (arch, files_to_move, quick)
}
static void
-ranlib_only (archname)
- const char *archname;
+ranlib_only (const char *archname)
{
bfd *arch;
@@ -1385,8 +1334,7 @@ ranlib_only (archname)
/* Update the timestamp of the symbol map of an archive. */
static void
-ranlib_touch (archname)
- const char *archname;
+ranlib_touch (const char *archname)
{
#ifdef __GO32__
/* I don't think updating works on go32. */
@@ -1431,8 +1379,7 @@ ranlib_touch (archname)
/* Things which are interesting to map over all or some of the files: */
static void
-print_descr (abfd)
- bfd *abfd;
+print_descr (bfd *abfd)
{
print_arelt_descr (stdout, abfd, verbose);
}
diff --git a/binutils/arlex.l b/binutils/arlex.l
index c1771a55840..ab1ff164e19 100644
--- a/binutils/arlex.l
+++ b/binutils/arlex.l
@@ -1,7 +1,7 @@
%{
/* arlex.l - Strange script language lexer */
-/* Copyright 1992, 1997, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright 1992, 1997, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define YY_NO_UNPUT
-extern int yylex PARAMS ((void));
+extern int yylex (void);
int linenumber;
%}
@@ -87,5 +87,5 @@ int linenumber;
%%
#ifndef yywrap
/* Needed for lex, though not flex. */
-int yywrap() { return 1; }
+int yywrap(void) { return 1; }
#endif
diff --git a/binutils/arparse.y b/binutils/arparse.y
index cf0ece1b92a..d54de24d1c5 100644
--- a/binutils/arparse.y
+++ b/binutils/arparse.y
@@ -1,7 +1,8 @@
%{
/* arparse.y - Stange script language parser */
-/* Copyright 1992, 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright 1992, 1993, 1995, 1997, 1999, 2003
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -29,8 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bucomm.h"
#include "arsup.h"
extern int verbose;
-extern int yylex PARAMS ((void));
-static int yyerror PARAMS ((const char *));
+extern int yylex (void);
+static int yyerror (const char *);
%}
%union {
@@ -193,8 +194,7 @@ verbose_command:
%%
static int
-yyerror (x)
- const char *x ATTRIBUTE_UNUSED;
+yyerror (const char *x ATTRIBUTE_UNUSED)
{
extern int linenumber;
diff --git a/binutils/arsup.c b/binutils/arsup.c
index b3e967243aa..e69281fcfd7 100644
--- a/binutils/arsup.c
+++ b/binutils/arsup.c
@@ -1,5 +1,5 @@
/* arsup.c - Archive support for MRI compatibility
- Copyright 1992, 1994, 1995, 1996, 1997, 2000, 2002
+ Copyright 1992, 1994, 1995, 1996, 1997, 2000, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -32,17 +32,14 @@
#include "filenames.h"
static void map_over_list
- PARAMS ((bfd *, void (*function) (bfd *, bfd *), struct list *));
-static void ar_directory_doer PARAMS ((bfd *, bfd *));
-static void ar_addlib_doer PARAMS ((bfd *, bfd *));
+ (bfd *, void (*function) (bfd *, bfd *), struct list *);
+static void ar_directory_doer (bfd *, bfd *);
+static void ar_addlib_doer (bfd *, bfd *);
extern int verbose;
static void
-map_over_list (arch, function, list)
- bfd *arch;
- void (*function) PARAMS ((bfd *, bfd *));
- struct list *list;
+map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
{
bfd *head;
@@ -92,18 +89,13 @@ map_over_list (arch, function, list)
FILE *outfile;
static void
-ar_directory_doer (abfd, ignore)
- bfd *abfd;
- bfd *ignore ATTRIBUTE_UNUSED;
+ar_directory_doer (bfd *abfd, bfd *ignore ATTRIBUTE_UNUSED)
{
print_arelt_descr(outfile, abfd, verbose);
}
void
-ar_directory (ar_name, list, output)
- char *ar_name;
- struct list *list;
- char *output;
+ar_directory (char *ar_name, struct list *list, char *output)
{
bfd *arch;
@@ -130,7 +122,7 @@ ar_directory (ar_name, list, output)
}
void
-DEFUN_VOID(prompt)
+prompt (void)
{
extern int interactive;
@@ -142,7 +134,7 @@ DEFUN_VOID(prompt)
}
void
-maybequit ()
+maybequit (void)
{
if (! interactive)
xexit (9);
@@ -153,9 +145,7 @@ bfd *obfd;
char *real_name;
void
-ar_open (name, t)
- char *name;
- int t;
+ar_open (char *name, int t)
{
char *tname = (char *) xmalloc (strlen (name) + 10);
const char *bname = lbasename (name);
@@ -219,9 +209,7 @@ ar_open (name, t)
}
static void
-ar_addlib_doer (abfd, prev)
- bfd *abfd;
- bfd *prev;
+ar_addlib_doer (bfd *abfd, bfd *prev)
{
/* Add this module to the output bfd. */
if (prev != NULL)
@@ -232,9 +220,7 @@ ar_addlib_doer (abfd, prev)
}
void
-ar_addlib (name, list)
- char *name;
- struct list *list;
+ar_addlib (char *name, struct list *list)
{
if (obfd == NULL)
{
@@ -254,8 +240,7 @@ ar_addlib (name, list)
}
void
-ar_addmod (list)
- struct list *list;
+ar_addmod (struct list *list)
{
if (!obfd)
{
@@ -286,15 +271,14 @@ ar_addmod (list)
void
-ar_clear ()
+ar_clear (void)
{
if (obfd)
obfd->archive_head = 0;
}
void
-ar_delete (list)
- struct list *list;
+ar_delete (struct list *list)
{
if (!obfd)
{
@@ -336,7 +320,7 @@ ar_delete (list)
}
void
-ar_save ()
+ar_save (void)
{
if (!obfd)
{
@@ -356,8 +340,7 @@ ar_save ()
}
void
-ar_replace (list)
- struct list *list;
+ar_replace (struct list *list)
{
if (!obfd)
{
@@ -423,7 +406,7 @@ ar_replace (list)
/* And I added this one. */
void
-ar_list ()
+ar_list (void)
{
if (!obfd)
{
@@ -446,7 +429,7 @@ ar_list ()
}
void
-ar_end ()
+ar_end (void)
{
if (obfd)
{
@@ -456,8 +439,7 @@ ar_end ()
}
void
-ar_extract (list)
- struct list *list;
+ar_extract (struct list *list)
{
if (!obfd)
{
diff --git a/binutils/arsup.h b/binutils/arsup.h
index aeec2589b01..e3a1807919b 100644
--- a/binutils/arsup.h
+++ b/binutils/arsup.h
@@ -1,5 +1,5 @@
/* arsup.h - archive support header file
- Copyright 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1996, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -22,40 +22,40 @@ struct list {
struct list *next;
};
-void maybequit PARAMS ((void));
+void maybequit (void);
-void prompt PARAMS ((void));
+void prompt (void);
-void ar_clear PARAMS ((void));
+void ar_clear (void);
-void ar_replace PARAMS ((struct list *));
+void ar_replace (struct list *);
-void ar_delete PARAMS ((struct list *));
+void ar_delete (struct list *);
-void ar_save PARAMS ((void));
+void ar_save (void);
-void ar_list PARAMS ((void));
+void ar_list (void);
-void ar_open PARAMS ((char *, int));
+void ar_open (char *, int);
-void ar_directory PARAMS ((char *, struct list *, char *));
+void ar_directory (char *, struct list *, char *);
-void ar_addmod PARAMS ((struct list *));
+void ar_addmod (struct list *);
-void ar_addlib PARAMS ((char *, struct list *));
+void ar_addlib (char *, struct list *);
-void ar_end PARAMS ((void));
+void ar_end (void);
-void ar_extract PARAMS ((struct list *));
+void ar_extract (struct list *);
-bfd *open_inarch PARAMS ((const char *archive_filename, const char *));
+bfd *open_inarch (const char *archive_filename, const char *);
-extern int yylex PARAMS ((void));
+extern int yylex (void);
-int yyparse PARAMS ((void));
+int yyparse (void);
/* Functions from ar.c */
-void extract_file PARAMS ((bfd * abfd));
+void extract_file (bfd * abfd);
extern int interactive;
diff --git a/binutils/binemul.c b/binutils/binemul.c
index 67aaba86238..3f6ed6573d6 100644
--- a/binutils/binemul.c
+++ b/binutils/binemul.c
@@ -1,5 +1,5 @@
/* Binutils emulation layer.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Written by Tom Rix, Redhat.
This file is part of GNU Binutils.
@@ -23,16 +23,14 @@
extern bin_emulation_xfer_type bin_dummy_emulation;
void
-ar_emul_usage (fp)
- FILE *fp;
+ar_emul_usage (FILE *fp)
{
if (bin_dummy_emulation.ar_usage)
bin_dummy_emulation.ar_usage (fp);
}
void
-ar_emul_default_usage (fp)
- FILE *fp;
+ar_emul_default_usage (FILE *fp)
{
AR_EMUL_USAGE_PRINT_OPTION_HEADER (fp);
/* xgettext:c-format */
@@ -40,10 +38,7 @@ ar_emul_default_usage (fp)
}
bfd_boolean
-ar_emul_append (after_bfd, file_name, verbose)
- bfd **after_bfd;
- char *file_name;
- bfd_boolean verbose;
+ar_emul_append (bfd **after_bfd, char *file_name, bfd_boolean verbose)
{
if (bin_dummy_emulation.ar_append)
return bin_dummy_emulation.ar_append (after_bfd, file_name, verbose);
@@ -52,10 +47,8 @@ ar_emul_append (after_bfd, file_name, verbose)
}
bfd_boolean
-ar_emul_default_append (after_bfd, file_name, verbose)
- bfd **after_bfd;
- char *file_name;
- bfd_boolean verbose;
+ar_emul_default_append (bfd **after_bfd, char *file_name,
+ bfd_boolean verbose)
{
bfd *temp;
@@ -71,10 +64,7 @@ ar_emul_default_append (after_bfd, file_name, verbose)
}
bfd_boolean
-ar_emul_replace (after_bfd, file_name, verbose)
- bfd **after_bfd;
- char *file_name;
- bfd_boolean verbose;
+ar_emul_replace (bfd **after_bfd, char *file_name, bfd_boolean verbose)
{
if (bin_dummy_emulation.ar_replace)
return bin_dummy_emulation.ar_replace (after_bfd, file_name, verbose);
@@ -83,10 +73,8 @@ ar_emul_replace (after_bfd, file_name, verbose)
}
bfd_boolean
-ar_emul_default_replace (after_bfd, file_name, verbose)
- bfd **after_bfd;
- char *file_name;
- bfd_boolean verbose;
+ar_emul_default_replace (bfd **after_bfd, char *file_name,
+ bfd_boolean verbose)
{
bfd *temp;
@@ -102,10 +90,7 @@ ar_emul_default_replace (after_bfd, file_name, verbose)
}
bfd_boolean
-ar_emul_create (abfd_out, archive_file_name, file_name)
- bfd **abfd_out;
- char *archive_file_name;
- char *file_name;
+ar_emul_create (bfd **abfd_out, char *archive_file_name, char *file_name)
{
if (bin_dummy_emulation.ar_create)
return bin_dummy_emulation.ar_create (abfd_out, archive_file_name,
@@ -115,10 +100,8 @@ ar_emul_create (abfd_out, archive_file_name, file_name)
}
bfd_boolean
-ar_emul_default_create (abfd_out, archive_file_name, file_name)
- bfd **abfd_out;
- char *archive_file_name;
- char *file_name;
+ar_emul_default_create (bfd **abfd_out, char *archive_file_name,
+ char *file_name)
{
char *target = NULL;
@@ -148,8 +131,7 @@ ar_emul_default_create (abfd_out, archive_file_name, file_name)
}
bfd_boolean
-ar_emul_parse_arg (arg)
- char *arg;
+ar_emul_parse_arg (char *arg)
{
if (bin_dummy_emulation.ar_parse_arg)
return bin_dummy_emulation.ar_parse_arg (arg);
@@ -158,8 +140,7 @@ ar_emul_parse_arg (arg)
}
bfd_boolean
-ar_emul_default_parse_arg (arg)
- char *arg ATTRIBUTE_UNUSED;
+ar_emul_default_parse_arg (char *arg ATTRIBUTE_UNUSED)
{
return FALSE;
}
diff --git a/binutils/binemul.h b/binutils/binemul.h
index f8afae518ba..59dc2bde20d 100644
--- a/binutils/binemul.h
+++ b/binutils/binemul.h
@@ -1,5 +1,5 @@
/* Binutils emulation layer.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Written by Tom Rix, Redhat.
This file is part of GNU Binutils.
@@ -24,26 +24,16 @@
#include "bfd.h"
#include "bucomm.h"
-extern void ar_emul_usage
- PARAMS ((FILE *));
-extern void ar_emul_default_usage
- PARAMS ((FILE *));
-extern bfd_boolean ar_emul_append
- PARAMS ((bfd **, char *, bfd_boolean));
-extern bfd_boolean ar_emul_default_append
- PARAMS ((bfd **, char *, bfd_boolean));
-extern bfd_boolean ar_emul_replace
- PARAMS ((bfd **, char *, bfd_boolean));
-extern bfd_boolean ar_emul_default_replace
- PARAMS ((bfd **, char *, bfd_boolean));
-extern bfd_boolean ar_emul_create
- PARAMS ((bfd **, char *, char *));
-extern bfd_boolean ar_emul_default_create
- PARAMS ((bfd **, char *, char *));
-extern bfd_boolean ar_emul_parse_arg
- PARAMS ((char *));
-extern bfd_boolean ar_emul_default_parse_arg
- PARAMS ((char *));
+extern void ar_emul_usage (FILE *);
+extern void ar_emul_default_usage (FILE *);
+extern bfd_boolean ar_emul_append (bfd **, char *, bfd_boolean);
+extern bfd_boolean ar_emul_default_append (bfd **, char *, bfd_boolean);
+extern bfd_boolean ar_emul_replace (bfd **, char *, bfd_boolean);
+extern bfd_boolean ar_emul_default_replace (bfd **, char *, bfd_boolean);
+extern bfd_boolean ar_emul_create (bfd **, char *, char *);
+extern bfd_boolean ar_emul_default_create (bfd **, char *, char *);
+extern bfd_boolean ar_emul_parse_arg (char *);
+extern bfd_boolean ar_emul_default_parse_arg (char *);
/* Macros for common output. */
@@ -63,11 +53,11 @@ extern bfd_boolean ar_emul_default_parse_arg
typedef struct bin_emulation_xfer_struct
{
/* Print out the extra options. */
- void (* ar_usage) PARAMS ((FILE *fp));
- bfd_boolean (* ar_append) PARAMS ((bfd **, char *, bfd_boolean));
- bfd_boolean (* ar_replace) PARAMS ((bfd **, char *, bfd_boolean));
- bfd_boolean (* ar_create) PARAMS ((bfd **, char *, char *));
- bfd_boolean (* ar_parse_arg) PARAMS ((char *));
+ void (* ar_usage) (FILE *fp);
+ bfd_boolean (* ar_append) (bfd **, char *, bfd_boolean);
+ bfd_boolean (* ar_replace) (bfd **, char *, bfd_boolean);
+ bfd_boolean (* ar_create) (bfd **, char *, char *);
+ bfd_boolean (* ar_parse_arg) (char *);
}
bin_emulation_xfer_type;
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index 237f934fe8c..a6bb6e483f9 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -38,18 +38,17 @@ typedef long time_t;
#endif
#endif
-static const char * endian_string PARAMS ((enum bfd_endian));
-static int display_target_list PARAMS ((void));
-static int display_info_table PARAMS ((int, int));
-static int display_target_tables PARAMS ((void));
+static const char * endian_string (enum bfd_endian);
+static int display_target_list (void);
+static int display_info_table (int, int);
+static int display_target_tables (void);
/* Error reporting. */
char *program_name;
void
-bfd_nonfatal (string)
- const char *string;
+bfd_nonfatal (const char *string)
{
const char *errmsg = bfd_errmsg (bfd_get_error ());
@@ -60,17 +59,14 @@ bfd_nonfatal (string)
}
void
-bfd_fatal (string)
- const char *string;
+bfd_fatal (const char *string)
{
bfd_nonfatal (string);
xexit (1);
}
void
-report (format, args)
- const char * format;
- va_list args;
+report (const char * format, va_list args)
{
fprintf (stderr, "%s: ", program_name);
vfprintf (stderr, format, args);
@@ -104,7 +100,7 @@ non_fatal VPARAMS ((const char *format, ...))
different target. */
void
-set_default_bfd_target ()
+set_default_bfd_target (void)
{
/* The macro TARGET is defined by Makefile. */
const char *target = TARGET;
@@ -119,8 +115,7 @@ set_default_bfd_target ()
the possible matching targets. */
void
-list_matching_formats (p)
- char **p;
+list_matching_formats (char **p)
{
fprintf (stderr, _("%s: Matching formats:"), program_name);
while (*p)
@@ -131,9 +126,7 @@ list_matching_formats (p)
/* List the supported targets. */
void
-list_supported_targets (name, f)
- const char *name;
- FILE *f;
+list_supported_targets (const char *name, FILE *f)
{
int t;
const char **targ_names = bfd_target_list ();
@@ -152,9 +145,7 @@ list_supported_targets (name, f)
/* List the supported architectures. */
void
-list_supported_architectures (name, f)
- const char *name;
- FILE *f;
+list_supported_architectures (const char *name, FILE *f)
{
const char **arch;
@@ -172,8 +163,7 @@ list_supported_architectures (name, f)
#define LONGEST_ARCH sizeof ("powerpc:common")
static const char *
-endian_string (endian)
- enum bfd_endian endian;
+endian_string (enum bfd_endian endian)
{
switch (endian)
{
@@ -187,7 +177,7 @@ endian_string (endian)
by its endianness and the architectures it supports. */
static int
-display_target_list ()
+display_target_list (void)
{
char *dummy_name;
int t;
@@ -239,9 +229,7 @@ display_target_list ()
architectures down). */
static int
-display_info_table (first, last)
- int first;
- int last;
+display_info_table (int first, int last)
{
int t;
int a;
@@ -316,7 +304,7 @@ display_info_table (first, last)
BFD has been configured to support. */
static int
-display_target_tables ()
+display_target_tables (void)
{
int t;
int columns;
@@ -355,7 +343,7 @@ display_target_tables ()
}
int
-display_info ()
+display_info (void)
{
printf (_("BFD header file version %s\n"), BFD_VERSION_STRING);
if (! display_target_list () || ! display_target_tables ())
@@ -369,10 +357,7 @@ display_info ()
Mode User\tGroup\tSize\tDate Name */
void
-print_arelt_descr (file, abfd, verbose)
- FILE *file;
- bfd *abfd;
- bfd_boolean verbose;
+print_arelt_descr (FILE *file, bfd *abfd, bfd_boolean verbose)
{
struct stat buf;
@@ -403,8 +388,7 @@ print_arelt_descr (file, abfd, verbose)
/* Return the name of a temporary file in the same directory as FILENAME. */
char *
-make_tempname (filename)
- char *filename;
+make_tempname (char *filename)
{
static char template[] = "stXXXXXX";
char *tmpname;
@@ -454,9 +438,7 @@ make_tempname (filename)
parsed. */
bfd_vma
-parse_vma (s, arg)
- const char *s;
- const char *arg;
+parse_vma (const char *s, const char *arg)
{
bfd_vma ret;
const char *end;
diff --git a/binutils/bucomm.h b/binutils/bucomm.h
index 2598d13386b..9b17791cd52 100644
--- a/binutils/bucomm.h
+++ b/binutils/bucomm.h
@@ -148,67 +148,48 @@ void *alloca ();
#endif
/* bucomm.c */
-void bfd_nonfatal
- PARAMS ((const char *));
+void bfd_nonfatal (const char *);
-void bfd_fatal
- PARAMS ((const char *)) ATTRIBUTE_NORETURN;
+void bfd_fatal (const char *) ATTRIBUTE_NORETURN;
-void report
- PARAMS ((const char *, va_list));
+void report (const char *, va_list);
-void fatal
- PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-void non_fatal
- PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1;
+void non_fatal (const char *, ...) ATTRIBUTE_PRINTF_1;
-void set_default_bfd_target
- PARAMS ((void));
+void set_default_bfd_target (void);
-void list_matching_formats
- PARAMS ((char **));
+void list_matching_formats (char **);
-void list_supported_targets
- PARAMS ((const char *, FILE *));
+void list_supported_targets (const char *, FILE *);
-void list_supported_architectures
- PARAMS ((const char *, FILE *));
+void list_supported_architectures (const char *, FILE *);
-int display_info
- PARAMS ((void));
-
-void print_arelt_descr
- PARAMS ((FILE *, bfd *, bfd_boolean));
+int display_info (void);
-char *make_tempname
- PARAMS ((char *));
+void print_arelt_descr (FILE *, bfd *, bfd_boolean);
-bfd_vma parse_vma
- PARAMS ((const char *, const char *));
+char *make_tempname (char *);
+
+bfd_vma parse_vma (const char *, const char *);
extern char *program_name;
/* filemode.c */
-void mode_string
- PARAMS ((unsigned long, char *));
+void mode_string (unsigned long, char *);
/* version.c */
-extern void print_version
- PARAMS ((const char *));
+extern void print_version (const char *);
/* rename.c */
-extern void set_times
- PARAMS ((const char *, const struct stat *));
+extern void set_times (const char *, const struct stat *);
-extern int smart_rename
- PARAMS ((const char *, const char *, int));
+extern int smart_rename (const char *, const char *, int);
/* libiberty. */
-PTR xmalloc
- PARAMS ((size_t));
+void *xmalloc (size_t);
-PTR xrealloc
- PARAMS ((PTR, size_t));
+void *xrealloc (void *, size_t);
#endif /* _BUCOMM_H */
diff --git a/binutils/budbg.h b/binutils/budbg.h
index e4eee835cb7..f5c03bd23a2 100644
--- a/binutils/budbg.h
+++ b/binutils/budbg.h
@@ -26,9 +26,8 @@
/* Routine used to read generic debugging information. */
-extern PTR read_debugging_info
- PARAMS ((bfd *, asymbol **, long));
-
+extern void *read_debugging_info (bfd *, asymbol **, long);
+
/* Routine used to print generic debugging information. */
extern bfd_boolean print_debugging_info
@@ -36,30 +35,24 @@ extern bfd_boolean print_debugging_info
/* Routines used to read and write stabs information. */
-extern PTR start_stab
- PARAMS ((PTR, bfd *, bfd_boolean, asymbol **, long));
+extern void *start_stab (void *, bfd *, bfd_boolean, asymbol **, long);
-extern bfd_boolean finish_stab
- PARAMS ((PTR, PTR));
+extern bfd_boolean finish_stab (void *, void *);
extern bfd_boolean parse_stab
- PARAMS ((PTR, PTR, int, int, bfd_vma, const char *));
+ (void *, void *, int, int, bfd_vma, const char *);
extern bfd_boolean write_stabs_in_sections_debugging_info
- PARAMS ((bfd *, PTR, bfd_byte **, bfd_size_type *, bfd_byte **,
- bfd_size_type *));
+ (bfd *, void *, bfd_byte **, bfd_size_type *, bfd_byte **, bfd_size_type *);
/* Routines used to read and write IEEE debugging information. */
-extern bfd_boolean parse_ieee
- PARAMS ((PTR, bfd *, const bfd_byte *, bfd_size_type));
+extern bfd_boolean parse_ieee (void *, bfd *, const bfd_byte *, bfd_size_type);
-extern bfd_boolean write_ieee_debugging_info
- PARAMS ((bfd *, PTR));
+extern bfd_boolean write_ieee_debugging_info (bfd *, void *);
/* Routine used to read COFF debugging information. */
-extern bfd_boolean parse_coff
- PARAMS ((bfd *, asymbol **, long, PTR));
+extern bfd_boolean parse_coff (bfd *, asymbol **, long, void *);
#endif
diff --git a/binutils/budemang.c b/binutils/budemang.c
index 3f8d385c5e5..525a1c898cf 100644
--- a/binutils/budemang.c
+++ b/binutils/budemang.c
@@ -1,5 +1,5 @@
/* demangle.c -- A wrapper calling libiberty cplus_demangle
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -36,9 +36,7 @@
other such chars that would otherwise confuse the demangler. */
char *
-demangle (abfd, name)
- bfd *abfd;
- const char *name;
+demangle (bfd *abfd, const char *name)
{
char *res;
const char *p;
diff --git a/binutils/budemang.h b/binutils/budemang.h
index 60a3c2d733f..b837d718d12 100644
--- a/binutils/budemang.h
+++ b/binutils/budemang.h
@@ -1,5 +1,5 @@
/* demangle.h -- A wrapper calling libiberty cplus_demangle
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -20,6 +20,6 @@
#ifndef BUDEMANG_H
#define BUDEMANG_H
-char *demangle PARAMS ((bfd *, const char *));
+char *demangle (bfd *, const char *);
#endif
diff --git a/binutils/coffdump.c b/binutils/coffdump.c
index 8f538e89279..039b9553621 100644
--- a/binutils/coffdump.c
+++ b/binutils/coffdump.c
@@ -1,5 +1,5 @@
/* Coff file dumper.
- Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -32,23 +32,22 @@
static int atnl;
-static void tab PARAMS ((int));
-static void nl PARAMS ((void));
-static void dump_coff_lines PARAMS ((struct coff_line *));
-static void dump_coff_type PARAMS ((struct coff_type *));
-static void dump_coff_where PARAMS ((struct coff_where *));
-static void dump_coff_visible PARAMS ((struct coff_visible *));
-extern void dump_coff_symbol PARAMS ((struct coff_symbol *));
-static void dump_coff_scope PARAMS ((struct coff_scope *));
-static void dump_coff_sfile PARAMS ((struct coff_sfile *));
-static void dump_coff_section PARAMS ((struct coff_section *));
-extern void coff_dump PARAMS ((struct coff_ofile *));
-static void show_usage PARAMS ((FILE *, int));
-extern int main PARAMS ((int, char **));
+static void tab (int);
+static void nl (void);
+static void dump_coff_lines (struct coff_line *);
+static void dump_coff_type (struct coff_type *);
+static void dump_coff_where (struct coff_where *);
+static void dump_coff_visible (struct coff_visible *);
+extern void dump_coff_symbol (struct coff_symbol *);
+static void dump_coff_scope (struct coff_scope *);
+static void dump_coff_sfile (struct coff_sfile *);
+static void dump_coff_section (struct coff_section *);
+extern void coff_dump (struct coff_ofile *);
+static void show_usage (FILE *, int);
+extern int main (int, char **);
static void
-tab (x)
- int x;
+tab (int x)
{
static int indent;
int i;
@@ -91,14 +90,13 @@ tab (x)
}
static void
-nl ()
+nl (void)
{
atnl = 1;
}
static void
-dump_coff_lines (p)
- struct coff_line *p;
+dump_coff_lines (struct coff_line *p)
{
int i;
int online = 0;
@@ -124,8 +122,7 @@ dump_coff_lines (p)
}
static void
-dump_coff_type (p)
- struct coff_type *p;
+dump_coff_type (struct coff_type *p)
{
tab (1);
printf ("size %d ", p->size);
@@ -244,8 +241,7 @@ dump_coff_type (p)
}
static void
-dump_coff_where (p)
- struct coff_where *p;
+dump_coff_where (struct coff_where *p)
{
tab (1);
switch (p->where)
@@ -284,8 +280,7 @@ dump_coff_where (p)
}
static void
-dump_coff_visible (p)
- struct coff_visible *p;
+dump_coff_visible (struct coff_visible *p)
{
tab (1);
switch (p->type)
@@ -331,8 +326,7 @@ dump_coff_visible (p)
}
void
-dump_coff_symbol (p)
- struct coff_symbol *p;
+dump_coff_symbol (struct coff_symbol *p)
{
tab (1);
printf ("List of symbols");
@@ -365,8 +359,7 @@ dump_coff_symbol (p)
}
static void
-dump_coff_scope (p)
- struct coff_scope *p;
+dump_coff_scope (struct coff_scope *p)
{
if (p)
{
@@ -402,8 +395,7 @@ dump_coff_scope (p)
}
static void
-dump_coff_sfile (p)
- struct coff_sfile *p;
+dump_coff_sfile (struct coff_sfile *p)
{
tab (1);
printf ("List of source files");
@@ -421,8 +413,7 @@ dump_coff_sfile (p)
}
static void
-dump_coff_section(ptr)
- struct coff_section *ptr;
+dump_coff_section (struct coff_section *ptr)
{
int i;
@@ -446,8 +437,7 @@ dump_coff_section(ptr)
}
void
-coff_dump (ptr)
- struct coff_ofile *ptr;
+coff_dump (struct coff_ofile *ptr)
{
int i;
@@ -464,9 +454,7 @@ coff_dump (ptr)
char * program_name;
static void
-show_usage (file, status)
- FILE *file;
- int status;
+show_usage (FILE *file, int status)
{
fprintf (file, _("Usage: %s [option(s)] in-file\n"), program_name);
fprintf (file, _(" Print a human readable interpretation of a SYSROFF object file\n"));
@@ -482,9 +470,7 @@ show_usage (file, status)
}
int
-main (ac, av)
- int ac;
- char *av[];
+main (int ac, char **av)
{
bfd *abfd;
struct coff_ofile *tree;
diff --git a/binutils/coffgrok.c b/binutils/coffgrok.c
index 8cab8d57eb1..a6145c95a54 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;
diff --git a/binutils/cxxfilt.c b/binutils/cxxfilt.c
index e4289c8ea1b..f41493b74ed 100644
--- a/binutils/cxxfilt.c
+++ b/binutils/cxxfilt.c
@@ -1,6 +1,6 @@
/* Demangler for GNU C++ - main program
Copyright 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.uucp)
Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling
Modified by Satish Pai (pai@apollo.hp.com) for HP demangling
@@ -32,13 +32,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
static int flags = DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE;
-static void demangle_it PARAMS ((char *));
-static void usage PARAMS ((FILE *, int)) ATTRIBUTE_NORETURN;
-static void print_demangler_list PARAMS ((FILE *));
+static void demangle_it (char *);
+static void usage (FILE *, int) ATTRIBUTE_NORETURN;
+static void print_demangler_list (FILE *);
static void
-demangle_it (mangled_name)
- char *mangled_name;
+demangle_it (char *mangled_name)
{
char *result;
@@ -55,14 +54,13 @@ demangle_it (mangled_name)
}
}
-static void
-print_demangler_list (stream)
- FILE *stream;
+static void
+print_demangler_list (FILE *stream)
{
- const struct demangler_engine *demangler;
+ const struct demangler_engine *demangler;
fprintf (stream, "{%s", libiberty_demanglers->demangling_style_name);
-
+
for (demangler = libiberty_demanglers + 1;
demangler->demangling_style != unknown_demangling;
++demangler)
@@ -72,9 +70,7 @@ print_demangler_list (stream)
}
static void
-usage (stream, status)
- FILE *stream;
- int status;
+usage (FILE *stream, int status)
{
fprintf (stream, "\
Usage: %s [-_] [-n] [--strip-underscores] [--no-strip-underscores] \n",
@@ -109,18 +105,16 @@ static const struct option long_options[] = {
{0, no_argument, 0, 0}
};
-static const char *
-standard_symbol_characters PARAMS ((void));
+static const char *standard_symbol_characters (void);
-static const char *
-hp_symbol_characters PARAMS ((void));
+static const char *hp_symbol_characters (void);
-/* Return the string of non-alnum characters that may occur
+/* Return the string of non-alnum characters that may occur
as a valid symbol component, in the standard assembler symbol
syntax. */
static const char *
-standard_symbol_characters ()
+standard_symbol_characters (void)
{
return "_$.";
}
@@ -157,17 +151,15 @@ standard_symbol_characters ()
So have fun. */
static const char *
-hp_symbol_characters ()
+hp_symbol_characters (void)
{
return "_$.<>#,*&[]:(){}";
}
-extern int main PARAMS ((int, char **));
+extern int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
char *result;
int c;
diff --git a/binutils/debug.c b/binutils/debug.c
index 3d7d48e2bbf..b711650b7d9 100644
--- a/binutils/debug.c
+++ b/binutils/debug.c
@@ -554,48 +554,45 @@ struct debug_type_real_list
/* Local functions. */
-static void debug_error
- PARAMS ((const char *));
+static void debug_error (const char *);
static struct debug_name *debug_add_to_namespace
- PARAMS ((struct debug_handle *, struct debug_namespace **, const char *,
- enum debug_object_kind, enum debug_object_linkage));
+ (struct debug_handle *, struct debug_namespace **, const char *,
+ enum debug_object_kind, enum debug_object_linkage);
static struct debug_name *debug_add_to_current_namespace
- PARAMS ((struct debug_handle *, const char *, enum debug_object_kind,
- enum debug_object_linkage));
+ (struct debug_handle *, const char *, enum debug_object_kind,
+ enum debug_object_linkage);
static struct debug_type *debug_make_type
- PARAMS ((struct debug_handle *, enum debug_type_kind, unsigned int));
+ (struct debug_handle *, enum debug_type_kind, unsigned int);
static struct debug_type *debug_get_real_type
- PARAMS ((PTR, debug_type, struct debug_type_real_list *));
+ (void *, debug_type, struct debug_type_real_list *);
static bfd_boolean debug_write_name
- PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
- struct debug_name *));
+ (struct debug_handle *, const struct debug_write_fns *, void *,
+ struct debug_name *);
static bfd_boolean debug_write_type
- PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
- struct debug_type *, struct debug_name *));
+ (struct debug_handle *, const struct debug_write_fns *, void *,
+ struct debug_type *, struct debug_name *);
static bfd_boolean debug_write_class_type
- PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
- struct debug_type *, const char *));
+ (struct debug_handle *, const struct debug_write_fns *, void *,
+ struct debug_type *, const char *);
static bfd_boolean debug_write_function
- PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
- const char *, enum debug_object_linkage, struct debug_function *));
+ (struct debug_handle *, const struct debug_write_fns *, void *,
+ const char *, enum debug_object_linkage, struct debug_function *);
static bfd_boolean debug_write_block
- PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
- struct debug_block *));
+ (struct debug_handle *, const struct debug_write_fns *, void *,
+ struct debug_block *);
static bfd_boolean debug_write_linenos
- PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
- bfd_vma));
+ (struct debug_handle *, const struct debug_write_fns *, void *, bfd_vma);
static bfd_boolean debug_set_class_id
- PARAMS ((struct debug_handle *, const char *, struct debug_type *));
+ (struct debug_handle *, const char *, struct debug_type *);
static bfd_boolean debug_type_samep
- PARAMS ((struct debug_handle *, struct debug_type *, struct debug_type *));
+ (struct debug_handle *, struct debug_type *, struct debug_type *);
static bfd_boolean debug_class_type_samep
- PARAMS ((struct debug_handle *, struct debug_type *, struct debug_type *));
+ (struct debug_handle *, struct debug_type *, struct debug_type *);
/* Issue an error message. */
static void
-debug_error (message)
- const char *message;
+debug_error (const char *message)
{
fprintf (stderr, "%s\n", message);
}
@@ -603,12 +600,10 @@ debug_error (message)
/* Add an object to a namespace. */
static struct debug_name *
-debug_add_to_namespace (info, nsp, name, kind, linkage)
- struct debug_handle *info ATTRIBUTE_UNUSED;
- struct debug_namespace **nsp;
- const char *name;
- enum debug_object_kind kind;
- enum debug_object_linkage linkage;
+debug_add_to_namespace (struct debug_handle *info ATTRIBUTE_UNUSED,
+ struct debug_namespace **nsp, const char *name,
+ enum debug_object_kind kind,
+ enum debug_object_linkage linkage)
{
struct debug_name *n;
struct debug_namespace *ns;
@@ -640,11 +635,9 @@ debug_add_to_namespace (info, nsp, name, kind, linkage)
/* Add an object to the current namespace. */
static struct debug_name *
-debug_add_to_current_namespace (info, name, kind, linkage)
- struct debug_handle *info;
- const char *name;
- enum debug_object_kind kind;
- enum debug_object_linkage linkage;
+debug_add_to_current_namespace (struct debug_handle *info, const char *name,
+ enum debug_object_kind kind,
+ enum debug_object_linkage linkage)
{
struct debug_namespace **nsp;
@@ -665,23 +658,21 @@ debug_add_to_current_namespace (info, name, kind, linkage)
/* Return a handle for debugging information. */
-PTR
-debug_init ()
+void *
+debug_init (void)
{
struct debug_handle *ret;
ret = (struct debug_handle *) xmalloc (sizeof *ret);
memset (ret, 0, sizeof *ret);
- return (PTR) ret;
+ return (void *) ret;
}
/* Set the source filename. This implicitly starts a new compilation
unit. */
bfd_boolean
-debug_set_filename (handle, name)
- PTR handle;
- const char *name;
+debug_set_filename (void *handle, const char *name)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_file *nfile;
@@ -722,9 +713,7 @@ debug_set_filename (handle, name)
include files in a single compilation unit. */
bfd_boolean
-debug_start_source (handle, name)
- PTR handle;
- const char *name;
+debug_start_source (void *handle, const char *name)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_file *f, **pf;
@@ -774,12 +763,9 @@ debug_start_source (handle, name)
functions. */
bfd_boolean
-debug_record_function (handle, name, return_type, global, addr)
- PTR handle;
- const char *name;
- debug_type return_type;
- bfd_boolean global;
- bfd_vma addr;
+debug_record_function (void *handle, const char *name,
+ debug_type return_type, bfd_boolean global,
+ bfd_vma addr)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_function *f;
@@ -833,12 +819,8 @@ debug_record_function (handle, name, return_type, global, addr)
/* Record a parameter for the current function. */
bfd_boolean
-debug_record_parameter (handle, name, type, kind, val)
- PTR handle;
- const char *name;
- debug_type type;
- enum debug_parm_kind kind;
- bfd_vma val;
+debug_record_parameter (void *handle, const char *name, debug_type type,
+ enum debug_parm_kind kind, bfd_vma val)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_parameter *p, **pp;
@@ -873,9 +855,7 @@ debug_record_parameter (handle, name, type, kind, val)
/* End a function. FIXME: This should handle function nesting. */
bfd_boolean
-debug_end_function (handle, addr)
- PTR handle;
- bfd_vma addr;
+debug_end_function (void *handle, bfd_vma addr)
{
struct debug_handle *info = (struct debug_handle *) handle;
@@ -907,9 +887,7 @@ debug_end_function (handle, addr)
argument is the address at which this block starts. */
bfd_boolean
-debug_start_block (handle, addr)
- PTR handle;
- bfd_vma addr;
+debug_start_block (void *handle, bfd_vma addr)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_block *b, **pb;
@@ -947,9 +925,7 @@ debug_start_block (handle, addr)
ends. */
bfd_boolean
-debug_end_block (handle, addr)
- PTR handle;
- bfd_vma addr;
+debug_end_block (void *handle, bfd_vma addr)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_block *parent;
@@ -979,10 +955,7 @@ debug_end_block (handle, addr)
with a given address. */
bfd_boolean
-debug_record_line (handle, lineno, addr)
- PTR handle;
- unsigned long lineno;
- bfd_vma addr;
+debug_record_line (void *handle, unsigned long lineno, bfd_vma addr)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_lineno *l;
@@ -1039,9 +1012,8 @@ debug_record_line (handle, lineno, addr)
move in memory. */
bfd_boolean
-debug_start_common_block (handle, name)
- PTR handle ATTRIBUTE_UNUSED;
- const char *name ATTRIBUTE_UNUSED;
+debug_start_common_block (void *handle ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED)
{
/* FIXME */
debug_error (_("debug_start_common_block: not implemented"));
@@ -1051,9 +1023,8 @@ debug_start_common_block (handle, name)
/* End a named common block. */
bfd_boolean
-debug_end_common_block (handle, name)
- PTR handle ATTRIBUTE_UNUSED;
- const char *name ATTRIBUTE_UNUSED;
+debug_end_common_block (void *handle ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED)
{
/* FIXME */
debug_error (_("debug_end_common_block: not implemented"));
@@ -1063,10 +1034,7 @@ debug_end_common_block (handle, name)
/* Record a named integer constant. */
bfd_boolean
-debug_record_int_const (handle, name, val)
- PTR handle;
- const char *name;
- bfd_vma val;
+debug_record_int_const (void *handle, const char *name, bfd_vma val)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_name *n;
@@ -1087,10 +1055,7 @@ debug_record_int_const (handle, name, val)
/* Record a named floating point constant. */
bfd_boolean
-debug_record_float_const (handle, name, val)
- PTR handle;
- const char *name;
- double val;
+debug_record_float_const (void *handle, const char *name, double val)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_name *n;
@@ -1111,11 +1076,8 @@ debug_record_float_const (handle, name, val)
/* Record a typed constant with an integral value. */
bfd_boolean
-debug_record_typed_const (handle, name, type, val)
- PTR handle;
- const char *name;
- debug_type type;
- bfd_vma val;
+debug_record_typed_const (void *handle, const char *name, debug_type type,
+ bfd_vma val)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_name *n;
@@ -1143,11 +1105,10 @@ debug_record_typed_const (handle, name, type, val)
/* Record a label. */
bfd_boolean
-debug_record_label (handle, name, type, addr)
- PTR handle ATTRIBUTE_UNUSED;
- const char *name ATTRIBUTE_UNUSED;
- debug_type type ATTRIBUTE_UNUSED;
- bfd_vma addr ATTRIBUTE_UNUSED;
+debug_record_label (void *handle ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED,
+ debug_type type ATTRIBUTE_UNUSED,
+ bfd_vma addr ATTRIBUTE_UNUSED)
{
/* FIXME. */
debug_error (_("debug_record_label: not implemented"));
@@ -1157,12 +1118,8 @@ debug_record_label (handle, name, type, addr)
/* Record a variable. */
bfd_boolean
-debug_record_variable (handle, name, type, kind, val)
- PTR handle;
- const char *name;
- debug_type type;
- enum debug_var_kind kind;
- bfd_vma val;
+debug_record_variable (void *handle, const char *name, debug_type type,
+ enum debug_var_kind kind, bfd_vma val)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_namespace **nsp;
@@ -1216,10 +1173,8 @@ debug_record_variable (handle, name, type, kind, val)
/* Make a type with a given kind and size. */
static struct debug_type *
-debug_make_type (info, kind, size)
- struct debug_handle *info ATTRIBUTE_UNUSED;
- enum debug_type_kind kind;
- unsigned int size;
+debug_make_type (struct debug_handle *info ATTRIBUTE_UNUSED,
+ enum debug_type_kind kind, unsigned int size)
{
struct debug_type *t;
@@ -1236,10 +1191,7 @@ debug_make_type (info, kind, size)
which is referenced before it is defined. */
debug_type
-debug_make_indirect_type (handle, slot, tag)
- PTR handle;
- debug_type *slot;
- const char *tag;
+debug_make_indirect_type (void *handle, debug_type *slot, const char *tag)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1263,8 +1215,7 @@ debug_make_indirect_type (handle, slot, tag)
/* Make a void type. There is only one of these. */
debug_type
-debug_make_void_type (handle)
- PTR handle;
+debug_make_void_type (void *handle)
{
struct debug_handle *info = (struct debug_handle *) handle;
@@ -1275,10 +1226,7 @@ debug_make_void_type (handle)
if the integer is unsigned. */
debug_type
-debug_make_int_type (handle, size, unsignedp)
- PTR handle;
- unsigned int size;
- bfd_boolean unsignedp;
+debug_make_int_type (void *handle, unsigned int size, bfd_boolean unsignedp)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1297,9 +1245,7 @@ debug_make_int_type (handle, size, unsignedp)
the format. */
debug_type
-debug_make_float_type (handle, size)
- PTR handle;
- unsigned int size;
+debug_make_float_type (void *handle, unsigned int size)
{
struct debug_handle *info = (struct debug_handle *) handle;
@@ -1309,9 +1255,7 @@ debug_make_float_type (handle, size)
/* Make a boolean type of a given size. */
debug_type
-debug_make_bool_type (handle, size)
- PTR handle;
- unsigned int size;
+debug_make_bool_type (void *handle, unsigned int size)
{
struct debug_handle *info = (struct debug_handle *) handle;
@@ -1321,9 +1265,7 @@ debug_make_bool_type (handle, size)
/* Make a complex type of a given size. */
debug_type
-debug_make_complex_type (handle, size)
- PTR handle;
- unsigned int size;
+debug_make_complex_type (void *handle, unsigned int size)
{
struct debug_handle *info = (struct debug_handle *) handle;
@@ -1335,11 +1277,8 @@ debug_make_complex_type (handle, size)
The fourth argument is a NULL terminated array of fields. */
debug_type
-debug_make_struct_type (handle, structp, size, fields)
- PTR handle;
- bfd_boolean structp;
- bfd_vma size;
- debug_field *fields;
+debug_make_struct_type (void *handle, bfd_boolean structp, bfd_vma size,
+ debug_field *fields)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1369,16 +1308,10 @@ debug_make_struct_type (handle, structp, size, fields)
object has its own virtual function table. */
debug_type
-debug_make_object_type (handle, structp, size, fields, baseclasses,
- methods, vptrbase, ownvptr)
- PTR handle;
- bfd_boolean structp;
- bfd_vma size;
- debug_field *fields;
- debug_baseclass *baseclasses;
- debug_method *methods;
- debug_type vptrbase;
- bfd_boolean ownvptr;
+debug_make_object_type (void *handle, bfd_boolean structp, bfd_vma size,
+ debug_field *fields, debug_baseclass *baseclasses,
+ debug_method *methods, debug_type vptrbase,
+ bfd_boolean ownvptr)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1410,10 +1343,8 @@ debug_make_object_type (handle, structp, size, fields, baseclasses,
array of strings, and an array of corresponding values. */
debug_type
-debug_make_enum_type (handle, names, values)
- PTR handle;
- const char **names;
- bfd_signed_vma *values;
+debug_make_enum_type (void *handle, const char **names,
+ bfd_signed_vma *values)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1437,9 +1368,7 @@ debug_make_enum_type (handle, names, values)
/* Make a pointer to a given type. */
debug_type
-debug_make_pointer_type (handle, type)
- PTR handle;
- debug_type type;
+debug_make_pointer_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1465,11 +1394,8 @@ debug_make_pointer_type (handle, type)
to record the parameter types. */
debug_type
-debug_make_function_type (handle, type, arg_types, varargs)
- PTR handle;
- debug_type type;
- debug_type *arg_types;
- bfd_boolean varargs;
+debug_make_function_type (void *handle, debug_type type,
+ debug_type *arg_types, bfd_boolean varargs)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1497,9 +1423,7 @@ debug_make_function_type (handle, type, arg_types, varargs)
/* Make a reference to a given type. */
debug_type
-debug_make_reference_type (handle, type)
- PTR handle;
- debug_type type;
+debug_make_reference_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1519,11 +1443,8 @@ debug_make_reference_type (handle, type)
/* Make a range of a given type from a lower to an upper bound. */
debug_type
-debug_make_range_type (handle, type, lower, upper)
- PTR handle;
- debug_type type;
- bfd_signed_vma lower;
- bfd_signed_vma upper;
+debug_make_range_type (void *handle, debug_type type, bfd_signed_vma lower,
+ bfd_signed_vma upper)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1555,14 +1476,9 @@ debug_make_range_type (handle, type, lower, upper)
actually a string, as in C. */
debug_type
-debug_make_array_type (handle, element_type, range_type, lower, upper,
- stringp)
- PTR handle;
- debug_type element_type;
- debug_type range_type;
- bfd_signed_vma lower;
- bfd_signed_vma upper;
- bfd_boolean stringp;
+debug_make_array_type (void *handle, debug_type element_type,
+ debug_type range_type, bfd_signed_vma lower,
+ bfd_signed_vma upper, bfd_boolean stringp)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1594,10 +1510,7 @@ debug_make_array_type (handle, element_type, range_type, lower, upper,
CHILL. */
debug_type
-debug_make_set_type (handle, type, bitstringp)
- PTR handle;
- debug_type type;
- bfd_boolean bitstringp;
+debug_make_set_type (void *handle, debug_type type, bfd_boolean bitstringp)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1627,10 +1540,8 @@ debug_make_set_type (handle, type, bitstringp)
to. */
debug_type
-debug_make_offset_type (handle, base_type, target_type)
- PTR handle;
- debug_type base_type;
- debug_type target_type;
+debug_make_offset_type (void *handle, debug_type base_type,
+ debug_type target_type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1659,12 +1570,9 @@ debug_make_offset_type (handle, base_type, target_type)
argument is a NULL terminated array of argument types. */
debug_type
-debug_make_method_type (handle, return_type, domain_type, arg_types, varargs)
- PTR handle;
- debug_type return_type;
- debug_type domain_type;
- debug_type *arg_types;
- bfd_boolean varargs;
+debug_make_method_type (void *handle, debug_type return_type,
+ debug_type domain_type, debug_type *arg_types,
+ bfd_boolean varargs)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1693,9 +1601,7 @@ debug_make_method_type (handle, return_type, domain_type, arg_types, varargs)
/* Make a const qualified version of a given type. */
debug_type
-debug_make_const_type (handle, type)
- PTR handle;
- debug_type type;
+debug_make_const_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1715,9 +1621,7 @@ debug_make_const_type (handle, type)
/* Make a volatile qualified version of a given type. */
debug_type
-debug_make_volatile_type (handle, type)
- PTR handle;
- debug_type type;
+debug_make_volatile_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1738,10 +1642,8 @@ debug_make_volatile_type (handle, type)
been mentioned, but not defined. */
debug_type
-debug_make_undefined_tagged_type (handle, name, kind)
- PTR handle;
- const char *name;
- enum debug_type_kind kind;
+debug_make_undefined_tagged_type (void *handle, const char *name,
+ enum debug_type_kind kind)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1777,12 +1679,9 @@ debug_make_undefined_tagged_type (handle, name, kind)
argument is the visibility of the base class. */
debug_baseclass
-debug_make_baseclass (handle, type, bitpos, virtual, visibility)
- PTR handle ATTRIBUTE_UNUSED;
- debug_type type;
- bfd_vma bitpos;
- bfd_boolean virtual;
- enum debug_visibility visibility;
+debug_make_baseclass (void *handle ATTRIBUTE_UNUSED, debug_type type,
+ bfd_vma bitpos, bfd_boolean virtual,
+ enum debug_visibility visibility)
{
struct debug_baseclass *b;
@@ -1804,13 +1703,9 @@ debug_make_baseclass (handle, type, bitpos, virtual, visibility)
of the field. */
debug_field
-debug_make_field (handle, name, type, bitpos, bitsize, visibility)
- PTR handle ATTRIBUTE_UNUSED;
- const char *name;
- debug_type type;
- bfd_vma bitpos;
- bfd_vma bitsize;
- enum debug_visibility visibility;
+debug_make_field (void *handle ATTRIBUTE_UNUSED, const char *name,
+ debug_type type, bfd_vma bitpos, bfd_vma bitsize,
+ enum debug_visibility visibility)
{
struct debug_field *f;
@@ -1834,12 +1729,9 @@ debug_make_field (handle, name, type, bitpos, bitsize, visibility)
member. */
debug_field
-debug_make_static_member (handle, name, type, physname, visibility)
- PTR handle ATTRIBUTE_UNUSED;
- const char *name;
- debug_type type;
- const char *physname;
- enum debug_visibility visibility;
+debug_make_static_member (void *handle ATTRIBUTE_UNUSED, const char *name,
+ debug_type type, const char *physname,
+ enum debug_visibility visibility)
{
struct debug_field *f;
@@ -1859,10 +1751,8 @@ debug_make_static_member (handle, name, type, physname, visibility)
argument is a NULL terminated array of method variants. */
debug_method
-debug_make_method (handle, name, variants)
- PTR handle ATTRIBUTE_UNUSED;
- const char *name;
- debug_method_variant *variants;
+debug_make_method (void *handle ATTRIBUTE_UNUSED, const char *name,
+ debug_method_variant *variants)
{
struct debug_method *m;
@@ -1885,16 +1775,11 @@ debug_make_method (handle, name, variants)
necessary? Could we just use debug_make_const_type? */
debug_method_variant
-debug_make_method_variant (handle, physname, type, visibility, constp,
- volatilep, voffset, context)
- PTR handle ATTRIBUTE_UNUSED;
- const char *physname;
- debug_type type;
- enum debug_visibility visibility;
- bfd_boolean constp;
- bfd_boolean volatilep;
- bfd_vma voffset;
- debug_type context;
+debug_make_method_variant (void *handle ATTRIBUTE_UNUSED,
+ const char *physname, debug_type type,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep,
+ bfd_vma voffset, debug_type context)
{
struct debug_method_variant *m;
@@ -1917,14 +1802,10 @@ debug_make_method_variant (handle, physname, type, visibility, constp,
since a static method can not also be virtual. */
debug_method_variant
-debug_make_static_method_variant (handle, physname, type, visibility,
- constp, volatilep)
- PTR handle ATTRIBUTE_UNUSED;
- const char *physname;
- debug_type type;
- enum debug_visibility visibility;
- bfd_boolean constp;
- bfd_boolean volatilep;
+debug_make_static_method_variant (void *handle ATTRIBUTE_UNUSED,
+ const char *physname, debug_type type,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep)
{
struct debug_method_variant *m;
@@ -1944,10 +1825,7 @@ debug_make_static_method_variant (handle, physname, type, visibility,
/* Name a type. */
debug_type
-debug_name_type (handle, name, type)
- PTR handle;
- const char *name;
- debug_type type;
+debug_name_type (void *handle, const char *name, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1993,10 +1871,7 @@ debug_name_type (handle, name, type)
/* Tag a type. */
debug_type
-debug_tag_type (handle, name, type)
- PTR handle;
- const char *name;
- debug_type type;
+debug_tag_type (void *handle, const char *name, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -2049,10 +1924,8 @@ debug_tag_type (handle, name, type)
/* Record the size of a given type. */
bfd_boolean
-debug_record_type_size (handle, type, size)
- PTR handle ATTRIBUTE_UNUSED;
- debug_type type;
- unsigned int size;
+debug_record_type_size (void *handle ATTRIBUTE_UNUSED, debug_type type,
+ unsigned int size)
{
if (type->size != 0 && type->size != size)
fprintf (stderr, _("Warning: changing type size from %d to %d\n"),
@@ -2066,9 +1939,7 @@ debug_record_type_size (handle, type, size)
/* Find a named type. */
debug_type
-debug_find_named_type (handle, name)
- PTR handle;
- const char *name;
+debug_find_named_type (void *handle, const char *name)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_block *b;
@@ -2121,10 +1992,8 @@ debug_find_named_type (handle, name)
/* Find a tagged type. */
debug_type
-debug_find_tagged_type (handle, name, kind)
- PTR handle;
- const char *name;
- enum debug_type_kind kind;
+debug_find_tagged_type (void *handle, const char *name,
+ enum debug_type_kind kind)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_unit *u;
@@ -2162,10 +2031,8 @@ debug_find_tagged_type (handle, name, kind)
crashing if the type is defined circularly. */
static struct debug_type *
-debug_get_real_type (handle, type, list)
- PTR handle;
- debug_type type;
- struct debug_type_real_list *list;
+debug_get_real_type (void *handle, debug_type type,
+ struct debug_type_real_list *list)
{
struct debug_type_real_list *l;
struct debug_type_real_list rl;
@@ -2213,9 +2080,7 @@ debug_get_real_type (handle, type, list)
/* Get the kind of a type. */
enum debug_type_kind
-debug_get_type_kind (handle, type)
- PTR handle;
- debug_type type;
+debug_get_type_kind (void *handle, debug_type type)
{
if (type == NULL)
return DEBUG_KIND_ILLEGAL;
@@ -2228,9 +2093,7 @@ debug_get_type_kind (handle, type)
/* Get the name of a type. */
const char *
-debug_get_type_name (handle, type)
- PTR handle;
- debug_type type;
+debug_get_type_name (void *handle, debug_type type)
{
if (type->kind == DEBUG_KIND_INDIRECT)
{
@@ -2247,9 +2110,7 @@ debug_get_type_name (handle, type)
/* Get the size of a type. */
bfd_vma
-debug_get_type_size (handle, type)
- PTR handle;
- debug_type type;
+debug_get_type_size (void *handle, debug_type type)
{
if (type == NULL)
return 0;
@@ -2278,9 +2139,7 @@ debug_get_type_size (handle, type)
/* Get the return type of a function or method type. */
debug_type
-debug_get_return_type (handle, type)
- PTR handle;
- debug_type type;
+debug_get_return_type (void *handle, debug_type type)
{
if (type == NULL)
return DEBUG_TYPE_NULL;
@@ -2305,10 +2164,8 @@ debug_get_return_type (handle, type)
we don't currently store the parameter types of a function). */
const debug_type *
-debug_get_parameter_types (handle, type, pvarargs)
- PTR handle;
- debug_type type;
- bfd_boolean *pvarargs;
+debug_get_parameter_types (void *handle, debug_type type,
+ bfd_boolean *pvarargs)
{
if (type == NULL)
return NULL;
@@ -2334,9 +2191,7 @@ debug_get_parameter_types (handle, type, pvarargs)
/* Get the target type of a type. */
debug_type
-debug_get_target_type (handle, type)
- PTR handle;
- debug_type type;
+debug_get_target_type (void *handle, debug_type type)
{
if (type == NULL)
return NULL;
@@ -2365,9 +2220,7 @@ debug_get_target_type (handle, type)
class. */
const debug_field *
-debug_get_fields (handle, type)
- PTR handle;
- debug_type type;
+debug_get_fields (void *handle, debug_type type)
{
if (type == NULL)
return NULL;
@@ -2392,9 +2245,7 @@ debug_get_fields (handle, type)
/* Get the type of a field. */
debug_type
-debug_get_field_type (handle, field)
- PTR handle ATTRIBUTE_UNUSED;
- debug_field field;
+debug_get_field_type (void *handle ATTRIBUTE_UNUSED, debug_field field)
{
if (field == NULL)
return NULL;
@@ -2404,9 +2255,7 @@ debug_get_field_type (handle, field)
/* Get the name of a field. */
const char *
-debug_get_field_name (handle, field)
- PTR handle ATTRIBUTE_UNUSED;
- debug_field field;
+debug_get_field_name (void *handle ATTRIBUTE_UNUSED, debug_field field)
{
if (field == NULL)
return NULL;
@@ -2416,9 +2265,7 @@ debug_get_field_name (handle, field)
/* Get the bit position of a field. */
bfd_vma
-debug_get_field_bitpos (handle, field)
- PTR handle ATTRIBUTE_UNUSED;
- debug_field field;
+debug_get_field_bitpos (void *handle ATTRIBUTE_UNUSED, debug_field field)
{
if (field == NULL || field->static_member)
return (bfd_vma) -1;
@@ -2428,9 +2275,7 @@ debug_get_field_bitpos (handle, field)
/* Get the bit size of a field. */
bfd_vma
-debug_get_field_bitsize (handle, field)
- PTR handle ATTRIBUTE_UNUSED;
- debug_field field;
+debug_get_field_bitsize (void *handle ATTRIBUTE_UNUSED, debug_field field)
{
if (field == NULL || field->static_member)
return (bfd_vma) -1;
@@ -2440,9 +2285,7 @@ debug_get_field_bitsize (handle, field)
/* Get the visibility of a field. */
enum debug_visibility
-debug_get_field_visibility (handle, field)
- PTR handle ATTRIBUTE_UNUSED;
- debug_field field;
+debug_get_field_visibility (void *handle ATTRIBUTE_UNUSED, debug_field field)
{
if (field == NULL)
return DEBUG_VISIBILITY_IGNORE;
@@ -2452,9 +2295,7 @@ debug_get_field_visibility (handle, field)
/* Get the physical name of a field. */
const char *
-debug_get_field_physname (handle, field)
- PTR handle ATTRIBUTE_UNUSED;
- debug_field field;
+debug_get_field_physname (void *handle ATTRIBUTE_UNUSED, debug_field field)
{
if (field == NULL || ! field->static_member)
return NULL;
@@ -2465,10 +2306,7 @@ debug_get_field_physname (handle, field)
debugging information, and a set of function pointers to call. */
bfd_boolean
-debug_write (handle, fns, fhandle)
- PTR handle;
- const struct debug_write_fns *fns;
- PTR fhandle;
+debug_write (void *handle, const struct debug_write_fns *fns, void *fhandle)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_unit *u;
@@ -2527,11 +2365,9 @@ debug_write (handle, fns, fhandle)
/* Write out an element in a namespace. */
static bfd_boolean
-debug_write_name (info, fns, fhandle, n)
- struct debug_handle *info;
- const struct debug_write_fns *fns;
- PTR fhandle;
- struct debug_name *n;
+debug_write_name (struct debug_handle *info,
+ const struct debug_write_fns *fns, void *fhandle,
+ struct debug_name *n)
{
switch (n->kind)
{
@@ -2577,12 +2413,9 @@ debug_write_name (info, fns, fhandle, n)
points to this one. */
static bfd_boolean
-debug_write_type (info, fns, fhandle, type, name)
- struct debug_handle *info;
- const struct debug_write_fns *fns;
- PTR fhandle;
- struct debug_type *type;
- struct debug_name *name;
+debug_write_type (struct debug_handle *info,
+ const struct debug_write_fns *fns, void *fhandle,
+ struct debug_type *type, struct debug_name *name)
{
unsigned int i;
int is;
@@ -2604,7 +2437,7 @@ debug_write_type (info, fns, fhandle, type, name)
struct debug_type *real;
unsigned int id;
- real = debug_get_real_type ((PTR) info, type, NULL);
+ real = debug_get_real_type ((void *) info, type, NULL);
if (real == NULL)
return (*fns->empty_type) (fhandle);
id = 0;
@@ -2825,12 +2658,9 @@ debug_write_type (info, fns, fhandle, type, name)
/* Write out a class type. */
static bfd_boolean
-debug_write_class_type (info, fns, fhandle, type, tag)
- struct debug_handle *info;
- const struct debug_write_fns *fns;
- PTR fhandle;
- struct debug_type *type;
- const char *tag;
+debug_write_class_type (struct debug_handle *info,
+ const struct debug_write_fns *fns, void *fhandle,
+ struct debug_type *type, const char *tag)
{
unsigned int i;
unsigned int id;
@@ -2977,13 +2807,10 @@ debug_write_class_type (info, fns, fhandle, type, tag)
/* Write out information for a function. */
static bfd_boolean
-debug_write_function (info, fns, fhandle, name, linkage, function)
- struct debug_handle *info;
- const struct debug_write_fns *fns;
- PTR fhandle;
- const char *name;
- enum debug_object_linkage linkage;
- struct debug_function *function;
+debug_write_function (struct debug_handle *info,
+ const struct debug_write_fns *fns, void *fhandle,
+ const char *name, enum debug_object_linkage linkage,
+ struct debug_function *function)
{
struct debug_parameter *p;
struct debug_block *b;
@@ -3019,11 +2846,9 @@ debug_write_function (info, fns, fhandle, name, linkage, function)
/* Write out information for a block. */
static bfd_boolean
-debug_write_block (info, fns, fhandle, block)
- struct debug_handle *info;
- const struct debug_write_fns *fns;
- PTR fhandle;
- struct debug_block *block;
+debug_write_block (struct debug_handle *info,
+ const struct debug_write_fns *fns, void *fhandle,
+ struct debug_block *block)
{
struct debug_name *n;
struct debug_block *b;
@@ -3069,11 +2894,9 @@ debug_write_block (info, fns, fhandle, block)
/* Write out line number information up to ADDRESS. */
static bfd_boolean
-debug_write_linenos (info, fns, fhandle, address)
- struct debug_handle *info;
- const struct debug_write_fns *fns;
- PTR fhandle;
- bfd_vma address;
+debug_write_linenos (struct debug_handle *info,
+ const struct debug_write_fns *fns, void *fhandle,
+ bfd_vma address)
{
while (info->current_write_lineno != NULL)
{
@@ -3111,10 +2934,8 @@ debug_write_linenos (info, fns, fhandle, address)
same struct will be defined by multiple compilation units. */
static bfd_boolean
-debug_set_class_id (info, tag, type)
- struct debug_handle *info;
- const char *tag;
- struct debug_type *type;
+debug_set_class_id (struct debug_handle *info, const char *tag,
+ struct debug_type *type)
{
struct debug_class_type *c;
struct debug_class_id *l;
@@ -3175,10 +2996,8 @@ debug_set_class_id (info, tag, type)
tags and the like. */
static bfd_boolean
-debug_type_samep (info, t1, t2)
- struct debug_handle *info;
- struct debug_type *t1;
- struct debug_type *t2;
+debug_type_samep (struct debug_handle *info, struct debug_type *t1,
+ struct debug_type *t2)
{
struct debug_type_compare_list *l;
struct debug_type_compare_list top;
@@ -3412,10 +3231,8 @@ debug_type_samep (info, t1, t2)
debug_type_samep. */
static bfd_boolean
-debug_class_type_samep (info, t1, t2)
- struct debug_handle *info;
- struct debug_type *t1;
- struct debug_type *t2;
+debug_class_type_samep (struct debug_handle *info, struct debug_type *t1,
+ struct debug_type *t2)
{
struct debug_class_type *c1, *c2;
@@ -3461,9 +3278,9 @@ debug_class_type_samep (info, t1, t2)
typedefs and we really don't care. */
if (strcmp (f1->name, f2->name) != 0
|| ! debug_type_samep (info,
- debug_get_real_type ((PTR) info,
+ debug_get_real_type ((void *) info,
f1->type, NULL),
- debug_get_real_type ((PTR) info,
+ debug_get_real_type ((void *) info,
f2->type, NULL)))
return FALSE;
}
diff --git a/binutils/debug.h b/binutils/debug.h
index d53210e5b74..03dc3f737ac 100644
--- a/binutils/debug.h
+++ b/binutils/debug.h
@@ -1,5 +1,5 @@
/* debug.h -- Describe generic debugging information.
- Copyright 1995, 1996, 2002 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -169,45 +169,45 @@ struct debug_write_fns
{
/* This is called at the start of each new compilation unit with the
name of the main file in the new unit. */
- bfd_boolean (*start_compilation_unit) PARAMS ((PTR, const char *));
+ bfd_boolean (*start_compilation_unit) (void *, const char *);
/* This is called at the start of each source file within a
compilation unit, before outputting any global information for
that file. The argument is the name of the file. */
- bfd_boolean (*start_source) PARAMS ((PTR, const char *));
+ bfd_boolean (*start_source) (void *, const char *);
/* Each writer must keep a stack of types. */
/* Push an empty type onto the type stack. This type can appear if
there is a reference to a type which is never defined. */
- bfd_boolean (*empty_type) PARAMS ((PTR));
+ bfd_boolean (*empty_type) (void *);
/* Push a void type onto the type stack. */
- bfd_boolean (*void_type) PARAMS ((PTR));
+ bfd_boolean (*void_type) (void *);
/* Push an integer type onto the type stack, given the size and
whether it is unsigned. */
- bfd_boolean (*int_type) PARAMS ((PTR, unsigned int, bfd_boolean));
+ bfd_boolean (*int_type) (void *, unsigned int, bfd_boolean);
/* Push a floating type onto the type stack, given the size. */
- bfd_boolean (*float_type) PARAMS ((PTR, unsigned int));
+ bfd_boolean (*float_type) (void *, unsigned int);
/* Push a complex type onto the type stack, given the size. */
- bfd_boolean (*complex_type) PARAMS ((PTR, unsigned int));
+ bfd_boolean (*complex_type) (void *, unsigned int);
/* Push a bfd_boolean type onto the type stack, given the size. */
- bfd_boolean (*bool_type) PARAMS ((PTR, unsigned int));
+ bfd_boolean (*bool_type) (void *, unsigned int);
/* Push an enum type onto the type stack, given the tag, a NULL
terminated array of names and the associated values. If there is
no tag, the tag argument will be NULL. If this is an undefined
enum, the names and values arguments will be NULL. */
bfd_boolean (*enum_type)
- PARAMS ((PTR, const char *, const char **, bfd_signed_vma *));
+ (void *, const char *, const char **, bfd_signed_vma *);
/* Pop the top type on the type stack, and push a pointer to that
type onto the type stack. */
- bfd_boolean (*pointer_type) PARAMS ((PTR));
+ bfd_boolean (*pointer_type) (void *);
/* Push a function type onto the type stack. The second argument
indicates the number of argument types that have been pushed onto
@@ -217,15 +217,15 @@ struct debug_write_fns
function takes a variable number of arguments. The return type
of the function is pushed onto the type stack below the argument
types, if any. */
- bfd_boolean (*function_type) PARAMS ((PTR, int, bfd_boolean));
+ bfd_boolean (*function_type) (void *, int, bfd_boolean);
/* Pop the top type on the type stack, and push a reference to that
type onto the type stack. */
- bfd_boolean (*reference_type) PARAMS ((PTR));
+ bfd_boolean (*reference_type) (void *);
/* Pop the top type on the type stack, and push a range of that type
with the given lower and upper bounds onto the type stack. */
- bfd_boolean (*range_type) PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
+ bfd_boolean (*range_type) (void *, bfd_signed_vma, bfd_signed_vma);
/* Push an array type onto the type stack. The top type on the type
stack is the range, and the next type on the type stack is the
@@ -233,18 +233,18 @@ struct debug_write_fns
pushed. The arguments are the lower bound, the upper bound, and
whether the array is a string. */
bfd_boolean (*array_type)
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, bfd_boolean));
+ (void *, bfd_signed_vma, bfd_signed_vma, bfd_boolean);
/* Pop the top type on the type stack, and push a set of that type
onto the type stack. The argument indicates whether this set is
a bitstring. */
- bfd_boolean (*set_type) PARAMS ((PTR, bfd_boolean));
+ bfd_boolean (*set_type) (void *, bfd_boolean);
/* Push an offset type onto the type stack. The top type on the
type stack is the target type, and the next type on the type
stack is the base type. These should be popped before the offset
type is pushed. */
- bfd_boolean (*offset_type) PARAMS ((PTR));
+ bfd_boolean (*offset_type) (void *);
/* Push a method type onto the type stack. If the second argument
is TRUE, the top type on the stack is the class to which the
@@ -258,15 +258,15 @@ struct debug_write_fns
type on the type stack below the domain and the argument types is
the return type of the method. All these types must be popped,
and then the method type must be pushed. */
- bfd_boolean (*method_type) PARAMS ((PTR, bfd_boolean, int, bfd_boolean));
+ bfd_boolean (*method_type) (void *, bfd_boolean, int, bfd_boolean);
/* Pop the top type off the type stack, and push a const qualified
version of that type onto the type stack. */
- bfd_boolean (*const_type) PARAMS ((PTR));
+ bfd_boolean (*const_type) (void *);
/* Pop the top type off the type stack, and push a volatile
qualified version of that type onto the type stack. */
- bfd_boolean (*volatile_type) PARAMS ((PTR));
+ bfd_boolean (*volatile_type) (void *);
/* Start building a struct. This is followed by calls to the
struct_field function, and finished by a call to the
@@ -278,17 +278,17 @@ struct debug_write_fns
undefined struct or union, the size will be 0 and struct_field
will not be called before end_struct_type is called. */
bfd_boolean (*start_struct_type)
- PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int));
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int);
/* Add a field to the struct type currently being built. The type
of the field should be popped off the type stack. The arguments
are the name, the bit position, the bit size (may be zero if the
field is not packed), and the visibility. */
bfd_boolean (*struct_field)
- PARAMS ((PTR, const char *, bfd_vma, bfd_vma, enum debug_visibility));
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
/* Finish building a struct, and push it onto the type stack. */
- bfd_boolean (*end_struct_type) PARAMS ((PTR));
+ bfd_boolean (*end_struct_type) (void *);
/* Start building a class. This is followed by calls to several
functions: struct_field, class_static_member, class_baseclass,
@@ -302,21 +302,21 @@ struct debug_write_fns
holding the virtual function table should be popped from the type
stack. */
bfd_boolean (*start_class_type)
- PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int,
- bfd_boolean, bfd_boolean));
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int,
+ bfd_boolean, bfd_boolean);
/* Add a static member to the class currently being built. The
arguments are the field name, the physical name, and the
visibility. The type must be popped off the type stack. */
bfd_boolean (*class_static_member)
- PARAMS ((PTR, const char *, const char *, enum debug_visibility));
+ (void *, const char *, const char *, enum debug_visibility);
/* Add a baseclass to the class currently being built. The type of
the baseclass must be popped off the type stack. The arguments
are the bit position, whether the class is virtual, and the
visibility. */
bfd_boolean (*class_baseclass)
- PARAMS ((PTR, bfd_vma, bfd_boolean, enum debug_visibility));
+ (void *, bfd_vma, bfd_boolean, enum debug_visibility);
/* Start adding a method to the class currently being built. This
is followed by calls to class_method_variant and
@@ -324,7 +324,7 @@ struct debug_write_fns
method which take different arguments. The method is finished
with a call to class_end_method. The argument is the method
name. */
- bfd_boolean (*class_start_method) PARAMS ((PTR, const char *));
+ bfd_boolean (*class_start_method) (void *, const char *);
/* Describe a variant to the class method currently being built.
The type of the variant must be popped off the type stack. The
@@ -334,26 +334,26 @@ struct debug_write_fns
function table, and whether the context is on the type stack
(below the variant type). */
bfd_boolean (*class_method_variant)
- PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean,
- bfd_boolean, bfd_vma, bfd_boolean));
+ (void *, const char *, enum debug_visibility, bfd_boolean,
+ bfd_boolean, bfd_vma, bfd_boolean);
/* Describe a static variant to the class method currently being
built. The arguments are the same as for class_method_variant,
except that the last two arguments are omitted. The type of the
variant must be popped off the type stack. */
bfd_boolean (*class_static_method_variant)
- PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean,
- bfd_boolean));
+ (void *, const char *, enum debug_visibility, bfd_boolean,
+ bfd_boolean);
/* Finish describing a class method. */
- bfd_boolean (*class_end_method) PARAMS ((PTR));
+ bfd_boolean (*class_end_method) (void *);
/* Finish describing a class, and push it onto the type stack. */
- bfd_boolean (*end_class_type) PARAMS ((PTR));
+ bfd_boolean (*end_class_type) (void *);
/* Push a type on the stack which was given a name by an earlier
call to typdef. */
- bfd_boolean (*typedef_type) PARAMS ((PTR, const char *));
+ bfd_boolean (*typedef_type) (void *, const char *);
/* Push a tagged type on the stack which was defined earlier. If
the second argument is not NULL, the type was defined by a call
@@ -365,57 +365,57 @@ struct debug_write_fns
start_struct_type (start_class_type) and the call to
end_struct_type (end_class_type). */
bfd_boolean (*tag_type)
- PARAMS ((PTR, const char *, unsigned int, enum debug_type_kind));
+ (void *, const char *, unsigned int, enum debug_type_kind);
/* Pop the type stack, and typedef it to the given name. */
- bfd_boolean (*typdef) PARAMS ((PTR, const char *));
+ bfd_boolean (*typdef) (void *, const char *);
/* Pop the type stack, and declare it as a tagged struct or union or
enum or whatever. The tag passed down here is redundant, since
was also passed when enum_type, start_struct_type, or
start_class_type was called. */
- bfd_boolean (*tag) PARAMS ((PTR, const char *));
+ bfd_boolean (*tag) (void *, const char *);
/* This is called to record a named integer constant. */
- bfd_boolean (*int_constant) PARAMS ((PTR, const char *, bfd_vma));
+ bfd_boolean (*int_constant) (void *, const char *, bfd_vma);
/* This is called to record a named floating point constant. */
- bfd_boolean (*float_constant) PARAMS ((PTR, const char *, double));
+ bfd_boolean (*float_constant) (void *, const char *, double);
/* This is called to record a typed integer constant. The type is
popped off the type stack. */
- bfd_boolean (*typed_constant) PARAMS ((PTR, const char *, bfd_vma));
+ bfd_boolean (*typed_constant) (void *, const char *, bfd_vma);
/* This is called to record a variable. The type is popped off the
type stack. */
bfd_boolean (*variable)
- PARAMS ((PTR, const char *, enum debug_var_kind, bfd_vma));
+ (void *, const char *, enum debug_var_kind, bfd_vma);
/* Start writing out a function. The return type must be popped off
the stack. The bfd_boolean is TRUE if the function is global. This
is followed by calls to function_parameter, followed by block
information. */
- bfd_boolean (*start_function) PARAMS ((PTR, const char *, bfd_boolean));
+ bfd_boolean (*start_function) (void *, const char *, bfd_boolean);
/* Record a function parameter for the current function. The type
must be popped off the stack. */
bfd_boolean (*function_parameter)
- PARAMS ((PTR, const char *, enum debug_parm_kind, bfd_vma));
+ (void *, const char *, enum debug_parm_kind, bfd_vma);
/* Start writing out a block. There is at least one top level block
per function. Blocks may be nested. The argument is the
starting address of the block. */
- bfd_boolean (*start_block) PARAMS ((PTR, bfd_vma));
+ bfd_boolean (*start_block) (void *, bfd_vma);
/* Finish writing out a block. The argument is the ending address
of the block. */
- bfd_boolean (*end_block) PARAMS ((PTR, bfd_vma));
+ bfd_boolean (*end_block) (void *, bfd_vma);
/* Finish writing out a function. */
- bfd_boolean (*end_function) PARAMS ((PTR));
+ bfd_boolean (*end_function) (void *);
/* Record line number information for the current compilation unit. */
- bfd_boolean (*lineno) PARAMS ((PTR, const char *, unsigned long, bfd_vma));
+ bfd_boolean (*lineno) (void *, const char *, unsigned long, bfd_vma);
};
/* Exported functions. */
@@ -428,17 +428,17 @@ struct debug_write_fns
/* Return a debugging handle. */
-extern PTR debug_init PARAMS ((void));
+extern void *debug_init (void);
/* Set the source filename. This implicitly starts a new compilation
unit. */
-extern bfd_boolean debug_set_filename PARAMS ((PTR, const char *));
+extern bfd_boolean debug_set_filename (void *, const char *);
/* Change source files to the given file name. This is used for
include files in a single compilation unit. */
-extern bfd_boolean debug_start_source PARAMS ((PTR, const char *));
+extern bfd_boolean debug_start_source (void *, const char *);
/* Record a function definition. This implicitly starts a function
block. The debug_type argument is the type of the return value.
@@ -448,69 +448,67 @@ extern bfd_boolean debug_start_source PARAMS ((PTR, const char *));
debug_record_parameter. */
extern bfd_boolean debug_record_function
- PARAMS ((PTR, const char *, debug_type, bfd_boolean, bfd_vma));
+ (void *, const char *, debug_type, bfd_boolean, bfd_vma);
/* Record a parameter for the current function. */
extern bfd_boolean debug_record_parameter
- PARAMS ((PTR, const char *, debug_type, enum debug_parm_kind, bfd_vma));
+ (void *, const char *, debug_type, enum debug_parm_kind, bfd_vma);
/* End a function definition. The argument is the address where the
function ends. */
-extern bfd_boolean debug_end_function PARAMS ((PTR, bfd_vma));
+extern bfd_boolean debug_end_function (void *, bfd_vma);
/* Start a block in a function. All local information will be
recorded in this block, until the matching call to debug_end_block.
debug_start_block and debug_end_block may be nested. The argument
is the address at which this block starts. */
-extern bfd_boolean debug_start_block PARAMS ((PTR, bfd_vma));
+extern bfd_boolean debug_start_block (void *, bfd_vma);
/* Finish a block in a function. This matches the call to
debug_start_block. The argument is the address at which this block
ends. */
-extern bfd_boolean debug_end_block PARAMS ((PTR, bfd_vma));
+extern bfd_boolean debug_end_block (void *, bfd_vma);
/* Associate a line number in the current source file with a given
address. */
-extern bfd_boolean debug_record_line PARAMS ((PTR, unsigned long, bfd_vma));
+extern bfd_boolean debug_record_line (void *, unsigned long, bfd_vma);
/* Start a named common block. This is a block of variables that may
move in memory. */
-extern bfd_boolean debug_start_common_block PARAMS ((PTR, const char *));
+extern bfd_boolean debug_start_common_block (void *, const char *);
/* End a named common block. */
-extern bfd_boolean debug_end_common_block PARAMS ((PTR, const char *));
+extern bfd_boolean debug_end_common_block (void *, const char *);
/* Record a named integer constant. */
-extern bfd_boolean debug_record_int_const
- PARAMS ((PTR, const char *, bfd_vma));
+extern bfd_boolean debug_record_int_const (void *, const char *, bfd_vma);
/* Record a named floating point constant. */
-extern bfd_boolean debug_record_float_const
- PARAMS ((PTR, const char *, double));
+extern bfd_boolean debug_record_float_const (void *, const char *, double);
/* Record a typed constant with an integral value. */
extern bfd_boolean debug_record_typed_const
- PARAMS ((PTR, const char *, debug_type, bfd_vma));
+ (void *, const char *, debug_type, bfd_vma);
/* Record a label. */
extern bfd_boolean debug_record_label
- PARAMS ((PTR, const char *, debug_type, bfd_vma));
+ (void *, const char *, debug_type, bfd_vma);
/* Record a variable. */
extern bfd_boolean debug_record_variable
- PARAMS ((PTR, const char *, debug_type, enum debug_var_kind, bfd_vma));
+ (void *, const char *, debug_type, enum debug_var_kind, bfd_vma);
/* Make an indirect type. The first argument is a pointer to the
location where the real type will be placed. The second argument
@@ -520,38 +518,37 @@ extern bfd_boolean debug_record_variable
referenced before it is defined. */
extern debug_type debug_make_indirect_type
- PARAMS ((PTR, debug_type *, const char *));
+ (void *, debug_type *, const char *);
/* Make a void type. */
-extern debug_type debug_make_void_type PARAMS ((PTR));
+extern debug_type debug_make_void_type (void *);
/* Make an integer type of a given size. The bfd_boolean argument is TRUE
if the integer is unsigned. */
-extern debug_type debug_make_int_type
- PARAMS ((PTR, unsigned int, bfd_boolean));
+extern debug_type debug_make_int_type (void *, unsigned int, bfd_boolean);
/* Make a floating point type of a given size. FIXME: On some
platforms, like an Alpha, you probably need to be able to specify
the format. */
-extern debug_type debug_make_float_type PARAMS ((PTR, unsigned int));
+extern debug_type debug_make_float_type (void *, unsigned int);
/* Make a boolean type of a given size. */
-extern debug_type debug_make_bool_type PARAMS ((PTR, unsigned int));
+extern debug_type debug_make_bool_type (void *, unsigned int);
/* Make a complex type of a given size. */
-extern debug_type debug_make_complex_type PARAMS ((PTR, unsigned int));
+extern debug_type debug_make_complex_type (void *, unsigned int);
/* Make a structure type. The second argument is TRUE for a struct,
FALSE for a union. The third argument is the size of the struct.
The fourth argument is a NULL terminated array of fields. */
extern debug_type debug_make_struct_type
- PARAMS ((PTR, bfd_boolean, bfd_vma, debug_field *));
+ (void *, bfd_boolean, bfd_vma, debug_field *);
/* Make an object type. The first three arguments after the handle
are the same as for debug_make_struct_type. The next arguments are
@@ -561,19 +558,18 @@ extern debug_type debug_make_struct_type
object has its own virtual function table. */
extern debug_type debug_make_object_type
- PARAMS ((PTR, bfd_boolean, bfd_vma, debug_field *, debug_baseclass *,
- debug_method *, debug_type, bfd_boolean));
+ (void *, bfd_boolean, bfd_vma, debug_field *, debug_baseclass *,
+ debug_method *, debug_type, bfd_boolean);
/* Make an enumeration type. The arguments are a null terminated
array of strings, and an array of corresponding values. */
extern debug_type debug_make_enum_type
- PARAMS ((PTR, const char **, bfd_signed_vma *));
+ (void *, const char **, bfd_signed_vma *);
/* Make a pointer to a given type. */
-extern debug_type debug_make_pointer_type
- PARAMS ((PTR, debug_type));
+extern debug_type debug_make_pointer_type (void *, debug_type);
/* Make a function type. The second argument is the return type. The
third argument is a NULL terminated array of argument types. The
@@ -582,16 +578,16 @@ extern debug_type debug_make_pointer_type
are unknown. */
extern debug_type debug_make_function_type
- PARAMS ((PTR, debug_type, debug_type *, bfd_boolean));
+ (void *, debug_type, debug_type *, bfd_boolean);
/* Make a reference to a given type. */
-extern debug_type debug_make_reference_type PARAMS ((PTR, debug_type));
+extern debug_type debug_make_reference_type (void *, debug_type);
/* Make a range of a given type from a lower to an upper bound. */
extern debug_type debug_make_range_type
- PARAMS ((PTR, debug_type, bfd_signed_vma, bfd_signed_vma));
+ (void *, debug_type, bfd_signed_vma, bfd_signed_vma);
/* Make an array type. The second argument is the type of an element
of the array. The third argument is the type of a range of the
@@ -601,22 +597,21 @@ extern debug_type debug_make_range_type
array is actually a string, as in C. */
extern debug_type debug_make_array_type
- PARAMS ((PTR, debug_type, debug_type, bfd_signed_vma, bfd_signed_vma,
- bfd_boolean));
+ (void *, debug_type, debug_type, bfd_signed_vma, bfd_signed_vma,
+ bfd_boolean);
/* Make a set of a given type. For example, a Pascal set type. The
bfd_boolean argument is TRUE if this set is actually a bitstring, as in
CHILL. */
-extern debug_type debug_make_set_type PARAMS ((PTR, debug_type, bfd_boolean));
+extern debug_type debug_make_set_type (void *, debug_type, bfd_boolean);
/* Make a type for a pointer which is relative to an object. The
second argument is the type of the object to which the pointer is
relative. The third argument is the type that the pointer points
to. */
-extern debug_type debug_make_offset_type
- PARAMS ((PTR, debug_type, debug_type));
+extern debug_type debug_make_offset_type (void *, debug_type, debug_type);
/* Make a type for a method function. The second argument is the
return type. The third argument is the domain. The fourth
@@ -629,21 +624,21 @@ extern debug_type debug_make_offset_type
the argument types from the mangled name. */
extern debug_type debug_make_method_type
- PARAMS ((PTR, debug_type, debug_type, debug_type *, bfd_boolean));
+ (void *, debug_type, debug_type, debug_type *, bfd_boolean);
/* Make a const qualified version of a given type. */
-extern debug_type debug_make_const_type PARAMS ((PTR, debug_type));
+extern debug_type debug_make_const_type (void *, debug_type);
/* Make a volatile qualified version of a given type. */
-extern debug_type debug_make_volatile_type PARAMS ((PTR, debug_type));
+extern debug_type debug_make_volatile_type (void *, debug_type);
/* Make an undefined tagged type. For example, a struct which has
been mentioned, but not defined. */
extern debug_type debug_make_undefined_tagged_type
- PARAMS ((PTR, const char *, enum debug_type_kind));
+ (void *, const char *, enum debug_type_kind);
/* Make a base class for an object. The second argument is the base
class type. The third argument is the bit position of this base
@@ -652,7 +647,7 @@ extern debug_type debug_make_undefined_tagged_type
class. */
extern debug_baseclass debug_make_baseclass
- PARAMS ((PTR, debug_type, bfd_vma, bfd_boolean, enum debug_visibility));
+ (void *, debug_type, bfd_vma, bfd_boolean, enum debug_visibility);
/* Make a field for a struct. The second argument is the name. The
third argument is the type of the field. The fourth argument is
@@ -661,8 +656,7 @@ extern debug_baseclass debug_make_baseclass
of the field. */
extern debug_field debug_make_field
- PARAMS ((PTR, const char *, debug_type, bfd_vma, bfd_vma,
- enum debug_visibility));
+ (void *, const char *, debug_type, bfd_vma, bfd_vma, enum debug_visibility);
/* Make a static member of an object. The second argument is the
name. The third argument is the type of the member. The fourth
@@ -671,8 +665,7 @@ extern debug_field debug_make_field
member. */
extern debug_field debug_make_static_member
- PARAMS ((PTR, const char *, debug_type, const char *,
- enum debug_visibility));
+ (void *, const char *, debug_type, const char *, enum debug_visibility);
/* Make a method. The second argument is the name, and the third
argument is a NULL terminated array of method variants. Each
@@ -680,7 +673,7 @@ extern debug_field debug_make_static_member
argument types. */
extern debug_method debug_make_method
- PARAMS ((PTR, const char *, debug_method_variant *));
+ (void *, const char *, debug_method_variant *);
/* Make a method variant. The second argument is the physical name of
the function. The third argument is the type of the function,
@@ -692,55 +685,54 @@ extern debug_method debug_make_method
function context. */
extern debug_method_variant debug_make_method_variant
- PARAMS ((PTR, const char *, debug_type, enum debug_visibility, bfd_boolean,
- bfd_boolean, bfd_vma, debug_type));
+ (void *, const char *, debug_type, enum debug_visibility, bfd_boolean,
+ bfd_boolean, bfd_vma, debug_type);
/* Make a static method argument. The arguments are the same as for
debug_make_method_variant, except that the last two are omitted
since a static method can not also be virtual. */
extern debug_method_variant debug_make_static_method_variant
- PARAMS ((PTR, const char *, debug_type, enum debug_visibility, bfd_boolean,
- bfd_boolean));
+ (void *, const char *, debug_type, enum debug_visibility, bfd_boolean,
+ bfd_boolean);
/* Name a type. This returns a new type with an attached name. */
-extern debug_type debug_name_type PARAMS ((PTR, const char *, debug_type));
+extern debug_type debug_name_type (void *, const char *, debug_type);
/* Give a tag to a type, such as a struct or union. This returns a
new type with an attached tag. */
-extern debug_type debug_tag_type PARAMS ((PTR, const char *, debug_type));
+extern debug_type debug_tag_type (void *, const char *, debug_type);
/* Record the size of a given type. */
-extern bfd_boolean debug_record_type_size
- PARAMS ((PTR, debug_type, unsigned int));
+extern bfd_boolean debug_record_type_size (void *, debug_type, unsigned int);
/* Find a named type. */
-extern debug_type debug_find_named_type PARAMS ((PTR, const char *));
+extern debug_type debug_find_named_type (void *, const char *);
/* Find a tagged type. */
extern debug_type debug_find_tagged_type
- PARAMS ((PTR, const char *, enum debug_type_kind));
+ (void *, const char *, enum debug_type_kind);
/* Get the kind of a type. */
-extern enum debug_type_kind debug_get_type_kind PARAMS ((PTR, debug_type));
+extern enum debug_type_kind debug_get_type_kind (void *, debug_type);
/* Get the name of a type. */
-extern const char *debug_get_type_name PARAMS ((PTR, debug_type));
+extern const char *debug_get_type_name (void *, debug_type);
/* Get the size of a type. */
-extern bfd_vma debug_get_type_size PARAMS ((PTR, debug_type));
+extern bfd_vma debug_get_type_size (void *, debug_type);
/* Get the return type of a function or method type. */
-extern debug_type debug_get_return_type PARAMS ((PTR, debug_type));
+extern debug_type debug_get_return_type (void *, debug_type);
/* Get the NULL terminated array of parameter types for a function or
method type (actually, parameter types are not currently stored for
@@ -750,52 +742,51 @@ extern debug_type debug_get_return_type PARAMS ((PTR, debug_type));
number of arguments. */
extern const debug_type *debug_get_parameter_types
- PARAMS ((PTR, debug_type, bfd_boolean *));
+ (void *, debug_type, bfd_boolean *);
/* Get the target type of a pointer or reference or const or volatile
type. */
-extern debug_type debug_get_target_type PARAMS ((PTR, debug_type));
+extern debug_type debug_get_target_type (void *, debug_type);
/* Get the NULL terminated array of fields for a struct, union, or
class. */
-extern const debug_field *debug_get_fields PARAMS ((PTR, debug_type));
+extern const debug_field *debug_get_fields (void *, debug_type);
/* Get the type of a field. */
-extern debug_type debug_get_field_type PARAMS ((PTR, debug_field));
+extern debug_type debug_get_field_type (void *, debug_field);
/* Get the name of a field. */
-extern const char *debug_get_field_name PARAMS ((PTR, debug_field));
+extern const char *debug_get_field_name (void *, debug_field);
/* Get the bit position of a field within the containing structure.
If the field is a static member, this will return (bfd_vma) -1. */
-extern bfd_vma debug_get_field_bitpos PARAMS ((PTR, debug_field));
+extern bfd_vma debug_get_field_bitpos (void *, debug_field);
/* Get the bit size of a field. If the field is a static member, this
will return (bfd_vma) -1. */
-extern bfd_vma debug_get_field_bitsize PARAMS ((PTR, debug_field));
+extern bfd_vma debug_get_field_bitsize (void *, debug_field);
/* Get the visibility of a field. */
-extern enum debug_visibility debug_get_field_visibility
- PARAMS ((PTR, debug_field));
+extern enum debug_visibility debug_get_field_visibility (void *, debug_field);
/* Get the physical name of a field, if it is a static member. If the
field is not a static member, this will return NULL. */
-extern const char *debug_get_field_physname PARAMS ((PTR, debug_field));
+extern const char *debug_get_field_physname (void *, debug_field);
/* Write out the recorded debugging information. This takes a set of
function pointers which are called to do the actual writing. The
- first PTR is the debugging handle. The second PTR is a handle
+ first void * is the debugging handle. The second void * is a handle
which is passed to the functions. */
extern bfd_boolean debug_write
- PARAMS ((PTR, const struct debug_write_fns *, PTR));
+ (void *, const struct debug_write_fns *, void *);
#endif /* DEBUG_H */
diff --git a/binutils/deflex.l b/binutils/deflex.l
index d4888bc9b41..106cc7bf155 100644
--- a/binutils/deflex.l
+++ b/binutils/deflex.l
@@ -1,6 +1,6 @@
%{/* deflex.l - Lexer for .def files */
-/* Copyright 1995, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
+/* Copyright 1995, 1997, 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -89,5 +89,5 @@ int linenumber;
%%
#ifndef yywrap
/* Needed for lex, though not flex. */
-int yywrap() { return 1; }
+int yywrap(void) { return 1; }
#endif
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index ffbcd2861cc..84f369243d3 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -1,5 +1,5 @@
/* dlltool.c -- tool to generate stuff for PE style DLLs
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -267,16 +267,12 @@
#endif
/* Forward references. */
-static char *look_for_prog
- PARAMS ((const char *, const char *, int));
-static char *deduce_name
- PARAMS ((const char *));
+static char *look_for_prog (const char *, const char *, int);
+static char *deduce_name (const char *);
#ifdef DLLTOOL_MCORE_ELF
-static void mcore_elf_cache_filename
- PARAMS ((char *));
-static void mcore_elf_gen_out_file
- PARAMS ((void));
+static void mcore_elf_cache_filename (char *);
+static void mcore_elf_gen_out_file (void);
#endif
#ifdef HAVE_SYS_WAIT_H
@@ -665,98 +661,57 @@ struct string_list
static struct string_list *excludes;
-static const char *rvaafter
- PARAMS ((int));
-static const char *rvabefore
- PARAMS ((int));
-static const char *asm_prefix
- PARAMS ((int));
-static void process_def_file
- PARAMS ((const char *));
-static void new_directive
- PARAMS ((char *));
-static void append_import
- PARAMS ((const char *, const char *, int));
-static void run
- PARAMS ((const char *, char *));
-static void scan_drectve_symbols
- PARAMS ((bfd *));
-static void scan_filtered_symbols
- PARAMS ((bfd *, PTR, long, unsigned int));
-static void add_excludes
- PARAMS ((const char *));
-static bfd_boolean match_exclude
- PARAMS ((const char *));
-static void set_default_excludes
- PARAMS ((void));
-static long filter_symbols
- PARAMS ((bfd *, PTR, long, unsigned int));
-static void scan_all_symbols
- PARAMS ((bfd *));
-static void scan_open_obj_file
- PARAMS ((bfd *));
-static void scan_obj_file
- PARAMS ((const char *));
-static void dump_def_info
- PARAMS ((FILE *));
-static int sfunc
- PARAMS ((const void *, const void *));
-static void flush_page
- PARAMS ((FILE *, long *, int, int));
-static void gen_def_file
- PARAMS ((void));
-static void generate_idata_ofile
- PARAMS ((FILE *));
-static void assemble_file
- PARAMS ((const char *, const char *));
-static void gen_exp_file
- PARAMS ((void));
-static const char *xlate
- PARAMS ((const char *));
+static const char *rvaafter (int);
+static const char *rvabefore (int);
+static const char *asm_prefix (int);
+static void process_def_file (const char *);
+static void new_directive (char *);
+static void append_import (const char *, const char *, int);
+static void run (const char *, char *);
+static void scan_drectve_symbols (bfd *);
+static void scan_filtered_symbols (bfd *, void *, long, unsigned int);
+static void add_excludes (const char *);
+static bfd_boolean match_exclude (const char *);
+static void set_default_excludes (void);
+static long filter_symbols (bfd *, void *, long, unsigned int);
+static void scan_all_symbols (bfd *);
+static void scan_open_obj_file (bfd *);
+static void scan_obj_file (const char *);
+static void dump_def_info (FILE *);
+static int sfunc (const void *, const void *);
+static void flush_page (FILE *, long *, int, int);
+static void gen_def_file (void);
+static void generate_idata_ofile (FILE *);
+static void assemble_file (const char *, const char *);
+static void gen_exp_file (void);
+static const char *xlate (const char *);
#if 0
-static void dump_iat
- PARAMS ((FILE *, export_type *));
+static void dump_iat (FILE *, export_type *);
#endif
-static char *make_label
- PARAMS ((const char *, const char *));
-static char *make_imp_label
- PARAMS ((const char *, const char *));
-static bfd *make_one_lib_file
- PARAMS ((export_type *, int));
-static bfd *make_head
- PARAMS ((void));
-static bfd *make_tail
- PARAMS ((void));
-static void gen_lib_file
- PARAMS ((void));
-static int pfunc
- PARAMS ((const void *, const void *));
-static int nfunc
- PARAMS ((const void *, const void *));
-static void remove_null_names
- PARAMS ((export_type **));
-static void dtab
- PARAMS ((export_type **));
-static void process_duplicates
- PARAMS ((export_type **));
-static void fill_ordinals
- PARAMS ((export_type **));
-static int alphafunc
- PARAMS ((const void *, const void *));
-static void mangle_defs
- PARAMS ((void));
-static void usage
- PARAMS ((FILE *, int));
-static void inform
- PARAMS ((const char *, ...));
+static char *make_label (const char *, const char *);
+static char *make_imp_label (const char *, const char *);
+static bfd *make_one_lib_file (export_type *, int);
+static bfd *make_head (void);
+static bfd *make_tail (void);
+static void gen_lib_file (void);
+static int pfunc (const void *, const void *);
+static int nfunc (const void *, const void *);
+static void remove_null_names (export_type **);
+static void dtab (export_type **);
+static void process_duplicates (export_type **);
+static void fill_ordinals (export_type **);
+static int alphafunc (const void *, const void *);
+static void mangle_defs (void);
+static void usage (FILE *, int);
+static void inform (const char *, ...);
static char *
-prefix_encode PARAMS ((char *start, unsigned code))
+prefix_encode (char *start, unsigned code))
{
static char alpha[26] = "abcdefghijklmnopqrstuvwxyz";
static char buf[32];
char *p;
- strcpy (buf, start);
+ strcpy (buf, start;
p = strchr (buf, '\0');
do
*p++ = alpha[code % sizeof (alpha)];
@@ -766,11 +721,11 @@ prefix_encode PARAMS ((char *start, unsigned code))
}
static char *
-dlltmp PARAMS ((char **buf, const char *fmt))
+dlltmp (char **buf, const char *fmt))
{
if (!*buf)
{
- *buf = malloc (strlen (tmp_prefix) + 64);
+ *buf = malloc (strlen (tmp_prefix) + 64;
sprintf (*buf, fmt, tmp_prefix);
}
return *buf;
@@ -791,8 +746,7 @@ inform VPARAMS ((const char * message, ...))
}
static const char *
-rvaafter (machine)
- int machine;
+rvaafter (int machine)
{
switch (machine)
{
@@ -816,8 +770,7 @@ rvaafter (machine)
}
static const char *
-rvabefore (machine)
- int machine;
+rvabefore (int machine)
{
switch (machine)
{
@@ -841,8 +794,7 @@ rvabefore (machine)
}
static const char *
-asm_prefix (machine)
- int machine;
+asm_prefix (int machine)
{
switch (machine)
{
@@ -866,17 +818,17 @@ asm_prefix (machine)
return "";
}
-#define ASM_BYTE mtable[machine].how_byte
-#define ASM_SHORT mtable[machine].how_short
+#define ASM_BYTE mtable[machine].how_byte
+#define ASM_SHORT mtable[machine].how_short
#define ASM_LONG mtable[machine].how_long
#define ASM_TEXT mtable[machine].how_asciz
-#define ASM_C mtable[machine].how_comment
-#define ASM_JUMP mtable[machine].how_jump
+#define ASM_C mtable[machine].how_comment
+#define ASM_JUMP mtable[machine].how_jump
#define ASM_GLOBAL mtable[machine].how_global
#define ASM_SPACE mtable[machine].how_space
#define ASM_ALIGN_SHORT mtable[machine].how_align_short
-#define ASM_RVA_BEFORE rvabefore(machine)
-#define ASM_RVA_AFTER rvaafter(machine)
+#define ASM_RVA_BEFORE rvabefore(machine)
+#define ASM_RVA_AFTER rvaafter(machine)
#define ASM_PREFIX asm_prefix(machine)
#define ASM_ALIGN_LONG mtable[machine].how_align_long
#define HOW_BFD_READ_TARGET 0 /* always default*/
@@ -890,8 +842,7 @@ asm_prefix (machine)
static char **oav;
static void
-process_def_file (name)
- const char *name;
+process_def_file (const char *name)
{
FILE *f = fopen (name, FOPEN_RT);
@@ -928,8 +879,7 @@ static int d_is_dll;
static int d_is_exe;
int
-yyerror (err)
- const char * err ATTRIBUTE_UNUSED;
+yyerror (const char * err ATTRIBUTE_UNUSED)
{
/* xgettext:c-format */
non_fatal (_("Syntax error in def file %s:%d"), def_file, linenumber);
@@ -938,13 +888,8 @@ yyerror (err)
}
void
-def_exports (name, internal_name, ordinal, noname, constant, data)
- const char *name;
- const char *internal_name;
- int ordinal;
- int noname;
- int constant;
- int data;
+def_exports (const char *name, const char *internal_name, int ordinal,
+ int noname, int constant, int data)
{
struct export *p = (struct export *) xmalloc (sizeof (*p));
@@ -966,9 +911,7 @@ def_exports (name, internal_name, ordinal, noname, constant, data)
}
void
-def_name (name, base)
- const char *name;
- int base;
+def_name (const char *name, int base)
{
/* xgettext:c-format */
inform (_("NAME: %s base: %x"), name, base);
@@ -985,9 +928,7 @@ def_name (name, base)
}
void
-def_library (name, base)
- const char *name;
- int base;
+def_library (const char *name, int base)
{
/* xgettext:c-format */
inform (_("LIBRARY: %s base: %x"), name, base);
@@ -1003,8 +944,7 @@ def_library (name, base)
}
void
-def_description (desc)
- const char *desc;
+def_description (const char *desc)
{
dlist_type *d = (dlist_type *) xmalloc (sizeof (dlist_type));
d->text = xstrdup (desc);
@@ -1013,8 +953,7 @@ def_description (desc)
}
static void
-new_directive (dir)
- char *dir;
+new_directive (char *dir)
{
dlist_type *d = (dlist_type *) xmalloc (sizeof (dlist_type));
d->text = xstrdup (dir);
@@ -1023,9 +962,7 @@ new_directive (dir)
}
void
-def_heapsize (reserve, commit)
- int reserve;
- int commit;
+def_heapsize (int reserve, int commit)
{
char b[200];
if (commit > 0)
@@ -1036,9 +973,7 @@ def_heapsize (reserve, commit)
}
void
-def_stacksize (reserve, commit)
- int reserve;
- int commit;
+def_stacksize (int reserve, int commit)
{
char b[200];
if (commit > 0)
@@ -1052,10 +987,7 @@ def_stacksize (reserve, commit)
import_list. It is used by def_import. */
static void
-append_import (symbol_name, dll_name, func_ordinal)
- const char *symbol_name;
- const char *dll_name;
- int func_ordinal;
+append_import (const char *symbol_name, const char *dll_name, int func_ordinal)
{
iheadtype **pq;
iheadtype *q;
@@ -1119,12 +1051,8 @@ append_import (symbol_name, dll_name, func_ordinal)
present (i.e., not NULL). */
void
-def_import (app_name, module, dllext, entry, ord_val)
- const char *app_name;
- const char *module;
- const char *dllext;
- const char *entry;
- int ord_val;
+def_import (const char *app_name, const char *module, const char *dllext,
+ const char *entry, int ord_val)
{
const char *application_name;
char *buf;
@@ -1150,17 +1078,13 @@ def_import (app_name, module, dllext, entry, ord_val)
}
void
-def_version (major, minor)
- int major;
- int minor;
+def_version (int major, int minor)
{
printf ("VERSION %d.%d\n", major, minor);
}
void
-def_section (name, attr)
- const char *name;
- int attr;
+def_section (const char *name, int attr)
{
char buf[200];
char atts[5];
@@ -1180,16 +1104,14 @@ def_section (name, attr)
}
void
-def_code (attr)
- int attr;
+def_code (int attr)
{
def_section ("CODE", attr);
}
void
-def_data (attr)
- int attr;
+def_data (int attr)
{
def_section ("DATA", attr);
}
@@ -1197,9 +1119,7 @@ def_data (attr)
/**********************************************************************/
static void
-run (what, args)
- const char *what;
- char *args;
+run (const char *what, char *args)
{
char *s;
int pid, wait_status;
@@ -1270,8 +1190,7 @@ run (what, args)
ABFD. Pass each one to def_exports. */
static void
-scan_drectve_symbols (abfd)
- bfd *abfd;
+scan_drectve_symbols (bfd *abfd)
{
asection * s;
int size;
@@ -1349,11 +1268,8 @@ scan_drectve_symbols (abfd)
symbols to export. */
static void
-scan_filtered_symbols (abfd, minisyms, symcount, size)
- bfd *abfd;
- PTR minisyms;
- long symcount;
- unsigned int size;
+scan_filtered_symbols (bfd *abfd, void *minisyms, long symcount,
+ unsigned int size)
{
asymbol *store;
bfd_byte *from, *fromend;
@@ -1395,8 +1311,7 @@ scan_filtered_symbols (abfd, minisyms, symcount, size)
/* Add a list of symbols to exclude. */
static void
-add_excludes (new_excludes)
- const char *new_excludes;
+add_excludes (const char *new_excludes)
{
char *local_copy;
char *exclude_string;
@@ -1429,8 +1344,7 @@ add_excludes (new_excludes)
/* See if STRING is on the list of symbols to exclude. */
static bfd_boolean
-match_exclude (string)
- const char *string;
+match_exclude (const char *string)
{
struct string_list *excl_item;
@@ -1451,11 +1365,7 @@ set_default_excludes (void)
/* Choose which symbols to export. */
static long
-filter_symbols (abfd, minisyms, symcount, size)
- bfd *abfd;
- PTR minisyms;
- long symcount;
- unsigned int size;
+filter_symbols (bfd *abfd, void *minisyms, long symcount, unsigned int size)
{
bfd_byte *from, *fromend, *to;
asymbol *store;
@@ -1473,7 +1383,7 @@ filter_symbols (abfd, minisyms, symcount, size)
int keep = 0;
asymbol *sym;
- sym = bfd_minisymbol_to_symbol (abfd, FALSE, (const PTR) from, store);
+ sym = bfd_minisymbol_to_symbol (abfd, FALSE, (const void *) from, store);
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
@@ -1499,11 +1409,10 @@ filter_symbols (abfd, minisyms, symcount, size)
export. */
static void
-scan_all_symbols (abfd)
- bfd *abfd;
+scan_all_symbols (bfd *abfd)
{
long symcount;
- PTR minisyms;
+ void *minisyms;
unsigned int size;
/* Ignore bfds with an import descriptor table. We assume that any
@@ -1542,8 +1451,7 @@ scan_all_symbols (abfd)
/* Look at the object file to decide which symbols to export. */
static void
-scan_open_obj_file (abfd)
- bfd *abfd;
+scan_open_obj_file (bfd *abfd)
{
if (export_all_symbols)
scan_all_symbols (abfd);
@@ -1557,8 +1465,7 @@ scan_open_obj_file (abfd)
}
static void
-scan_obj_file (filename)
- const char *filename;
+scan_obj_file (const char *filename)
{
bfd * f = bfd_openr (filename, 0);
@@ -1601,8 +1508,7 @@ scan_obj_file (filename)
/**********************************************************************/
static void
-dump_def_info (f)
- FILE *f;
+dump_def_info (FILE *f)
{
int i;
export_type *exp;
@@ -1627,19 +1533,13 @@ dump_def_info (f)
/* Generate the .exp file. */
static int
-sfunc (a, b)
- const void *a;
- const void *b;
+sfunc (const void *a, const void *b)
{
return *(const long *) a - *(const long *) b;
}
static void
-flush_page (f, need, page_addr, on_page)
- FILE *f;
- long *need;
- int page_addr;
- int on_page;
+flush_page (FILE *f, long *need, int page_addr, int on_page)
{
int i;
@@ -1669,7 +1569,7 @@ flush_page (f, need, page_addr, on_page)
}
static void
-gen_def_file ()
+gen_def_file (void)
{
int i;
export_type *exp;
@@ -1689,7 +1589,7 @@ gen_def_file ()
if (res)
{
- fprintf (output_def,";\t%s\n", res);
+ fprintf (output_def,";\t%s\n", res);
free (res);
}
@@ -1729,8 +1629,7 @@ gen_def_file ()
the file. */
static void
-generate_idata_ofile (filvar)
- FILE *filvar;
+generate_idata_ofile (FILE *filvar)
{
iheadtype *headptr;
ifunctype *funcptr;
@@ -1822,9 +1721,7 @@ generate_idata_ofile (filvar)
/* Assemble the specified file. */
static void
-assemble_file (source, dest)
- const char * source;
- const char * dest;
+assemble_file (const char * source, const char * dest)
{
char * cmd;
@@ -1837,7 +1734,7 @@ assemble_file (source, dest)
}
static void
-gen_exp_file ()
+gen_exp_file (void)
{
FILE *f;
int i;
@@ -2087,8 +1984,7 @@ gen_exp_file ()
}
static const char *
-xlate (name)
- const char *name;
+xlate (const char *name)
{
int lead_at = (*name == '@');
@@ -2118,9 +2014,7 @@ xlate (name)
#if 0
static void
-dump_iat (f, exp)
- FILE *f;
- export_type *exp;
+dump_iat (FILE *f, export_type *exp)
{
if (exp->noname && !show_allnames )
{
@@ -2250,9 +2144,7 @@ ID2: .short 2
bctr */
static char *
-make_label (prefix, name)
- const char *prefix;
- const char *name;
+make_label (const char *prefix, const char *name)
{
int len = strlen (ASM_PREFIX) + strlen (prefix) + strlen (name);
char *copy = xmalloc (len +1 );
@@ -2264,9 +2156,7 @@ make_label (prefix, name)
}
static char *
-make_imp_label (prefix, name)
- const char *prefix;
- const char *name;
+make_imp_label (const char *prefix, const char *name)
{
int len;
char *copy;
@@ -2290,9 +2180,7 @@ make_imp_label (prefix, name)
}
static bfd *
-make_one_lib_file (exp, i)
- export_type *exp;
- int i;
+make_one_lib_file (export_type *exp, int i)
{
#if 0
{
@@ -2757,7 +2645,7 @@ make_one_lib_file (exp, i)
}
static bfd *
-make_head ()
+make_head (void)
{
FILE *f = fopen (TMP_HEAD_S, FOPEN_WT);
@@ -2816,7 +2704,7 @@ make_head ()
}
static bfd *
-make_tail ()
+make_tail (void)
{
FILE *f = fopen (TMP_TAIL_S, FOPEN_WT);
@@ -2874,7 +2762,7 @@ make_tail ()
}
static void
-gen_lib_file ()
+gen_lib_file (void)
{
int i;
export_type *exp;
@@ -2960,9 +2848,7 @@ gen_lib_file ()
/* Run through the information gathered from the .o files and the
.def file and work out the best stuff. */
static int
-pfunc (a, b)
- const void *a;
- const void *b;
+pfunc (const void *a, const void *b)
{
export_type *ap = *(export_type **) a;
export_type *bp = *(export_type **) b;
@@ -2978,9 +2864,7 @@ pfunc (a, b)
}
static int
-nfunc (a, b)
- const void *a;
- const void *b;
+nfunc (const void *a, const void *b)
{
export_type *ap = *(export_type **) a;
export_type *bp = *(export_type **) b;
@@ -2989,8 +2873,7 @@ nfunc (a, b)
}
static void
-remove_null_names (ptr)
- export_type **ptr;
+remove_null_names (export_type **ptr)
{
int src;
int dst;
@@ -3007,12 +2890,11 @@ remove_null_names (ptr)
}
static void
-dtab (ptr)
- export_type ** ptr
+dtab (export **ptr
#ifndef SACDEBUG
ATTRIBUTE_UNUSED
#endif
- ;
+ )
{
#ifdef SACDEBUG
int i;
@@ -3033,8 +2915,7 @@ ATTRIBUTE_UNUSED
}
static void
-process_duplicates (d_export_vec)
- export_type **d_export_vec;
+process_duplicates (export_type **d_export_vec)
{
int more = 1;
int i;
@@ -3092,8 +2973,7 @@ process_duplicates (d_export_vec)
}
static void
-fill_ordinals (d_export_vec)
- export_type **d_export_vec;
+fill_ordinals (export_type **d_export_vec)
{
int lowest = -1;
int i;
@@ -3167,9 +3047,7 @@ fill_ordinals (d_export_vec)
}
static int
-alphafunc (av,bv)
- const void *av;
- const void *bv;
+alphafunc (const void *av, const void *bv)
{
const export_type **a = (const export_type **) av;
const export_type **b = (const export_type **) bv;
@@ -3178,7 +3056,7 @@ alphafunc (av,bv)
}
static void
-mangle_defs ()
+mangle_defs (void)
{
/* First work out the minimum ordinal chosen. */
export_type *exp;
@@ -3226,9 +3104,7 @@ mangle_defs ()
/**********************************************************************/
static void
-usage (file, status)
- FILE *file;
- int status;
+usage (FILE *file, int status)
{
/* xgetext:c-format */
fprintf (file, _("Usage %s <option(s)> <object-file(s)>\n"), program_name);
@@ -3303,12 +3179,10 @@ static const struct option long_options[] =
{NULL,0,NULL,0}
};
-int main PARAMS ((int, char **));
+int main (int, char **);
int
-main (ac, av)
- int ac;
- char **av;
+main (int ac, char **av)
{
int c;
int i;
@@ -3519,10 +3393,7 @@ main (ac, av)
appropriate. */
static char *
-look_for_prog (prog_name, prefix, end_prefix)
- const char *prog_name;
- const char *prefix;
- int end_prefix;
+look_for_prog (const char *prog_name, const char *prefix, int end_prefix)
{
struct stat s;
char *cmd;
@@ -3588,8 +3459,7 @@ look_for_prog (prog_name, prefix, end_prefix)
Returns a dynamically allocated string. */
static char *
-deduce_name (prog_name)
- const char *prog_name;
+deduce_name (const char *prog_name)
{
char *cmd;
char *dash, *slash, *cp;
diff --git a/binutils/dlltool.h b/binutils/dlltool.h
index 29c825dd824..c2eaea6fdea 100644
--- a/binutils/dlltool.h
+++ b/binutils/dlltool.h
@@ -1,5 +1,5 @@
/* dlltool.h -- header file for dlltool
- Copyright 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -21,22 +21,21 @@
#include "ansidecl.h"
#include <stdio.h>
-extern void def_code PARAMS ((int));
-extern void def_data PARAMS ((int));
-extern void def_description PARAMS ((const char *));
-extern void def_exports
- PARAMS ((const char *, const char *, int, int, int, int));
-extern void def_heapsize PARAMS ((int, int));
+extern void def_code (int);
+extern void def_data (int);
+extern void def_description (const char *);
+extern void def_exports (const char *, const char *, int, int, int, int);
+extern void def_heapsize (int, int);
extern void def_import
- PARAMS ((const char *, const char *, const char *, const char *, int));
-extern void def_library PARAMS ((const char *, int));
-extern void def_name PARAMS ((const char *, int));
-extern void def_section PARAMS ((const char *, int));
-extern void def_stacksize PARAMS ((int, int));
-extern void def_version PARAMS ((int, int));
-extern int yyparse PARAMS ((void));
-extern int yyerror PARAMS ((const char *));
+ (const char *, const char *, const char *, const char *, int);
+extern void def_library (const char *, int);
+extern void def_name (const char *, int);
+extern void def_section (const char *, int);
+extern void def_stacksize (int, int);
+extern void def_version (int, int);
+extern int yyparse (void);
+extern int yyerror (const char *);
extern int yydebug;
-extern int yylex PARAMS ((void));
+extern int yylex (void);
extern FILE *yyin;
extern int linenumber;
diff --git a/binutils/dllwrap.c b/binutils/dllwrap.c
index 4ca59366a02..e4db7bae538 100644
--- a/binutils/dllwrap.c
+++ b/binutils/dllwrap.c
@@ -1,5 +1,5 @@
/* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Mumit Khan (khan@xraylith.wisc.edu).
This file is part of GNU Binutils.
@@ -114,17 +114,17 @@ static int delete_base_file = 1;
static int delete_exp_file = 1;
static int delete_def_file = 1;
-static int run PARAMS ((const char *, char *));
-static char *mybasename PARAMS ((const char *));
-static int strhash PARAMS ((const char *));
-static void usage PARAMS ((FILE *, int));
-static void display PARAMS ((const char *, va_list));
-static void inform PARAMS ((const char *, ...));
-static void warn PARAMS ((const char *, ...));
-static char *look_for_prog PARAMS ((const char *, const char *, int));
-static char *deduce_name PARAMS ((const char *));
-static void delete_temp_files PARAMS ((void));
-static void cleanup_and_exit PARAMS ((int));
+static int run (const char *, char *);
+static char *mybasename (const char *);
+static int strhash (const char *);
+static void usage (FILE *, int);
+static void display (const char *, va_list);
+static void inform (const char *, ...);
+static void warn (const char *, ...);
+static char *look_for_prog (const char *, const char *, int);
+static char *deduce_name (const char *);
+static void delete_temp_files (void);
+static void cleanup_and_exit (int);
/**********************************************************************/
@@ -137,9 +137,7 @@ static void cleanup_and_exit PARAMS ((int));
(hopefully) soon be retired in favor of `ld --shared. */
static void
-display (message, args)
- const char * message;
- va_list args;
+display (const char * message, va_list args)
{
if (program_name != NULL)
fprintf (stderr, "%s: ", program_name);
@@ -180,10 +178,7 @@ warn VPARAMS ((const char *format, ...))
appropriate. */
static char *
-look_for_prog (prog_name, prefix, end_prefix)
- const char *prog_name;
- const char *prefix;
- int end_prefix;
+look_for_prog (const char *prog_name, const char *prefix, int end_prefix)
{
struct stat s;
char *cmd;
@@ -249,8 +244,7 @@ look_for_prog (prog_name, prefix, end_prefix)
Returns a dynamically allocated string. */
static char *
-deduce_name (prog_name)
- const char *prog_name;
+deduce_name (const char *prog_name)
{
char *cmd;
char *dash, *slash, *cp;
@@ -298,7 +292,7 @@ deduce_name (prog_name)
}
static void
-delete_temp_files ()
+delete_temp_files (void)
{
if (delete_base_file && base_file_name)
{
@@ -349,17 +343,14 @@ delete_temp_files ()
}
static void
-cleanup_and_exit (status)
- int status;
+cleanup_and_exit (int status)
{
delete_temp_files ();
exit (status);
}
static int
-run (what, args)
- const char *what;
- char *args;
+run (const char *what, char *args)
{
char *s;
int pid, wait_status, retcode;
@@ -445,8 +436,7 @@ run (what, args)
}
static char *
-mybasename (name)
- const char *name;
+mybasename (const char *name)
{
const char *base = name;
@@ -462,8 +452,7 @@ mybasename (name)
}
static int
-strhash (str)
- const char *str;
+strhash (const char *str)
{
const unsigned char *s;
unsigned long hash;
@@ -488,9 +477,7 @@ strhash (str)
/**********************************************************************/
static void
-usage (file, status)
- FILE *file;
- int status;
+usage (FILE *file, int status)
{
fprintf (file, _("Usage %s <option(s)> <object-file(s)>\n"), program_name);
fprintf (file, _(" Generic options:\n"));
@@ -552,7 +539,7 @@ usage (file, status)
/* DLLTOOL options. */
#define OPTION_NODELETE (OPTION_MNO_CYGWIN + 1)
#define OPTION_DLLNAME (OPTION_NODELETE + 1)
-#define OPTION_NO_IDATA4 (OPTION_DLLNAME + 1)
+#define OPTION_NO_IDATA4 (OPTION_DLLNAME + 1)
#define OPTION_NO_IDATA5 (OPTION_NO_IDATA4 + 1)
#define OPTION_OUTPUT_EXP (OPTION_NO_IDATA5 + 1)
#define OPTION_OUTPUT_DEF (OPTION_OUTPUT_EXP + 1)
@@ -611,12 +598,10 @@ static const struct option long_options[] =
{0, 0, 0, 0}
};
-int main PARAMS ((int, char **));
+int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
int i;
diff --git a/binutils/emul_aix.c b/binutils/emul_aix.c
index cbb0894c2f2..e7150aebaeb 100644
--- a/binutils/emul_aix.c
+++ b/binutils/emul_aix.c
@@ -1,5 +1,5 @@
/* Binutils emulation layer.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Written by Tom Rix, Redhat.
This file is part of GNU Binutils.
@@ -34,24 +34,17 @@ static bfd_boolean X32 = TRUE;
/* Whether to include 64 bit objects. */
static bfd_boolean X64 = FALSE;
-static void ar_emul_aix_usage
- PARAMS ((FILE *));
-static bfd_boolean ar_emul_aix_append
- PARAMS ((bfd **, char *, bfd_boolean));
-static bfd_boolean ar_emul_aix5_append
- PARAMS ((bfd **, char *, bfd_boolean));
-static bfd_boolean ar_emul_aix_replace
- PARAMS ((bfd **, char *, bfd_boolean));
-static bfd_boolean ar_emul_aix5_replace
- PARAMS ((bfd **, char *, bfd_boolean));
-static bfd_boolean ar_emul_aix_parse_arg
- PARAMS ((char *));
+static void ar_emul_aix_usage (FILE *);
+static bfd_boolean ar_emul_aix_append (bfd **, char *, bfd_boolean);
+static bfd_boolean ar_emul_aix5_append (bfd **, char *, bfd_boolean);
+static bfd_boolean ar_emul_aix_replace (bfd **, char *, bfd_boolean);
+static bfd_boolean ar_emul_aix5_replace (bfd **, char *, bfd_boolean);
+static bfd_boolean ar_emul_aix_parse_arg (char *);
static bfd_boolean ar_emul_aix_internal
- PARAMS ((bfd **, char *, bfd_boolean, const char *, bfd_boolean));
+ (bfd **, char *, bfd_boolean, const char *, bfd_boolean);
static void
-ar_emul_aix_usage (fp)
- FILE *fp;
+ar_emul_aix_usage (FILE *fp)
{
AR_EMUL_USAGE_PRINT_OPTION_HEADER (fp);
/* xgettext:c-format */
@@ -62,12 +55,8 @@ ar_emul_aix_usage (fp)
}
static bfd_boolean
-ar_emul_aix_internal (after_bfd, file_name, verbose, target_name, is_append)
- bfd **after_bfd;
- char *file_name;
- bfd_boolean verbose;
- const char * target_name;
- bfd_boolean is_append;
+ar_emul_aix_internal (bfd **after_bfd, char *file_name, bfd_boolean verbose,
+ const char * target_name, bfd_boolean is_append)
{
bfd *temp;
bfd *try_bfd;
@@ -107,48 +96,35 @@ ar_emul_aix_internal (after_bfd, file_name, verbose, target_name, is_append)
static bfd_boolean
-ar_emul_aix_append (after_bfd, file_name, verbose)
- bfd **after_bfd;
- char *file_name;
- bfd_boolean verbose;
+ar_emul_aix_append (bfd **after_bfd, char *file_name, bfd_boolean verbose)
{
return ar_emul_aix_internal (after_bfd, file_name, verbose,
"aixcoff64-rs6000", TRUE);
}
static bfd_boolean
-ar_emul_aix5_append (after_bfd, file_name, verbose)
- bfd **after_bfd;
- char *file_name;
- bfd_boolean verbose;
+ar_emul_aix5_append (bfd **after_bfd, char *file_name, bfd_boolean verbose)
{
return ar_emul_aix_internal (after_bfd, file_name, verbose,
"aix5coff64-rs6000", TRUE);
}
static bfd_boolean
-ar_emul_aix_replace (after_bfd, file_name, verbose)
- bfd **after_bfd;
- char *file_name;
- bfd_boolean verbose;
+ar_emul_aix_replace (bfd **after_bfd, char *file_name, bfd_boolean verbose)
{
return ar_emul_aix_internal (after_bfd, file_name, verbose,
"aixcoff64-rs6000", FALSE);
}
static bfd_boolean
-ar_emul_aix5_replace (after_bfd, file_name, verbose)
- bfd **after_bfd;
- char *file_name;
- bfd_boolean verbose;
+ar_emul_aix5_replace (bfd **after_bfd, char *file_name, bfd_boolean verbose)
{
return ar_emul_aix_internal (after_bfd, file_name, verbose,
"aix5coff64-rs6000", FALSE);
}
static bfd_boolean
-ar_emul_aix_parse_arg (arg)
- char *arg;
+ar_emul_aix_parse_arg (char *arg)
{
if (strncmp (arg, "-X32_64", 6) == 0)
{
diff --git a/binutils/filemode.c b/binutils/filemode.c
index ca00694fb78..6e87df02aee 100644
--- a/binutils/filemode.c
+++ b/binutils/filemode.c
@@ -1,5 +1,5 @@
/* filemode.c -- make a string describing file modes
- Copyright 1985, 1990, 1991, 1994, 1995, 1997
+ Copyright 1985, 1990, 1991, 1994, 1995, 1997, 2003
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -20,8 +20,8 @@
#include "bfd.h"
#include "bucomm.h"
-static char ftypelet PARAMS ((unsigned long));
-static void setst PARAMS ((unsigned long, char *));
+static char ftypelet (unsigned long);
+static void setst (unsigned long, char *);
/* filemodestring - fill in string STR with an ls-style ASCII
representation of the st_mode field of file stats block STATP.
@@ -64,9 +64,7 @@ static void setst PARAMS ((unsigned long, char *));
/* This is not used; only mode_string is used. */
void
-filemodestring (statp, str)
- struct stat *statp;
- char *str;
+filemodestring (struct stat *statp, char *str)
{
mode_string ((unsigned long) statp->st_mode, str);
}
@@ -118,9 +116,7 @@ filemodestring (statp, str)
is given as an argument. */
void
-mode_string (mode, str)
- unsigned long mode;
- char *str;
+mode_string (unsigned long mode, char *str)
{
str[0] = ftypelet ((unsigned long) mode);
str[1] = (mode & S_IRUSR) != 0 ? 'r' : '-';
@@ -195,8 +191,7 @@ mode_string (mode, str)
#endif /* ! defined (S_ISLNK) */
static char
-ftypelet (bits)
- unsigned long bits;
+ftypelet (unsigned long bits)
{
if (S_ISDIR (bits))
return 'd';
@@ -230,9 +225,7 @@ ftypelet (bits)
according to the file mode BITS. */
static void
-setst (bits, chars)
- unsigned long bits ATTRIBUTE_UNUSED;
- char *chars ATTRIBUTE_UNUSED;
+setst (unsigned long bits ATTRIBUTE_UNUSED, char *chars ATTRIBUTE_UNUSED)
{
#ifdef S_ISUID
if (bits & S_ISUID)
diff --git a/binutils/ieee.c b/binutils/ieee.c
index c9340cbad1a..ec9dec8780e 100644
--- a/binutils/ieee.c
+++ b/binutils/ieee.c
@@ -1,5 +1,5 @@
/* ieee.c -- Read and write IEEE-695 debugging information.
- Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -146,7 +146,7 @@ struct ieee_tag
struct ieee_info
{
/* The debugging handle. */
- PTR dhandle;
+ void *dhandle;
/* The BFD. */
bfd *abfd;
/* The start of the bytes to be parsed. */
@@ -249,65 +249,50 @@ enum builtin_types
/* Local functions. */
-static void ieee_error
- PARAMS ((struct ieee_info *, const bfd_byte *, const char *));
-static void ieee_eof
- PARAMS ((struct ieee_info *));
-static char *savestring
- PARAMS ((const char *, unsigned long));
+static void ieee_error (struct ieee_info *, const bfd_byte *, const char *);
+static void ieee_eof (struct ieee_info *);
+static char *savestring (const char *, unsigned long);
static bfd_boolean ieee_read_number
- PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *));
+ (struct ieee_info *, const bfd_byte **, bfd_vma *);
static bfd_boolean ieee_read_optional_number
- PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *, bfd_boolean *));
+ (struct ieee_info *, const bfd_byte **, bfd_vma *, bfd_boolean *);
static bfd_boolean ieee_read_id
- PARAMS ((struct ieee_info *, const bfd_byte **, const char **,
- unsigned long *));
+ (struct ieee_info *, const bfd_byte **, const char **, unsigned long *);
static bfd_boolean ieee_read_optional_id
- PARAMS ((struct ieee_info *, const bfd_byte **, const char **,
- unsigned long *, bfd_boolean *));
+ (struct ieee_info *, const bfd_byte **, const char **, unsigned long *,
+ bfd_boolean *);
static bfd_boolean ieee_read_expression
- PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *));
+ (struct ieee_info *, const bfd_byte **, bfd_vma *);
static debug_type ieee_builtin_type
- PARAMS ((struct ieee_info *, const bfd_byte *, unsigned int));
+ (struct ieee_info *, const bfd_byte *, unsigned int);
static bfd_boolean ieee_alloc_type
- PARAMS ((struct ieee_info *, unsigned int, bfd_boolean));
+ (struct ieee_info *, unsigned int, bfd_boolean);
static bfd_boolean ieee_read_type_index
- PARAMS ((struct ieee_info *, const bfd_byte **, debug_type *));
-static int ieee_regno_to_genreg
- PARAMS ((bfd *, int));
-static int ieee_genreg_to_regno
- PARAMS ((bfd *, int));
-static bfd_boolean parse_ieee_bb
- PARAMS ((struct ieee_info *, const bfd_byte **));
-static bfd_boolean parse_ieee_be
- PARAMS ((struct ieee_info *, const bfd_byte **));
-static bfd_boolean parse_ieee_nn
- PARAMS ((struct ieee_info *, const bfd_byte **));
-static bfd_boolean parse_ieee_ty
- PARAMS ((struct ieee_info *, const bfd_byte **));
-static bfd_boolean parse_ieee_atn
- PARAMS ((struct ieee_info *, const bfd_byte **));
+ (struct ieee_info *, const bfd_byte **, debug_type *);
+static int ieee_regno_to_genreg (bfd *, int);
+static int ieee_genreg_to_regno (bfd *, int);
+static bfd_boolean parse_ieee_bb (struct ieee_info *, const bfd_byte **);
+static bfd_boolean parse_ieee_be (struct ieee_info *, const bfd_byte **);
+static bfd_boolean parse_ieee_nn (struct ieee_info *, const bfd_byte **);
+static bfd_boolean parse_ieee_ty (struct ieee_info *, const bfd_byte **);
+static bfd_boolean parse_ieee_atn (struct ieee_info *, const bfd_byte **);
static bfd_boolean ieee_read_cxx_misc
- PARAMS ((struct ieee_info *, const bfd_byte **, unsigned long));
+ (struct ieee_info *, const bfd_byte **, unsigned long);
static bfd_boolean ieee_read_cxx_class
- PARAMS ((struct ieee_info *, const bfd_byte **, unsigned long));
+ (struct ieee_info *, const bfd_byte **, unsigned long);
static bfd_boolean ieee_read_cxx_defaults
- PARAMS ((struct ieee_info *, const bfd_byte **, unsigned long));
+ (struct ieee_info *, const bfd_byte **, unsigned long);
static bfd_boolean ieee_read_reference
- PARAMS ((struct ieee_info *, const bfd_byte **));
+ (struct ieee_info *, const bfd_byte **);
static bfd_boolean ieee_require_asn
- PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *));
+ (struct ieee_info *, const bfd_byte **, bfd_vma *);
static bfd_boolean ieee_require_atn65
- PARAMS ((struct ieee_info *, const bfd_byte **, const char **,
- unsigned long *));
+ (struct ieee_info *, const bfd_byte **, const char **, unsigned long *);
/* Report an error in the IEEE debugging information. */
static void
-ieee_error (info, p, s)
- struct ieee_info *info;
- const bfd_byte *p;
- const char *s;
+ieee_error (struct ieee_info *info, const bfd_byte *p, const char *s)
{
if (p != NULL)
fprintf (stderr, "%s: 0x%lx: %s (0x%x)\n", bfd_get_filename (info->abfd),
@@ -319,8 +304,7 @@ ieee_error (info, p, s)
/* Report an unexpected EOF in the IEEE debugging information. */
static void
-ieee_eof (info)
- struct ieee_info *info;
+ieee_eof (struct ieee_info *info)
{
ieee_error (info, (const bfd_byte *) NULL,
_("unexpected end of debugging information"));
@@ -329,9 +313,7 @@ ieee_eof (info)
/* Save a string in memory. */
static char *
-savestring (start, len)
- const char *start;
- unsigned long len;
+savestring (const char *start, unsigned long len)
{
char *ret;
@@ -344,10 +326,7 @@ savestring (start, len)
/* Read a number which must be present in an IEEE file. */
static bfd_boolean
-ieee_read_number (info, pp, pv)
- struct ieee_info *info;
- const bfd_byte **pp;
- bfd_vma *pv;
+ieee_read_number (struct ieee_info *info, const bfd_byte **pp, bfd_vma *pv)
{
return ieee_read_optional_number (info, pp, pv, (bfd_boolean *) NULL);
}
@@ -356,11 +335,8 @@ ieee_read_number (info, pp, pv)
need not be there. */
static bfd_boolean
-ieee_read_optional_number (info, pp, pv, ppresent)
- struct ieee_info *info;
- const bfd_byte **pp;
- bfd_vma *pv;
- bfd_boolean *ppresent;
+ieee_read_optional_number (struct ieee_info *info, const bfd_byte **pp,
+ bfd_vma *pv, bfd_boolean *ppresent)
{
ieee_record_enum_type b;
@@ -425,11 +401,8 @@ ieee_read_optional_number (info, pp, pv, ppresent)
/* Read a required string from an IEEE file. */
static bfd_boolean
-ieee_read_id (info, pp, pname, pnamlen)
- struct ieee_info *info;
- const bfd_byte **pp;
- const char **pname;
- unsigned long *pnamlen;
+ieee_read_id (struct ieee_info *info, const bfd_byte **pp,
+ const char **pname, unsigned long *pnamlen)
{
return ieee_read_optional_id (info, pp, pname, pnamlen, (bfd_boolean *) NULL);
}
@@ -438,12 +411,9 @@ ieee_read_id (info, pp, pname, pnamlen)
string is optional. */
static bfd_boolean
-ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
- struct ieee_info *info;
- const bfd_byte **pp;
- const char **pname;
- unsigned long *pnamlen;
- bfd_boolean *ppresent;
+ieee_read_optional_id (struct ieee_info *info, const bfd_byte **pp,
+ const char **pname, unsigned long *pnamlen,
+ bfd_boolean *ppresent)
{
bfd_byte b;
unsigned long len;
@@ -504,10 +474,8 @@ ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
necessary. */
static bfd_boolean
-ieee_read_expression (info, pp, pv)
- struct ieee_info *info;
- const bfd_byte **pp;
- bfd_vma *pv;
+ieee_read_expression (struct ieee_info *info, const bfd_byte **pp,
+ bfd_vma *pv)
{
const bfd_byte *expr_start;
#define EXPR_STACK_SIZE (10)
@@ -616,12 +584,10 @@ ieee_read_expression (info, pp, pv)
/* Return an IEEE builtin type. */
static debug_type
-ieee_builtin_type (info, p, indx)
- struct ieee_info *info;
- const bfd_byte *p;
- unsigned int indx;
+ieee_builtin_type (struct ieee_info *info, const bfd_byte *p,
+ unsigned int indx)
{
- PTR dhandle;
+ void *dhandle;
debug_type type;
const char *name;
@@ -807,10 +773,7 @@ ieee_builtin_type (info, p, indx)
up an indirect type. */
static bfd_boolean
-ieee_alloc_type (info, indx, ref)
- struct ieee_info *info;
- unsigned int indx;
- bfd_boolean ref;
+ieee_alloc_type (struct ieee_info *info, unsigned int indx, bfd_boolean ref)
{
unsigned int nalloc;
register struct ieee_type *t;
@@ -858,10 +821,8 @@ ieee_alloc_type (info, indx, ref)
/* Read a type index and return the corresponding type. */
static bfd_boolean
-ieee_read_type_index (info, pp, ptype)
- struct ieee_info *info;
- const bfd_byte **pp;
- debug_type *ptype;
+ieee_read_type_index (struct ieee_info *info, const bfd_byte **pp,
+ debug_type *ptype)
{
const bfd_byte *start;
bfd_vma indx;
@@ -892,11 +853,7 @@ ieee_read_type_index (info, pp, ptype)
bytes which compose the Debug Information Part of an IEEE file. */
bfd_boolean
-parse_ieee (dhandle, abfd, bytes, len)
- PTR dhandle;
- bfd *abfd;
- const bfd_byte *bytes;
- bfd_size_type len;
+parse_ieee (void *dhandle, bfd *abfd, const bfd_byte *bytes, bfd_size_type len)
{
struct ieee_info info;
unsigned int i;
@@ -984,9 +941,7 @@ parse_ieee (dhandle, abfd, bytes, len)
/* Handle an IEEE BB record. */
static bfd_boolean
-parse_ieee_bb (info, pp)
- struct ieee_info *info;
- const bfd_byte **pp;
+parse_ieee_bb (struct ieee_info *info, const bfd_byte **pp)
{
const bfd_byte *block_start;
bfd_byte b;
@@ -1265,9 +1220,7 @@ parse_ieee_bb (info, pp)
/* Handle an IEEE BE record. */
static bfd_boolean
-parse_ieee_be (info, pp)
- struct ieee_info *info;
- const bfd_byte **pp;
+parse_ieee_be (struct ieee_info *info, const bfd_byte **pp)
{
bfd_vma offset;
@@ -1370,9 +1323,7 @@ parse_ieee_be (info, pp)
/* Parse an NN record. */
static bfd_boolean
-parse_ieee_nn (info, pp)
- struct ieee_info *info;
- const bfd_byte **pp;
+parse_ieee_nn (struct ieee_info *info, const bfd_byte **pp)
{
const bfd_byte *nn_start;
bfd_vma varindx;
@@ -1418,13 +1369,11 @@ parse_ieee_nn (info, pp)
/* Parse a TY record. */
static bfd_boolean
-parse_ieee_ty (info, pp)
- struct ieee_info *info;
- const bfd_byte **pp;
+parse_ieee_ty (struct ieee_info *info, const bfd_byte **pp)
{
const bfd_byte *ty_start, *ty_var_start, *ty_code_start;
bfd_vma typeindx, varindx, tc;
- PTR dhandle;
+ void *dhandle;
bfd_boolean tag, typdef;
debug_type *arg_slots;
unsigned long type_bitsize;
@@ -2117,16 +2066,14 @@ parse_ieee_ty (info, pp)
/* Parse an ATN record. */
static bfd_boolean
-parse_ieee_atn (info, pp)
- struct ieee_info *info;
- const bfd_byte **pp;
+parse_ieee_atn (struct ieee_info *info, const bfd_byte **pp)
{
const bfd_byte *atn_start, *atn_code_start;
bfd_vma varindx;
struct ieee_var *pvar;
debug_type type;
bfd_vma atn_code;
- PTR dhandle;
+ void *dhandle;
bfd_vma v, v2, v3, v4, v5;
const char *name;
unsigned long namlen;
@@ -2486,10 +2433,8 @@ parse_ieee_atn (info, pp)
procedure miscellaneous records of type 80. */
static bfd_boolean
-ieee_read_cxx_misc (info, pp, count)
- struct ieee_info *info;
- const bfd_byte **pp;
- unsigned long count;
+ieee_read_cxx_misc (struct ieee_info *info, const bfd_byte **pp,
+ unsigned long count)
{
const bfd_byte *start;
bfd_vma category;
@@ -2574,17 +2519,15 @@ ieee_read_cxx_misc (info, pp, count)
category 'T'. */
static bfd_boolean
-ieee_read_cxx_class (info, pp, count)
- struct ieee_info *info;
- const bfd_byte **pp;
- unsigned long count;
+ieee_read_cxx_class (struct ieee_info *info, const bfd_byte **pp,
+ unsigned long count)
{
const bfd_byte *start;
bfd_vma class;
const char *tag;
unsigned long taglen;
struct ieee_tag *it;
- PTR dhandle;
+ void *dhandle;
debug_field *fields;
unsigned int field_count, field_alloc;
debug_baseclass *baseclasses;
@@ -3241,10 +3184,8 @@ ieee_read_cxx_class (info, pp, count)
/* Read C++ default argument value and reference type information. */
static bfd_boolean
-ieee_read_cxx_defaults (info, pp, count)
- struct ieee_info *info;
- const bfd_byte **pp;
- unsigned long count;
+ieee_read_cxx_defaults (struct ieee_info *info, const bfd_byte **pp,
+ unsigned long count)
{
const bfd_byte *start;
const char *fnname;
@@ -3312,7 +3253,7 @@ ieee_read_cxx_defaults (info, pp, count)
reference type. */
if (count > 0)
{
- PTR dhandle;
+ void *dhandle;
debug_type *arg_slots;
dhandle = info->dhandle;
@@ -3348,9 +3289,7 @@ ieee_read_cxx_defaults (info, pp, count)
/* Read a C++ reference definition. */
static bfd_boolean
-ieee_read_reference (info, pp)
- struct ieee_info *info;
- const bfd_byte **pp;
+ieee_read_reference (struct ieee_info *info, const bfd_byte **pp)
{
const bfd_byte *start;
bfd_vma flags;
@@ -3521,10 +3460,7 @@ ieee_read_reference (info, pp)
/* Require an ASN record. */
static bfd_boolean
-ieee_require_asn (info, pp, pv)
- struct ieee_info *info;
- const bfd_byte **pp;
- bfd_vma *pv;
+ieee_require_asn (struct ieee_info *info, const bfd_byte **pp, bfd_vma *pv)
{
const bfd_byte *start;
ieee_record_enum_type c;
@@ -3558,11 +3494,8 @@ ieee_require_asn (info, pp, pv)
/* Require an ATN65 record. */
static bfd_boolean
-ieee_require_atn65 (info, pp, pname, pnamlen)
- struct ieee_info *info;
- const bfd_byte **pp;
- const char **pname;
- unsigned long *pnamlen;
+ieee_require_atn65 (struct ieee_info *info, const bfd_byte **pp,
+ const char **pname, unsigned long *pnamlen)
{
const bfd_byte *start;
ieee_record_enum_type c;
@@ -3606,9 +3539,7 @@ ieee_require_atn65 (info, pp, pname, pnamlen)
generic register number. */
static int
-ieee_regno_to_genreg (abfd, r)
- bfd *abfd;
- int r;
+ieee_regno_to_genreg (bfd *abfd, int r)
{
switch (bfd_get_arch (abfd))
{
@@ -3635,9 +3566,7 @@ ieee_regno_to_genreg (abfd, r)
/* Convert a generic register number to an IEEE specific one. */
static int
-ieee_genreg_to_regno (abfd, r)
- bfd *abfd;
- int r;
+ieee_genreg_to_regno (bfd *abfd, int r)
{
switch (bfd_get_arch (abfd))
{
@@ -3955,154 +3884,108 @@ struct ieee_handle
};
static bfd_boolean ieee_init_buffer
- PARAMS ((struct ieee_handle *, struct ieee_buflist *));
+ (struct ieee_handle *, struct ieee_buflist *);
static bfd_boolean ieee_change_buffer
- PARAMS ((struct ieee_handle *, struct ieee_buflist *));
+ (struct ieee_handle *, struct ieee_buflist *);
static bfd_boolean ieee_append_buffer
- PARAMS ((struct ieee_handle *, struct ieee_buflist *,
- struct ieee_buflist *));
-static bfd_boolean ieee_real_write_byte
- PARAMS ((struct ieee_handle *, int));
-static bfd_boolean ieee_write_2bytes
- PARAMS ((struct ieee_handle *, int));
-static bfd_boolean ieee_write_number
- PARAMS ((struct ieee_handle *, bfd_vma));
-static bfd_boolean ieee_write_id
- PARAMS ((struct ieee_handle *, const char *));
+ (struct ieee_handle *, struct ieee_buflist *, struct ieee_buflist *);
+static bfd_boolean ieee_real_write_byte (struct ieee_handle *, int);
+static bfd_boolean ieee_write_2bytes (struct ieee_handle *, int);
+static bfd_boolean ieee_write_number (struct ieee_handle *, bfd_vma);
+static bfd_boolean ieee_write_id (struct ieee_handle *, const char *);
static bfd_boolean ieee_write_asn
- PARAMS ((struct ieee_handle *, unsigned int, bfd_vma));
+ (struct ieee_handle *, unsigned int, bfd_vma);
static bfd_boolean ieee_write_atn65
- PARAMS ((struct ieee_handle *, unsigned int, const char *));
+ (struct ieee_handle *, unsigned int, const char *);
static bfd_boolean ieee_push_type
- PARAMS ((struct ieee_handle *, unsigned int, unsigned int, bfd_boolean,
- bfd_boolean));
-static unsigned int ieee_pop_type
- PARAMS ((struct ieee_handle *));
-static void ieee_pop_unused_type
- PARAMS ((struct ieee_handle *));
-static unsigned int ieee_pop_type_used
- PARAMS ((struct ieee_handle *, bfd_boolean));
+ (struct ieee_handle *, unsigned int, unsigned int, bfd_boolean,
+ bfd_boolean);
+static unsigned int ieee_pop_type (struct ieee_handle *);
+static void ieee_pop_unused_type (struct ieee_handle *);
+static unsigned int ieee_pop_type_used (struct ieee_handle *, bfd_boolean);
static bfd_boolean ieee_add_range
- PARAMS ((struct ieee_handle *, bfd_boolean, bfd_vma, bfd_vma));
-static bfd_boolean ieee_start_range
- PARAMS ((struct ieee_handle *, bfd_vma));
-static bfd_boolean ieee_end_range
- PARAMS ((struct ieee_handle *, bfd_vma));
+ (struct ieee_handle *, bfd_boolean, bfd_vma, bfd_vma);
+static bfd_boolean ieee_start_range (struct ieee_handle *, bfd_vma);
+static bfd_boolean ieee_end_range (struct ieee_handle *, bfd_vma);
static bfd_boolean ieee_define_type
- PARAMS ((struct ieee_handle *, unsigned int, bfd_boolean, bfd_boolean));
+ (struct ieee_handle *, unsigned int, bfd_boolean, bfd_boolean);
static bfd_boolean ieee_define_named_type
- PARAMS ((struct ieee_handle *, const char *, unsigned int, unsigned int,
- bfd_boolean, bfd_boolean, struct ieee_buflist *));
+ (struct ieee_handle *, const char *, unsigned int, unsigned int,
+ bfd_boolean, bfd_boolean, struct ieee_buflist *);
static struct ieee_modified_type *ieee_get_modified_info
- PARAMS ((struct ieee_handle *, unsigned int));
+ (struct ieee_handle *, unsigned int);
static struct bfd_hash_entry *ieee_name_type_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
static bfd_boolean ieee_write_undefined_tag
- PARAMS ((struct ieee_name_type_hash_entry *, PTR));
-static bfd_boolean ieee_finish_compilation_unit
- PARAMS ((struct ieee_handle *));
-static void ieee_add_bb11_blocks
- PARAMS ((bfd *, asection *, PTR));
+ (struct ieee_name_type_hash_entry *, void *);
+static bfd_boolean ieee_finish_compilation_unit (struct ieee_handle *);
+static void ieee_add_bb11_blocks (bfd *, asection *, void *);
static bfd_boolean ieee_add_bb11
- PARAMS ((struct ieee_handle *, asection *, bfd_vma, bfd_vma));
-static bfd_boolean ieee_output_pending_parms
- PARAMS ((struct ieee_handle *));
-static unsigned int ieee_vis_to_flags
- PARAMS ((enum debug_visibility));
+ (struct ieee_handle *, asection *, bfd_vma, bfd_vma);
+static bfd_boolean ieee_output_pending_parms (struct ieee_handle *);
+static unsigned int ieee_vis_to_flags (enum debug_visibility);
static bfd_boolean ieee_class_method_var
- PARAMS ((struct ieee_handle *, const char *, enum debug_visibility, bfd_boolean,
- bfd_boolean, bfd_boolean, bfd_vma, bfd_boolean));
-
-static bfd_boolean ieee_start_compilation_unit
- PARAMS ((PTR, const char *));
-static bfd_boolean ieee_start_source
- PARAMS ((PTR, const char *));
-static bfd_boolean ieee_empty_type
- PARAMS ((PTR));
-static bfd_boolean ieee_void_type
- PARAMS ((PTR));
-static bfd_boolean ieee_int_type
- PARAMS ((PTR, unsigned int, bfd_boolean));
-static bfd_boolean ieee_float_type
- PARAMS ((PTR, unsigned int));
-static bfd_boolean ieee_complex_type
- PARAMS ((PTR, unsigned int));
-static bfd_boolean ieee_bool_type
- PARAMS ((PTR, unsigned int));
+ (struct ieee_handle *, const char *, enum debug_visibility, bfd_boolean,
+ bfd_boolean, bfd_boolean, bfd_vma, bfd_boolean);
+
+static bfd_boolean ieee_start_compilation_unit (void *, const char *);
+static bfd_boolean ieee_start_source (void *, const char *);
+static bfd_boolean ieee_empty_type (void *);
+static bfd_boolean ieee_void_type (void *);
+static bfd_boolean ieee_int_type (void *, unsigned int, bfd_boolean);
+static bfd_boolean ieee_float_type (void *, unsigned int);
+static bfd_boolean ieee_complex_type (void *, unsigned int);
+static bfd_boolean ieee_bool_type (void *, unsigned int);
static bfd_boolean ieee_enum_type
- PARAMS ((PTR, const char *, const char **, bfd_signed_vma *));
-static bfd_boolean ieee_pointer_type
- PARAMS ((PTR));
-static bfd_boolean ieee_function_type
- PARAMS ((PTR, int, bfd_boolean));
-static bfd_boolean ieee_reference_type
- PARAMS ((PTR));
-static bfd_boolean ieee_range_type
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
+ (void *, const char *, const char **, bfd_signed_vma *);
+static bfd_boolean ieee_pointer_type (void *);
+static bfd_boolean ieee_function_type (void *, int, bfd_boolean);
+static bfd_boolean ieee_reference_type (void *);
+static bfd_boolean ieee_range_type (void *, bfd_signed_vma, bfd_signed_vma);
static bfd_boolean ieee_array_type
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, bfd_boolean));
-static bfd_boolean ieee_set_type
- PARAMS ((PTR, bfd_boolean));
-static bfd_boolean ieee_offset_type
- PARAMS ((PTR));
-static bfd_boolean ieee_method_type
- PARAMS ((PTR, bfd_boolean, int, bfd_boolean));
-static bfd_boolean ieee_const_type
- PARAMS ((PTR));
-static bfd_boolean ieee_volatile_type
- PARAMS ((PTR));
+ (void *, bfd_signed_vma, bfd_signed_vma, bfd_boolean);
+static bfd_boolean ieee_set_type (void *, bfd_boolean);
+static bfd_boolean ieee_offset_type (void *);
+static bfd_boolean ieee_method_type (void *, bfd_boolean, int, bfd_boolean);
+static bfd_boolean ieee_const_type (void *);
+static bfd_boolean ieee_volatile_type (void *);
static bfd_boolean ieee_start_struct_type
- PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int));
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int);
static bfd_boolean ieee_struct_field
- PARAMS ((PTR, const char *, bfd_vma, bfd_vma, enum debug_visibility));
-static bfd_boolean ieee_end_struct_type
- PARAMS ((PTR));
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
+static bfd_boolean ieee_end_struct_type (void *);
static bfd_boolean ieee_start_class_type
- PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int, bfd_boolean,
- bfd_boolean));
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int, bfd_boolean,
+ bfd_boolean);
static bfd_boolean ieee_class_static_member
- PARAMS ((PTR, const char *, const char *, enum debug_visibility));
+ (void *, const char *, const char *, enum debug_visibility);
static bfd_boolean ieee_class_baseclass
- PARAMS ((PTR, bfd_vma, bfd_boolean, enum debug_visibility));
-static bfd_boolean ieee_class_start_method
- PARAMS ((PTR, const char *));
+ (void *, bfd_vma, bfd_boolean, enum debug_visibility);
+static bfd_boolean ieee_class_start_method (void *, const char *);
static bfd_boolean ieee_class_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
- bfd_vma, bfd_boolean));
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
+ bfd_vma, bfd_boolean);
static bfd_boolean ieee_class_static_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean, bfd_boolean));
-static bfd_boolean ieee_class_end_method
- PARAMS ((PTR));
-static bfd_boolean ieee_end_class_type
- PARAMS ((PTR));
-static bfd_boolean ieee_typedef_type
- PARAMS ((PTR, const char *));
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean);
+static bfd_boolean ieee_class_end_method (void *);
+static bfd_boolean ieee_end_class_type (void *);
+static bfd_boolean ieee_typedef_type (void *, const char *);
static bfd_boolean ieee_tag_type
- PARAMS ((PTR, const char *, unsigned int, enum debug_type_kind));
-static bfd_boolean ieee_typdef
- PARAMS ((PTR, const char *));
-static bfd_boolean ieee_tag
- PARAMS ((PTR, const char *));
-static bfd_boolean ieee_int_constant
- PARAMS ((PTR, const char *, bfd_vma));
-static bfd_boolean ieee_float_constant
- PARAMS ((PTR, const char *, double));
-static bfd_boolean ieee_typed_constant
- PARAMS ((PTR, const char *, bfd_vma));
+ (void *, const char *, unsigned int, enum debug_type_kind);
+static bfd_boolean ieee_typdef (void *, const char *);
+static bfd_boolean ieee_tag (void *, const char *);
+static bfd_boolean ieee_int_constant (void *, const char *, bfd_vma);
+static bfd_boolean ieee_float_constant (void *, const char *, double);
+static bfd_boolean ieee_typed_constant (void *, const char *, bfd_vma);
static bfd_boolean ieee_variable
- PARAMS ((PTR, const char *, enum debug_var_kind, bfd_vma));
-static bfd_boolean ieee_start_function
- PARAMS ((PTR, const char *, bfd_boolean));
+ (void *, const char *, enum debug_var_kind, bfd_vma);
+static bfd_boolean ieee_start_function (void *, const char *, bfd_boolean);
static bfd_boolean ieee_function_parameter
- PARAMS ((PTR, const char *, enum debug_parm_kind, bfd_vma));
-static bfd_boolean ieee_start_block
- PARAMS ((PTR, bfd_vma));
-static bfd_boolean ieee_end_block
- PARAMS ((PTR, bfd_vma));
-static bfd_boolean ieee_end_function
- PARAMS ((PTR));
-static bfd_boolean ieee_lineno
- PARAMS ((PTR, const char *, unsigned long, bfd_vma));
+ (void *, const char *, enum debug_parm_kind, bfd_vma);
+static bfd_boolean ieee_start_block (void *, bfd_vma);
+static bfd_boolean ieee_end_block (void *, bfd_vma);
+static bfd_boolean ieee_end_function (void *);
+static bfd_boolean ieee_lineno (void *, const char *, unsigned long, bfd_vma);
static const struct debug_write_fns ieee_fns =
{
@@ -4155,9 +4038,8 @@ static const struct debug_write_fns ieee_fns =
/* Initialize a buffer to be empty. */
static bfd_boolean
-ieee_init_buffer (info, buflist)
- struct ieee_handle *info ATTRIBUTE_UNUSED;
- struct ieee_buflist *buflist;
+ieee_init_buffer (struct ieee_handle *info ATTRIBUTE_UNUSED,
+ struct ieee_buflist *buflist)
{
buflist->head = NULL;
buflist->tail = NULL;
@@ -4171,9 +4053,7 @@ ieee_init_buffer (info, buflist)
/* Change the current buffer to a specified buffer chain. */
static bfd_boolean
-ieee_change_buffer (info, buflist)
- struct ieee_handle *info;
- struct ieee_buflist *buflist;
+ieee_change_buffer (struct ieee_handle *info, struct ieee_buflist *buflist)
{
if (buflist->head == NULL)
{
@@ -4195,10 +4075,9 @@ ieee_change_buffer (info, buflist)
/* Append a buffer chain. */
static bfd_boolean
-ieee_append_buffer (info, mainbuf, newbuf)
- struct ieee_handle *info ATTRIBUTE_UNUSED;
- struct ieee_buflist *mainbuf;
- struct ieee_buflist *newbuf;
+ieee_append_buffer (struct ieee_handle *info ATTRIBUTE_UNUSED,
+ struct ieee_buflist *mainbuf,
+ struct ieee_buflist *newbuf)
{
if (newbuf->head != NULL)
{
@@ -4220,9 +4099,7 @@ ieee_append_buffer (info, mainbuf, newbuf)
: ieee_real_write_byte ((info), (b)))
static bfd_boolean
-ieee_real_write_byte (info, b)
- struct ieee_handle *info;
- int b;
+ieee_real_write_byte (struct ieee_handle *info, int b)
{
if (info->curbuf->c >= IEEE_BUFSIZE)
{
@@ -4248,9 +4125,7 @@ ieee_real_write_byte (info, b)
/* Write out two bytes. */
static bfd_boolean
-ieee_write_2bytes (info, i)
- struct ieee_handle *info;
- int i;
+ieee_write_2bytes (struct ieee_handle *info, int i)
{
return (ieee_write_byte (info, i >> 8)
&& ieee_write_byte (info, i & 0xff));
@@ -4259,9 +4134,7 @@ ieee_write_2bytes (info, i)
/* Write out an integer. */
static bfd_boolean
-ieee_write_number (info, v)
- struct ieee_handle *info;
- bfd_vma v;
+ieee_write_number (struct ieee_handle *info, bfd_vma v)
{
bfd_vma t;
bfd_byte ab[20];
@@ -4303,9 +4176,7 @@ ieee_write_number (info, v)
/* Write out a string. */
static bfd_boolean
-ieee_write_id (info, s)
- struct ieee_handle *info;
- const char *s;
+ieee_write_id (struct ieee_handle *info, const char *s)
{
unsigned int len;
@@ -4343,10 +4214,7 @@ ieee_write_id (info, s)
/* Write out an ASN record. */
static bfd_boolean
-ieee_write_asn (info, indx, val)
- struct ieee_handle *info;
- unsigned int indx;
- bfd_vma val;
+ieee_write_asn (struct ieee_handle *info, unsigned int indx, bfd_vma val)
{
return (ieee_write_2bytes (info, (int) ieee_asn_record_enum)
&& ieee_write_number (info, indx)
@@ -4356,10 +4224,7 @@ ieee_write_asn (info, indx, val)
/* Write out an ATN65 record. */
static bfd_boolean
-ieee_write_atn65 (info, indx, s)
- struct ieee_handle *info;
- unsigned int indx;
- const char *s;
+ieee_write_atn65 (struct ieee_handle *info, unsigned int indx, const char *s)
{
return (ieee_write_2bytes (info, (int) ieee_atn_record_enum)
&& ieee_write_number (info, indx)
@@ -4371,12 +4236,8 @@ ieee_write_atn65 (info, indx, s)
/* Push a type index onto the type stack. */
static bfd_boolean
-ieee_push_type (info, indx, size, unsignedp, localp)
- struct ieee_handle *info;
- unsigned int indx;
- unsigned int size;
- bfd_boolean unsignedp;
- bfd_boolean localp;
+ieee_push_type (struct ieee_handle *info, unsigned int indx,
+ unsigned int size, bfd_boolean unsignedp, bfd_boolean localp)
{
struct ieee_type_stack *ts;
@@ -4397,8 +4258,7 @@ ieee_push_type (info, indx, size, unsignedp, localp)
/* Pop a type index off the type stack. */
static unsigned int
-ieee_pop_type (info)
- struct ieee_handle *info;
+ieee_pop_type (struct ieee_handle *info)
{
return ieee_pop_type_used (info, TRUE);
}
@@ -4406,8 +4266,7 @@ ieee_pop_type (info)
/* Pop an unused type index off the type stack. */
static void
-ieee_pop_unused_type (info)
- struct ieee_handle *info;
+ieee_pop_unused_type (struct ieee_handle *info)
{
(void) ieee_pop_type_used (info, FALSE);
}
@@ -4415,9 +4274,7 @@ ieee_pop_unused_type (info)
/* Pop a used or unused type index off the type stack. */
static unsigned int
-ieee_pop_type_used (info, used)
- struct ieee_handle *info;
- bfd_boolean used;
+ieee_pop_type_used (struct ieee_handle *info, bfd_boolean used)
{
struct ieee_type_stack *ts;
unsigned int ret;
@@ -4473,11 +4330,8 @@ ieee_pop_type_used (info, used)
/* Add a range of bytes included in the current compilation unit. */
static bfd_boolean
-ieee_add_range (info, global, low, high)
- struct ieee_handle *info;
- bfd_boolean global;
- bfd_vma low;
- bfd_vma high;
+ieee_add_range (struct ieee_handle *info, bfd_boolean global, bfd_vma low,
+ bfd_vma high)
{
struct ieee_range **plist, *r, **pr;
@@ -4532,9 +4386,7 @@ ieee_add_range (info, global, low, high)
/* Start a new range for which we only have the low address. */
static bfd_boolean
-ieee_start_range (info, low)
- struct ieee_handle *info;
- bfd_vma low;
+ieee_start_range (struct ieee_handle *info, bfd_vma low)
{
struct ieee_range *r;
@@ -4549,9 +4401,7 @@ ieee_start_range (info, low)
/* Finish a range started by ieee_start_range. */
static bfd_boolean
-ieee_end_range (info, high)
- struct ieee_handle *info;
- bfd_vma high;
+ieee_end_range (struct ieee_handle *info, bfd_vma high)
{
struct ieee_range *r;
bfd_vma low;
@@ -4567,11 +4417,8 @@ ieee_end_range (info, high)
/* Start defining a type. */
static bfd_boolean
-ieee_define_type (info, size, unsignedp, localp)
- struct ieee_handle *info;
- unsigned int size;
- bfd_boolean unsignedp;
- bfd_boolean localp;
+ieee_define_type (struct ieee_handle *info, unsigned int size,
+ bfd_boolean unsignedp, bfd_boolean localp)
{
return ieee_define_named_type (info, (const char *) NULL,
(unsigned int) -1, size, unsignedp,
@@ -4581,14 +4428,10 @@ ieee_define_type (info, size, unsignedp, localp)
/* Start defining a named type. */
static bfd_boolean
-ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
- struct ieee_handle *info;
- const char *name;
- unsigned int indx;
- unsigned int size;
- bfd_boolean unsignedp;
- bfd_boolean localp;
- struct ieee_buflist *buflist;
+ieee_define_named_type (struct ieee_handle *info, const char *name,
+ unsigned int indx, unsigned int size,
+ bfd_boolean unsignedp, bfd_boolean localp,
+ struct ieee_buflist *buflist)
{
unsigned int type_indx;
unsigned int name_indx;
@@ -4668,9 +4511,7 @@ ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
/* Get an entry to the list of modified versions of a type. */
static struct ieee_modified_type *
-ieee_get_modified_info (info, indx)
- struct ieee_handle *info;
- unsigned int indx;
+ieee_get_modified_info (struct ieee_handle *info, unsigned int indx)
{
if (indx >= info->modified_alloc)
{
@@ -4697,10 +4538,8 @@ ieee_get_modified_info (info, indx)
/* Initialize an entry in the hash table. */
static struct bfd_hash_entry *
-ieee_name_type_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+ieee_name_type_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table, const char *string)
{
struct ieee_name_type_hash_entry *ret =
(struct ieee_name_type_hash_entry *) entry;
@@ -4736,15 +4575,13 @@ ieee_name_type_newfunc (entry, table, string)
#define ieee_name_type_hash_traverse(table, func, info) \
(bfd_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct bfd_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct bfd_hash_entry *, void *)) (func), \
(info)))
/* The general routine to write out IEEE debugging information. */
bfd_boolean
-write_ieee_debugging_info (abfd, dhandle)
- bfd *abfd;
- PTR dhandle;
+write_ieee_debugging_info (bfd *abfd, void *dhandle)
{
struct ieee_handle info;
asection *s;
@@ -4770,7 +4607,7 @@ write_ieee_debugging_info (abfd, dhandle)
|| ! ieee_init_buffer (&info, &info.fnargs))
return FALSE;
- if (! debug_write (dhandle, &ieee_fns, (PTR) &info))
+ if (! debug_write (dhandle, &ieee_fns, (void *) &info))
return FALSE;
if (info.filename != NULL)
@@ -4783,7 +4620,7 @@ write_ieee_debugging_info (abfd, dhandle)
info.error = FALSE;
ieee_name_type_hash_traverse (&info.tags,
ieee_write_undefined_tag,
- (PTR) &info);
+ (void *) &info);
if (info.error)
return FALSE;
@@ -4815,7 +4652,7 @@ write_ieee_debugging_info (abfd, dhandle)
info.error = FALSE;
if (! ieee_init_buffer (&info, &info.vars))
return FALSE;
- bfd_map_over_sections (abfd, ieee_add_bb11_blocks, (PTR) &info);
+ bfd_map_over_sections (abfd, ieee_add_bb11_blocks, (void *) &info);
if (info.error)
return FALSE;
if (! ieee_buffer_emptyp (&info.vars))
@@ -4889,9 +4726,7 @@ write_ieee_debugging_info (abfd, dhandle)
ieee_name_type_hash_traverse. */
static bfd_boolean
-ieee_write_undefined_tag (h, p)
- struct ieee_name_type_hash_entry *h;
- PTR p;
+ieee_write_undefined_tag (struct ieee_name_type_hash_entry *h, void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_name_type *nt;
@@ -4971,9 +4806,7 @@ ieee_write_undefined_tag (h, p)
/* Start writing out information for a compilation unit. */
static bfd_boolean
-ieee_start_compilation_unit (p, filename)
- PTR p;
- const char *filename;
+ieee_start_compilation_unit (void *p, const char *filename)
{
struct ieee_handle *info = (struct ieee_handle *) p;
const char *modname;
@@ -5044,8 +4877,7 @@ ieee_start_compilation_unit (p, filename)
/* Finish up a compilation unit. */
static bfd_boolean
-ieee_finish_compilation_unit (info)
- struct ieee_handle *info;
+ieee_finish_compilation_unit (struct ieee_handle *info)
{
struct ieee_range *r;
@@ -5090,7 +4922,7 @@ ieee_finish_compilation_unit (info)
if (info->pending_lineno_filename != NULL)
{
/* Force out the pending line number. */
- if (! ieee_lineno ((PTR) info, (const char *) NULL, 0, (bfd_vma) -1))
+ if (! ieee_lineno ((void *) info, (const char *) NULL, 0, (bfd_vma) -1))
return FALSE;
}
if (! ieee_buffer_emptyp (&info->linenos))
@@ -5194,10 +5026,7 @@ ieee_finish_compilation_unit (info)
described. */
static void
-ieee_add_bb11_blocks (abfd, sec, data)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- PTR data;
+ieee_add_bb11_blocks (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *data)
{
struct ieee_handle *info = (struct ieee_handle *) data;
bfd_vma low, high;
@@ -5239,11 +5068,8 @@ ieee_add_bb11_blocks (abfd, sec, data)
/* Add a single BB11 block for a range. We add it to info->vars. */
static bfd_boolean
-ieee_add_bb11 (info, sec, low, high)
- struct ieee_handle *info;
- asection *sec;
- bfd_vma low;
- bfd_vma high;
+ieee_add_bb11 (struct ieee_handle *info, asection *sec, bfd_vma low,
+ bfd_vma high)
{
int kind;
@@ -5324,9 +5150,8 @@ ieee_add_bb11 (info, sec, low, high)
to store this information anywhere. */
static bfd_boolean
-ieee_start_source (p, filename)
- PTR p ATTRIBUTE_UNUSED;
- const char *filename ATTRIBUTE_UNUSED;
+ieee_start_source (void *p ATTRIBUTE_UNUSED,
+ const char *filename ATTRIBUTE_UNUSED)
{
return TRUE;
}
@@ -5334,8 +5159,7 @@ ieee_start_source (p, filename)
/* Make an empty type. */
static bfd_boolean
-ieee_empty_type (p)
- PTR p;
+ieee_empty_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -5345,8 +5169,7 @@ ieee_empty_type (p)
/* Make a void type. */
static bfd_boolean
-ieee_void_type (p)
- PTR p;
+ieee_void_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -5356,10 +5179,7 @@ ieee_void_type (p)
/* Make an integer type. */
static bfd_boolean
-ieee_int_type (p, size, unsignedp)
- PTR p;
- unsigned int size;
- bfd_boolean unsignedp;
+ieee_int_type (void *p, unsigned int size, bfd_boolean unsignedp)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int indx;
@@ -5392,9 +5212,7 @@ ieee_int_type (p, size, unsignedp)
/* Make a floating point type. */
static bfd_boolean
-ieee_float_type (p, size)
- PTR p;
- unsigned int size;
+ieee_float_type (void *p, unsigned int size)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int indx;
@@ -5425,9 +5243,7 @@ ieee_float_type (p, size)
/* Make a complex type. */
static bfd_boolean
-ieee_complex_type (p, size)
- PTR p;
- unsigned int size;
+ieee_complex_type (void *p, unsigned int size)
{
struct ieee_handle *info = (struct ieee_handle *) p;
char code;
@@ -5473,9 +5289,7 @@ ieee_complex_type (p, size)
an integer type instead. */
static bfd_boolean
-ieee_bool_type (p, size)
- PTR p;
- unsigned int size;
+ieee_bool_type (void *p, unsigned int size)
{
return ieee_int_type (p, size, TRUE);
}
@@ -5483,11 +5297,8 @@ ieee_bool_type (p, size)
/* Make an enumeration. */
static bfd_boolean
-ieee_enum_type (p, tag, names, vals)
- PTR p;
- const char *tag;
- const char **names;
- bfd_signed_vma *vals;
+ieee_enum_type (void *p, const char *tag, const char **names,
+ bfd_signed_vma *vals)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_defined_enum *e;
@@ -5615,8 +5426,7 @@ ieee_enum_type (p, tag, names, vals)
/* Make a pointer type. */
static bfd_boolean
-ieee_pointer_type (p)
- PTR p;
+ieee_pointer_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
bfd_boolean localp;
@@ -5659,10 +5469,7 @@ ieee_pointer_type (p)
adding that buffer to the typedef block if we are going to use it. */
static bfd_boolean
-ieee_function_type (p, argcount, varargs)
- PTR p;
- int argcount;
- bfd_boolean varargs;
+ieee_function_type (void *p, int argcount, bfd_boolean varargs)
{
struct ieee_handle *info = (struct ieee_handle *) p;
bfd_boolean localp;
@@ -5746,8 +5553,7 @@ ieee_function_type (p, argcount, varargs)
/* Make a reference type. */
static bfd_boolean
-ieee_reference_type (p)
- PTR p;
+ieee_reference_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -5763,10 +5569,7 @@ ieee_reference_type (p)
/* Make a range type. */
static bfd_boolean
-ieee_range_type (p, low, high)
- PTR p;
- bfd_signed_vma low;
- bfd_signed_vma high;
+ieee_range_type (void *p, bfd_signed_vma low, bfd_signed_vma high)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int size;
@@ -5787,11 +5590,8 @@ ieee_range_type (p, low, high)
/* Make an array type. */
static bfd_boolean
-ieee_array_type (p, low, high, stringp)
- PTR p;
- bfd_signed_vma low;
- bfd_signed_vma high;
- bfd_boolean stringp ATTRIBUTE_UNUSED;
+ieee_array_type (void *p, bfd_signed_vma low, bfd_signed_vma high,
+ bfd_boolean stringp ATTRIBUTE_UNUSED)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int eleindx;
@@ -5856,9 +5656,7 @@ ieee_array_type (p, low, high, stringp)
/* Make a set type. */
static bfd_boolean
-ieee_set_type (p, bitstringp)
- PTR p;
- bfd_boolean bitstringp ATTRIBUTE_UNUSED;
+ieee_set_type (void *p, bfd_boolean bitstringp ATTRIBUTE_UNUSED)
{
struct ieee_handle *info = (struct ieee_handle *) p;
bfd_boolean localp;
@@ -5878,8 +5676,7 @@ ieee_set_type (p, bitstringp)
/* Make an offset type. */
static bfd_boolean
-ieee_offset_type (p)
- PTR p;
+ieee_offset_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int targetindx, baseindx;
@@ -5900,11 +5697,8 @@ ieee_offset_type (p)
/* Make a method type. */
static bfd_boolean
-ieee_method_type (p, domain, argcount, varargs)
- PTR p;
- bfd_boolean domain;
- int argcount;
- bfd_boolean varargs;
+ieee_method_type (void *p, bfd_boolean domain, int argcount,
+ bfd_boolean varargs)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -5921,8 +5715,7 @@ ieee_method_type (p, domain, argcount, varargs)
/* Make a const qualified type. */
static bfd_boolean
-ieee_const_type (p)
- PTR p;
+ieee_const_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int size;
@@ -5961,8 +5754,7 @@ ieee_const_type (p)
/* Make a volatile qualified type. */
static bfd_boolean
-ieee_volatile_type (p)
- PTR p;
+ieee_volatile_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int size;
@@ -6001,8 +5793,7 @@ ieee_volatile_type (p)
/* Convert an enum debug_visibility into a CXXFLAGS value. */
static unsigned int
-ieee_vis_to_flags (visibility)
- enum debug_visibility visibility;
+ieee_vis_to_flags (enum debug_visibility visibility)
{
switch (visibility)
{
@@ -6023,12 +5814,8 @@ ieee_vis_to_flags (visibility)
fields with the struct type itself. */
static bfd_boolean
-ieee_start_struct_type (p, tag, id, structp, size)
- PTR p;
- const char *tag;
- unsigned int id;
- bfd_boolean structp;
- unsigned int size;
+ieee_start_struct_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp, unsigned int size)
{
struct ieee_handle *info = (struct ieee_handle *) p;
bfd_boolean localp, ignorep;
@@ -6130,12 +5917,8 @@ ieee_start_struct_type (p, tag, id, structp, size)
/* Add a field to a struct. */
static bfd_boolean
-ieee_struct_field (p, name, bitpos, bitsize, visibility)
- PTR p;
- const char *name;
- bfd_vma bitpos;
- bfd_vma bitsize;
- enum debug_visibility visibility;
+ieee_struct_field (void *p, const char *name, bfd_vma bitpos, bfd_vma bitsize,
+ enum debug_visibility visibility)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int size;
@@ -6244,8 +6027,7 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
/* Finish up a struct type. */
static bfd_boolean
-ieee_end_struct_type (p)
- PTR p;
+ieee_end_struct_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_buflist *pb;
@@ -6305,14 +6087,9 @@ ieee_end_struct_type (p)
/* Start a class type. */
static bfd_boolean
-ieee_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
- PTR p;
- const char *tag;
- unsigned int id;
- bfd_boolean structp;
- unsigned int size;
- bfd_boolean vptr;
- bfd_boolean ownvptr;
+ieee_start_class_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp, unsigned int size,
+ bfd_boolean vptr, bfd_boolean ownvptr)
{
struct ieee_handle *info = (struct ieee_handle *) p;
const char *vclass;
@@ -6380,11 +6157,8 @@ ieee_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
/* Add a static member to a class. */
static bfd_boolean
-ieee_class_static_member (p, name, physname, visibility)
- PTR p;
- const char *name;
- const char *physname;
- enum debug_visibility visibility;
+ieee_class_static_member (void *p, const char *name, const char *physname,
+ enum debug_visibility visibility)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int flags;
@@ -6417,11 +6191,8 @@ ieee_class_static_member (p, name, physname, visibility)
/* Add a base class to a class. */
static bfd_boolean
-ieee_class_baseclass (p, bitpos, virtual, visibility)
- PTR p;
- bfd_vma bitpos;
- bfd_boolean virtual;
- enum debug_visibility visibility;
+ieee_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual,
+ enum debug_visibility visibility)
{
struct ieee_handle *info = (struct ieee_handle *) p;
const char *bname;
@@ -6490,9 +6261,7 @@ ieee_class_baseclass (p, bitpos, virtual, visibility)
/* Start building a method for a class. */
static bfd_boolean
-ieee_class_start_method (p, name)
- PTR p;
- const char *name;
+ieee_class_start_method (void *p, const char *name)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -6508,16 +6277,11 @@ ieee_class_start_method (p, name)
/* Define a new method variant, either static or not. */
static bfd_boolean
-ieee_class_method_var (info, physname, visibility, staticp, constp,
- volatilep, voffset, context)
- struct ieee_handle *info;
- const char *physname;
- enum debug_visibility visibility;
- bfd_boolean staticp;
- bfd_boolean constp;
- bfd_boolean volatilep;
- bfd_vma voffset;
- bfd_boolean context;
+ieee_class_method_var (struct ieee_handle *info, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean staticp, bfd_boolean constp,
+ bfd_boolean volatilep, bfd_vma voffset,
+ bfd_boolean context)
{
unsigned int flags;
unsigned int nindx;
@@ -6582,15 +6346,10 @@ ieee_class_method_var (info, physname, visibility, staticp, constp,
/* Define a new method variant. */
static bfd_boolean
-ieee_class_method_variant (p, physname, visibility, constp, volatilep,
- voffset, context)
- PTR p;
- const char *physname;
- enum debug_visibility visibility;
- bfd_boolean constp;
- bfd_boolean volatilep;
- bfd_vma voffset;
- bfd_boolean context;
+ieee_class_method_variant (void *p, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep,
+ bfd_vma voffset, bfd_boolean context)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -6601,12 +6360,9 @@ ieee_class_method_variant (p, physname, visibility, constp, volatilep,
/* Define a new static method variant. */
static bfd_boolean
-ieee_class_static_method_variant (p, physname, visibility, constp, volatilep)
- PTR p;
- const char *physname;
- enum debug_visibility visibility;
- bfd_boolean constp;
- bfd_boolean volatilep;
+ieee_class_static_method_variant (void *p, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -6617,8 +6373,7 @@ ieee_class_static_method_variant (p, physname, visibility, constp, volatilep)
/* Finish up a method. */
static bfd_boolean
-ieee_class_end_method (p)
- PTR p;
+ieee_class_end_method (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -6634,8 +6389,7 @@ ieee_class_end_method (p)
/* Finish up a class. */
static bfd_boolean
-ieee_end_class_type (p)
- PTR p;
+ieee_end_class_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int nindx;
@@ -6711,9 +6465,7 @@ ieee_end_class_type (p)
/* Push a previously seen typedef onto the type stack. */
static bfd_boolean
-ieee_typedef_type (p, name)
- PTR p;
- const char *name;
+ieee_typedef_type (void *p, const char *name)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_name_type_hash_entry *h;
@@ -6743,11 +6495,8 @@ ieee_typedef_type (p, name)
/* Push a tagged type onto the type stack. */
static bfd_boolean
-ieee_tag_type (p, name, id, kind)
- PTR p;
- const char *name;
- unsigned int id;
- enum debug_type_kind kind;
+ieee_tag_type (void *p, const char *name, unsigned int id,
+ enum debug_type_kind kind)
{
struct ieee_handle *info = (struct ieee_handle *) p;
bfd_boolean localp;
@@ -6838,9 +6587,7 @@ ieee_tag_type (p, name, id, kind)
/* Output a typedef. */
static bfd_boolean
-ieee_typdef (p, name)
- PTR p;
- const char *name;
+ieee_typdef (void *p, const char *name)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_write_type type;
@@ -7076,9 +6823,7 @@ ieee_typdef (p, name)
/* Output a tag for a type. We don't have to do anything here. */
static bfd_boolean
-ieee_tag (p, name)
- PTR p;
- const char *name ATTRIBUTE_UNUSED;
+ieee_tag (void *p, const char *name ATTRIBUTE_UNUSED)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -7091,10 +6836,8 @@ ieee_tag (p, name)
/* Output an integer constant. */
static bfd_boolean
-ieee_int_constant (p, name, val)
- PTR p ATTRIBUTE_UNUSED;
- const char *name ATTRIBUTE_UNUSED;
- bfd_vma val ATTRIBUTE_UNUSED;
+ieee_int_constant (void *p ATTRIBUTE_UNUSED, const char *name ATTRIBUTE_UNUSED,
+ bfd_vma val ATTRIBUTE_UNUSED)
{
/* FIXME. */
return TRUE;
@@ -7103,10 +6846,9 @@ ieee_int_constant (p, name, val)
/* Output a floating point constant. */
static bfd_boolean
-ieee_float_constant (p, name, val)
- PTR p ATTRIBUTE_UNUSED;
- const char *name ATTRIBUTE_UNUSED;
- double val ATTRIBUTE_UNUSED;
+ieee_float_constant (void *p ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED,
+ double val ATTRIBUTE_UNUSED)
{
/* FIXME. */
return TRUE;
@@ -7115,10 +6857,8 @@ ieee_float_constant (p, name, val)
/* Output a typed constant. */
static bfd_boolean
-ieee_typed_constant (p, name, val)
- PTR p;
- const char *name ATTRIBUTE_UNUSED;
- bfd_vma val ATTRIBUTE_UNUSED;
+ieee_typed_constant (void *p, const char *name ATTRIBUTE_UNUSED,
+ bfd_vma val ATTRIBUTE_UNUSED)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -7130,11 +6870,8 @@ ieee_typed_constant (p, name, val)
/* Output a variable. */
static bfd_boolean
-ieee_variable (p, name, kind, val)
- PTR p;
- const char *name;
- enum debug_var_kind kind;
- bfd_vma val;
+ieee_variable (void *p, const char *name, enum debug_var_kind kind,
+ bfd_vma val)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int name_indx;
@@ -7253,10 +6990,7 @@ ieee_variable (p, name, kind, val)
/* Start outputting information for a function. */
static bfd_boolean
-ieee_start_function (p, name, global)
- PTR p;
- const char *name;
- bfd_boolean global;
+ieee_start_function (void *p, const char *name, bfd_boolean global)
{
struct ieee_handle *info = (struct ieee_handle *) p;
bfd_boolean referencep;
@@ -7338,11 +7072,8 @@ ieee_start_function (p, name, global)
first block, so we postpone them until we see the block. */
static bfd_boolean
-ieee_function_parameter (p, name, kind, val)
- PTR p;
- const char *name;
- enum debug_parm_kind kind;
- bfd_vma val;
+ieee_function_parameter (void *p, const char *name, enum debug_parm_kind kind,
+ bfd_vma val)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_pending_parm *m, **pm;
@@ -7375,8 +7106,7 @@ ieee_function_parameter (p, name, kind, val)
/* Output pending function parameters. */
static bfd_boolean
-ieee_output_pending_parms (info)
- struct ieee_handle *info;
+ieee_output_pending_parms (struct ieee_handle *info)
{
struct ieee_pending_parm *m;
unsigned int refcount;
@@ -7406,7 +7136,7 @@ ieee_output_pending_parms (info)
info->type_stack->type.referencep = m->referencep;
if (m->referencep)
++refcount;
- if (! ieee_variable ((PTR) info, m->name, vkind, m->val))
+ if (! ieee_variable ((void *) info, m->name, vkind, m->val))
return FALSE;
}
@@ -7465,9 +7195,7 @@ ieee_output_pending_parms (info)
to finish the BB4 or BB6, and then output the function parameters. */
static bfd_boolean
-ieee_start_block (p, addr)
- PTR p;
- bfd_vma addr;
+ieee_start_block (void *p, bfd_vma addr)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -7503,9 +7231,7 @@ ieee_start_block (p, addr)
/* End a block. */
static bfd_boolean
-ieee_end_block (p, addr)
- PTR p;
- bfd_vma addr;
+ieee_end_block (void *p, bfd_vma addr)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -7531,8 +7257,7 @@ ieee_end_block (p, addr)
/* End a function. */
static bfd_boolean
-ieee_end_function (p)
- PTR p;
+ieee_end_function (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -7579,11 +7304,7 @@ ieee_end_function (p)
/* Record line number information. */
static bfd_boolean
-ieee_lineno (p, filename, lineno, addr)
- PTR p;
- const char *filename;
- unsigned long lineno;
- bfd_vma addr;
+ieee_lineno (void *p, const char *filename, unsigned long lineno, bfd_vma addr)
{
struct ieee_handle *info = (struct ieee_handle *) p;
diff --git a/binutils/nlmconv.c b/binutils/nlmconv.c
index 6709461d328..5a644e44669 100644
--- a/binutils/nlmconv.c
+++ b/binutils/nlmconv.c
@@ -1,5 +1,5 @@
/* nlmconv.c -- NLM conversion program
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -56,7 +56,7 @@
/* If strerror is just a macro, we want to use the one from libiberty
since it will handle undefined values. */
#undef strerror
-extern char *strerror PARAMS ((int));
+extern char *strerror (int);
#ifndef localtime
extern struct tm *localtime ();
@@ -122,48 +122,37 @@ static struct option long_options[] =
/* Local routines. */
-int main PARAMS ((int, char **));
+int main (int, char **);
-static void show_usage
- PARAMS ((FILE *, int));
+static void show_usage (FILE *, int);
static const char *select_output_format
- PARAMS ((enum bfd_architecture, unsigned long, bfd_boolean));
-static void setup_sections
- PARAMS ((bfd *, asection *, PTR));
-static void copy_sections
- PARAMS ((bfd *, asection *, PTR));
+ (enum bfd_architecture, unsigned long, bfd_boolean);
+static void setup_sections (bfd *, asection *, void *);
+static void copy_sections (bfd *, asection *, void *);
static void mangle_relocs
- PARAMS ((bfd *, asection *, arelent ***, long *, char *, bfd_size_type));
+ (bfd *, asection *, arelent ***, long *, char *, bfd_size_type);
static void default_mangle_relocs
- PARAMS ((bfd *, asection *, arelent ***, long *, char *, bfd_size_type));
-static char *link_inputs
- PARAMS ((struct string_list *, char *));
+ (bfd *, asection *, arelent ***, long *, char *, bfd_size_type);
+static char *link_inputs (struct string_list *, char *);
#ifdef NLMCONV_I386
-static void i386_mangle_relocs
- PARAMS ((bfd *, asection *, arelent ***, long *, char *, bfd_size_type));
+static void i386_mangle_relocs (bfd *, asection *, arelent ***, long *, char *, bfd_size_type);
#endif
#ifdef NLMCONV_ALPHA
-static void alpha_mangle_relocs
- PARAMS ((bfd *, asection *, arelent ***, long *, char *, bfd_size_type));
+static void alpha_mangle_relocs (bfd *, asection *, arelent ***, long *, char *, bfd_size_type);
#endif
#ifdef NLMCONV_POWERPC
-static void powerpc_build_stubs
- PARAMS ((bfd *, bfd *, asymbol ***, long *));
-static void powerpc_resolve_stubs
- PARAMS ((bfd *, bfd *));
-static void powerpc_mangle_relocs
- PARAMS ((bfd *, asection *, arelent ***, long *, char *, bfd_size_type));
+static void powerpc_build_stubs (bfd *, bfd *, asymbol ***, long *);
+static void powerpc_resolve_stubs (bfd *, bfd *);
+static void powerpc_mangle_relocs (bfd *, asection *, arelent ***, long *, char *, bfd_size_type);
#endif
/* The main routine. */
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int opt;
char *input_file = NULL;
@@ -286,15 +275,15 @@ main (argc, argv)
/* Initialize the header information to default values. */
fixed_hdr = &fixed_hdr_struct;
- memset ((PTR) &fixed_hdr_struct, 0, sizeof fixed_hdr_struct);
+ memset ((void *) &fixed_hdr_struct, 0, sizeof fixed_hdr_struct);
var_hdr = &var_hdr_struct;
- memset ((PTR) &var_hdr_struct, 0, sizeof var_hdr_struct);
+ memset ((void *) &var_hdr_struct, 0, sizeof var_hdr_struct);
version_hdr = &version_hdr_struct;
- memset ((PTR) &version_hdr_struct, 0, sizeof version_hdr_struct);
+ memset ((void *) &version_hdr_struct, 0, sizeof version_hdr_struct);
copyright_hdr = &copyright_hdr_struct;
- memset ((PTR) &copyright_hdr_struct, 0, sizeof copyright_hdr_struct);
+ memset ((void *) &copyright_hdr_struct, 0, sizeof copyright_hdr_struct);
extended_hdr = &extended_hdr_struct;
- memset ((PTR) &extended_hdr_struct, 0, sizeof extended_hdr_struct);
+ memset ((void *) &extended_hdr_struct, 0, sizeof extended_hdr_struct);
check_procedure = NULL;
custom_file = NULL;
debug_info = FALSE;
@@ -432,7 +421,7 @@ main (argc, argv)
#endif
/* Set up the sections. */
- bfd_map_over_sections (inbfd, setup_sections, (PTR) outbfd);
+ bfd_map_over_sections (inbfd, setup_sections, (void *) outbfd);
text_sec = bfd_get_section_by_name (outbfd, NLM_CODE_NAME);
@@ -589,7 +578,7 @@ main (argc, argv)
{
newsymalloc += 10;
newsyms = ((asymbol **)
- xrealloc ((PTR) newsyms,
+ xrealloc ((void *) newsyms,
(newsymalloc
* sizeof (asymbol *))));
}
@@ -903,12 +892,12 @@ main (argc, argv)
#endif
/* Copy over the sections. */
- bfd_map_over_sections (inbfd, copy_sections, (PTR) outbfd);
+ bfd_map_over_sections (inbfd, copy_sections, (void *) outbfd);
/* Finish up the header information. */
if (custom_file != NULL)
{
- PTR data;
+ void *data;
data = xmalloc (custom_size);
if (fread (data, 1, custom_size, custom_data) != custom_size)
@@ -937,7 +926,7 @@ main (argc, argv)
non_fatal (_("warning: MAP and FULLMAP are not supported; try ld -M"));
if (help_file != NULL)
{
- PTR data;
+ void *data;
data = xmalloc (help_size);
if (fread (data, 1, help_size, help_data) != help_size)
@@ -955,7 +944,7 @@ main (argc, argv)
}
if (message_file != NULL)
{
- PTR data;
+ void *data;
data = xmalloc (message_size);
if (fread (data, 1, message_size, message_data) != message_size)
@@ -980,7 +969,7 @@ main (argc, argv)
}
if (modules != NULL)
{
- PTR data;
+ void *data;
unsigned char *set;
struct string_list *l;
bfd_size_type c;
@@ -1004,7 +993,7 @@ main (argc, argv)
}
if (rpc_file != NULL)
{
- PTR data;
+ void *data;
data = xmalloc (rpc_size);
if (fread (data, 1, rpc_size, rpc_data) != rpc_size)
@@ -1022,7 +1011,7 @@ main (argc, argv)
}
if (sharelib_file != NULL)
{
- PTR data;
+ void *data;
data = xmalloc (shared_size);
if (fseek (shared_data, shared_offset, SEEK_SET) != 0
@@ -1102,9 +1091,7 @@ main (argc, argv)
/* Show a usage message and exit. */
static void
-show_usage (file, status)
- FILE *file;
- int status;
+show_usage (FILE *file, int status)
{
fprintf (file, _("Usage: %s [option(s)] [in-file [out-file]]\n"), program_name);
fprintf (file, _(" Convert an object file into a NetWare Loadable Module\n"));
@@ -1126,10 +1113,8 @@ show_usage (file, status)
and endianness. This chooses the appropriate NLM target. */
static const char *
-select_output_format (arch, mach, bigendian)
- enum bfd_architecture arch;
- unsigned long mach;
- bfd_boolean bigendian ATTRIBUTE_UNUSED;
+select_output_format (enum bfd_architecture arch, unsigned long mach,
+ bfd_boolean bigendian ATTRIBUTE_UNUSED)
{
switch (arch)
{
@@ -1161,10 +1146,7 @@ select_output_format (arch, mach, bigendian)
name, size, etc. */
static void
-setup_sections (inbfd, insec, data_ptr)
- bfd *inbfd ATTRIBUTE_UNUSED;
- asection *insec;
- PTR data_ptr;
+setup_sections (bfd *inbfd ATTRIBUTE_UNUSED, asection *insec, void *data_ptr)
{
bfd *outbfd = (bfd *) data_ptr;
flagword f;
@@ -1231,17 +1213,14 @@ setup_sections (inbfd, insec, data_ptr)
/* Copy the section contents. */
static void
-copy_sections (inbfd, insec, data_ptr)
- bfd *inbfd;
- asection *insec;
- PTR data_ptr;
+copy_sections (bfd *inbfd, asection *insec, void *data_ptr)
{
static bfd_size_type secsecoff = 0;
bfd *outbfd = (bfd *) data_ptr;
const char *inname;
asection *outsec;
bfd_size_type size;
- PTR contents;
+ void *contents;
long reloc_size;
bfd_byte buf[4];
bfd_size_type add;
@@ -1311,7 +1290,7 @@ copy_sections (inbfd, insec, data_ptr)
}
/* Add this section to .nlmsections. */
- if (! bfd_set_section_contents (outbfd, secsec, (PTR) inname, secsecoff,
+ if (! bfd_set_section_contents (outbfd, secsec, (void *) inname, secsecoff,
strlen (inname) + 1))
bfd_fatal (_("set .nlmsection contents"));
secsecoff += strlen (inname) + 1;
@@ -1343,14 +1322,9 @@ copy_sections (inbfd, insec, data_ptr)
by the input formats. */
static void
-mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents,
- contents_size)
- bfd *outbfd;
- asection *insec;
- arelent ***relocs_ptr;
- long *reloc_count_ptr;
- char *contents;
- bfd_size_type contents_size;
+mangle_relocs (bfd *outbfd, asection *insec, arelent ***relocs_ptr,
+ long *reloc_count_ptr, char *contents,
+ bfd_size_type contents_size)
{
switch (bfd_get_arch (outbfd))
{
@@ -1383,14 +1357,10 @@ mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents,
the output_offset. */
static void
-default_mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents,
- contents_size)
- bfd *outbfd ATTRIBUTE_UNUSED;
- asection *insec;
- arelent ***relocs_ptr;
- long *reloc_count_ptr;
- char *contents ATTRIBUTE_UNUSED;
- bfd_size_type contents_size ATTRIBUTE_UNUSED;
+default_mangle_relocs (bfd *outbfd ATTRIBUTE_UNUSED, asection *insec,
+ arelent ***relocs_ptr, long *reloc_count_ptr,
+ char *contents ATTRIBUTE_UNUSED,
+ bfd_size_type contents_size ATTRIBUTE_UNUSED)
{
if (insec->output_offset != 0)
{
@@ -1429,14 +1399,9 @@ static reloc_howto_type nlm_i386_pcrel_howto =
TRUE); /* pcrel_offset */
static void
-i386_mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents,
- contents_size)
- bfd *outbfd;
- asection *insec;
- arelent ***relocs_ptr;
- long *reloc_count_ptr;
- char *contents;
- bfd_size_type contents_size;
+i386_mangle_relocs (bfd *outbfd, asection *insec, arelent ***relocs_ptr,
+ long *reloc_count_ptr, char *contents,
+ bfd_size_type contents_size)
{
long reloc_count, i;
arelent **relocs;
@@ -1587,14 +1552,10 @@ static reloc_howto_type nlm32_alpha_nw_howto =
FALSE); /* pcrel_offset */
static void
-alpha_mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents,
- contents_size)
- bfd *outbfd;
- asection *insec;
- register arelent ***relocs_ptr;
- long *reloc_count_ptr;
- char *contents ATTRIBUTE_UNUSED;
- bfd_size_type contents_size ATTRIBUTE_UNUSED;
+alpha_mangle_relocs (bfd *outbfd, asection *insec,
+ register arelent ***relocs_ptr, long *reloc_count_ptr,
+ char *contents ATTRIBUTE_UNUSED,
+ bfd_size_type contents_size ATTRIBUTE_UNUSED)
{
long old_reloc_count;
arelent **old_relocs;
@@ -1647,8 +1608,7 @@ alpha_mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents,
++relocs;
++(*reloc_count_ptr);
- memcpy ((PTR) relocs, (PTR) old_relocs,
- (size_t) old_reloc_count * sizeof (arelent *));
+ memcpy (relocs, old_relocs, (size_t) old_reloc_count * sizeof (arelent *));
relocs[old_reloc_count] = (arelent *) NULL;
free (old_relocs);
@@ -1724,11 +1684,8 @@ static bfd_size_type powerpc_initial_got_size;
build a stub for each one. */
static void
-powerpc_build_stubs (inbfd, outbfd, symbols_ptr, symcount_ptr)
- bfd *inbfd;
- bfd *outbfd ATTRIBUTE_UNUSED;
- asymbol ***symbols_ptr;
- long *symcount_ptr;
+powerpc_build_stubs (bfd *inbfd, bfd *outbfd ATTRIBUTE_UNUSED,
+ asymbol ***symbols_ptr, long *symcount_ptr)
{
asection *stub_sec;
asection *got_sec;
@@ -1844,9 +1801,7 @@ powerpc_build_stubs (inbfd, outbfd, symbols_ptr, symcount_ptr)
of the output section, and create new relocs in the TOC. */
static void
-powerpc_resolve_stubs (inbfd, outbfd)
- bfd *inbfd;
- bfd *outbfd;
+powerpc_resolve_stubs (bfd *inbfd, bfd *outbfd)
{
bfd_byte buf[POWERPC_STUB_SIZE];
unsigned int i;
@@ -1907,14 +1862,10 @@ powerpc_resolve_stubs (inbfd, outbfd)
any further reloc. */
static void
-powerpc_mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents,
- contents_size)
- bfd *outbfd;
- asection *insec;
- register arelent ***relocs_ptr;
- long *reloc_count_ptr;
- char *contents;
- bfd_size_type contents_size ATTRIBUTE_UNUSED;
+powerpc_mangle_relocs (bfd *outbfd, asection *insec,
+ register arelent ***relocs_ptr,
+ long *reloc_count_ptr, char *contents,
+ bfd_size_type contents_size ATTRIBUTE_UNUSED)
{
reloc_howto_type *toc_howto;
long reloc_count;
@@ -2090,9 +2041,7 @@ powerpc_mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents,
file. */
static char *
-link_inputs (inputs, ld)
- struct string_list *inputs;
- char *ld;
+link_inputs (struct string_list *inputs, char *ld)
{
size_t c;
struct string_list *q;
diff --git a/binutils/nlmconv.h b/binutils/nlmconv.h
index e46518719b9..35c84ec0f40 100644
--- a/binutils/nlmconv.h
+++ b/binutils/nlmconv.h
@@ -1,5 +1,5 @@
/* nlmconv.h -- header file for NLM conversion program
- Copyright 1993, 2002 Free Software Foundation, Inc.
+ Copyright 1993, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -78,7 +78,7 @@ extern char *rpc_file;
extern int parse_errors;
/* The parser. */
-extern int yyparse PARAMS ((void));
+extern int yyparse (void);
/* Tell the lexer what file to read. */
-extern bfd_boolean nlmlex_file PARAMS ((const char *));
+extern bfd_boolean nlmlex_file (const char *);
diff --git a/binutils/nlmheader.y b/binutils/nlmheader.y
index 8aef16834f8..64101dbf3bc 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;
diff --git a/binutils/nm.c b/binutils/nm.c
index 8463acb1abd..74350d74679 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -37,7 +37,7 @@
struct size_sym
{
- const PTR minisym;
+ const void *minisym;
bfd_vma size;
};
@@ -68,103 +68,69 @@ struct extended_symbol_info
#define SYM_SIZE(sym) \
(sym->elfinfo ? sym->elfinfo->internal_elf_sym.st_size: sym->ssize)
-static void usage
- PARAMS ((FILE *, int));
-static void set_print_radix
- PARAMS ((char *));
-static void set_output_format
- PARAMS ((char *));
-static void display_archive
- PARAMS ((bfd *));
-static bfd_boolean display_file
- PARAMS ((char *));
-static void display_rel_file
- PARAMS ((bfd *, bfd *));
-static long filter_symbols
- PARAMS ((bfd *, bfd_boolean, PTR, long, unsigned int));
+static void usage (FILE *, int);
+static void set_print_radix (char *);
+static void set_output_format (char *);
+static void display_archive (bfd *);
+static bfd_boolean display_file (char *);
+static void display_rel_file (bfd *, bfd *);
+static long filter_symbols (bfd *, bfd_boolean, void *, long, unsigned int);
static long sort_symbols_by_size
- PARAMS ((bfd *, bfd_boolean, PTR, long, unsigned int, struct size_sym **));
+ (bfd *, bfd_boolean, void *, long, unsigned int, struct size_sym **);
static void print_symbols
- PARAMS ((bfd *, bfd_boolean, PTR, long, unsigned int, bfd *));
+ (bfd *, bfd_boolean, void *, long, unsigned int, bfd *);
static void print_size_symbols
- PARAMS ((bfd *, bfd_boolean, struct size_sym *, long, bfd *));
-static void print_symname
- PARAMS ((const char *, const char *, bfd *));
-static void print_symbol
- PARAMS ((bfd *, asymbol *, bfd_vma ssize, bfd *));
-static void print_symdef_entry
- PARAMS ((bfd *));
+ (bfd *, bfd_boolean, struct size_sym *, long, bfd *);
+static void print_symname (const char *, const char *, bfd *);
+static void print_symbol (bfd *, asymbol *, bfd_vma ssize, bfd *);
+static void print_symdef_entry (bfd *);
/* The sorting functions. */
-static int numeric_forward
- PARAMS ((const PTR, const PTR));
-static int numeric_reverse
- PARAMS ((const PTR, const PTR));
-static int non_numeric_forward
- PARAMS ((const PTR, const PTR));
-static int non_numeric_reverse
- PARAMS ((const PTR, const PTR));
-static int size_forward1
- PARAMS ((const PTR, const PTR));
-static int size_forward2
- PARAMS ((const PTR, const PTR));
+static int numeric_forward (const void *, const void *);
+static int numeric_reverse (const void *, const void *);
+static int non_numeric_forward (const void *, const void *);
+static int non_numeric_reverse (const void *, const void *);
+static int size_forward1 (const void *, const void *);
+static int size_forward2 (const void *, const void *);
/* The output formatting functions. */
-static void print_object_filename_bsd
- PARAMS ((char *));
-static void print_object_filename_sysv
- PARAMS ((char *));
-static void print_object_filename_posix
- PARAMS ((char *));
-static void print_archive_filename_bsd
- PARAMS ((char *));
-static void print_archive_filename_sysv
- PARAMS ((char *));
-static void print_archive_filename_posix
- PARAMS ((char *));
-static void print_archive_member_bsd
- PARAMS ((char *, const char *));
-static void print_archive_member_sysv
- PARAMS ((char *, const char *));
-static void print_archive_member_posix
- PARAMS ((char *, const char *));
-static void print_symbol_filename_bsd
- PARAMS ((bfd *, bfd *));
-static void print_symbol_filename_sysv
- PARAMS ((bfd *, bfd *));
-static void print_symbol_filename_posix
- PARAMS ((bfd *, bfd *));
-static void print_value
- PARAMS ((bfd *, bfd_vma));
-static void print_symbol_info_bsd
- PARAMS ((struct extended_symbol_info *, bfd *));
-static void print_symbol_info_sysv
- PARAMS ((struct extended_symbol_info *, bfd *));
-static void print_symbol_info_posix
- PARAMS ((struct extended_symbol_info *, bfd *));
-static void get_relocs
- PARAMS ((bfd *, asection *, PTR));
-static const char * get_symbol_type
- PARAMS ((unsigned int));
+static void print_object_filename_bsd (char *);
+static void print_object_filename_sysv (char *);
+static void print_object_filename_posix (char *);
+static void print_archive_filename_bsd (char *);
+static void print_archive_filename_sysv (char *);
+static void print_archive_filename_posix (char *);
+static void print_archive_member_bsd (char *, const char *);
+static void print_archive_member_sysv (char *, const char *);
+static void print_archive_member_posix (char *, const char *);
+static void print_symbol_filename_bsd (bfd *, bfd *);
+static void print_symbol_filename_sysv (bfd *, bfd *);
+static void print_symbol_filename_posix (bfd *, bfd *);
+static void print_value (bfd *, bfd_vma);
+static void print_symbol_info_bsd (struct extended_symbol_info *, bfd *);
+static void print_symbol_info_sysv (struct extended_symbol_info *, bfd *);
+static void print_symbol_info_posix (struct extended_symbol_info *, bfd *);
+static void get_relocs (bfd *, asection *, void *);
+static const char * get_symbol_type (unsigned int);
/* Support for different output formats. */
struct output_fns
{
/* Print the name of an object file given on the command line. */
- void (*print_object_filename) PARAMS ((char *));
+ void (*print_object_filename) (char *);
/* Print the name of an archive file given on the command line. */
- void (*print_archive_filename) PARAMS ((char *));
+ void (*print_archive_filename) (char *);
/* Print the name of an archive member file. */
- void (*print_archive_member) PARAMS ((char *, const char *));
+ void (*print_archive_member) (char *, const char *);
/* Print the name of the file (and archive, if there is one)
containing a symbol. */
- void (*print_symbol_filename) PARAMS ((bfd *, bfd *));
+ void (*print_symbol_filename) (bfd *, bfd *);
/* Print a line of information about a symbol. */
- void (*print_symbol_info) PARAMS ((struct extended_symbol_info *, bfd *));
+ void (*print_symbol_info) (struct extended_symbol_info *, bfd *);
};
static struct output_fns formats[] =
@@ -276,9 +242,7 @@ static struct option long_options[] =
/* Some error-reporting functions. */
static void
-usage (stream, status)
- FILE *stream;
- int status;
+usage (FILE *stream, int status)
{
fprintf (stream, _("Usage: %s [option(s)] [file(s)]\n"), program_name);
fprintf (stream, _(" List symbols in [file(s)] (a.out by default).\n"));
@@ -323,8 +287,7 @@ usage (stream, status)
/* Set the radix for the symbol value and size according to RADIX. */
static void
-set_print_radix (radix)
- char *radix;
+set_print_radix (char *radix)
{
switch (*radix)
{
@@ -354,8 +317,7 @@ set_print_radix (radix)
}
static void
-set_output_format (f)
- char *f;
+set_output_format (char *f)
{
int i;
@@ -379,12 +341,10 @@ set_output_format (f)
format = &formats[i];
}
-int main PARAMS ((int, char **));
+int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
int retval;
@@ -549,8 +509,7 @@ main (argc, argv)
}
static const char *
-get_symbol_type (type)
- unsigned int type;
+get_symbol_type (unsigned int type)
{
static char buff [32];
@@ -575,8 +534,7 @@ get_symbol_type (type)
}
static void
-display_archive (file)
- bfd *file;
+display_archive (bfd *file)
{
bfd *arfile = NULL;
bfd *last_arfile = NULL;
@@ -638,8 +596,7 @@ display_archive (file)
}
static bfd_boolean
-display_file (filename)
- char *filename;
+display_file (char *filename)
{
bfd_boolean retval = TRUE;
bfd *file;
@@ -700,9 +657,7 @@ static asymbol *sort_y;
specially -- i.e., their sizes are used as their "values". */
static int
-numeric_forward (P_x, P_y)
- const PTR P_x;
- const PTR P_y;
+numeric_forward (const void *P_x, const void *P_y)
{
asymbol *x, *y;
asection *xs, *ys;
@@ -729,17 +684,13 @@ numeric_forward (P_x, P_y)
}
static int
-numeric_reverse (x, y)
- const PTR x;
- const PTR y;
+numeric_reverse (const void *x, const void *y)
{
return - numeric_forward (x, y);
}
static int
-non_numeric_forward (P_x, P_y)
- const PTR P_x;
- const PTR P_y;
+non_numeric_forward (const void *P_x, const void *P_y)
{
asymbol *x, *y;
const char *xn, *yn;
@@ -772,14 +723,12 @@ non_numeric_forward (P_x, P_y)
}
static int
-non_numeric_reverse (x, y)
- const PTR x;
- const PTR y;
+non_numeric_reverse (const void *x, const void *y)
{
return - non_numeric_forward (x, y);
}
-static int (*(sorters[2][2])) PARAMS ((const PTR, const PTR)) =
+static int (*(sorters[2][2])) (const void *, const void *) =
{
{ non_numeric_forward, non_numeric_reverse },
{ numeric_forward, numeric_reverse }
@@ -797,9 +746,7 @@ static int (*(sorters[2][2])) PARAMS ((const PTR, const PTR)) =
value. */
static int
-size_forward1 (P_x, P_y)
- const PTR P_x;
- const PTR P_y;
+size_forward1 (const void *P_x, const void *P_y)
{
asymbol *x, *y;
asection *xs, *ys;
@@ -869,9 +816,7 @@ size_forward1 (P_x, P_y)
an array of size_sym structures into size order. */
static int
-size_forward2 (P_x, P_y)
- const PTR P_x;
- const PTR P_y;
+size_forward2 (const void *P_x, const void *P_y)
{
const struct size_sym *x = (const struct size_sym *) P_x;
const struct size_sym *y = (const struct size_sym *) P_y;
@@ -890,13 +835,9 @@ size_forward2 (P_x, P_y)
size. */
static long
-sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
- bfd *abfd;
- bfd_boolean dynamic;
- PTR minisyms;
- long symcount;
- unsigned int size;
- struct size_sym **symsizesp;
+sort_symbols_by_size (bfd *abfd, bfd_boolean dynamic, void *minisyms,
+ long symcount, unsigned int size,
+ struct size_sym **symsizesp)
{
struct size_sym *symsizes;
bfd_byte *from, *fromend;
@@ -921,7 +862,7 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
if (from < fromend)
{
- sym = bfd_minisymbol_to_symbol (abfd, dynamic, (const PTR) from,
+ sym = bfd_minisymbol_to_symbol (abfd, dynamic, (const void *) from,
store_sym);
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
@@ -938,7 +879,7 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
{
next = bfd_minisymbol_to_symbol (abfd,
dynamic,
- (const PTR) (from + size),
+ (const void *) (from + size),
store_next);
if (next == NULL)
bfd_fatal (bfd_get_filename (abfd));
@@ -965,7 +906,7 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
if (sz != 0)
{
- symsizes->minisym = (const PTR) from;
+ symsizes->minisym = (const void *) from;
symsizes->size = sz;
++symsizes;
}
@@ -980,7 +921,7 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
symcount = symsizes - *symsizesp;
/* We must now sort again by size. */
- qsort ((PTR) *symsizesp, symcount, sizeof (struct size_sym), size_forward2);
+ qsort ((void *) *symsizesp, symcount, sizeof (struct size_sym), size_forward2);
return symcount;
}
@@ -988,12 +929,10 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
/* If ARCHIVE_BFD is non-NULL, it is the archive containing ABFD. */
static void
-display_rel_file (abfd, archive_bfd)
- bfd *abfd;
- bfd *archive_bfd;
+display_rel_file (bfd *abfd, bfd *archive_bfd)
{
long symcount;
- PTR minisyms;
+ void *minisyms;
unsigned int size;
struct size_sym *symsizes;
@@ -1053,12 +992,8 @@ display_rel_file (abfd, archive_bfd)
Return the number of symbols to be printed. */
static long
-filter_symbols (abfd, dynamic, minisyms, symcount, size)
- bfd *abfd;
- bfd_boolean dynamic;
- PTR minisyms;
- long symcount;
- unsigned int size;
+filter_symbols (bfd *abfd, bfd_boolean dynamic, void *minisyms,
+ long symcount, unsigned int size)
{
bfd_byte *from, *fromend, *to;
asymbol *store;
@@ -1078,7 +1013,7 @@ filter_symbols (abfd, dynamic, minisyms, symcount, size)
PROGRESS (1);
- sym = bfd_minisymbol_to_symbol (abfd, dynamic, (const PTR) from, store);
+ sym = bfd_minisymbol_to_symbol (abfd, dynamic, (const void *) from, store);
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
@@ -1124,10 +1059,7 @@ filter_symbols (abfd, dynamic, minisyms, symcount, size)
demangling it if requested. */
static void
-print_symname (format, name, abfd)
- const char *format;
- const char *name;
- bfd *abfd;
+print_symname (const char *format, const char *name, bfd *abfd)
{
if (do_demangle && *name)
{
@@ -1145,13 +1077,8 @@ print_symname (format, name, abfd)
containing ABFD. */
static void
-print_symbols (abfd, dynamic, minisyms, symcount, size, archive_bfd)
- bfd *abfd;
- bfd_boolean dynamic;
- PTR minisyms;
- long symcount;
- unsigned int size;
- bfd *archive_bfd;
+print_symbols (bfd *abfd, bfd_boolean dynamic, void *minisyms, long symcount,
+ unsigned int size, bfd *archive_bfd)
{
asymbol *store;
bfd_byte *from, *fromend;
@@ -1177,12 +1104,9 @@ print_symbols (abfd, dynamic, minisyms, symcount, size, archive_bfd)
/* Print the symbols when sorting by size. */
static void
-print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd)
- bfd *abfd;
- bfd_boolean dynamic;
- struct size_sym *symsizes;
- long symcount;
- bfd *archive_bfd;
+print_size_symbols (bfd *abfd, bfd_boolean dynamic,
+ struct size_sym *symsizes, long symcount,
+ bfd *archive_bfd)
{
asymbol *store;
struct size_sym *from, *fromend;
@@ -1215,15 +1139,11 @@ print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd)
/* Print a single symbol. */
static void
-print_symbol (abfd, sym, ssize, archive_bfd)
- bfd *abfd;
- asymbol *sym;
- bfd_vma ssize;
- bfd *archive_bfd;
+print_symbol (bfd *abfd, asymbol *sym, bfd_vma ssize, bfd *archive_bfd)
{
symbol_info syminfo;
struct extended_symbol_info info;
-
+
PROGRESS (1);
(*format->print_symbol_filename) (archive_bfd, abfd);
@@ -1304,7 +1224,7 @@ print_symbol (abfd, sym, ssize, archive_bfd)
info.relocs = relocs;
info.relcount = relcount;
info.syms = syms;
- bfd_map_over_sections (abfd, get_relocs, (PTR) &info);
+ bfd_map_over_sections (abfd, get_relocs, (void *) &info);
lineno_cache_rel_bfd = abfd;
}
@@ -1361,16 +1281,14 @@ print_symbol (abfd, sym, ssize, archive_bfd)
/* Print the name of an object file given on the command line. */
static void
-print_object_filename_bsd (filename)
- char *filename;
+print_object_filename_bsd (char *filename)
{
if (filename_per_file && !filename_per_symbol)
printf ("\n%s:\n", filename);
}
static void
-print_object_filename_sysv (filename)
- char *filename;
+print_object_filename_sysv (char *filename)
{
if (undefined_only)
printf (_("\n\nUndefined symbols from %s:\n\n"), filename);
@@ -1385,8 +1303,7 @@ Name Value Class Type Size
}
static void
-print_object_filename_posix (filename)
- char *filename;
+print_object_filename_posix (char *filename)
{
if (filename_per_file && !filename_per_symbol)
printf ("%s:\n", filename);
@@ -1395,40 +1312,34 @@ print_object_filename_posix (filename)
/* Print the name of an archive file given on the command line. */
static void
-print_archive_filename_bsd (filename)
- char *filename;
+print_archive_filename_bsd (char *filename)
{
if (filename_per_file)
printf ("\n%s:\n", filename);
}
static void
-print_archive_filename_sysv (filename)
- char *filename ATTRIBUTE_UNUSED;
+print_archive_filename_sysv (char *filename ATTRIBUTE_UNUSED)
{
}
static void
-print_archive_filename_posix (filename)
- char *filename ATTRIBUTE_UNUSED;
+print_archive_filename_posix (char *filename ATTRIBUTE_UNUSED)
{
}
/* Print the name of an archive member file. */
static void
-print_archive_member_bsd (archive, filename)
- char *archive ATTRIBUTE_UNUSED;
- const char *filename;
+print_archive_member_bsd (char *archive ATTRIBUTE_UNUSED,
+ const char *filename)
{
if (!filename_per_symbol)
printf ("\n%s:\n", filename);
}
static void
-print_archive_member_sysv (archive, filename)
- char *archive;
- const char *filename;
+print_archive_member_sysv (char *archive, const char *filename)
{
if (undefined_only)
printf (_("\n\nUndefined symbols from %s[%s]:\n\n"), archive, filename);
@@ -1443,9 +1354,7 @@ Name Value Class Type Size
}
static void
-print_archive_member_posix (archive, filename)
- char *archive;
- const char *filename;
+print_archive_member_posix (char *archive, const char *filename)
{
if (!filename_per_symbol)
printf ("%s[%s]:\n", archive, filename);
@@ -1455,8 +1364,7 @@ print_archive_member_posix (archive, filename)
containing a symbol. */
static void
-print_symbol_filename_bsd (archive_bfd, abfd)
- bfd *archive_bfd, *abfd;
+print_symbol_filename_bsd (bfd *archive_bfd, bfd *abfd)
{
if (filename_per_symbol)
{
@@ -1467,8 +1375,7 @@ print_symbol_filename_bsd (archive_bfd, abfd)
}
static void
-print_symbol_filename_sysv (archive_bfd, abfd)
- bfd *archive_bfd, *abfd;
+print_symbol_filename_sysv (bfd *archive_bfd, bfd *abfd)
{
if (filename_per_symbol)
{
@@ -1479,8 +1386,7 @@ print_symbol_filename_sysv (archive_bfd, abfd)
}
static void
-print_symbol_filename_posix (archive_bfd, abfd)
- bfd *archive_bfd, *abfd;
+print_symbol_filename_posix (bfd *archive_bfd, bfd *abfd)
{
if (filename_per_symbol)
{
@@ -1495,9 +1401,7 @@ print_symbol_filename_posix (archive_bfd, abfd)
/* Print a symbol value. */
static void
-print_value (abfd, val)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_vma val;
+print_value (bfd *abfd ATTRIBUTE_UNUSED, bfd_vma val)
{
#if ! defined (BFD64) || BFD_HOST_64BIT_LONG
printf (value_format, val);
@@ -1527,9 +1431,7 @@ print_value (abfd, val)
/* Print a line of information about a symbol. */
static void
-print_symbol_info_bsd (info, abfd)
- struct extended_symbol_info *info;
- bfd *abfd;
+print_symbol_info_bsd (struct extended_symbol_info *info, bfd *abfd)
{
if (bfd_is_undefined_symclass (SYM_TYPE (info)))
{
@@ -1570,9 +1472,7 @@ print_symbol_info_bsd (info, abfd)
}
static void
-print_symbol_info_sysv (info, abfd)
- struct extended_symbol_info *info;
- bfd *abfd;
+print_symbol_info_sysv (struct extended_symbol_info *info, bfd *abfd)
{
print_symname ("%-20s|", SYM_NAME (info), abfd);
@@ -1622,9 +1522,7 @@ print_symbol_info_sysv (info, abfd)
}
static void
-print_symbol_info_posix (info, abfd)
- struct extended_symbol_info *info;
- bfd *abfd;
+print_symbol_info_posix (struct extended_symbol_info *info, bfd *abfd)
{
print_symname ("%s ", SYM_NAME (info), abfd);
printf ("%c ", SYM_TYPE (info));
@@ -1641,8 +1539,7 @@ print_symbol_info_posix (info, abfd)
}
static void
-print_symdef_entry (abfd)
- bfd *abfd;
+print_symdef_entry (bfd *abfd)
{
symindex idx = BFD_NO_MORE_SYMBOLS;
carsym *thesym;
@@ -1673,10 +1570,7 @@ print_symdef_entry (abfd)
It is called via bfd_map_over_sections. */
static void
-get_relocs (abfd, sec, dataarg)
- bfd *abfd;
- asection *sec;
- PTR dataarg;
+get_relocs (bfd *abfd, asection *sec, void *dataarg)
{
struct get_relocs_info *data = (struct get_relocs_info *) dataarg;
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
index 33ba213495e..eb41dab56f7 100644
--- a/binutils/prdbg.c
+++ b/binutils/prdbg.c
@@ -76,145 +76,118 @@ struct pr_stack
int num_parents;
};
-static void indent
- PARAMS ((struct pr_handle *));
-static bfd_boolean push_type
- PARAMS ((struct pr_handle *, const char *));
-static bfd_boolean prepend_type
- PARAMS ((struct pr_handle *, const char *));
-static bfd_boolean append_type
- PARAMS ((struct pr_handle *, const char *));
-static bfd_boolean substitute_type
- PARAMS ((struct pr_handle *, const char *));
-static bfd_boolean indent_type
- PARAMS ((struct pr_handle *));
-static char *pop_type
- PARAMS ((struct pr_handle *));
-static void print_vma
- PARAMS ((bfd_vma, char *, bfd_boolean, bfd_boolean));
+static void indent (struct pr_handle *);
+static bfd_boolean push_type (struct pr_handle *, const char *);
+static bfd_boolean prepend_type (struct pr_handle *, const char *);
+static bfd_boolean append_type (struct pr_handle *, const char *);
+static bfd_boolean substitute_type (struct pr_handle *, const char *);
+static bfd_boolean indent_type (struct pr_handle *);
+static char *pop_type (struct pr_handle *);
+static void print_vma (bfd_vma, char *, bfd_boolean, bfd_boolean);
static bfd_boolean pr_fix_visibility
- PARAMS ((struct pr_handle *, enum debug_visibility));
-static bfd_boolean pr_start_compilation_unit
- PARAMS ((PTR, const char *));
-static bfd_boolean pr_start_source
- PARAMS ((PTR, const char *));
-static bfd_boolean pr_empty_type
- PARAMS ((PTR));
-static bfd_boolean pr_void_type
- PARAMS ((PTR));
-static bfd_boolean pr_int_type
- PARAMS ((PTR, unsigned int, bfd_boolean));
-static bfd_boolean pr_float_type
- PARAMS ((PTR, unsigned int));
-static bfd_boolean pr_complex_type
- PARAMS ((PTR, unsigned int));
-static bfd_boolean pr_bool_type
- PARAMS ((PTR, unsigned int));
+ (struct pr_handle *, enum debug_visibility);
+static bfd_boolean pr_start_compilation_unit (void *, const char *);
+static bfd_boolean pr_start_source (void *, const char *);
+static bfd_boolean pr_empty_type (void *);
+static bfd_boolean pr_void_type (void *);
+static bfd_boolean pr_int_type (void *, unsigned int, bfd_boolean);
+static bfd_boolean pr_float_type (void *, unsigned int);
+static bfd_boolean pr_complex_type (void *, unsigned int);
+static bfd_boolean pr_bool_type (void *, unsigned int);
static bfd_boolean pr_enum_type
- PARAMS ((PTR, const char *, const char **, bfd_signed_vma *));
-static bfd_boolean pr_pointer_type
- PARAMS ((PTR));
-static bfd_boolean pr_function_type
- PARAMS ((PTR, int, bfd_boolean));
-static bfd_boolean pr_reference_type
- PARAMS ((PTR));
-static bfd_boolean pr_range_type
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
+ (void *, const char *, const char **, bfd_signed_vma *);
+static bfd_boolean pr_pointer_type (void *);
+static bfd_boolean pr_function_type (void *, int, bfd_boolean);
+static bfd_boolean pr_reference_type (void *);
+static bfd_boolean pr_range_type (void *, bfd_signed_vma, bfd_signed_vma);
static bfd_boolean pr_array_type
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, bfd_boolean));
-static bfd_boolean pr_set_type
- PARAMS ((PTR, bfd_boolean));
-static bfd_boolean pr_offset_type
- PARAMS ((PTR));
-static bfd_boolean pr_method_type
- PARAMS ((PTR, bfd_boolean, int, bfd_boolean));
-static bfd_boolean pr_const_type
- PARAMS ((PTR));
-static bfd_boolean pr_volatile_type
- PARAMS ((PTR));
+ (void *, bfd_signed_vma, bfd_signed_vma, bfd_boolean);
+static bfd_boolean pr_set_type (void *, bfd_boolean);
+static bfd_boolean pr_offset_type (void *);
+static bfd_boolean pr_method_type (void *, bfd_boolean, int, bfd_boolean);
+static bfd_boolean pr_const_type (void *);
+static bfd_boolean pr_volatile_type (void *);
static bfd_boolean pr_start_struct_type
- PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int));
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int);
static bfd_boolean pr_struct_field
- PARAMS ((PTR, const char *, bfd_vma, bfd_vma, enum debug_visibility));
-static bfd_boolean pr_end_struct_type
- PARAMS ((PTR));
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
+static bfd_boolean pr_end_struct_type (void *);
static bfd_boolean pr_start_class_type
- PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int,
- bfd_boolean, bfd_boolean));
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int,
+ bfd_boolean, bfd_boolean);
static bfd_boolean pr_class_static_member
- PARAMS ((PTR, const char *, const char *, enum debug_visibility));
+ (void *, const char *, const char *, enum debug_visibility);
static bfd_boolean pr_class_baseclass
- PARAMS ((PTR, bfd_vma, bfd_boolean, enum debug_visibility));
-static bfd_boolean pr_class_start_method
- PARAMS ((PTR, const char *));
+ (void *, bfd_vma, bfd_boolean, enum debug_visibility);
+static bfd_boolean pr_class_start_method (void *, const char *);
static bfd_boolean pr_class_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
- bfd_vma, bfd_boolean));
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
+ bfd_vma, bfd_boolean);
static bfd_boolean pr_class_static_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean,
- bfd_boolean));
-static bfd_boolean pr_class_end_method
- PARAMS ((PTR));
-static bfd_boolean pr_end_class_type
- PARAMS ((PTR));
-static bfd_boolean pr_typedef_type
- PARAMS ((PTR, const char *));
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean);
+static bfd_boolean pr_class_end_method (void *);
+static bfd_boolean pr_end_class_type (void *);
+static bfd_boolean pr_typedef_type (void *, const char *);
static bfd_boolean pr_tag_type
- PARAMS ((PTR, const char *, unsigned int, enum debug_type_kind));
-static bfd_boolean pr_typdef
- PARAMS ((PTR, const char *));
-static bfd_boolean pr_tag
- PARAMS ((PTR, const char *));
-static bfd_boolean pr_int_constant
- PARAMS ((PTR, const char *, bfd_vma));
-static bfd_boolean pr_float_constant
- PARAMS ((PTR, const char *, double));
-static bfd_boolean pr_typed_constant
- PARAMS ((PTR, const char *, bfd_vma));
+ (void *, const char *, unsigned int, enum debug_type_kind);
+static bfd_boolean pr_typdef (void *, const char *);
+static bfd_boolean pr_tag (void *, const char *);
+static bfd_boolean pr_int_constant (void *, const char *, bfd_vma);
+static bfd_boolean pr_float_constant (void *, const char *, double);
+static bfd_boolean pr_typed_constant (void *, const char *, bfd_vma);
static bfd_boolean pr_variable
- PARAMS ((PTR, const char *, enum debug_var_kind, bfd_vma));
-static bfd_boolean pr_start_function
- PARAMS ((PTR, const char *, bfd_boolean));
+ (void *, const char *, enum debug_var_kind, bfd_vma);
+static bfd_boolean pr_start_function (void *, const char *, bfd_boolean);
static bfd_boolean pr_function_parameter
- PARAMS ((PTR, const char *, enum debug_parm_kind, bfd_vma));
-static bfd_boolean pr_start_block
- PARAMS ((PTR, bfd_vma));
-static bfd_boolean pr_end_block
- PARAMS ((PTR, bfd_vma));
-static bfd_boolean pr_end_function
- PARAMS ((PTR));
-static bfd_boolean pr_lineno
- PARAMS ((PTR, const char *, unsigned long, bfd_vma));
+ (void *, const char *, enum debug_parm_kind, bfd_vma);
+static bfd_boolean pr_start_block (void *, bfd_vma);
+static bfd_boolean pr_end_block (void *, bfd_vma);
+static bfd_boolean pr_end_function (void *);
+static bfd_boolean pr_lineno (void *, const char *, unsigned long, bfd_vma);
static bfd_boolean append_parent (struct pr_handle *, const char *);
/* Only used by tg_ code. */
-static bfd_boolean tg_fix_visibility (struct pr_handle *, enum debug_visibility);
+static bfd_boolean tg_fix_visibility
+ (struct pr_handle *, enum debug_visibility);
static void find_address_in_section (bfd *, asection *, void *);
static void translate_addresses (bfd *, char *, FILE *, asymbol **);
static const char *visibility_name (enum debug_visibility);
/* Tags style replacements. */
static bfd_boolean tg_start_compilation_unit (void *, const char *);
static bfd_boolean tg_start_source (void *, const char *);
-static bfd_boolean tg_enum_type (void *, const char *, const char **, bfd_signed_vma *);
-static bfd_boolean tg_start_struct_type (void *, const char *, unsigned int, bfd_boolean, unsigned int);
-static bfd_boolean pr_struct_field (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
-static bfd_boolean tg_struct_field (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
-static bfd_boolean tg_struct_field (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
+static bfd_boolean tg_enum_type
+ (void *, const char *, const char **, bfd_signed_vma *);
+static bfd_boolean tg_start_struct_type
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int);
+static bfd_boolean pr_struct_field
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
+static bfd_boolean tg_struct_field
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
+static bfd_boolean tg_struct_field
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
static bfd_boolean tg_end_struct_type (void *);
-static bfd_boolean tg_start_class_type (void *, const char *, unsigned int, bfd_boolean, unsigned int, bfd_boolean, bfd_boolean);
-static bfd_boolean tg_class_static_member (void *, const char *, const char *, enum debug_visibility);
-static bfd_boolean tg_class_baseclass (void *, bfd_vma, bfd_boolean, enum debug_visibility);
-static bfd_boolean tg_class_method_variant (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean, bfd_vma, bfd_boolean);
-static bfd_boolean tg_class_static_method_variant (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean);
+static bfd_boolean tg_start_class_type
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int, bfd_boolean, bfd_boolean);
+static bfd_boolean tg_class_static_member
+ (void *, const char *, const char *, enum debug_visibility);
+static bfd_boolean tg_class_baseclass
+ (void *, bfd_vma, bfd_boolean, enum debug_visibility);
+static bfd_boolean tg_class_method_variant
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean, bfd_vma, bfd_boolean);
+static bfd_boolean tg_class_static_method_variant
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean);
static bfd_boolean tg_end_class_type (void *);
-static bfd_boolean tg_tag_type (void *, const char *, unsigned int, enum debug_type_kind);
+static bfd_boolean tg_tag_type
+ (void *, const char *, unsigned int, enum debug_type_kind);
static bfd_boolean tg_typdef (void *, const char *);
static bfd_boolean tg_tag (void *, const char *);
static bfd_boolean tg_int_constant (void *, const char *, bfd_vma);
static bfd_boolean tg_float_constant (void *, const char *, double);
static bfd_boolean tg_typed_constant (void *, const char *, bfd_vma);
-static bfd_boolean tg_variable (void *, const char *, enum debug_var_kind, bfd_vma);
+static bfd_boolean tg_variable
+ (void *, const char *, enum debug_var_kind, bfd_vma);
static bfd_boolean tg_start_function (void *, const char *, bfd_boolean);
-static bfd_boolean tg_function_parameter (void *, const char *, enum debug_parm_kind, bfd_vma);
+static bfd_boolean tg_function_parameter
+ (void *, const char *, enum debug_parm_kind, bfd_vma);
static bfd_boolean tg_start_block (void *, bfd_vma);
static bfd_boolean tg_end_block (void *, bfd_vma);
static bfd_boolean tg_lineno (void *, const char *, unsigned long, bfd_vma);
@@ -318,13 +291,8 @@ static const struct debug_write_fns tg_fns =
/* Print out the generic debugging information recorded in dhandle. */
bfd_boolean
-print_debugging_info (f, dhandle, abfd, syms, demangler, as_tags)
- FILE *f;
- PTR dhandle;
- bfd *abfd;
- asymbol **syms;
- PTR demangler;
- bfd_boolean as_tags;
+print_debugging_info (FILE *f, void *dhandle, bfd *abfd, asymbol **syms,
+ void *demangler, bfd_boolean as_tags)
{
struct pr_handle info;
@@ -352,8 +320,7 @@ print_debugging_info (f, dhandle, abfd, syms, demangler, as_tags)
/* Indent to the current indentation level. */
static void
-indent (info)
- struct pr_handle *info;
+indent (struct pr_handle *info)
{
unsigned int i;
@@ -364,9 +331,7 @@ indent (info)
/* Push a type on the type stack. */
static bfd_boolean
-push_type (info, type)
- struct pr_handle *info;
- const char *type;
+push_type (struct pr_handle *info, const char *type)
{
struct pr_stack *n;
@@ -388,9 +353,7 @@ push_type (info, type)
/* Prepend a string onto the type on the top of the type stack. */
static bfd_boolean
-prepend_type (info, s)
- struct pr_handle *info;
- const char *s;
+prepend_type (struct pr_handle *info, const char *s)
{
char *n;
@@ -407,9 +370,7 @@ prepend_type (info, s)
/* Append a string to the type on the top of the type stack. */
static bfd_boolean
-append_type (info, s)
- struct pr_handle *info;
- const char *s;
+append_type (struct pr_handle *info, const char *s)
{
unsigned int len;
@@ -451,9 +412,7 @@ append_parent (struct pr_handle *info, const char *s)
there is no underscore, the name follows the type. */
static bfd_boolean
-substitute_type (info, s)
- struct pr_handle *info;
- const char *s;
+substitute_type (struct pr_handle *info, const char *s)
{
char *u;
@@ -495,8 +454,7 @@ substitute_type (info, s)
/* Indent the type at the top of the stack by appending spaces. */
static bfd_boolean
-indent_type (info)
- struct pr_handle *info;
+indent_type (struct pr_handle *info)
{
unsigned int i;
@@ -512,8 +470,7 @@ indent_type (info)
/* Pop a type from the type stack. */
static char *
-pop_type (info)
- struct pr_handle *info;
+pop_type (struct pr_handle *info)
{
struct pr_stack *o;
char *ret;
@@ -531,11 +488,7 @@ pop_type (info)
/* Print a VMA value into a string. */
static void
-print_vma (vma, buf, unsignedp, hexp)
- bfd_vma vma;
- char *buf;
- bfd_boolean unsignedp;
- bfd_boolean hexp;
+print_vma (bfd_vma vma, char *buf, bfd_boolean unsignedp, bfd_boolean hexp)
{
if (sizeof (vma) <= sizeof (unsigned long))
{
@@ -557,9 +510,7 @@ print_vma (vma, buf, unsignedp, hexp)
/* Start a new compilation unit. */
static bfd_boolean
-pr_start_compilation_unit (p, filename)
- PTR p;
- const char *filename;
+pr_start_compilation_unit (void *p, const char *filename)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -573,9 +524,7 @@ pr_start_compilation_unit (p, filename)
/* Start a source file within a compilation unit. */
static bfd_boolean
-pr_start_source (p, filename)
- PTR p;
- const char *filename;
+pr_start_source (void *p, const char *filename)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -589,8 +538,7 @@ pr_start_source (p, filename)
/* Push an empty type onto the type stack. */
static bfd_boolean
-pr_empty_type (p)
- PTR p;
+pr_empty_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -600,8 +548,7 @@ pr_empty_type (p)
/* Push a void type onto the type stack. */
static bfd_boolean
-pr_void_type (p)
- PTR p;
+pr_void_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -611,10 +558,7 @@ pr_void_type (p)
/* Push an integer type onto the type stack. */
static bfd_boolean
-pr_int_type (p, size, unsignedp)
- PTR p;
- unsigned int size;
- bfd_boolean unsignedp;
+pr_int_type (void *p, unsigned int size, bfd_boolean unsignedp)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[10];
@@ -626,9 +570,7 @@ pr_int_type (p, size, unsignedp)
/* Push a floating type onto the type stack. */
static bfd_boolean
-pr_float_type (p, size)
- PTR p;
- unsigned int size;
+pr_float_type (void *p, unsigned int size)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[10];
@@ -645,9 +587,7 @@ pr_float_type (p, size)
/* Push a complex type onto the type stack. */
static bfd_boolean
-pr_complex_type (p, size)
- PTR p;
- unsigned int size;
+pr_complex_type (void *p, unsigned int size)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -660,9 +600,7 @@ pr_complex_type (p, size)
/* Push a bfd_boolean type onto the type stack. */
static bfd_boolean
-pr_bool_type (p, size)
- PTR p;
- unsigned int size;
+pr_bool_type (void *p, unsigned int size)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[10];
@@ -675,11 +613,8 @@ pr_bool_type (p, size)
/* Push an enum type onto the type stack. */
static bfd_boolean
-pr_enum_type (p, tag, names, values)
- PTR p;
- const char *tag;
- const char **names;
- bfd_signed_vma *values;
+pr_enum_type (void *p, const char *tag, const char **names,
+ bfd_signed_vma *values)
{
struct pr_handle *info = (struct pr_handle *) p;
unsigned int i;
@@ -736,8 +671,7 @@ pr_enum_type (p, tag, names, values)
/* Turn the top type on the stack into a pointer. */
static bfd_boolean
-pr_pointer_type (p)
- PTR p;
+pr_pointer_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
char *s;
@@ -753,10 +687,7 @@ pr_pointer_type (p)
/* Turn the top type on the stack into a function returning that type. */
static bfd_boolean
-pr_function_type (p, argcount, varargs)
- PTR p;
- int argcount;
- bfd_boolean varargs;
+pr_function_type (void *p, int argcount, bfd_boolean varargs)
{
struct pr_handle *info = (struct pr_handle *) p;
char **arg_types;
@@ -830,8 +761,7 @@ pr_function_type (p, argcount, varargs)
/* Turn the top type on the stack into a reference to that type. */
static bfd_boolean
-pr_reference_type (p)
- PTR p;
+pr_reference_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -843,10 +773,7 @@ pr_reference_type (p)
/* Make a range type. */
static bfd_boolean
-pr_range_type (p, lower, upper)
- PTR p;
- bfd_signed_vma lower;
- bfd_signed_vma upper;
+pr_range_type (void *p, bfd_signed_vma lower, bfd_signed_vma upper)
{
struct pr_handle *info = (struct pr_handle *) p;
char abl[20], abu[20];
@@ -869,11 +796,8 @@ pr_range_type (p, lower, upper)
/* Make an array type. */
static bfd_boolean
-pr_array_type (p, lower, upper, stringp)
- PTR p;
- bfd_signed_vma lower;
- bfd_signed_vma upper;
- bfd_boolean stringp;
+pr_array_type (void *p, bfd_signed_vma lower, bfd_signed_vma upper,
+ bfd_boolean stringp)
{
struct pr_handle *info = (struct pr_handle *) p;
char *range_type;
@@ -922,9 +846,7 @@ pr_array_type (p, lower, upper, stringp)
/* Make a set type. */
static bfd_boolean
-pr_set_type (p, bitstringp)
- PTR p;
- bfd_boolean bitstringp;
+pr_set_type (void *p, bfd_boolean bitstringp)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -947,8 +869,7 @@ pr_set_type (p, bitstringp)
/* Make an offset type. */
static bfd_boolean
-pr_offset_type (p)
- PTR p;
+pr_offset_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -969,11 +890,7 @@ pr_offset_type (p)
/* Make a method type. */
static bfd_boolean
-pr_method_type (p, domain, argcount, varargs)
- PTR p;
- bfd_boolean domain;
- int argcount;
- bfd_boolean varargs;
+pr_method_type (void *p, bfd_boolean domain, int argcount, bfd_boolean varargs)
{
struct pr_handle *info = (struct pr_handle *) p;
unsigned int len;
@@ -1070,8 +987,7 @@ pr_method_type (p, domain, argcount, varargs)
/* Make a const qualified type. */
static bfd_boolean
-pr_const_type (p)
- PTR p;
+pr_const_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -1081,8 +997,7 @@ pr_const_type (p)
/* Make a volatile qualified type. */
static bfd_boolean
-pr_volatile_type (p)
- PTR p;
+pr_volatile_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -1092,12 +1007,8 @@ pr_volatile_type (p)
/* Start accumulating a struct type. */
static bfd_boolean
-pr_start_struct_type (p, tag, id, structp, size)
- PTR p;
- const char *tag;
- unsigned int id;
- bfd_boolean structp;
- unsigned int size;
+pr_start_struct_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp, unsigned int size)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -1154,9 +1065,7 @@ pr_start_struct_type (p, tag, id, structp, size)
/* Output the visibility of a field in a struct. */
static bfd_boolean
-pr_fix_visibility (info, visibility)
- struct pr_handle *info;
- enum debug_visibility visibility;
+pr_fix_visibility (struct pr_handle *info, enum debug_visibility visibility)
{
const char *s = NULL;
char *t;
@@ -1207,12 +1116,8 @@ pr_fix_visibility (info, visibility)
/* Add a field to a struct type. */
static bfd_boolean
-pr_struct_field (p, name, bitpos, bitsize, visibility)
- PTR p;
- const char *name;
- bfd_vma bitpos;
- bfd_vma bitsize;
- enum debug_visibility visibility;
+pr_struct_field (void *p, const char *name, bfd_vma bitpos, bfd_vma bitsize,
+ enum debug_visibility visibility)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[20];
@@ -1253,8 +1158,7 @@ pr_struct_field (p, name, bitpos, bitsize, visibility)
/* Finish a struct type. */
static bfd_boolean
-pr_end_struct_type (p)
- PTR p;
+pr_end_struct_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
char *s;
@@ -1277,14 +1181,9 @@ pr_end_struct_type (p)
/* Start a class type. */
static bfd_boolean
-pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
- PTR p;
- const char *tag;
- unsigned int id;
- bfd_boolean structp;
- unsigned int size;
- bfd_boolean vptr;
- bfd_boolean ownvptr;
+pr_start_class_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp, unsigned int size,
+ bfd_boolean vptr, bfd_boolean ownvptr)
{
struct pr_handle *info = (struct pr_handle *) p;
char *tv = NULL;
@@ -1370,11 +1269,8 @@ pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
/* Add a static member to a class. */
static bfd_boolean
-pr_class_static_member (p, name, physname, visibility)
- PTR p;
- const char *name;
- const char *physname;
- enum debug_visibility visibility;
+pr_class_static_member (void *p, const char *name, const char *physname,
+ enum debug_visibility visibility)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1402,11 +1298,8 @@ pr_class_static_member (p, name, physname, visibility)
/* Add a base class to a class. */
static bfd_boolean
-pr_class_baseclass (p, bitpos, virtual, visibility)
- PTR p;
- bfd_vma bitpos;
- bfd_boolean virtual;
- enum debug_visibility visibility;
+pr_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual,
+ enum debug_visibility visibility)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1501,9 +1394,7 @@ pr_class_baseclass (p, bitpos, virtual, visibility)
/* Start adding a method to a class. */
static bfd_boolean
-pr_class_start_method (p, name)
- PTR p;
- const char *name;
+pr_class_start_method (void *p, const char *name)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -1515,15 +1406,10 @@ pr_class_start_method (p, name)
/* Add a variant to a method. */
static bfd_boolean
-pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
- context)
- PTR p;
- const char *physname;
- enum debug_visibility visibility;
- bfd_boolean constp;
- bfd_boolean volatilep;
- bfd_vma voffset;
- bfd_boolean context;
+pr_class_method_variant (void *p, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep,
+ bfd_vma voffset, bfd_boolean context)
{
struct pr_handle *info = (struct pr_handle *) p;
char *method_type;
@@ -1600,12 +1486,9 @@ pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
/* Add a static variant to a method. */
static bfd_boolean
-pr_class_static_method_variant (p, physname, visibility, constp, volatilep)
- PTR p;
- const char *physname;
- enum debug_visibility visibility;
- bfd_boolean constp;
- bfd_boolean volatilep;
+pr_class_static_method_variant (void *p, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep)
{
struct pr_handle *info = (struct pr_handle *) p;
char *method_type;
@@ -1654,8 +1537,7 @@ pr_class_static_method_variant (p, physname, visibility, constp, volatilep)
/* Finish up a method. */
static bfd_boolean
-pr_class_end_method (p)
- PTR p;
+pr_class_end_method (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -1666,8 +1548,7 @@ pr_class_end_method (p)
/* Finish up a class. */
static bfd_boolean
-pr_end_class_type (p)
- PTR p;
+pr_end_class_type (void *p)
{
return pr_end_struct_type (p);
}
@@ -1675,9 +1556,7 @@ pr_end_class_type (p)
/* Push a type on the stack using a typedef name. */
static bfd_boolean
-pr_typedef_type (p, name)
- PTR p;
- const char *name;
+pr_typedef_type (void *p, const char *name)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -1687,11 +1566,8 @@ pr_typedef_type (p, name)
/* Push a type on the stack using a tag name. */
static bfd_boolean
-pr_tag_type (p, name, id, kind)
- PTR p;
- const char *name;
- unsigned int id;
- enum debug_type_kind kind;
+pr_tag_type (void *p, const char *name, unsigned int id,
+ enum debug_type_kind kind)
{
struct pr_handle *info = (struct pr_handle *) p;
const char *t, *tag;
@@ -1744,9 +1620,7 @@ pr_tag_type (p, name, id, kind)
/* Output a typedef. */
static bfd_boolean
-pr_typdef (p, name)
- PTR p;
- const char *name;
+pr_typdef (void *p, const char *name)
{
struct pr_handle *info = (struct pr_handle *) p;
char *s;
@@ -1770,9 +1644,7 @@ pr_typdef (p, name)
stack, so all we have to do here is print it out. */
static bfd_boolean
-pr_tag (p, name)
- PTR p;
- const char *name ATTRIBUTE_UNUSED;
+pr_tag (void *p, const char *name ATTRIBUTE_UNUSED)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1792,10 +1664,7 @@ pr_tag (p, name)
/* Output an integer constant. */
static bfd_boolean
-pr_int_constant (p, name, val)
- PTR p;
- const char *name;
- bfd_vma val;
+pr_int_constant (void *p, const char *name, bfd_vma val)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[20];
@@ -1809,10 +1678,7 @@ pr_int_constant (p, name, val)
/* Output a floating point constant. */
static bfd_boolean
-pr_float_constant (p, name, val)
- PTR p;
- const char *name;
- double val;
+pr_float_constant (void *p, const char *name, double val)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -1824,10 +1690,7 @@ pr_float_constant (p, name, val)
/* Output a typed constant. */
static bfd_boolean
-pr_typed_constant (p, name, val)
- PTR p;
- const char *name;
- bfd_vma val;
+pr_typed_constant (void *p, const char *name, bfd_vma val)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1849,11 +1712,8 @@ pr_typed_constant (p, name, val)
/* Output a variable. */
static bfd_boolean
-pr_variable (p, name, kind, val)
- PTR p;
- const char *name;
- enum debug_var_kind kind;
- bfd_vma val;
+pr_variable (void *p, const char *name, enum debug_var_kind kind,
+ bfd_vma val)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1890,10 +1750,7 @@ pr_variable (p, name, kind, val)
/* Start outputting a function. */
static bfd_boolean
-pr_start_function (p, name, global)
- PTR p;
- const char *name;
- bfd_boolean global;
+pr_start_function (void *p, const char *name, bfd_boolean global)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1918,11 +1775,8 @@ pr_start_function (p, name, global)
/* Output a function parameter. */
static bfd_boolean
-pr_function_parameter (p, name, kind, val)
- PTR p;
- const char *name;
- enum debug_parm_kind kind;
- bfd_vma val;
+pr_function_parameter (void *p, const char *name,
+ enum debug_parm_kind kind, bfd_vma val)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1961,9 +1815,7 @@ pr_function_parameter (p, name, kind, val)
/* Start writing out a block. */
static bfd_boolean
-pr_start_block (p, addr)
- PTR p;
- bfd_vma addr;
+pr_start_block (void *p, bfd_vma addr)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[20];
@@ -1986,11 +1838,7 @@ pr_start_block (p, addr)
/* Write out line number information. */
static bfd_boolean
-pr_lineno (p, filename, lineno, addr)
- PTR p;
- const char *filename;
- unsigned long lineno;
- bfd_vma addr;
+pr_lineno (void *p, const char *filename, unsigned long lineno, bfd_vma addr)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[20];
@@ -2005,9 +1853,7 @@ pr_lineno (p, filename, lineno, addr)
/* Finish writing out a block. */
static bfd_boolean
-pr_end_block (p, addr)
- PTR p;
- bfd_vma addr;
+pr_end_block (void *p, bfd_vma addr)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[20];
@@ -2024,8 +1870,7 @@ pr_end_block (p, addr)
/* Finish writing out a function. */
static bfd_boolean
-pr_end_function (p)
- PTR p ATTRIBUTE_UNUSED;
+pr_end_function (void *p ATTRIBUTE_UNUSED)
{
return TRUE;
}
@@ -2148,7 +1993,8 @@ tg_enum_type (void *p, const char *tag, const char **names,
static bfd_boolean
tg_start_struct_type (void *p, const char *tag, unsigned int id,
- bfd_boolean structp, unsigned int size ATTRIBUTE_UNUSED)
+ bfd_boolean structp,
+ unsigned int size ATTRIBUTE_UNUSED)
{
struct pr_handle *info = (struct pr_handle *) p;
const char *name;
@@ -2432,7 +2278,7 @@ tg_class_method_variant (void *p, const char *physname ATTRIBUTE_UNUSED,
method_name = strdup (context ? info->stack->next->next->method
: info->stack->next->method);
-
+
/* Stick the name of the method into its type. */
if (! substitute_type (info, method_name))
return FALSE;
@@ -2461,7 +2307,7 @@ tg_class_method_variant (void *p, const char *physname ATTRIBUTE_UNUSED,
free (method_type);
free (method_name);
free (context_type);
-
+
return TRUE;
}
@@ -2471,8 +2317,7 @@ static bfd_boolean
tg_class_static_method_variant (void *p,
const char *physname ATTRIBUTE_UNUSED,
enum debug_visibility visibility,
- bfd_boolean constp,
- bfd_boolean volatilep)
+ bfd_boolean constp, bfd_boolean volatilep)
{
struct pr_handle *info = (struct pr_handle *) p;
char *method_type;
@@ -2775,7 +2620,7 @@ tg_start_function (void *p, const char *name, bfd_boolean global)
if (! substitute_type (info, dname))
return FALSE;
-
+
if (dname != name)
{
char *sep;
@@ -2836,11 +2681,11 @@ tg_function_parameter (void *p, const char *name, enum debug_parm_kind kind,
{
if (info->parameter != 1 && ! append_type (info, ", "))
return FALSE;
-
+
if (kind == DEBUG_PARM_REG || kind == DEBUG_PARM_REF_REG)
if (! append_type (info, "register "))
return FALSE;
-
+
if (! append_type (info, t))
return FALSE;
}
@@ -2905,8 +2750,7 @@ tg_start_block (void *p, bfd_vma addr)
/* Write out line number information. */
static bfd_boolean
-tg_lineno (void *p ATTRIBUTE_UNUSED,
- const char *filename ATTRIBUTE_UNUSED,
+tg_lineno (void *p ATTRIBUTE_UNUSED, const char *filename ATTRIBUTE_UNUSED,
unsigned long lineno ATTRIBUTE_UNUSED,
bfd_vma addr ATTRIBUTE_UNUSED)
{
diff --git a/binutils/rclex.l b/binutils/rclex.l
index 3a4f3e1df8e..2735cc18aca 100644
--- a/binutils/rclex.l
+++ b/binutils/rclex.l
@@ -1,5 +1,5 @@
%{ /* rclex.l -- lexer for Windows rc files parser */
-/* Copyright 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright 1997, 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -66,9 +66,9 @@ static struct alloc_string *strings;
/* Local functions. */
-static void cpp_line PARAMS ((const char *));
-static char *handle_quotes PARAMS ((const char *, unsigned long *));
-static char *get_string PARAMS ((int));
+static void cpp_line (const char *);
+static char *handle_quotes (const char *, unsigned long *);
+static char *get_string (int);
%}
@@ -236,7 +236,7 @@ static char *get_string PARAMS ((int));
%%
#ifndef yywrap
/* This is needed for some versions of lex. */
-int yywrap ()
+int yywrap (void)
{
return 1;
}
@@ -245,8 +245,7 @@ int yywrap ()
/* Handle a C preprocessor line. */
static void
-cpp_line (s)
- const char *s;
+cpp_line (const char *s)
{
int line;
char *send, *fn;
@@ -301,9 +300,7 @@ cpp_line (s)
merged separated by whitespace are merged, as in C. */
static char *
-handle_quotes (input, len)
- const char *input;
- unsigned long *len;
+handle_quotes (const char *input, unsigned long *len)
{
char *ret, *s;
const char *t;
@@ -447,8 +444,7 @@ handle_quotes (input, len)
/* Allocate a string of a given length. */
static char *
-get_string (len)
- int len;
+get_string (int len)
{
struct alloc_string *as;
@@ -465,7 +461,7 @@ get_string (len)
when it no longer needs them. */
void
-rcparse_discard_strings ()
+rcparse_discard_strings (void)
{
struct alloc_string *as;
@@ -486,7 +482,7 @@ rcparse_discard_strings ()
/* Enter rcdata mode. */
void
-rcparse_rcdata ()
+rcparse_rcdata (void)
{
rcdata_mode = 1;
}
@@ -494,7 +490,7 @@ rcparse_rcdata ()
/* Go back to normal mode from rcdata mode. */
void
-rcparse_normal ()
+rcparse_normal (void)
{
rcdata_mode = 0;
}
diff --git a/binutils/rcparse.y b/binutils/rcparse.y
index 1866c90912c..7aacaaa0673 100644
--- a/binutils/rcparse.y
+++ b/binutils/rcparse.y
@@ -1762,8 +1762,7 @@ sizedposnumexpr:
/* Set the language from the command line. */
void
-rcparse_set_language (lang)
- int lang;
+rcparse_set_language (int lang)
{
language = lang;
}
diff --git a/binutils/rdcoff.c b/binutils/rdcoff.c
index cca9b0e64be..84788e0e10e 100644
--- a/binutils/rdcoff.c
+++ b/binutils/rdcoff.c
@@ -1,5 +1,5 @@
/* stabs.c -- Parse COFF debugging information
- Copyright 1996, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 2000, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -82,32 +82,28 @@ struct coff_types
debug_type basic[T_MAX + 1];
};
-static debug_type *coff_get_slot
- PARAMS ((struct coff_types *, int));
+static debug_type *coff_get_slot (struct coff_types *, int);
static debug_type parse_coff_type
- PARAMS ((bfd *, struct coff_symbols *, struct coff_types *, long, int,
- union internal_auxent *, bfd_boolean, PTR));
+ (bfd *, struct coff_symbols *, struct coff_types *, long, int,
+ union internal_auxent *, bfd_boolean, void *);
static debug_type parse_coff_base_type
- PARAMS ((bfd *, struct coff_symbols *, struct coff_types *, long, int,
- union internal_auxent *, PTR));
+ (bfd *, struct coff_symbols *, struct coff_types *, long, int,
+ union internal_auxent *, void *);
static debug_type parse_coff_struct_type
- PARAMS ((bfd *, struct coff_symbols *, struct coff_types *, int,
- union internal_auxent *, PTR));
+ (bfd *, struct coff_symbols *, struct coff_types *, int,
+ union internal_auxent *, void *);
static debug_type parse_coff_enum_type
- PARAMS ((bfd *, struct coff_symbols *, struct coff_types *,
- union internal_auxent *, PTR));
+ (bfd *, struct coff_symbols *, struct coff_types *,
+ union internal_auxent *, void *);
static bfd_boolean parse_coff_symbol
- PARAMS ((bfd *, struct coff_types *, asymbol *, long,
- struct internal_syment *, PTR, debug_type, bfd_boolean));
-static bfd_boolean external_coff_symbol_p
- PARAMS ((int sym_class));
+ (bfd *, struct coff_types *, asymbol *, long, struct internal_syment *,
+ void *, debug_type, bfd_boolean);
+static bfd_boolean external_coff_symbol_p (int sym_class);
/* Return the slot for a type. */
static debug_type *
-coff_get_slot (types, indx)
- struct coff_types *types;
- int indx;
+coff_get_slot (struct coff_types *types, int indx)
{
struct coff_slots **pps;
@@ -136,16 +132,10 @@ coff_get_slot (types, indx)
/* Parse a COFF type code in NTYPE. */
static debug_type
-parse_coff_type (abfd, symbols, types, coff_symno, ntype, pauxent, useaux,
- dhandle)
- bfd *abfd;
- struct coff_symbols *symbols;
- struct coff_types *types;
- long coff_symno;
- int ntype;
- union internal_auxent *pauxent;
- bfd_boolean useaux;
- PTR dhandle;
+parse_coff_type (bfd *abfd, struct coff_symbols *symbols,
+ struct coff_types *types, long coff_symno, int ntype,
+ union internal_auxent *pauxent, bfd_boolean useaux,
+ void *dhandle)
{
debug_type type;
@@ -239,15 +229,9 @@ parse_coff_type (abfd, symbols, types, coff_symno, ntype, pauxent, useaux,
/* Parse a basic COFF type in NTYPE. */
static debug_type
-parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
- dhandle)
- bfd *abfd;
- struct coff_symbols *symbols;
- struct coff_types *types;
- long coff_symno;
- int ntype;
- union internal_auxent *pauxent;
- PTR dhandle;
+parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
+ struct coff_types *types, long coff_symno, int ntype,
+ union internal_auxent *pauxent, void *dhandle)
{
debug_type ret;
bfd_boolean set_basic;
@@ -385,13 +369,9 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
/* Parse a struct type. */
static debug_type
-parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
- bfd *abfd;
- struct coff_symbols *symbols;
- struct coff_types *types;
- int ntype;
- union internal_auxent *pauxent;
- PTR dhandle;
+parse_coff_struct_type (bfd *abfd, struct coff_symbols *symbols,
+ struct coff_types *types, int ntype,
+ union internal_auxent *pauxent, void *dhandle)
{
long symend;
int alloc;
@@ -496,12 +476,9 @@ parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
/* Parse an enum type. */
static debug_type
-parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
- bfd *abfd;
- struct coff_symbols *symbols;
- struct coff_types *types ATTRIBUTE_UNUSED;
- union internal_auxent *pauxent;
- PTR dhandle;
+parse_coff_enum_type (bfd *abfd, struct coff_symbols *symbols,
+ struct coff_types *types ATTRIBUTE_UNUSED,
+ union internal_auxent *pauxent, void *dhandle)
{
long symend;
int alloc;
@@ -568,16 +545,10 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
/* Handle a single COFF symbol. */
static bfd_boolean
-parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
- within_function)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct coff_types *types;
- asymbol *sym;
- long coff_symno;
- struct internal_syment *psyment;
- PTR dhandle;
- debug_type type;
- bfd_boolean within_function;
+parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
+ asymbol *sym, long coff_symno,
+ struct internal_syment *psyment, void *dhandle,
+ debug_type type, bfd_boolean within_function)
{
switch (psyment->n_sclass)
{
@@ -662,8 +633,7 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
/* Determine if a symbol has external visibility. */
static bfd_boolean
-external_coff_symbol_p (sym_class)
- int sym_class;
+external_coff_symbol_p (int sym_class)
{
switch (sym_class)
{
@@ -680,11 +650,7 @@ external_coff_symbol_p (sym_class)
handles them. */
bfd_boolean
-parse_coff (abfd, syms, symcount, dhandle)
- bfd *abfd;
- asymbol **syms;
- long symcount;
- PTR dhandle;
+parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
{
struct coff_symbols symbols;
struct coff_types types;
diff --git a/binutils/rddbg.c b/binutils/rddbg.c
index 2f6ec6e3ea1..75ddab54488 100644
--- a/binutils/rddbg.c
+++ b/binutils/rddbg.c
@@ -1,5 +1,6 @@
/* rddbg.c -- Read debugging information into a generic form.
- Copyright 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 2000, 2002, 2003
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -30,28 +31,21 @@
#include "budbg.h"
static bfd_boolean read_section_stabs_debugging_info
- PARAMS ((bfd *, asymbol **, long, PTR, bfd_boolean *));
+ (bfd *, asymbol **, long, void *, bfd_boolean *);
static bfd_boolean read_symbol_stabs_debugging_info
- PARAMS ((bfd *, asymbol **, long, PTR, bfd_boolean *));
-static bfd_boolean read_ieee_debugging_info
- PARAMS ((bfd *, PTR, bfd_boolean *));
-static void save_stab
- PARAMS ((int, int, bfd_vma, const char *));
-static void stab_context
- PARAMS ((void));
-static void free_saved_stabs
- PARAMS ((void));
+ (bfd *, asymbol **, long, void *, bfd_boolean *);
+static bfd_boolean read_ieee_debugging_info (bfd *, void *, bfd_boolean *);
+static void save_stab (int, int, bfd_vma, const char *);
+static void stab_context (void);
+static void free_saved_stabs (void);
/* Read debugging information from a BFD. Returns a generic debugging
pointer. */
-PTR
-read_debugging_info (abfd, syms, symcount)
- bfd *abfd;
- asymbol **syms;
- long symcount;
+void *
+read_debugging_info (bfd *abfd, asymbol **syms, long symcount)
{
- PTR dhandle;
+ void *dhandle;
bfd_boolean found;
dhandle = debug_init ();
@@ -99,12 +93,8 @@ read_debugging_info (abfd, syms, symcount)
/* Read stabs in sections debugging information from a BFD. */
static bfd_boolean
-read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
- bfd *abfd;
- asymbol **syms;
- long symcount;
- PTR dhandle;
- bfd_boolean *pfound;
+read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
+ void *dhandle, bfd_boolean *pfound)
{
static struct
{
@@ -113,7 +103,7 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
} names[] = { { ".stab", ".stabstr" },
{ "LC_SYMTAB.stabs", "LC_SYMTAB.stabstr" } };
unsigned int i;
- PTR shandle;
+ void *shandle;
*pfound = FALSE;
shandle = NULL;
@@ -261,14 +251,10 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
/* Read stabs in the symbol table. */
static bfd_boolean
-read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
- bfd *abfd;
- asymbol **syms;
- long symcount;
- PTR dhandle;
- bfd_boolean *pfound;
+read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
+ void *dhandle, bfd_boolean *pfound)
{
- PTR shandle;
+ void *shandle;
asymbol **ps, **symend;
shandle = NULL;
@@ -341,10 +327,7 @@ read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
/* Read IEEE debugging information. */
static bfd_boolean
-read_ieee_debugging_info (abfd, dhandle, pfound)
- bfd *abfd;
- PTR dhandle;
- bfd_boolean *pfound;
+read_ieee_debugging_info (bfd *abfd, void *dhandle, bfd_boolean *pfound)
{
asection *dsec;
bfd_size_type size;
@@ -390,11 +373,7 @@ static int saved_stabs_index;
/* Save a stabs string. */
static void
-save_stab (type, desc, value, string)
- int type;
- int desc;
- bfd_vma value;
- const char *string;
+save_stab (int type, int desc, bfd_vma value, const char *string)
{
if (saved_stabs[saved_stabs_index].string != NULL)
free (saved_stabs[saved_stabs_index].string);
@@ -408,7 +387,7 @@ save_stab (type, desc, value, string)
/* Provide context for an error. */
static void
-stab_context ()
+stab_context (void)
{
int i;
@@ -446,7 +425,7 @@ stab_context ()
/* Free the saved stab strings. */
static void
-free_saved_stabs ()
+free_saved_stabs (void)
{
int i;
diff --git a/binutils/rename.c b/binutils/rename.c
index 0ccaedc9638..99561c47bcf 100644
--- a/binutils/rename.c
+++ b/binutils/rename.c
@@ -1,5 +1,5 @@
/* rename.c -- rename a file, preserving symlinks.
- Copyright 1999, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -37,8 +37,7 @@
#define O_BINARY 0
#endif
-static int simple_copy
- PARAMS ((const char *, const char *));
+static int simple_copy (const char *, const char *);
/* The number of bytes to copy at once. */
#define COPY_BUF 8192
@@ -47,9 +46,7 @@ static int simple_copy
Return 0 if ok, -1 if error. */
static int
-simple_copy (from, to)
- const char *from;
- const char *to;
+simple_copy (const char *from, const char *to)
{
int fromfd, tofd, nread;
int saved;
@@ -96,9 +93,7 @@ simple_copy (from, to)
STATBUF. */
void
-set_times (destination, statbuf)
- const char *destination;
- const struct stat *statbuf;
+set_times (const char *destination, const struct stat *statbuf)
{
int result;
@@ -145,10 +140,7 @@ set_times (destination, statbuf)
Return 0 if ok, -1 if error. */
int
-smart_rename (from, to, preserve_dates)
- const char *from;
- const char *to;
- int preserve_dates;
+smart_rename (const char *from, const char *to, int preserve_dates)
{
bfd_boolean exists;
struct stat s;
diff --git a/binutils/resbin.c b/binutils/resbin.c
index 079818c6fab..ad14bdafcbb 100644
--- a/binutils/resbin.c
+++ b/binutils/resbin.c
@@ -1,5 +1,6 @@
/* resbin.c -- manipulate the Windows binary resource format.
- Copyright 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2002, 2003
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -36,42 +37,43 @@
/* Local functions. */
-static void toosmall PARAMS ((const char *));
+static void toosmall (const char *);
+
static unichar *get_unicode
- PARAMS ((const unsigned char *, unsigned long, int, int *));
+ (const unsigned char *, unsigned long, int, int *);
static int get_resid
- PARAMS ((struct res_id *, const unsigned char *, unsigned long, int));
+ (struct res_id *, const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_generic
- PARAMS ((enum res_type, const unsigned char *, unsigned long));
+ (enum res_type, const unsigned char *, unsigned long);
static struct res_resource *bin_to_res_cursor
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_menu
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct menuitem *bin_to_res_menuitems
- PARAMS ((const unsigned char *, unsigned long, int, int *));
+ (const unsigned char *, unsigned long, int, int *);
static struct menuitem *bin_to_res_menuexitems
- PARAMS ((const unsigned char *, unsigned long, int, int *));
+ (const unsigned char *, unsigned long, int, int *);
static struct res_resource *bin_to_res_dialog
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_string
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_fontdir
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_accelerators
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_rcdata
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_group_cursor
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_group_icon
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_version
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_userdata
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static void get_version_header
- PARAMS ((const unsigned char *, unsigned long, int, const char *,
- unichar **, int *, int *, int *, int *));
+ (const unsigned char *, unsigned long, int, const char *,
+ unichar **, int *, int *, int *, int *);
/* Given a resource type ID, a pointer to data, a length, return a
res_resource structure which represents that resource. The caller
@@ -79,11 +81,8 @@ static void get_version_header
of the returned structure. */
struct res_resource *
-bin_to_res (type, data, length, big_endian)
- struct res_id type;
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res (struct res_id type, const unsigned char *data,
+ unsigned long length, int big_endian)
{
if (type.named)
return bin_to_res_userdata (data, length, big_endian);
@@ -128,8 +127,7 @@ bin_to_res (type, data, length, big_endian)
/* Give an error if the binary data is too small. */
static void
-toosmall (msg)
- const char *msg;
+toosmall (const char *msg)
{
fatal (_("%s: not enough binary data"), msg);
}
@@ -137,11 +135,8 @@ toosmall (msg)
/* Swap in a NULL terminated unicode string. */
static unichar *
-get_unicode (data, length, big_endian, retlen)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
- int *retlen;
+get_unicode (const unsigned char *data, unsigned long length,
+ int big_endian, int *retlen)
{
int c, i;
unichar *ret;
@@ -171,11 +166,8 @@ get_unicode (data, length, big_endian, retlen)
/* Get a resource identifier. This returns the number of bytes used. */
static int
-get_resid (id, data, length, big_endian)
- struct res_id *id;
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+get_resid (struct res_id *id, const unsigned char *data,
+ unsigned long length, int big_endian)
{
int first;
@@ -203,10 +195,8 @@ get_resid (id, data, length, big_endian)
binary. */
struct res_resource *
-bin_to_res_generic (type, data, length)
- enum res_type type;
- const unsigned char *data;
- unsigned long length;
+bin_to_res_generic (enum res_type type, const unsigned char *data,
+ unsigned long length)
{
struct res_resource *r;
@@ -221,10 +211,8 @@ bin_to_res_generic (type, data, length)
/* Convert a cursor resource from binary. */
struct res_resource *
-bin_to_res_cursor (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_cursor (const unsigned char *data, unsigned long length,
+ int big_endian)
{
struct cursor *c;
struct res_resource *r;
@@ -248,10 +236,8 @@ bin_to_res_cursor (data, length, big_endian)
/* Convert a menu resource from binary. */
struct res_resource *
-bin_to_res_menu (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_menu (const unsigned char *data, unsigned long length,
+ int big_endian)
{
struct res_resource *r;
struct menu *m;
@@ -300,11 +286,8 @@ bin_to_res_menu (data, length, big_endian)
/* Convert menu items from binary. */
static struct menuitem *
-bin_to_res_menuitems (data, length, big_endian, read)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
- int *read;
+bin_to_res_menuitems (const unsigned char *data, unsigned long length,
+ int big_endian, int *read)
{
struct menuitem *first, **pp;
@@ -381,11 +364,8 @@ bin_to_res_menuitems (data, length, big_endian, read)
/* Convert menuex items from binary. */
static struct menuitem *
-bin_to_res_menuexitems (data, length, big_endian, read)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
- int *read;
+bin_to_res_menuexitems (const unsigned char *data, unsigned long length,
+ int big_endian, int *read)
{
struct menuitem *first, **pp;
@@ -459,10 +439,8 @@ bin_to_res_menuexitems (data, length, big_endian, read)
/* Convert a dialog resource from binary. */
static struct res_resource *
-bin_to_res_dialog (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_dialog (const unsigned char *data, unsigned long length,
+ int big_endian)
{
int signature;
struct dialog *d;
@@ -647,10 +625,8 @@ bin_to_res_dialog (data, length, big_endian)
/* Convert a stringtable resource from binary. */
static struct res_resource *
-bin_to_res_string (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_string (const unsigned char *data, unsigned long length,
+ int big_endian)
{
struct stringtable *st;
int i;
@@ -696,10 +672,8 @@ bin_to_res_string (data, length, big_endian)
/* Convert a fontdir resource from binary. */
static struct res_resource *
-bin_to_res_fontdir (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_fontdir (const unsigned char *data, unsigned long length,
+ int big_endian)
{
int c, i;
struct fontdir *first, **pp;
@@ -768,10 +742,8 @@ bin_to_res_fontdir (data, length, big_endian)
/* Convert an accelerators resource from binary. */
static struct res_resource *
-bin_to_res_accelerators (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_accelerators (const unsigned char *data, unsigned long length,
+ int big_endian)
{
struct accelerator *first, **pp;
struct res_resource *r;
@@ -813,10 +785,8 @@ bin_to_res_accelerators (data, length, big_endian)
/* Convert an rcdata resource from binary. */
static struct res_resource *
-bin_to_res_rcdata (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian ATTRIBUTE_UNUSED;
+bin_to_res_rcdata (const unsigned char *data, unsigned long length,
+ int big_endian ATTRIBUTE_UNUSED)
{
struct rcdata_item *ri;
struct res_resource *r;
@@ -838,10 +808,8 @@ bin_to_res_rcdata (data, length, big_endian)
/* Convert a group cursor resource from binary. */
static struct res_resource *
-bin_to_res_group_cursor (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_group_cursor (const unsigned char *data, unsigned long length,
+ int big_endian)
{
int type, c, i;
struct group_cursor *first, **pp;
@@ -896,10 +864,8 @@ bin_to_res_group_cursor (data, length, big_endian)
/* Convert a group icon resource from binary. */
static struct res_resource *
-bin_to_res_group_icon (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_group_icon (const unsigned char *data, unsigned long length,
+ int big_endian)
{
int type, c, i;
struct group_icon *first, **pp;
@@ -958,17 +924,9 @@ bin_to_res_group_icon (data, length, big_endian)
to the type, and *OFF to the offset to the children. */
static void
-get_version_header (data, length, big_endian, key, pkey, len, vallen, type,
- off)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
- const char *key;
- unichar **pkey;
- int *len;
- int *vallen;
- int *type;
- int *off;
+get_version_header (const unsigned char *data, unsigned long length,
+ int big_endian, const char *key, unichar **pkey,
+ int *len, int *vallen, int *type, int *off)
{
if (length < 8)
toosmall (key);
@@ -1015,10 +973,8 @@ get_version_header (data, length, big_endian, key, pkey, len, vallen, type,
/* Convert a version resource from binary. */
static struct res_resource *
-bin_to_res_version (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_version (const unsigned char *data, unsigned long length,
+ int big_endian)
{
int verlen, vallen, type, off;
struct fixed_versioninfo *fi;
@@ -1236,10 +1192,8 @@ bin_to_res_version (data, length, big_endian)
/* Convert an arbitrary user defined resource from binary. */
static struct res_resource *
-bin_to_res_userdata (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian ATTRIBUTE_UNUSED;
+bin_to_res_userdata (const unsigned char *data, unsigned long length,
+ int big_endian ATTRIBUTE_UNUSED)
{
struct rcdata_item *ri;
struct res_resource *r;
@@ -1266,43 +1220,41 @@ bin_to_res_userdata (data, length, big_endian)
/* Local functions used to convert resources to binary format. */
-static void dword_align_bin PARAMS ((struct bindata ***, unsigned long *));
-static struct bindata *resid_to_bin PARAMS ((struct res_id, int));
-static struct bindata *unicode_to_bin PARAMS ((const unichar *, int));
+static void dword_align_bin (struct bindata ***, unsigned long *);
+static struct bindata *resid_to_bin (struct res_id, int);
+static struct bindata *unicode_to_bin (const unichar *, int);
static struct bindata *res_to_bin_accelerator
- PARAMS ((const struct accelerator *, int));
+ (const struct accelerator *, int);
static struct bindata *res_to_bin_cursor
- PARAMS ((const struct cursor *, int));
+ (const struct cursor *, int);
static struct bindata *res_to_bin_group_cursor
- PARAMS ((const struct group_cursor *, int));
+ (const struct group_cursor *, int);
static struct bindata *res_to_bin_dialog
- PARAMS ((const struct dialog *, int));
+ (const struct dialog *, int);
static struct bindata *res_to_bin_fontdir
- PARAMS ((const struct fontdir *, int));
+ (const struct fontdir *, int);
static struct bindata *res_to_bin_group_icon
- PARAMS ((const struct group_icon *, int));
+ (const struct group_icon *, int);
static struct bindata *res_to_bin_menu
- PARAMS ((const struct menu *, int));
+ (const struct menu *, int);
static struct bindata *res_to_bin_menuitems
- PARAMS ((const struct menuitem *, int));
+ (const struct menuitem *, int);
static struct bindata *res_to_bin_menuexitems
- PARAMS ((const struct menuitem *, int));
+ (const struct menuitem *, int);
static struct bindata *res_to_bin_rcdata
- PARAMS ((const struct rcdata_item *, int));
+ (const struct rcdata_item *, int);
static struct bindata *res_to_bin_stringtable
- PARAMS ((const struct stringtable *, int));
-static struct bindata *string_to_unicode_bin PARAMS ((const char *, int));
+ (const struct stringtable *, int);
+static struct bindata *string_to_unicode_bin (const char *, int);
static struct bindata *res_to_bin_versioninfo
- PARAMS ((const struct versioninfo *, int));
+ (const struct versioninfo *, int);
static struct bindata *res_to_bin_generic
- PARAMS ((unsigned long, const unsigned char *));
+ (unsigned long, const unsigned char *);
/* Convert a resource to binary. */
struct bindata *
-res_to_bin (res, big_endian)
- const struct res_resource *res;
- int big_endian;
+res_to_bin (const struct res_resource *res, int big_endian)
{
switch (res->type)
{
@@ -1344,9 +1296,7 @@ res_to_bin (res, big_endian)
boundary. It updates *PPP and *LENGTH. */
static void
-dword_align_bin (ppp, length)
- struct bindata ***ppp;
- unsigned long *length;
+dword_align_bin (struct bindata ***ppp, unsigned long *length)
{
int add;
struct bindata *d;
@@ -1372,9 +1322,7 @@ dword_align_bin (ppp, length)
bindata structure. */
static struct bindata *
-resid_to_bin (id, big_endian)
- struct res_id id;
- int big_endian;
+resid_to_bin (struct res_id id, int big_endian)
{
struct bindata *d;
@@ -1407,9 +1355,7 @@ resid_to_bin (id, big_endian)
returns exactly one bindata structure. */
static struct bindata *
-unicode_to_bin (str, big_endian)
- const unichar *str;
- int big_endian;
+unicode_to_bin (const unichar *str, int big_endian)
{
int len;
struct bindata *d;
@@ -1447,9 +1393,8 @@ unicode_to_bin (str, big_endian)
/* Convert an accelerator resource to binary. */
static struct bindata *
-res_to_bin_accelerator (accelerators, big_endian)
- const struct accelerator *accelerators;
- int big_endian;
+res_to_bin_accelerator (const struct accelerator *accelerators,
+ int big_endian)
{
struct bindata *first, **pp;
const struct accelerator *a;
@@ -1483,9 +1428,7 @@ res_to_bin_accelerator (accelerators, big_endian)
/* Convert a cursor resource to binary. */
static struct bindata *
-res_to_bin_cursor (c, big_endian)
- const struct cursor *c;
- int big_endian;
+res_to_bin_cursor (const struct cursor *c, int big_endian)
{
struct bindata *d;
@@ -1507,9 +1450,8 @@ res_to_bin_cursor (c, big_endian)
/* Convert a group cursor resource to binary. */
static struct bindata *
-res_to_bin_group_cursor (group_cursors, big_endian)
- const struct group_cursor *group_cursors;
- int big_endian;
+res_to_bin_group_cursor (const struct group_cursor *group_cursors,
+ int big_endian)
{
struct bindata *first, **pp;
int c;
@@ -1556,9 +1498,7 @@ res_to_bin_group_cursor (group_cursors, big_endian)
/* Convert a dialog resource to binary. */
static struct bindata *
-res_to_bin_dialog (dialog, big_endian)
- const struct dialog *dialog;
- int big_endian;
+res_to_bin_dialog (const struct dialog *dialog, int big_endian)
{
int dialogex;
struct bindata *first, **pp;
@@ -1739,9 +1679,7 @@ res_to_bin_dialog (dialog, big_endian)
/* Convert a fontdir resource to binary. */
static struct bindata *
-res_to_bin_fontdir (fontdirs, big_endian)
- const struct fontdir *fontdirs;
- int big_endian;
+res_to_bin_fontdir (const struct fontdir *fontdirs, int big_endian)
{
struct bindata *first, **pp;
int c;
@@ -1787,9 +1725,7 @@ res_to_bin_fontdir (fontdirs, big_endian)
/* Convert a group icon resource to binary. */
static struct bindata *
-res_to_bin_group_icon (group_icons, big_endian)
- const struct group_icon *group_icons;
- int big_endian;
+res_to_bin_group_icon (const struct group_icon *group_icons, int big_endian)
{
struct bindata *first, **pp;
int c;
@@ -1838,9 +1774,7 @@ res_to_bin_group_icon (group_icons, big_endian)
/* Convert a menu resource to binary. */
static struct bindata *
-res_to_bin_menu (menu, big_endian)
- const struct menu *menu;
- int big_endian;
+res_to_bin_menu (const struct menu *menu, int big_endian)
{
int menuex;
struct bindata *d;
@@ -1873,9 +1807,7 @@ res_to_bin_menu (menu, big_endian)
/* Convert menu items to binary. */
static struct bindata *
-res_to_bin_menuitems (items, big_endian)
- const struct menuitem *items;
- int big_endian;
+res_to_bin_menuitems (const struct menuitem *items, int big_endian)
{
struct bindata *first, **pp;
const struct menuitem *mi;
@@ -1923,9 +1855,7 @@ res_to_bin_menuitems (items, big_endian)
/* Convert menuex items to binary. */
static struct bindata *
-res_to_bin_menuexitems (items, big_endian)
- const struct menuitem *items;
- int big_endian;
+res_to_bin_menuexitems (const struct menuitem *items, int big_endian)
{
struct bindata *first, **pp;
unsigned long length;
@@ -1997,9 +1927,7 @@ res_to_bin_menuexitems (items, big_endian)
to binary. */
static struct bindata *
-res_to_bin_rcdata (items, big_endian)
- const struct rcdata_item *items;
- int big_endian;
+res_to_bin_rcdata (const struct rcdata_item *items, int big_endian)
{
struct bindata *first, **pp;
const struct rcdata_item *ri;
@@ -2063,9 +1991,7 @@ res_to_bin_rcdata (items, big_endian)
/* Convert a stringtable resource to binary. */
static struct bindata *
-res_to_bin_stringtable (st, big_endian)
- const struct stringtable *st;
- int big_endian;
+res_to_bin_stringtable (const struct stringtable *st, int big_endian)
{
struct bindata *first, **pp;
int i;
@@ -2103,9 +2029,7 @@ res_to_bin_stringtable (st, big_endian)
returns exactly one bindata structure. */
static struct bindata *
-string_to_unicode_bin (s, big_endian)
- const char *s;
- int big_endian;
+string_to_unicode_bin (const char *s, int big_endian)
{
size_t len, i;
struct bindata *d;
@@ -2128,9 +2052,7 @@ string_to_unicode_bin (s, big_endian)
/* Convert a versioninfo resource to binary. */
static struct bindata *
-res_to_bin_versioninfo (versioninfo, big_endian)
- const struct versioninfo *versioninfo;
- int big_endian;
+res_to_bin_versioninfo (const struct versioninfo *versioninfo, int big_endian)
{
struct bindata *first, **pp;
unsigned long length;
@@ -2382,9 +2304,7 @@ res_to_bin_versioninfo (versioninfo, big_endian)
/* Convert a generic resource to binary. */
static struct bindata *
-res_to_bin_generic (length, data)
- unsigned long length;
- const unsigned char *data;
+res_to_bin_generic (unsigned long length, const unsigned char *data)
{
struct bindata *d;
diff --git a/binutils/rescoff.c b/binutils/rescoff.c
index e24402ba008..60122ded0f2 100644
--- a/binutils/rescoff.c
+++ b/binutils/rescoff.c
@@ -1,5 +1,6 @@
/* rescoff.c -- read and write resources in Windows COFF files.
- Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2003
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -102,20 +103,17 @@ struct extern_res_data
/* Local functions. */
-static void overrun PARAMS ((const struct coff_file_info *, const char *));
+static void overrun (const struct coff_file_info *, const char *);
static struct res_directory *read_coff_res_dir
- PARAMS ((const bfd_byte *, const struct coff_file_info *,
- const struct res_id *, int));
+ (const bfd_byte *, const struct coff_file_info *,
+ const struct res_id *, int);
static struct res_resource *read_coff_data_entry
- PARAMS ((const bfd_byte *, const struct coff_file_info *,
- const struct res_id *));
+ (const bfd_byte *, const struct coff_file_info *, const struct res_id *);
/* Read the resources in a COFF file. */
struct res_directory *
-read_coff_rsrc (filename, target)
- const char *filename;
- const char *target;
+read_coff_rsrc (const char *filename, const char *target)
{
bfd *abfd;
char **matching;
@@ -171,9 +169,7 @@ read_coff_rsrc (filename, target)
/* Give an error if we are out of bounds. */
static void
-overrun (finfo, msg)
- const struct coff_file_info *finfo;
- const char *msg;
+overrun (const struct coff_file_info *finfo, const char *msg)
{
fatal (_("%s: %s: address out of bounds"), finfo->filename, msg);
}
@@ -181,11 +177,8 @@ overrun (finfo, msg)
/* Read a resource directory. */
static struct res_directory *
-read_coff_res_dir (data, finfo, type, level)
- const bfd_byte *data;
- const struct coff_file_info *finfo;
- const struct res_id *type;
- int level;
+read_coff_res_dir (const bfd_byte *data, const struct coff_file_info *finfo,
+ const struct res_id *type, int level)
{
const struct extern_res_directory *erd;
struct res_directory *rd;
@@ -314,10 +307,7 @@ read_coff_res_dir (data, finfo, type, level)
/* Read a resource data entry. */
static struct res_resource *
-read_coff_data_entry (data, finfo, type)
- const bfd_byte *data;
- const struct coff_file_info *finfo;
- const struct res_id *type;
+read_coff_data_entry (const bfd_byte *data, const struct coff_file_info *finfo, const struct res_id *type)
{
const struct extern_res_data *erd;
struct res_resource *r;
@@ -408,12 +398,12 @@ struct coff_write_info
((cwi->big_endian) ? bfd_putb32 ((v), (s)) : bfd_putl32 ((v), (s)))
static void coff_bin_sizes
- PARAMS ((const struct res_directory *, struct coff_write_info *));
-static unsigned char *coff_alloc PARAMS ((struct bindata_build *, size_t));
+ (const struct res_directory *, struct coff_write_info *);
+static unsigned char *coff_alloc (struct bindata_build *, size_t);
static void coff_to_bin
- PARAMS ((const struct res_directory *, struct coff_write_info *));
+ (const struct res_directory *, struct coff_write_info *);
static void coff_res_to_bin
- PARAMS ((const struct res_resource *, struct coff_write_info *));
+ (const struct res_resource *, struct coff_write_info *);
/* Write resources to a COFF file. RESOURCES should already be
sorted.
@@ -424,10 +414,8 @@ static void coff_res_to_bin
adding the .rsrc section. */
void
-write_coff_file (filename, target, resources)
- const char *filename;
- const char *target;
- const struct res_directory *resources;
+write_coff_file (const char *filename, const char *target,
+ const struct res_directory *resources)
{
bfd *abfd;
asection *sec;
@@ -584,9 +572,8 @@ write_coff_file (filename, target, resources)
entries. This updates fields in CWI. */
static void
-coff_bin_sizes (resdir, cwi)
- const struct res_directory *resdir;
- struct coff_write_info *cwi;
+coff_bin_sizes (const struct res_directory *resdir,
+ struct coff_write_info *cwi)
{
const struct res_entry *re;
@@ -609,9 +596,7 @@ coff_bin_sizes (resdir, cwi)
/* Allocate data for a particular list. */
static unsigned char *
-coff_alloc (bb, size)
- struct bindata_build *bb;
- size_t size;
+coff_alloc (struct bindata_build *bb, size_t size)
{
struct bindata *d;
@@ -634,9 +619,7 @@ coff_alloc (bb, size)
/* Convert the resource directory RESDIR to binary. */
static void
-coff_to_bin (resdir, cwi)
- const struct res_directory *resdir;
- struct coff_write_info *cwi;
+coff_to_bin (const struct res_directory *resdir, struct coff_write_info *cwi)
{
struct extern_res_directory *erd;
int ci, cn;
@@ -713,9 +696,7 @@ coff_to_bin (resdir, cwi)
/* Convert the resource RES to binary. */
static void
-coff_res_to_bin (res, cwi)
- const struct res_resource *res;
- struct coff_write_info *cwi;
+coff_res_to_bin (const struct res_resource *res, struct coff_write_info *cwi)
{
arelent *r;
struct extern_res_data *erd;
diff --git a/binutils/resrc.c b/binutils/resrc.c
index cced3f20113..2613b396d5e 100644
--- a/binutils/resrc.c
+++ b/binutils/resrc.c
@@ -161,24 +161,21 @@ static int icons;
/* Local functions. */
-static int run_cmd PARAMS ((char *, const char *));
-static FILE *open_input_stream PARAMS ((char *));
-static FILE *look_for_default PARAMS ((char *, const char *, int,
- const char *, const char *));
-static void close_input_stream PARAMS ((void));
-static void unexpected_eof PARAMS ((const char *));
-static int get_word PARAMS ((FILE *, const char *));
-static unsigned long get_long PARAMS ((FILE *, const char *));
-static void get_data
- PARAMS ((FILE *, unsigned char *, unsigned long, const char *));
-static void define_fontdirs PARAMS ((void));
+static int run_cmd (char *, const char *);
+static FILE *open_input_stream (char *);
+static FILE *look_for_default
+ (char *, const char *, int, const char *, const char *);
+static void close_input_stream (void);
+static void unexpected_eof (const char *);
+static int get_word (FILE *, const char *);
+static unsigned long get_long (FILE *, const char *);
+static void get_data (FILE *, unsigned char *, unsigned long, const char *);
+static void define_fontdirs (void);
/* Run `cmd' and redirect the output to `redir'. */
static int
-run_cmd (cmd, redir)
- char *cmd;
- const char *redir;
+run_cmd (char *cmd, const char *redir)
{
char *s;
int pid, wait_status, retcode;
@@ -292,8 +289,7 @@ run_cmd (cmd, redir)
}
static FILE *
-open_input_stream (cmd)
- char *cmd;
+open_input_stream (char *cmd)
{
if (istream_type == ISTREAM_FILE)
{
@@ -333,12 +329,8 @@ open_input_stream (cmd)
/* look for the preprocessor program */
static FILE *
-look_for_default (cmd, prefix, end_prefix, preprocargs, filename)
- char *cmd;
- const char *prefix;
- int end_prefix;
- const char *preprocargs;
- const char *filename;
+look_for_default (char *cmd, const char *prefix, int end_prefix,
+ const char *preprocargs, const char *filename)
{
char *space;
int found;
@@ -386,12 +378,8 @@ look_for_default (cmd, prefix, end_prefix, preprocargs, filename)
/* Read an rc file. */
struct res_directory *
-read_rc_file (filename, preprocessor, preprocargs, language, use_temp_file)
- const char *filename;
- const char *preprocessor;
- const char *preprocargs;
- int language;
- int use_temp_file;
+read_rc_file (const char *filename, const char *preprocessor,
+ const char *preprocargs, int language, int use_temp_file)
{
char *cmd;
@@ -497,7 +485,7 @@ read_rc_file (filename, preprocessor, preprocargs, language, use_temp_file)
/* Close the input stream if it is open. */
static void
-close_input_stream ()
+close_input_stream (void)
{
if (istream_type == ISTREAM_FILE)
{
@@ -527,8 +515,7 @@ close_input_stream ()
/* Report an error while reading an rc file. */
void
-yyerror (msg)
- const char *msg;
+yyerror (const char *msg)
{
fatal ("%s:%d: %s", rc_filename, rc_lineno, msg);
}
@@ -536,8 +523,7 @@ yyerror (msg)
/* Issue a warning while reading an rc file. */
void
-rcparse_warning (msg)
- const char *msg;
+rcparse_warning (const char *msg)
{
fprintf (stderr, _("%s:%d: %s\n"), rc_filename, rc_lineno, msg);
}
@@ -545,8 +531,7 @@ rcparse_warning (msg)
/* Die if we get an unexpected end of file. */
static void
-unexpected_eof (msg)
- const char *msg;
+unexpected_eof (const char *msg)
{
fatal (_("%s: unexpected EOF"), msg);
}
@@ -555,9 +540,7 @@ unexpected_eof (msg)
endian. */
static int
-get_word (e, msg)
- FILE *e;
- const char *msg;
+get_word (FILE *e, const char *msg)
{
int b1, b2;
@@ -572,9 +555,7 @@ get_word (e, msg)
endian. */
static unsigned long
-get_long (e, msg)
- FILE *e;
- const char *msg;
+get_long (FILE *e, const char *msg)
{
int b1, b2, b3, b4;
@@ -593,11 +574,7 @@ get_long (e, msg)
/* Read data from a file. This is a wrapper to do error checking. */
static void
-get_data (e, p, c, msg)
- FILE *e;
- unsigned char *p;
- unsigned long c;
- const char *msg;
+get_data (FILE *e, unsigned char *p, unsigned long c, const char *msg)
{
unsigned long got;
@@ -611,10 +588,8 @@ get_data (e, p, c, msg)
/* Define an accelerator resource. */
void
-define_accelerator (id, resinfo, data)
- struct res_id id;
- const struct res_res_info *resinfo;
- struct accelerator *data;
+define_accelerator (struct res_id id, const struct res_res_info *resinfo,
+ struct accelerator *data)
{
struct res_resource *r;
@@ -632,10 +607,8 @@ define_accelerator (id, resinfo, data)
#define BITMAP_SKIP (14)
void
-define_bitmap (id, resinfo, filename)
- struct res_id id;
- const struct res_res_info *resinfo;
- const char *filename;
+define_bitmap (struct res_id id, const struct res_res_info *resinfo,
+ const char *filename)
{
FILE *e;
char *real_filename;
@@ -676,10 +649,8 @@ define_bitmap (id, resinfo, filename)
select one of the actual cursors. */
void
-define_cursor (id, resinfo, filename)
- struct res_id id;
- const struct res_res_info *resinfo;
- const char *filename;
+define_cursor (struct res_id id, const struct res_res_info *resinfo,
+ const char *filename)
{
FILE *e;
char *real_filename;
@@ -796,10 +767,8 @@ define_cursor (id, resinfo, filename)
/* Define a dialog resource. */
void
-define_dialog (id, resinfo, dialog)
- struct res_id id;
- const struct res_res_info *resinfo;
- const struct dialog *dialog;
+define_dialog (struct res_id id, const struct res_res_info *resinfo,
+ const struct dialog *dialog)
{
struct dialog *copy;
struct res_resource *r;
@@ -818,16 +787,10 @@ define_dialog (id, resinfo, dialog)
merely allocates and fills in a structure. */
struct dialog_control *
-define_control (iid, id, x, y, width, height, class, style, exstyle)
- const struct res_id iid;
- unsigned long id;
- unsigned long x;
- unsigned long y;
- unsigned long width;
- unsigned long height;
- unsigned long class;
- unsigned long style;
- unsigned long exstyle;
+define_control (const struct res_id iid, unsigned long id, unsigned long x,
+ unsigned long y, unsigned long width, unsigned long height,
+ unsigned long class, unsigned long style,
+ unsigned long exstyle)
{
struct dialog_control *n;
@@ -850,16 +813,10 @@ define_control (iid, id, x, y, width, height, class, style, exstyle)
}
struct dialog_control *
-define_icon_control (iid, id, x, y, style, exstyle, help, data, ex)
- struct res_id iid;
- unsigned long id;
- unsigned long x;
- unsigned long y;
- unsigned long style;
- unsigned long exstyle;
- unsigned long help;
- struct rcdata_item *data;
- struct dialog_ex *ex;
+define_icon_control (struct res_id iid, unsigned long id, unsigned long x,
+ unsigned long y, unsigned long style,
+ unsigned long exstyle, unsigned long help,
+ struct rcdata_item *data, struct dialog_ex *ex)
{
struct dialog_control *n;
struct res_id tid;
@@ -882,10 +839,8 @@ define_icon_control (iid, id, x, y, style, exstyle, help, data, ex)
/* Define a font resource. */
void
-define_font (id, resinfo, filename)
- struct res_id id;
- const struct res_res_info *resinfo;
- const char *filename;
+define_font (struct res_id id, const struct res_res_info *resinfo,
+ const char *filename)
{
FILE *e;
char *real_filename;
@@ -970,7 +925,7 @@ define_font (id, resinfo, filename)
file has been parsed, if any font resources were seen. */
static void
-define_fontdirs ()
+define_fontdirs (void)
{
struct res_resource *r;
struct res_id id;
@@ -992,10 +947,8 @@ define_fontdirs ()
select one of the actual icon bitmaps. */
void
-define_icon (id, resinfo, filename)
- struct res_id id;
- const struct res_res_info *resinfo;
- const char *filename;
+define_icon (struct res_id id, const struct res_res_info *resinfo,
+ const char *filename)
{
FILE *e;
char *real_filename;
@@ -1111,10 +1064,8 @@ define_icon (id, resinfo, filename)
/* Define a menu resource. */
void
-define_menu (id, resinfo, menuitems)
- struct res_id id;
- const struct res_res_info *resinfo;
- struct menuitem *menuitems;
+define_menu (struct res_id id, const struct res_res_info *resinfo,
+ struct menuitem *menuitems)
{
struct menu *m;
struct res_resource *r;
@@ -1133,13 +1084,9 @@ define_menu (id, resinfo, menuitems)
allocates and fills in a structure. */
struct menuitem *
-define_menuitem (text, menuid, type, state, help, menuitems)
- const char *text;
- int menuid;
- unsigned long type;
- unsigned long state;
- unsigned long help;
- struct menuitem *menuitems;
+define_menuitem (const char *text, int menuid, unsigned long type,
+ unsigned long state, unsigned long help,
+ struct menuitem *menuitems)
{
struct menuitem *mi;
@@ -1160,10 +1107,8 @@ define_menuitem (text, menuid, type, state, help, menuitems)
/* Define a messagetable resource. */
void
-define_messagetable (id, resinfo, filename)
- struct res_id id;
- const struct res_res_info *resinfo;
- const char *filename;
+define_messagetable (struct res_id id, const struct res_res_info *resinfo,
+ const char *filename)
{
FILE *e;
char *real_filename;
@@ -1197,10 +1142,8 @@ define_messagetable (id, resinfo, filename)
/* Define an rcdata resource. */
void
-define_rcdata (id, resinfo, data)
- struct res_id id;
- const struct res_res_info *resinfo;
- struct rcdata_item *data;
+define_rcdata (struct res_id id, const struct res_res_info *resinfo,
+ struct rcdata_item *data)
{
struct res_resource *r;
@@ -1214,9 +1157,7 @@ define_rcdata (id, resinfo, data)
/* Create an rcdata item holding a string. */
struct rcdata_item *
-define_rcdata_string (string, len)
- const char *string;
- unsigned long len;
+define_rcdata_string (const char *string, unsigned long len)
{
struct rcdata_item *ri;
char *s;
@@ -1235,9 +1176,7 @@ define_rcdata_string (string, len)
/* Create an rcdata item holding a number. */
struct rcdata_item *
-define_rcdata_number (val, dword)
- unsigned long val;
- int dword;
+define_rcdata_number (unsigned long val, int dword)
{
struct rcdata_item *ri;
@@ -1253,10 +1192,8 @@ define_rcdata_number (val, dword)
which appears in a STRINGTABLE statement. */
void
-define_stringtable (resinfo, stringid, string)
- const struct res_res_info *resinfo;
- unsigned long stringid;
- const char *string;
+define_stringtable (const struct res_res_info *resinfo,
+ unsigned long stringid, const char *string)
{
struct res_id id;
struct res_resource *r;
@@ -1290,11 +1227,9 @@ define_stringtable (resinfo, stringid, string)
/* Define a user data resource where the data is in the rc file. */
void
-define_user_data (id, type, resinfo, data)
- struct res_id id;
- struct res_id type;
- const struct res_res_info *resinfo;
- struct rcdata_item *data;
+define_user_data (struct res_id id, struct res_id type,
+ const struct res_res_info *resinfo,
+ struct rcdata_item *data)
{
struct res_id ids[3];
struct res_resource *r;
@@ -1313,11 +1248,8 @@ define_user_data (id, type, resinfo, data)
/* Define a user data resource where the data is in a file. */
void
-define_user_file (id, type, resinfo, filename)
- struct res_id id;
- struct res_id type;
- const struct res_res_info *resinfo;
- const char *filename;
+define_user_file (struct res_id id, struct res_id type,
+ const struct res_res_info *resinfo, const char *filename)
{
FILE *e;
char *real_filename;
@@ -1358,11 +1290,9 @@ define_user_file (id, type, resinfo, filename)
/* Define a versioninfo resource. */
void
-define_versioninfo (id, language, fixedverinfo, verinfo)
- struct res_id id;
- int language;
- struct fixed_versioninfo *fixedverinfo;
- struct ver_info *verinfo;
+define_versioninfo (struct res_id id, int language,
+ struct fixed_versioninfo *fixedverinfo,
+ struct ver_info *verinfo)
{
struct res_resource *r;
@@ -1378,10 +1308,8 @@ define_versioninfo (id, language, fixedverinfo, verinfo)
/* Add string version info to a list of version information. */
struct ver_info *
-append_ver_stringfileinfo (verinfo, language, strings)
- struct ver_info *verinfo;
- const char *language;
- struct ver_stringinfo *strings;
+append_ver_stringfileinfo (struct ver_info *verinfo, const char *language,
+ struct ver_stringinfo *strings)
{
struct ver_info *vi, **pp;
@@ -1401,10 +1329,8 @@ append_ver_stringfileinfo (verinfo, language, strings)
/* Add variable version info to a list of version information. */
struct ver_info *
-append_ver_varfileinfo (verinfo, key, var)
- struct ver_info *verinfo;
- const char *key;
- struct ver_varinfo *var;
+append_ver_varfileinfo (struct ver_info *verinfo, const char *key,
+ struct ver_varinfo *var)
{
struct ver_info *vi, **pp;
@@ -1424,10 +1350,8 @@ append_ver_varfileinfo (verinfo, key, var)
/* Append version string information to a list. */
struct ver_stringinfo *
-append_verval (strings, key, value)
- struct ver_stringinfo *strings;
- const char *key;
- const char *value;
+append_verval (struct ver_stringinfo *strings, const char *key,
+ const char *value)
{
struct ver_stringinfo *vs, **pp;
@@ -1446,10 +1370,8 @@ append_verval (strings, key, value)
/* Append version variable information to a list. */
struct ver_varinfo *
-append_vertrans (var, language, charset)
- struct ver_varinfo *var;
- unsigned long language;
- unsigned long charset;
+append_vertrans (struct ver_varinfo *var, unsigned long language,
+ unsigned long charset)
{
struct ver_varinfo *vv, **pp;
@@ -1467,42 +1389,35 @@ append_vertrans (var, language, charset)
/* Local functions used to write out an rc file. */
-static void indent PARAMS ((FILE *, int));
+static void indent (FILE *, int);
static void write_rc_directory
- PARAMS ((FILE *, const struct res_directory *, const struct res_id *,
- const struct res_id *, int *, int));
+ (FILE *, const struct res_directory *, const struct res_id *,
+ const struct res_id *, int *, int);
static void write_rc_subdir
- PARAMS ((FILE *, const struct res_entry *, const struct res_id *,
- const struct res_id *, int *, int));
+ (FILE *, const struct res_entry *, const struct res_id *,
+ const struct res_id *, int *, int);
static void write_rc_resource
- PARAMS ((FILE *, const struct res_id *, const struct res_id *,
- const struct res_resource *, int *));
-static void write_rc_accelerators
- PARAMS ((FILE *, const struct accelerator *));
-static void write_rc_cursor PARAMS ((FILE *, const struct cursor *));
-static void write_rc_group_cursor
- PARAMS ((FILE *, const struct group_cursor *));
-static void write_rc_dialog PARAMS ((FILE *, const struct dialog *));
-static void write_rc_dialog_control
- PARAMS ((FILE *, const struct dialog_control *));
-static void write_rc_fontdir PARAMS ((FILE *, const struct fontdir *));
-static void write_rc_group_icon PARAMS ((FILE *, const struct group_icon *));
-static void write_rc_menu PARAMS ((FILE *, const struct menu *, int));
-static void write_rc_menuitems
- PARAMS ((FILE *, const struct menuitem *, int, int));
-static void write_rc_rcdata PARAMS ((FILE *, const struct rcdata_item *, int));
+ (FILE *, const struct res_id *, const struct res_id *,
+ const struct res_resource *, int *);
+static void write_rc_accelerators (FILE *, const struct accelerator *);
+static void write_rc_cursor (FILE *, const struct cursor *);
+static void write_rc_group_cursor (FILE *, const struct group_cursor *);
+static void write_rc_dialog (FILE *, const struct dialog *);
+static void write_rc_dialog_control (FILE *, const struct dialog_control *);
+static void write_rc_fontdir (FILE *, const struct fontdir *);
+static void write_rc_group_icon (FILE *, const struct group_icon *);
+static void write_rc_menu (FILE *, const struct menu *, int);
+static void write_rc_menuitems (FILE *, const struct menuitem *, int, int);
+static void write_rc_rcdata (FILE *, const struct rcdata_item *, int);
static void write_rc_stringtable
- PARAMS ((FILE *, const struct res_id *, const struct stringtable *));
-static void write_rc_versioninfo PARAMS ((FILE *, const struct versioninfo *));
-static void write_rc_filedata
- PARAMS ((FILE *, unsigned long, const unsigned char *));
+ (FILE *, const struct res_id *, const struct stringtable *);
+static void write_rc_versioninfo (FILE *, const struct versioninfo *);
+static void write_rc_filedata (FILE *, unsigned long, const unsigned char *);
/* Indent a given number of spaces. */
static void
-indent (e, c)
- FILE *e;
- int c;
+indent (FILE *e, int c)
{
int i;
@@ -1521,9 +1436,7 @@ indent (e, c)
comes, this code will have to be fixed up. */
void
-write_rc_file (filename, resources)
- const char *filename;
- const struct res_directory *resources;
+write_rc_file (const char *filename, const struct res_directory *resources)
{
FILE *e;
int language;
@@ -1549,13 +1462,9 @@ write_rc_file (filename, resources)
language. LEVEL is the level in the tree. */
static void
-write_rc_directory (e, rd, type, name, language, level)
- FILE *e;
- const struct res_directory *rd;
- const struct res_id *type;
- const struct res_id *name;
- int *language;
- int level;
+write_rc_directory (FILE *e, const struct res_directory *rd,
+ const struct res_id *type, const struct res_id *name,
+ int *language, int level)
{
const struct res_entry *re;
@@ -1633,13 +1542,9 @@ write_rc_directory (e, rd, type, name, language, level)
LEVEL is the level in the tree. */
static void
-write_rc_subdir (e, re, type, name, language, level)
- FILE *e;
- const struct res_entry *re;
- const struct res_id *type;
- const struct res_id *name;
- int *language;
- int level;
+write_rc_subdir (FILE *e, const struct res_entry *re,
+ const struct res_id *type, const struct res_id *name,
+ int *language, int level)
{
fprintf (e, "\n");
switch (level)
@@ -1712,12 +1617,9 @@ write_rc_subdir (e, re, type, name, language, level)
language. */
static void
-write_rc_resource (e, type, name, res, language)
- FILE *e;
- const struct res_id *type;
- const struct res_id *name;
- const struct res_resource *res;
- int *language;
+write_rc_resource (FILE *e, const struct res_id *type,
+ const struct res_id *name, const struct res_resource *res,
+ int *language)
{
const char *s;
int rt;
@@ -1965,9 +1867,7 @@ write_rc_resource (e, type, name, res, language)
/* Write out accelerator information. */
static void
-write_rc_accelerators (e, accelerators)
- FILE *e;
- const struct accelerator *accelerators;
+write_rc_accelerators (FILE *e, const struct accelerator *accelerators)
{
const struct accelerator *acc;
@@ -2018,9 +1918,7 @@ write_rc_accelerators (e, accelerators)
file, which the rc file would include. */
static void
-write_rc_cursor (e, cursor)
- FILE *e;
- const struct cursor *cursor;
+write_rc_cursor (FILE *e, const struct cursor *cursor)
{
fprintf (e, "// Hotspot: x: %d; y: %d\n", cursor->xhotspot,
cursor->yhotspot);
@@ -2031,9 +1929,7 @@ write_rc_cursor (e, cursor)
cursor data. */
static void
-write_rc_group_cursor (e, group_cursor)
- FILE *e;
- const struct group_cursor *group_cursor;
+write_rc_group_cursor (FILE *e, const struct group_cursor *group_cursor)
{
const struct group_cursor *gc;
@@ -2049,9 +1945,7 @@ write_rc_group_cursor (e, group_cursor)
/* Write dialog data. */
static void
-write_rc_dialog (e, dialog)
- FILE *e;
- const struct dialog *dialog;
+write_rc_dialog (FILE *e, const struct dialog *dialog)
{
const struct dialog_control *control;
@@ -2144,9 +2038,7 @@ static const struct control_info control_info[] =
/* Write a dialog control. */
static void
-write_rc_dialog_control (e, control)
- FILE *e;
- const struct dialog_control *control;
+write_rc_dialog_control (FILE *e, const struct dialog_control *control)
{
const struct control_info *ci;
@@ -2217,9 +2109,7 @@ write_rc_dialog_control (e, control)
the font data. */
static void
-write_rc_fontdir (e, fontdir)
- FILE *e;
- const struct fontdir *fontdir;
+write_rc_fontdir (FILE *e, const struct fontdir *fontdir)
{
const struct fontdir *fc;
@@ -2234,9 +2124,7 @@ write_rc_fontdir (e, fontdir)
icon data. */
static void
-write_rc_group_icon (e, group_icon)
- FILE *e;
- const struct group_icon *group_icon;
+write_rc_group_icon (FILE *e, const struct group_icon *group_icon)
{
const struct group_icon *gi;
@@ -2252,10 +2140,7 @@ write_rc_group_icon (e, group_icon)
/* Write out a menu resource. */
static void
-write_rc_menu (e, menu, menuex)
- FILE *e;
- const struct menu *menu;
- int menuex;
+write_rc_menu (FILE *e, const struct menu *menu, int menuex)
{
if (menu->help != 0)
fprintf (e, "// Help ID: %lu\n", menu->help);
@@ -2265,11 +2150,8 @@ write_rc_menu (e, menu, menuex)
/* Write out menuitems. */
static void
-write_rc_menuitems (e, menuitems, menuex, ind)
- FILE *e;
- const struct menuitem *menuitems;
- int menuex;
- int ind;
+write_rc_menuitems (FILE *e, const struct menuitem *menuitems, int menuex,
+ int ind)
{
const struct menuitem *mi;
@@ -2354,10 +2236,7 @@ write_rc_menuitems (e, menuitems, menuex, ind)
resources that need to print arbitrary data. */
static void
-write_rc_rcdata (e, rcdata, ind)
- FILE *e;
- const struct rcdata_item *rcdata;
- int ind;
+write_rc_rcdata (FILE *e, const struct rcdata_item *rcdata, int ind)
{
const struct rcdata_item *ri;
@@ -2522,10 +2401,8 @@ write_rc_rcdata (e, rcdata, ind)
/* Write out a stringtable resource. */
static void
-write_rc_stringtable (e, name, stringtable)
- FILE *e;
- const struct res_id *name;
- const struct stringtable *stringtable;
+write_rc_stringtable (FILE *e, const struct res_id *name,
+ const struct stringtable *stringtable)
{
unsigned long offset;
int i;
@@ -2558,9 +2435,7 @@ write_rc_stringtable (e, name, stringtable)
/* Write out a versioninfo resource. */
static void
-write_rc_versioninfo (e, versioninfo)
- FILE *e;
- const struct versioninfo *versioninfo;
+write_rc_versioninfo (FILE *e, const struct versioninfo *versioninfo)
{
const struct fixed_versioninfo *f;
const struct ver_info *vi;
@@ -2649,10 +2524,7 @@ write_rc_versioninfo (e, versioninfo)
/* Write out data which would normally be read from a file. */
static void
-write_rc_filedata (e, length, data)
- FILE *e;
- unsigned long length;
- const unsigned char *data;
+write_rc_filedata (FILE *e, unsigned long length, const unsigned char *data)
{
unsigned long i;
diff --git a/binutils/size.c b/binutils/size.c
index 5e4c9ed6ba3..02f0972c247 100644
--- a/binutils/size.c
+++ b/binutils/size.c
@@ -1,6 +1,6 @@
/* size.c -- report size of various sections of an executable file.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002 Free Software Foundation, Inc.
+ 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -61,26 +61,24 @@ static char *target = NULL;
/* Static declarations. */
-static void usage PARAMS ((FILE *, int));
-static void display_file PARAMS ((char *));
-static void display_bfd PARAMS ((bfd *));
-static void display_archive PARAMS ((bfd *));
-static int size_number PARAMS ((bfd_size_type));
+static void usage (FILE *, int);
+static void display_file (char *);
+static void display_bfd (bfd *);
+static void display_archive (bfd *);
+static int size_number (bfd_size_type);
#if 0
-static void lprint_number PARAMS ((int, bfd_size_type));
+static void lprint_number (int, bfd_size_type);
#endif
-static void rprint_number PARAMS ((int, bfd_size_type));
-static void print_berkeley_format PARAMS ((bfd *));
-static void sysv_internal_sizer PARAMS ((bfd *, asection *, PTR));
-static void sysv_internal_printer PARAMS ((bfd *, asection *, PTR));
-static void print_sysv_format PARAMS ((bfd *));
-static void print_sizes PARAMS ((bfd * file));
-static void berkeley_sum PARAMS ((bfd *, sec_ptr, PTR));
+static void rprint_number (int, bfd_size_type);
+static void print_berkeley_format (bfd *);
+static void sysv_internal_sizer (bfd *, asection *, void *);
+static void sysv_internal_printer (bfd *, asection *, void *);
+static void print_sysv_format (bfd *);
+static void print_sizes (bfd * file);
+static void berkeley_sum (bfd *, sec_ptr, void *);
static void
-usage (stream, status)
- FILE *stream;
- int status;
+usage (FILE *stream, int status)
{
fprintf (stream, _("Usage: %s [option(s)] [file(s)]\n"), program_name);
fprintf (stream, _(" Displays the sizes of sections inside binary files\n"));
@@ -116,12 +114,10 @@ struct option long_options[] =
{0, no_argument, 0, 0}
};
-int main PARAMS ((int, char **));
+int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int temp;
int c;
@@ -260,8 +256,7 @@ main (argc, argv)
/* Display stats on file or archive member ABFD. */
static void
-display_bfd (abfd)
- bfd *abfd;
+display_bfd (bfd *abfd)
{
char **matching;
@@ -312,8 +307,7 @@ display_bfd (abfd)
}
static void
-display_archive (file)
- bfd *file;
+display_archive (bfd *file)
{
bfd *arfile = (bfd *) NULL;
bfd *last_arfile = (bfd *) NULL;
@@ -345,8 +339,7 @@ display_archive (file)
}
static void
-display_file (filename)
- char *filename;
+display_file (char *filename)
{
bfd *file = bfd_openr (filename, target);
@@ -373,8 +366,7 @@ display_file (filename)
/* This is what lexical functions are for. */
static int
-size_number (num)
- bfd_size_type num;
+size_number (bfd_size_type num)
{
char buffer[40];
@@ -391,9 +383,7 @@ size_number (num)
/* This is not used. */
static void
-lprint_number (width, num)
- int width;
- bfd_size_type num;
+lprint_number (int width, bfd_size_type num)
{
char buffer[40];
@@ -408,9 +398,7 @@ lprint_number (width, num)
#endif
static void
-rprint_number (width, num)
- int width;
- bfd_size_type num;
+rprint_number (int width, bfd_size_type num)
{
char buffer[40];
@@ -427,10 +415,8 @@ static bfd_size_type datasize;
static bfd_size_type textsize;
static void
-berkeley_sum (abfd, sec, ignore)
- bfd *abfd ATTRIBUTE_UNUSED;
- sec_ptr sec;
- PTR ignore ATTRIBUTE_UNUSED;
+berkeley_sum (bfd *abfd ATTRIBUTE_UNUSED, sec_ptr sec,
+ void *ignore ATTRIBUTE_UNUSED)
{
flagword flags;
bfd_size_type size;
@@ -449,8 +435,7 @@ berkeley_sum (abfd, sec, ignore)
}
static void
-print_berkeley_format (abfd)
- bfd *abfd;
+print_berkeley_format (bfd *abfd)
{
static int files_seen = 0;
bfd_size_type total;
@@ -459,7 +444,7 @@ print_berkeley_format (abfd)
datasize = 0;
textsize = 0;
- bfd_map_over_sections (abfd, berkeley_sum, (PTR) NULL);
+ bfd_map_over_sections (abfd, berkeley_sum, NULL);
if (files_seen++ == 0)
#if 0
@@ -502,10 +487,8 @@ int svi_vmalen = 0;
int svi_sizelen = 0;
static void
-sysv_internal_sizer (file, sec, ignore)
- bfd *file ATTRIBUTE_UNUSED;
- sec_ptr sec;
- PTR ignore ATTRIBUTE_UNUSED;
+sysv_internal_sizer (bfd *file ATTRIBUTE_UNUSED, sec_ptr sec,
+ void *ignore ATTRIBUTE_UNUSED)
{
bfd_size_type size = bfd_section_size (file, sec);
@@ -526,10 +509,8 @@ sysv_internal_sizer (file, sec, ignore)
}
static void
-sysv_internal_printer (file, sec, ignore)
- bfd *file ATTRIBUTE_UNUSED;
- sec_ptr sec;
- PTR ignore ATTRIBUTE_UNUSED;
+sysv_internal_printer (bfd *file ATTRIBUTE_UNUSED, sec_ptr sec,
+ void *ignore ATTRIBUTE_UNUSED)
{
bfd_size_type size = bfd_section_size (file, sec);
@@ -548,14 +529,13 @@ sysv_internal_printer (file, sec, ignore)
}
static void
-print_sysv_format (file)
- bfd *file;
+print_sysv_format (bfd *file)
{
/* Size all of the columns. */
svi_total = 0;
svi_maxvma = 0;
svi_namelen = 0;
- bfd_map_over_sections (file, sysv_internal_sizer, (PTR) NULL);
+ bfd_map_over_sections (file, sysv_internal_sizer, NULL);
svi_vmalen = size_number ((bfd_size_type)svi_maxvma);
if ((size_t) svi_vmalen < sizeof ("addr") - 1)
@@ -574,7 +554,7 @@ print_sysv_format (file)
printf (":\n%-*s %*s %*s\n", svi_namelen, "section",
svi_sizelen, "size", svi_vmalen, "addr");
- bfd_map_over_sections (file, sysv_internal_printer, (PTR) NULL);
+ bfd_map_over_sections (file, sysv_internal_printer, NULL);
printf ("%-*s ", svi_namelen, "Total");
rprint_number (svi_sizelen, svi_total);
@@ -582,8 +562,7 @@ print_sysv_format (file)
}
static void
-print_sizes (file)
- bfd *file;
+print_sizes (bfd *file)
{
if (berkeley_format)
print_berkeley_format (file);
diff --git a/binutils/srconv.c b/binutils/srconv.c
index a45437fd534..0ffa0588347 100644
--- a/binutils/srconv.c
+++ b/binutils/srconv.c
@@ -1,5 +1,5 @@
/* srconv.c -- Sysroff conversion program
- Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -42,61 +42,52 @@ static int addrsize;
static char *toolname;
static char **rnames;
-static int get_member_id PARAMS ((int));
-static int get_ordinary_id PARAMS ((int));
-static char *section_translate PARAMS ((char *));
-static char *strip_suffix PARAMS ((char *));
-static void checksum PARAMS ((FILE *, char *, int, int));
-static void writeINT PARAMS ((int, char *, int *, int, FILE *));
-static void writeBITS PARAMS ((int, char *, int *, int));
-static void writeBARRAY PARAMS ((barray, char *, int *, int, FILE *));
-static void writeCHARS PARAMS ((char *, char *, int *, int, FILE *));
-static void wr_tr PARAMS ((void));
-static void wr_un PARAMS ((struct coff_ofile *, struct coff_sfile *, int, int));
-static void wr_hd PARAMS ((struct coff_ofile *));
-static void wr_sh PARAMS ((struct coff_ofile *, struct coff_section *));
-static void wr_ob PARAMS ((struct coff_ofile *, struct coff_section *));
-static void wr_rl PARAMS ((struct coff_ofile *, struct coff_section *));
-static void wr_object_body PARAMS ((struct coff_ofile *));
+static int get_member_id (int);
+static int get_ordinary_id (int);
+static char *section_translate (char *);
+static char *strip_suffix (char *);
+static void checksum (FILE *, char *, int, int);
+static void writeINT (int, char *, int *, int, FILE *);
+static void writeBITS (int, char *, int *, int);
+static void writeBARRAY (barray, char *, int *, int, FILE *);
+static void writeCHARS (char *, char *, int *, int, FILE *);
+static void wr_tr (void);
+static void wr_un (struct coff_ofile *, struct coff_sfile *, int, int);
+static void wr_hd (struct coff_ofile *);
+static void wr_sh (struct coff_ofile *, struct coff_section *);
+static void wr_ob (struct coff_ofile *, struct coff_section *);
+static void wr_rl (struct coff_ofile *, struct coff_section *);
+static void wr_object_body (struct coff_ofile *);
static void wr_dps_start
- PARAMS ((struct coff_sfile *, struct coff_section *, struct coff_scope *,
- int, int));
-static void wr_dps_end
- PARAMS ((struct coff_section *, struct coff_scope *, int));
-static int *nints PARAMS ((int));
+ (struct coff_sfile *, struct coff_section *, struct coff_scope *, int, int);
+static void wr_dps_end (struct coff_section *, struct coff_scope *, int);
+static int *nints (int);
static void walk_tree_type_1
- PARAMS ((struct coff_sfile *, struct coff_symbol *, struct coff_type *,
- int));
+ (struct coff_sfile *, struct coff_symbol *, struct coff_type *, int);
static void walk_tree_type
- PARAMS ((struct coff_sfile *, struct coff_symbol *, struct coff_type *,
- int));
+ (struct coff_sfile *, struct coff_symbol *, struct coff_type *, int);
static void walk_tree_symbol
- PARAMS ((struct coff_sfile *, struct coff_section *,
- struct coff_symbol *, int));
+ (struct coff_sfile *, struct coff_section *, struct coff_symbol *, int);
static void walk_tree_scope
- PARAMS ((struct coff_section *, struct coff_sfile *, struct coff_scope *,
- int, int));
-static void walk_tree_sfile
- PARAMS ((struct coff_section *, struct coff_sfile *));
-static void wr_program_structure
- PARAMS ((struct coff_ofile *, struct coff_sfile *));
-static void wr_du PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
-static void wr_dus PARAMS ((struct coff_ofile *, struct coff_sfile *));
-static int find_base PARAMS ((struct coff_sfile *, struct coff_section *));
-static void wr_dln PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
-static void wr_globals
- PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
-static void wr_debug PARAMS ((struct coff_ofile *));
-static void wr_cs PARAMS ((void));
-static int wr_sc PARAMS ((struct coff_ofile *, struct coff_sfile *));
-static void wr_er PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
-static void wr_ed PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
-static void wr_unit_info PARAMS ((struct coff_ofile *));
-static void wr_module PARAMS ((struct coff_ofile *));
-static int align PARAMS ((int));
-static void prescan PARAMS ((struct coff_ofile *));
-static void show_usage PARAMS ((FILE *, int));
-extern int main PARAMS ((int, char **));
+ (struct coff_section *, struct coff_sfile *, struct coff_scope *, int, int);
+static void walk_tree_sfile (struct coff_section *, struct coff_sfile *);
+static void wr_program_structure (struct coff_ofile *, struct coff_sfile *);
+static void wr_du (struct coff_ofile *, struct coff_sfile *, int);
+static void wr_dus (struct coff_ofile *, struct coff_sfile *);
+static int find_base (struct coff_sfile *, struct coff_section *);
+static void wr_dln (struct coff_ofile *, struct coff_sfile *, int);
+static void wr_globals (struct coff_ofile *, struct coff_sfile *, int);
+static void wr_debug (struct coff_ofile *);
+static void wr_cs (void);
+static int wr_sc (struct coff_ofile *, struct coff_sfile *);
+static void wr_er (struct coff_ofile *, struct coff_sfile *, int);
+static void wr_ed (struct coff_ofile *, struct coff_sfile *, int);
+static void wr_unit_info (struct coff_ofile *);
+static void wr_module (struct coff_ofile *);
+static int align (int);
+static void prescan (struct coff_ofile *);
+static void show_usage (FILE *, int);
+extern int main (int, char **);
static FILE *file;
static bfd *abfd;
@@ -118,8 +109,7 @@ static int base1 = 0x18;
static int base2 = 0x2018;
static int
-get_member_id (x)
- int x;
+get_member_id (int x)
{
if (ids2[x])
return ids2[x];
@@ -129,8 +119,7 @@ get_member_id (x)
}
static int
-get_ordinary_id (x)
- int x;
+get_ordinary_id (int x)
{
if (ids1[x])
return ids1[x];
@@ -139,8 +128,7 @@ get_ordinary_id (x)
return ids1[x];
}
static char *
-section_translate (n)
- char *n;
+section_translate (char *n)
{
if (strcmp (n, ".text") == 0)
return "P";
@@ -155,8 +143,7 @@ section_translate (n)
static
char *
-strip_suffix (name)
- char *name;
+strip_suffix (char *name)
{
int i;
char *res;
@@ -171,11 +158,7 @@ strip_suffix (name)
/* IT LEN stuff CS */
static void
-checksum (file, ptr, size, code)
- FILE *file;
- char *ptr;
- int size;
- int code;
+checksum (FILE *file, char *ptr, int size, int code)
{
int j;
int last;
@@ -198,12 +181,7 @@ checksum (file, ptr, size, code)
static void
-writeINT (n, ptr, idx, size, file)
- int n;
- char *ptr;
- int *idx;
- int size;
- FILE *file;
+writeINT (int n, char *ptr, int *idx, int size, FILE *file)
{
int byte = *idx / 8;
@@ -244,11 +222,7 @@ writeINT (n, ptr, idx, size, file)
}
static void
-writeBITS (val, ptr, idx, size)
- int val;
- char *ptr;
- int *idx;
- int size;
+writeBITS (int val, char *ptr, int *idx, int size)
{
int byte = *idx / 8;
int bit = *idx % 8;
@@ -265,12 +239,8 @@ writeBITS (val, ptr, idx, size)
}
static void
-writeBARRAY (data, ptr, idx, size, file)
- barray data;
- char *ptr;
- int *idx;
- int size ATTRIBUTE_UNUSED;
- FILE *file;
+writeBARRAY (barray data, char *ptr, int *idx, int size ATTRIBUTE_UNUSED,
+ FILE *file)
{
int i;
@@ -280,12 +250,7 @@ writeBARRAY (data, ptr, idx, size, file)
}
static void
-writeCHARS (string, ptr, idx, size, file)
- char *string;
- char *ptr;
- int *idx;
- int size;
- FILE *file;
+writeCHARS (char *string, char *ptr, int *idx, int size, FILE *file)
{
int i = *idx / 8;
@@ -324,7 +289,7 @@ static char *rname_h8300[] =
};
static void
-wr_tr ()
+wr_tr (void)
{
/* The TR block is not normal - it doesn't have any contents. */
@@ -338,11 +303,8 @@ wr_tr ()
}
static void
-wr_un (ptr, sfile, first, nsecs)
- struct coff_ofile *ptr;
- struct coff_sfile *sfile;
- int first;
- int nsecs ATTRIBUTE_UNUSED;
+wr_un (struct coff_ofile *ptr, struct coff_sfile *sfile, int first,
+ int nsecs ATTRIBUTE_UNUSED)
{
struct IT_un un;
struct coff_symbol *s;
@@ -387,8 +349,7 @@ wr_un (ptr, sfile, first, nsecs)
}
static void
-wr_hd (p)
- struct coff_ofile *p;
+wr_hd (struct coff_ofile *p)
{
struct IT_hd hd;
@@ -475,9 +436,7 @@ wr_hd (p)
static void
-wr_sh (p, sec)
- struct coff_ofile *p ATTRIBUTE_UNUSED;
- struct coff_section *sec;
+wr_sh (struct coff_ofile *p ATTRIBUTE_UNUSED, struct coff_section *sec)
{
struct IT_sh sh;
sh.unit = 0;
@@ -490,9 +449,7 @@ wr_sh (p, sec)
static void
-wr_ob (p, section)
- struct coff_ofile *p ATTRIBUTE_UNUSED;
- struct coff_section *section;
+wr_ob (struct coff_ofile *p ATTRIBUTE_UNUSED, struct coff_section *section)
{
bfd_size_type i;
int first = 1;
@@ -553,9 +510,7 @@ wr_ob (p, section)
}
static void
-wr_rl (ptr, sec)
- struct coff_ofile *ptr ATTRIBUTE_UNUSED;
- struct coff_section *sec;
+wr_rl (struct coff_ofile *ptr ATTRIBUTE_UNUSED, struct coff_section *sec)
{
int nr = sec->nrelocs;
int i;
@@ -613,8 +568,7 @@ wr_rl (ptr, sec)
}
static void
-wr_object_body (p)
- struct coff_ofile *p;
+wr_object_body (struct coff_ofile *p)
{
int i;
@@ -627,12 +581,9 @@ wr_object_body (p)
}
static void
-wr_dps_start (sfile, section, scope, type, nest)
- struct coff_sfile *sfile;
- struct coff_section *section ATTRIBUTE_UNUSED;
- struct coff_scope *scope;
- int type;
- int nest;
+wr_dps_start (struct coff_sfile *sfile,
+ struct coff_section *section ATTRIBUTE_UNUSED,
+ struct coff_scope *scope, int type, int nest)
{
struct IT_dps dps;
@@ -667,10 +618,8 @@ wr_dps_start (sfile, section, scope, type, nest)
}
static void
-wr_dps_end (section, scope, type)
- struct coff_section *section ATTRIBUTE_UNUSED;
- struct coff_scope *scope ATTRIBUTE_UNUSED;
- int type;
+wr_dps_end (struct coff_section *section ATTRIBUTE_UNUSED,
+ struct coff_scope *scope ATTRIBUTE_UNUSED, int type)
{
struct IT_dps dps;
@@ -680,18 +629,14 @@ wr_dps_end (section, scope, type)
}
static int *
-nints (x)
- int x;
+nints (int x)
{
return (int *) (xcalloc (sizeof (int), x));
}
static void
-walk_tree_type_1 (sfile, symbol, type, nest)
- struct coff_sfile *sfile;
- struct coff_symbol *symbol;
- struct coff_type *type;
- int nest;
+walk_tree_type_1 (struct coff_sfile *sfile, struct coff_symbol *symbol,
+ struct coff_type *type, int nest)
{
switch (type->type)
{
@@ -962,11 +907,8 @@ walk_tree_type_1 (sfile, symbol, type, nest)
*/
static void
-walk_tree_type (sfile, symbol, type, nest)
- struct coff_sfile *sfile;
- struct coff_symbol *symbol;
- struct coff_type *type;
- int nest;
+walk_tree_type (struct coff_sfile *sfile, struct coff_symbol *symbol,
+ struct coff_type *type, int nest)
{
if (symbol->type->type == coff_function_type)
{
@@ -1012,11 +954,7 @@ walk_tree_type (sfile, symbol, type, nest)
}
static void
-walk_tree_symbol (sfile, section, symbol, nest)
- struct coff_sfile *sfile;
- struct coff_section *section ATTRIBUTE_UNUSED;
- struct coff_symbol *symbol;
- int nest;
+walk_tree_symbol (struct coff_sfile *sfile, struct coff_section *section ATTRIBUTE_UNUSED, struct coff_symbol *symbol, int nest)
{
struct IT_dsy dsy;
@@ -1230,12 +1168,7 @@ walk_tree_symbol (sfile, section, symbol, nest)
}
static void
-walk_tree_scope (section, sfile, scope, nest, type)
- struct coff_section *section;
- struct coff_sfile *sfile;
- struct coff_scope *scope;
- int nest;
- int type;
+walk_tree_scope (struct coff_section *section, struct coff_sfile *sfile, struct coff_scope *scope, int nest, int type)
{
struct coff_symbol *vars;
struct coff_scope *child;
@@ -1259,26 +1192,19 @@ walk_tree_scope (section, sfile, scope, nest, type)
}
static void
-walk_tree_sfile (section, sfile)
- struct coff_section *section;
- struct coff_sfile *sfile;
+walk_tree_sfile (struct coff_section *section, struct coff_sfile *sfile)
{
walk_tree_scope (section, sfile, sfile->scope, 0, BLOCK_TYPE_COMPUNIT);
}
static void
-wr_program_structure (p, sfile)
- struct coff_ofile *p;
- struct coff_sfile *sfile;
+wr_program_structure (struct coff_ofile *p, struct coff_sfile *sfile)
{
walk_tree_sfile (p->sections + 4, sfile);
}
static void
-wr_du (p, sfile, n)
- struct coff_ofile *p;
- struct coff_sfile *sfile;
- int n;
+wr_du (struct coff_ofile *p, struct coff_sfile *sfile, int n)
{
struct IT_du du;
int lim;
@@ -1391,9 +1317,7 @@ wr_du (p, sfile, n)
}
static void
-wr_dus (p, sfile)
- struct coff_ofile *p ATTRIBUTE_UNUSED;
- struct coff_sfile *sfile;
+wr_dus (struct coff_ofile *p ATTRIBUTE_UNUSED, struct coff_sfile *sfile)
{
struct IT_dus dus;
@@ -1429,19 +1353,14 @@ wr_dus (p, sfile)
.text section for the output file. */
static int
-find_base (sfile, section)
- struct coff_sfile *sfile;
- struct coff_section *section;
+find_base (struct coff_sfile *sfile, struct coff_section *section)
{
return sfile->section[section->number].low;
}
static void
-wr_dln (p, sfile, n)
- struct coff_ofile *p ATTRIBUTE_UNUSED;
- struct coff_sfile *sfile;
- int n ATTRIBUTE_UNUSED;
-
+wr_dln (struct coff_ofile *p ATTRIBUTE_UNUSED, struct coff_sfile *sfile,
+ int n ATTRIBUTE_UNUSED)
{
#if 0
if (n == 0)
@@ -1578,10 +1497,8 @@ wr_dln (p, sfile, n)
/* Write the global symbols out to the debug info. */
static void
-wr_globals (p, sfile, n)
- struct coff_ofile *p;
- struct coff_sfile *sfile;
- int n ATTRIBUTE_UNUSED;
+wr_globals (struct coff_ofile *p, struct coff_sfile *sfile,
+ int n ATTRIBUTE_UNUSED)
{
struct coff_symbol *sy;
@@ -1601,8 +1518,7 @@ wr_globals (p, sfile, n)
}
static void
-wr_debug (p)
- struct coff_ofile *p;
+wr_debug (struct coff_ofile *p)
{
struct coff_sfile *sfile;
int n = 0;
@@ -1623,7 +1539,7 @@ wr_debug (p)
}
static void
-wr_cs ()
+wr_cs (void)
{
/* It seems that the CS struct is not normal - the size is wrong
heres one I prepared earlier. */
@@ -1671,9 +1587,7 @@ wr_cs ()
if there isn't an equivalent one on the input. */
static int
-wr_sc (ptr, sfile)
- struct coff_ofile *ptr;
- struct coff_sfile *sfile;
+wr_sc (struct coff_ofile *ptr, struct coff_sfile *sfile)
{
int i;
int scount = 0;
@@ -1795,10 +1709,8 @@ wr_sc (ptr, sfile)
/* Write out the ER records for a unit. */
static void
-wr_er (ptr, sfile, first)
- struct coff_ofile *ptr;
- struct coff_sfile *sfile ATTRIBUTE_UNUSED;
- int first;
+wr_er (struct coff_ofile *ptr, struct coff_sfile *sfile ATTRIBUTE_UNUSED,
+ int first)
{
int idx = 0;
struct coff_symbol *sym;
@@ -1824,10 +1736,8 @@ wr_er (ptr, sfile, first)
/* Write out the ED records for a unit. */
static void
-wr_ed (ptr, sfile, first)
- struct coff_ofile *ptr;
- struct coff_sfile *sfile ATTRIBUTE_UNUSED;
- int first;
+wr_ed (struct coff_ofile *ptr, struct coff_sfile *sfile ATTRIBUTE_UNUSED,
+ int first)
{
struct coff_symbol *s;
@@ -1866,8 +1776,7 @@ wr_ed (ptr, sfile, first)
}
static void
-wr_unit_info (ptr)
- struct coff_ofile *ptr;
+wr_unit_info (struct coff_ofile *ptr)
{
struct coff_sfile *sfile;
int first = 1;
@@ -1894,8 +1803,7 @@ wr_unit_info (ptr)
}
static void
-wr_module (p)
- struct coff_ofile *p;
+wr_module (struct coff_ofile *p)
{
wr_cs ();
wr_hd (p);
@@ -1906,8 +1814,7 @@ wr_module (p)
}
static int
-align (x)
- int x;
+align (int x)
{
return (x + 3) & ~3;
}
@@ -1916,8 +1823,7 @@ align (x)
ordinary defs - dunno why, but thats what hitachi does with 'em. */
static void
-prescan (tree)
- struct coff_ofile *tree;
+prescan (struct coff_ofile *tree)
{
struct coff_symbol *s;
struct coff_section *common_section;
@@ -1945,9 +1851,7 @@ prescan (tree)
char *program_name;
static void
-show_usage (file, status)
- FILE *file;
- int status;
+show_usage (FILE *file, int status)
{
fprintf (file, _("Usage: %s [option(s)] in-file [out-file]\n"), program_name);
fprintf (file, _("Convert a COFF object file into a SYSROFF object file\n"));
@@ -1964,9 +1868,7 @@ show_usage (file, status)
}
int
-main (ac, av)
- int ac;
- char *av[];
+main (int ac, char **av)
{
int opt;
static struct option long_options[] =
diff --git a/binutils/stabs.c b/binutils/stabs.c
index 91eff59ffac..e2b8a2affa2 100644
--- a/binutils/stabs.c
+++ b/binutils/stabs.c
@@ -147,86 +147,65 @@ struct stab_tag
debug_type type;
};
-static char *savestring
- PARAMS ((const char *, int));
-static bfd_vma parse_number
- PARAMS ((const char **, bfd_boolean *));
-static void bad_stab
- PARAMS ((const char *));
-static void warn_stab
- PARAMS ((const char *, const char *));
+static char *savestring (const char *, int);
+static bfd_vma parse_number (const char **, bfd_boolean *);
+static void bad_stab (const char *);
+static void warn_stab (const char *, const char *);
static bfd_boolean parse_stab_string
- PARAMS ((PTR, struct stab_handle *, int, int, bfd_vma, const char *));
+ (void *, struct stab_handle *, int, int, bfd_vma, const char *);
static debug_type parse_stab_type
- PARAMS ((PTR, struct stab_handle *, const char *, const char **,
- debug_type **));
-static bfd_boolean parse_stab_type_number
- PARAMS ((const char **, int *));
+ (void *, struct stab_handle *, const char *, const char **, debug_type **);
+static bfd_boolean parse_stab_type_number (const char **, int *);
static debug_type parse_stab_range_type
- PARAMS ((PTR, struct stab_handle *, const char *, const char **,
- const int *));
-static debug_type parse_stab_sun_builtin_type
- PARAMS ((PTR, const char **));
-static debug_type parse_stab_sun_floating_type
- PARAMS ((PTR, const char **));
-static debug_type parse_stab_enum_type
- PARAMS ((PTR, const char **));
+ (void *, struct stab_handle *, const char *, const char **, const int *);
+static debug_type parse_stab_sun_builtin_type (void *, const char **);
+static debug_type parse_stab_sun_floating_type (void *, const char **);
+static debug_type parse_stab_enum_type (void *, const char **);
static debug_type parse_stab_struct_type
- PARAMS ((PTR, struct stab_handle *, const char *, const char **,
- bfd_boolean, const int *));
+ (void *, struct stab_handle *, const char *, const char **,
+ bfd_boolean, const int *);
static bfd_boolean parse_stab_baseclasses
- PARAMS ((PTR, struct stab_handle *, const char **, debug_baseclass **));
+ (void *, struct stab_handle *, const char **, debug_baseclass **);
static bfd_boolean parse_stab_struct_fields
- PARAMS ((PTR, struct stab_handle *, const char **, debug_field **,
- bfd_boolean *));
+ (void *, struct stab_handle *, const char **, debug_field **, bfd_boolean *);
static bfd_boolean parse_stab_cpp_abbrev
- PARAMS ((PTR, struct stab_handle *, const char **, debug_field *));
+ (void *, struct stab_handle *, const char **, debug_field *);
static bfd_boolean parse_stab_one_struct_field
- PARAMS ((PTR, struct stab_handle *, const char **, const char *,
- debug_field *, bfd_boolean *));
+ (void *, struct stab_handle *, const char **, const char *,
+ debug_field *, bfd_boolean *);
static bfd_boolean parse_stab_members
- PARAMS ((PTR, struct stab_handle *, const char *, const char **,
- const int *, debug_method **));
+ (void *, struct stab_handle *, const char *, const char **, const int *,
+ debug_method **);
static debug_type parse_stab_argtypes
- PARAMS ((PTR, struct stab_handle *, debug_type, const char *, const char *,
- debug_type, const char *, bfd_boolean, bfd_boolean, const char **));
+ (void *, struct stab_handle *, debug_type, const char *, const char *,
+ debug_type, const char *, bfd_boolean, bfd_boolean, const char **);
static bfd_boolean parse_stab_tilde_field
- PARAMS ((PTR, struct stab_handle *, const char **, const int *,
- debug_type *, bfd_boolean *));
+ (void *, struct stab_handle *, const char **, const int *, debug_type *,
+ bfd_boolean *);
static debug_type parse_stab_array_type
- PARAMS ((PTR, struct stab_handle *, const char **, bfd_boolean));
-static void push_bincl
- PARAMS ((struct stab_handle *, const char *, bfd_vma));
-static const char *pop_bincl
- PARAMS ((struct stab_handle *));
-static bfd_boolean find_excl
- PARAMS ((struct stab_handle *, const char *, bfd_vma));
+ (void *, struct stab_handle *, const char **, bfd_boolean);
+static void push_bincl (struct stab_handle *, const char *, bfd_vma);
+static const char *pop_bincl (struct stab_handle *);
+static bfd_boolean find_excl (struct stab_handle *, const char *, bfd_vma);
static bfd_boolean stab_record_variable
- PARAMS ((PTR, struct stab_handle *, const char *, debug_type,
- enum debug_var_kind, bfd_vma));
-static bfd_boolean stab_emit_pending_vars
- PARAMS ((PTR, struct stab_handle *));
-static debug_type *stab_find_slot
- PARAMS ((struct stab_handle *, const int *));
-static debug_type stab_find_type
- PARAMS ((PTR, struct stab_handle *, const int *));
+ (void *, struct stab_handle *, const char *, debug_type,
+ enum debug_var_kind, bfd_vma);
+static bfd_boolean stab_emit_pending_vars (void *, struct stab_handle *);
+static debug_type *stab_find_slot (struct stab_handle *, const int *);
+static debug_type stab_find_type (void *, struct stab_handle *, const int *);
static bfd_boolean stab_record_type
- PARAMS ((PTR, struct stab_handle *, const int *, debug_type));
+ (void *, struct stab_handle *, const int *, debug_type);
static debug_type stab_xcoff_builtin_type
- PARAMS ((PTR, struct stab_handle *, int));
+ (void *, struct stab_handle *, int);
static debug_type stab_find_tagged_type
- PARAMS ((PTR, struct stab_handle *, const char *, int,
- enum debug_type_kind));
+ (void *, struct stab_handle *, const char *, int, enum debug_type_kind);
static debug_type *stab_demangle_argtypes
- PARAMS ((PTR, struct stab_handle *, const char *, bfd_boolean *,
- unsigned int));
+ (void *, struct stab_handle *, const char *, bfd_boolean *, unsigned int);
/* Save a string in memory. */
static char *
-savestring (start, len)
- const char *start;
- int len;
+savestring (const char *start, int len)
{
char *ret;
@@ -239,9 +218,7 @@ savestring (start, len)
/* Read a number from a string. */
static bfd_vma
-parse_number (pp, poverflow)
- const char **pp;
- bfd_boolean *poverflow;
+parse_number (const char **pp, bfd_boolean *poverflow)
{
unsigned long ul;
const char *orig;
@@ -351,8 +328,7 @@ parse_number (pp, poverflow)
/* Give an error for a bad stab string. */
static void
-bad_stab (p)
- const char *p;
+bad_stab (const char *p)
{
fprintf (stderr, _("Bad stab: %s\n"), p);
}
@@ -360,22 +336,16 @@ bad_stab (p)
/* Warn about something in a stab string. */
static void
-warn_stab (p, err)
- const char *p;
- const char *err;
+warn_stab (const char *p, const char *err)
{
fprintf (stderr, _("Warning: %s: %s\n"), err, p);
}
/* Create a handle to parse stabs symbols with. */
-PTR
-start_stab (dhandle, abfd, sections, syms, symcount)
- PTR dhandle ATTRIBUTE_UNUSED;
- bfd *abfd;
- bfd_boolean sections;
- asymbol **syms;
- long symcount;
+void *
+start_stab (void *dhandle ATTRIBUTE_UNUSED, bfd *abfd, bfd_boolean sections,
+ asymbol **syms, long symcount)
{
struct stab_handle *ret;
@@ -389,16 +359,14 @@ start_stab (dhandle, abfd, sections, syms, symcount)
ret->file_types = (struct stab_types **) xmalloc (sizeof *ret->file_types);
ret->file_types[0] = NULL;
ret->function_end = (bfd_vma) -1;
- return (PTR) ret;
+ return (void *) ret;
}
/* When we have processed all the stabs information, we need to go
through and fill in all the undefined tags. */
bfd_boolean
-finish_stab (dhandle, handle)
- PTR dhandle;
- PTR handle;
+finish_stab (void *dhandle, void *handle)
{
struct stab_handle *info = (struct stab_handle *) handle;
struct stab_tag *st;
@@ -430,13 +398,8 @@ finish_stab (dhandle, handle)
/* Handle a single stabs symbol. */
bfd_boolean
-parse_stab (dhandle, handle, type, desc, value, string)
- PTR dhandle;
- PTR handle;
- int type;
- int desc;
- bfd_vma value;
- const char *string;
+parse_stab (void *dhandle, void *handle, int type, int desc, bfd_vma value,
+ const char *string)
{
struct stab_handle *info = (struct stab_handle *) handle;
@@ -708,13 +671,8 @@ parse_stab (dhandle, handle, type, desc, value, string)
/* Parse the stabs string. */
static bfd_boolean
-parse_stab_string (dhandle, info, stabtype, desc, value, string)
- PTR dhandle;
- struct stab_handle *info;
- int stabtype;
- int desc;
- bfd_vma value;
- const char *string;
+parse_stab_string (void *dhandle, struct stab_handle *info, int stabtype,
+ int desc, bfd_vma value, const char *string)
{
const char *p;
char *name;
@@ -1159,12 +1117,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
store the slot used if the type is being defined. */
static debug_type
-parse_stab_type (dhandle, info, typename, pp, slotp)
- PTR dhandle;
- struct stab_handle *info;
- const char *typename;
- const char **pp;
- debug_type **slotp;
+parse_stab_type (void *dhandle, struct stab_handle *info, const char *typename, const char **pp, debug_type **slotp)
{
const char *orig;
int typenums[2];
@@ -1529,7 +1482,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
{
alloc += 10;
args = ((debug_type *)
- xrealloc ((PTR) args, alloc * sizeof *args));
+ xrealloc (args, alloc * sizeof *args));
}
args[n] = parse_stab_type (dhandle, info, (const char *) NULL,
@@ -1637,9 +1590,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
storing them in the vector TYPENUMS. */
static bfd_boolean
-parse_stab_type_number (pp, typenums)
- const char **pp;
- int *typenums;
+parse_stab_type_number (const char **pp, int *typenums)
{
const char *orig;
@@ -1675,12 +1626,7 @@ parse_stab_type_number (pp, typenums)
/* Parse a range type. */
static debug_type
-parse_stab_range_type (dhandle, info, typename, pp, typenums)
- PTR dhandle;
- struct stab_handle *info;
- const char *typename;
- const char **pp;
- const int *typenums;
+parse_stab_range_type (void *dhandle, struct stab_handle *info, const char *typename, const char **pp, const int *typenums)
{
const char *orig;
int rangenums[2];
@@ -1864,9 +1810,7 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
FIXME. */
static debug_type
-parse_stab_sun_builtin_type (dhandle, pp)
- PTR dhandle;
- const char **pp;
+parse_stab_sun_builtin_type (void *dhandle, const char **pp)
{
const char *orig;
bfd_boolean unsignedp;
@@ -1937,9 +1881,7 @@ parse_stab_sun_builtin_type (dhandle, pp)
/* Parse a builtin floating type generated by the Sun compiler. */
static debug_type
-parse_stab_sun_floating_type (dhandle, pp)
- PTR dhandle;
- const char **pp;
+parse_stab_sun_floating_type (void *dhandle, const char **pp)
{
const char *orig;
bfd_vma details;
@@ -1975,9 +1917,7 @@ parse_stab_sun_floating_type (dhandle, pp)
/* Handle an enum type. */
static debug_type
-parse_stab_enum_type (dhandle, pp)
- PTR dhandle;
- const char **pp;
+parse_stab_enum_type (void *dhandle, const char **pp)
{
const char *orig;
const char **names;
@@ -2030,9 +1970,9 @@ parse_stab_enum_type (dhandle, pp)
{
alloc += 10;
names = ((const char **)
- xrealloc ((PTR) names, alloc * sizeof *names));
+ xrealloc (names, alloc * sizeof *names));
values = ((bfd_signed_vma *)
- xrealloc ((PTR) values, alloc * sizeof *values));
+ xrealloc (values, alloc * sizeof *values));
}
names[n] = name;
@@ -2057,13 +1997,9 @@ parse_stab_enum_type (dhandle, pp)
*PP will point to "4a:1,0,32;;". */
static debug_type
-parse_stab_struct_type (dhandle, info, tagname, pp, structp, typenums)
- PTR dhandle;
- struct stab_handle *info;
- const char *tagname;
- const char **pp;
- bfd_boolean structp;
- const int *typenums;
+parse_stab_struct_type (void *dhandle, struct stab_handle *info,
+ const char *tagname, const char **pp,
+ bfd_boolean structp, const int *typenums)
{
const char *orig;
bfd_vma size;
@@ -2110,7 +2046,7 @@ parse_stab_struct_type (dhandle, info, tagname, pp, structp, typenums)
the type for the base class, and a terminating semicolon.
A typical example, with two base classes, would be "!2,020,19;0264,21;".
- ^^ ^ ^ ^ ^ ^ ^
+ ^^ ^ ^ ^ ^ ^ ^
Baseclass information marker __________________|| | | | | | |
Number of baseclasses __________________________| | | | | | |
Visibility specifiers (2) ________________________| | | | | |
@@ -2123,11 +2059,8 @@ parse_stab_struct_type (dhandle, info, tagname, pp, structp, typenums)
Return TRUE for success, FALSE for failure. */
static bfd_boolean
-parse_stab_baseclasses (dhandle, info, pp, retp)
- PTR dhandle;
- struct stab_handle *info;
- const char **pp;
- debug_baseclass **retp;
+parse_stab_baseclasses (void *dhandle, struct stab_handle *info,
+ const char **pp, debug_baseclass **retp)
{
const char *orig;
unsigned int c, i;
@@ -2230,7 +2163,7 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
/* Read struct or class data fields. They have the form:
- NAME : [VISIBILITY] TYPENUM , BITPOS , BITSIZE ;
+ NAME : [VISIBILITY] TYPENUM , BITPOS , BITSIZE ;
At the end, we see a semicolon instead of a field.
@@ -2239,7 +2172,7 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
The optional VISIBILITY is one of:
- '/0' (VISIBILITY_PRIVATE)
+ '/0' (VISIBILITY_PRIVATE)
'/1' (VISIBILITY_PROTECTED)
'/2' (VISIBILITY_PUBLIC)
'/9' (VISIBILITY_IGNORE)
@@ -2249,12 +2182,9 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
Returns 1 for success, 0 for failure. */
static bfd_boolean
-parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
- PTR dhandle;
- struct stab_handle *info;
- const char **pp;
- debug_field **retp;
- bfd_boolean *staticsp;
+parse_stab_struct_fields (void *dhandle, struct stab_handle *info,
+ const char **pp, debug_field **retp,
+ bfd_boolean *staticsp)
{
const char *orig;
const char *p;
@@ -2281,7 +2211,7 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
{
alloc += 10;
fields = ((debug_field *)
- xrealloc ((PTR) fields, alloc * sizeof *fields));
+ xrealloc (fields, alloc * sizeof *fields));
}
/* If it starts with CPLUS_MARKER it is a special abbreviation,
@@ -2332,11 +2262,8 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
/* Special GNU C++ name. */
static bfd_boolean
-parse_stab_cpp_abbrev (dhandle, info, pp, retp)
- PTR dhandle;
- struct stab_handle *info;
- const char **pp;
- debug_field *retp;
+parse_stab_cpp_abbrev (void *dhandle, struct stab_handle *info,
+ const char **pp, debug_field *retp)
{
const char *orig;
int cpp_abbrev;
@@ -2427,13 +2354,9 @@ parse_stab_cpp_abbrev (dhandle, info, pp, retp)
/* Parse a single field in a struct or union. */
static bfd_boolean
-parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
- PTR dhandle;
- struct stab_handle *info;
- const char **pp;
- const char *p;
- debug_field *retp;
- bfd_boolean *staticsp;
+parse_stab_one_struct_field (void *dhandle, struct stab_handle *info,
+ const char **pp, const char *p,
+ debug_field *retp, bfd_boolean *staticsp)
{
const char *orig;
char *name;
@@ -2565,13 +2488,9 @@ parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
name (such as `+=') and `.' marks the end of the operator name. */
static bfd_boolean
-parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
- PTR dhandle;
- struct stab_handle *info;
- const char *tagname;
- const char **pp;
- const int *typenums;
- debug_method **retp;
+parse_stab_members (void *dhandle, struct stab_handle *info,
+ const char *tagname, const char **pp,
+ const int *typenums, debug_method **retp)
{
const char *orig;
debug_method *methods;
@@ -2831,7 +2750,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
{
allocvars += 10;
variants = ((debug_method_variant *)
- xrealloc ((PTR) variants,
+ xrealloc (variants,
allocvars * sizeof *variants));
}
@@ -2863,7 +2782,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
{
alloc += 10;
methods = ((debug_method *)
- xrealloc ((PTR) methods, alloc * sizeof *methods));
+ xrealloc (methods, alloc * sizeof *methods));
}
methods[c] = debug_make_method (dhandle, name, variants);
@@ -2886,18 +2805,11 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
the tag name. */
static debug_type
-parse_stab_argtypes (dhandle, info, class_type, fieldname, tagname,
- return_type, argtypes, constp, volatilep, pphysname)
- PTR dhandle;
- struct stab_handle *info;
- debug_type class_type;
- const char *fieldname;
- const char *tagname;
- debug_type return_type;
- const char *argtypes;
- bfd_boolean constp;
- bfd_boolean volatilep;
- const char **pphysname;
+parse_stab_argtypes (void *dhandle, struct stab_handle *info,
+ debug_type class_type, const char *fieldname,
+ const char *tagname, debug_type return_type,
+ const char *argtypes, bfd_boolean constp,
+ bfd_boolean volatilep, const char **pphysname)
{
bfd_boolean is_full_physname_constructor;
bfd_boolean is_constructor;
@@ -3015,13 +2927,9 @@ parse_stab_argtypes (dhandle, info, class_type, fieldname, tagname,
so we can look for the vptr base class info. */
static bfd_boolean
-parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
- PTR dhandle;
- struct stab_handle *info;
- const char **pp;
- const int *typenums;
- debug_type *retvptrbase;
- bfd_boolean *retownvptr;
+parse_stab_tilde_field (void *dhandle, struct stab_handle *info,
+ const char **pp, const int *typenums,
+ debug_type *retvptrbase, bfd_boolean *retownvptr)
{
const char *orig;
const char *hold;
@@ -3091,11 +2999,8 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
/* Read a definition of an array type. */
static debug_type
-parse_stab_array_type (dhandle, info, pp, stringp)
- PTR dhandle;
- struct stab_handle *info;
- const char **pp;
- bfd_boolean stringp;
+parse_stab_array_type (void *dhandle, struct stab_handle *info,
+ const char **pp, bfd_boolean stringp)
{
const char *orig;
const char *p;
@@ -3211,10 +3116,7 @@ struct bincl_file
/* Start a new N_BINCL file, pushing it onto the stack. */
static void
-push_bincl (info, name, hash)
- struct stab_handle *info;
- const char *name;
- bfd_vma hash;
+push_bincl (struct stab_handle *info, const char *name, bfd_vma hash)
{
struct bincl_file *n;
@@ -3230,7 +3132,7 @@ push_bincl (info, name, hash)
++info->files;
info->file_types = ((struct stab_types **)
- xrealloc ((PTR) info->file_types,
+ xrealloc (info->file_types,
(info->files
* sizeof *info->file_types)));
info->file_types[n->file] = NULL;
@@ -3240,8 +3142,7 @@ push_bincl (info, name, hash)
stack. */
static const char *
-pop_bincl (info)
- struct stab_handle *info;
+pop_bincl (struct stab_handle *info)
{
struct bincl_file *o;
@@ -3260,16 +3161,13 @@ pop_bincl (info)
/* Handle an N_EXCL: get the types from the corresponding N_BINCL. */
static bfd_boolean
-find_excl (info, name, hash)
- struct stab_handle *info;
- const char *name;
- bfd_vma hash;
+find_excl (struct stab_handle *info, const char *name, bfd_vma hash)
{
struct bincl_file *l;
++info->files;
info->file_types = ((struct stab_types **)
- xrealloc ((PTR) info->file_types,
+ xrealloc (info->file_types,
(info->files
* sizeof *info->file_types)));
@@ -3294,13 +3192,9 @@ find_excl (info, name, hash)
N_LBRAC, so we can call debug_record_variable immediately. */
static bfd_boolean
-stab_record_variable (dhandle, info, name, type, kind, val)
- PTR dhandle;
- struct stab_handle *info;
- const char *name;
- debug_type type;
- enum debug_var_kind kind;
- bfd_vma val;
+stab_record_variable (void *dhandle, struct stab_handle *info,
+ const char *name, debug_type type,
+ enum debug_var_kind kind, bfd_vma val)
{
struct stab_pending_var *v;
@@ -3326,9 +3220,7 @@ stab_record_variable (dhandle, info, name, type, kind, val)
N_LBRAC that starts the block. */
static bfd_boolean
-stab_emit_pending_vars (dhandle, info)
- PTR dhandle;
- struct stab_handle *info;
+stab_emit_pending_vars (void *dhandle, struct stab_handle *info)
{
struct stab_pending_var *v;
@@ -3353,9 +3245,7 @@ stab_emit_pending_vars (dhandle, info)
/* Find the slot for a type in the database. */
static debug_type *
-stab_find_slot (info, typenums)
- struct stab_handle *info;
- const int *typenums;
+stab_find_slot (struct stab_handle *info, const int *typenums)
{
int filenum;
int index;
@@ -3400,10 +3290,7 @@ stab_find_slot (info, typenums)
allocated yet, create an indirect type. */
static debug_type
-stab_find_type (dhandle, info, typenums)
- PTR dhandle;
- struct stab_handle *info;
- const int *typenums;
+stab_find_type (void *dhandle, struct stab_handle *info, const int *typenums)
{
debug_type *slot;
@@ -3426,11 +3313,8 @@ stab_find_type (dhandle, info, typenums)
/* Record that a given type number refers to a given type. */
static bfd_boolean
-stab_record_type (dhandle, info, typenums, type)
- PTR dhandle ATTRIBUTE_UNUSED;
- struct stab_handle *info;
- const int *typenums;
- debug_type type;
+stab_record_type (void *dhandle ATTRIBUTE_UNUSED, struct stab_handle *info,
+ const int *typenums, debug_type type)
{
debug_type *slot;
@@ -3448,10 +3332,8 @@ stab_record_type (dhandle, info, typenums, type)
/* Return an XCOFF builtin type. */
static debug_type
-stab_xcoff_builtin_type (dhandle, info, typenum)
- PTR dhandle;
- struct stab_handle *info;
- int typenum;
+stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info,
+ int typenum)
{
debug_type rettype;
const char *name;
@@ -3627,12 +3509,8 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
/* Find or create a tagged type. */
static debug_type
-stab_find_tagged_type (dhandle, info, p, len, kind)
- PTR dhandle;
- struct stab_handle *info;
- const char *p;
- int len;
- enum debug_type_kind kind;
+stab_find_tagged_type (void *dhandle, struct stab_handle *info,
+ const char *p, int len, enum debug_type_kind kind)
{
char *name;
debug_type dtype;
@@ -3707,7 +3585,7 @@ struct stab_demangle_typestring
struct stab_demangle_info
{
/* The debugging information handle. */
- PTR dhandle;
+ void *dhandle;
/* The stab information handle. */
struct stab_handle *info;
/* The array of arguments we are building. */
@@ -3722,42 +3600,37 @@ struct stab_demangle_info
unsigned int typestring_alloc;
};
-static void stab_bad_demangle
- PARAMS ((const char *));
-static unsigned int stab_demangle_count
- PARAMS ((const char **));
-static bfd_boolean stab_demangle_get_count
- PARAMS ((const char **, unsigned int *));
+static void stab_bad_demangle (const char *);
+static unsigned int stab_demangle_count (const char **);
+static bfd_boolean stab_demangle_get_count (const char **, unsigned int *);
static bfd_boolean stab_demangle_prefix
- PARAMS ((struct stab_demangle_info *, const char **, unsigned int));
+ (struct stab_demangle_info *, const char **, unsigned int);
static bfd_boolean stab_demangle_function_name
- PARAMS ((struct stab_demangle_info *, const char **, const char *));
+ (struct stab_demangle_info *, const char **, const char *);
static bfd_boolean stab_demangle_signature
- PARAMS ((struct stab_demangle_info *, const char **));
+ (struct stab_demangle_info *, const char **);
static bfd_boolean stab_demangle_qualified
- PARAMS ((struct stab_demangle_info *, const char **, debug_type *));
+ (struct stab_demangle_info *, const char **, debug_type *);
static bfd_boolean stab_demangle_template
- PARAMS ((struct stab_demangle_info *, const char **, char **));
+ (struct stab_demangle_info *, const char **, char **);
static bfd_boolean stab_demangle_class
- PARAMS ((struct stab_demangle_info *, const char **, const char **));
+ (struct stab_demangle_info *, const char **, const char **);
static bfd_boolean stab_demangle_args
- PARAMS ((struct stab_demangle_info *, const char **, debug_type **,
- bfd_boolean *));
+ (struct stab_demangle_info *, const char **, debug_type **, bfd_boolean *);
static bfd_boolean stab_demangle_arg
- PARAMS ((struct stab_demangle_info *, const char **, debug_type **,
- unsigned int *, unsigned int *));
+ (struct stab_demangle_info *, const char **, debug_type **,
+ unsigned int *, unsigned int *);
static bfd_boolean stab_demangle_type
- PARAMS ((struct stab_demangle_info *, const char **, debug_type *));
+ (struct stab_demangle_info *, const char **, debug_type *);
static bfd_boolean stab_demangle_fund_type
- PARAMS ((struct stab_demangle_info *, const char **, debug_type *));
+ (struct stab_demangle_info *, const char **, debug_type *);
static bfd_boolean stab_demangle_remember_type
- PARAMS ((struct stab_demangle_info *, const char *, int));
+ (struct stab_demangle_info *, const char *, int);
/* Warn about a bad demangling. */
static void
-stab_bad_demangle (s)
- const char *s;
+stab_bad_demangle (const char *s)
{
fprintf (stderr, _("bad mangled name `%s'\n"), s);
}
@@ -3765,8 +3638,7 @@ stab_bad_demangle (s)
/* Get a count from a stab string. */
static unsigned int
-stab_demangle_count (pp)
- const char **pp;
+stab_demangle_count (const char **pp)
{
unsigned int count;
@@ -3784,9 +3656,7 @@ stab_demangle_count (pp)
which case it must end in an underscore. */
static bfd_boolean
-stab_demangle_get_count (pp, pi)
- const char **pp;
- unsigned int *pi;
+stab_demangle_get_count (const char **pp, unsigned int *pi)
{
if (! ISDIGIT (**pp))
return FALSE;
@@ -3821,12 +3691,9 @@ stab_demangle_get_count (pp, pi)
terminated array of argument types. */
static debug_type *
-stab_demangle_argtypes (dhandle, info, physname, pvarargs, physname_len)
- PTR dhandle;
- struct stab_handle *info;
- const char *physname;
- bfd_boolean *pvarargs;
- unsigned int physname_len;
+stab_demangle_argtypes (void *dhandle, struct stab_handle *info,
+ const char *physname, bfd_boolean *pvarargs,
+ unsigned int physname_len)
{
struct stab_demangle_info minfo;
@@ -3870,10 +3737,8 @@ stab_demangle_argtypes (dhandle, info, physname, pvarargs, physname_len)
/* Demangle the prefix of the mangled name. */
static bfd_boolean
-stab_demangle_prefix (minfo, pp, physname_len)
- struct stab_demangle_info *minfo;
- const char **pp;
- unsigned int physname_len;
+stab_demangle_prefix (struct stab_demangle_info *minfo, const char **pp,
+ unsigned int physname_len)
{
const char *scan;
unsigned int i;
@@ -3949,10 +3814,8 @@ stab_demangle_prefix (minfo, pp, physname_len)
signature. */
static bfd_boolean
-stab_demangle_function_name (minfo, pp, scan)
- struct stab_demangle_info *minfo;
- const char **pp;
- const char *scan;
+stab_demangle_function_name (struct stab_demangle_info *minfo,
+ const char **pp, const char *scan)
{
const char *name;
@@ -3995,9 +3858,7 @@ stab_demangle_function_name (minfo, pp, scan)
found. */
static bfd_boolean
-stab_demangle_signature (minfo, pp)
- struct stab_demangle_info *minfo;
- const char **pp;
+stab_demangle_signature (struct stab_demangle_info *minfo, const char **pp)
{
const char *orig;
bfd_boolean expect_func, func_done;
@@ -4111,10 +3972,8 @@ stab_demangle_signature (minfo, pp)
mangled form of "Outer::Inner". */
static bfd_boolean
-stab_demangle_qualified (minfo, pp, ptype)
- struct stab_demangle_info *minfo;
- const char **pp;
- debug_type *ptype;
+stab_demangle_qualified (struct stab_demangle_info *minfo, const char **pp,
+ debug_type *ptype)
{
const char *orig;
const char *p;
@@ -4284,10 +4143,8 @@ stab_demangle_qualified (minfo, pp, ptype)
string representation of the template. */
static bfd_boolean
-stab_demangle_template (minfo, pp, pname)
- struct stab_demangle_info *minfo;
- const char **pp;
- char **pname;
+stab_demangle_template (struct stab_demangle_info *minfo, const char **pp,
+ char **pname)
{
const char *orig;
unsigned int r, i;
@@ -4507,10 +4364,8 @@ stab_demangle_template (minfo, pp, pname)
/* Demangle a class name. */
static bfd_boolean
-stab_demangle_class (minfo, pp, pstart)
- struct stab_demangle_info *minfo ATTRIBUTE_UNUSED;
- const char **pp;
- const char **pstart;
+stab_demangle_class (struct stab_demangle_info *minfo ATTRIBUTE_UNUSED,
+ const char **pp, const char **pstart)
{
const char *orig;
unsigned int n;
@@ -4536,11 +4391,8 @@ stab_demangle_class (minfo, pp, pstart)
is set to a NULL terminated array holding the arguments. */
static bfd_boolean
-stab_demangle_args (minfo, pp, pargs, pvarargs)
- struct stab_demangle_info *minfo;
- const char **pp;
- debug_type **pargs;
- bfd_boolean *pvarargs;
+stab_demangle_args (struct stab_demangle_info *minfo, const char **pp,
+ debug_type **pargs, bfd_boolean *pvarargs)
{
const char *orig;
unsigned int alloc, count;
@@ -4619,12 +4471,9 @@ stab_demangle_args (minfo, pp, pargs, pvarargs)
/* Demangle a single argument. */
static bfd_boolean
-stab_demangle_arg (minfo, pp, pargs, pcount, palloc)
- struct stab_demangle_info *minfo;
- const char **pp;
- debug_type **pargs;
- unsigned int *pcount;
- unsigned int *palloc;
+stab_demangle_arg (struct stab_demangle_info *minfo, const char **pp,
+ debug_type **pargs, unsigned int *pcount,
+ unsigned int *palloc)
{
const char *start;
debug_type type;
@@ -4657,10 +4506,8 @@ stab_demangle_arg (minfo, pp, pargs, pcount, palloc)
to the newly allocated type. */
static bfd_boolean
-stab_demangle_type (minfo, pp, ptype)
- struct stab_demangle_info *minfo;
- const char **pp;
- debug_type *ptype;
+stab_demangle_type (struct stab_demangle_info *minfo, const char **pp,
+ debug_type *ptype)
{
const char *orig;
@@ -4926,10 +4773,8 @@ stab_demangle_type (minfo, pp, ptype)
*ptype is set to the newly allocated type. */
static bfd_boolean
-stab_demangle_fund_type (minfo, pp, ptype)
- struct stab_demangle_info *minfo;
- const char **pp;
- debug_type *ptype;
+stab_demangle_fund_type (struct stab_demangle_info *minfo, const char **pp,
+ debug_type *ptype)
{
const char *orig;
bfd_boolean constp, volatilep, unsignedp, signedp;
@@ -5182,10 +5027,8 @@ stab_demangle_fund_type (minfo, pp, ptype)
/* Remember a type string in a demangled string. */
static bfd_boolean
-stab_demangle_remember_type (minfo, p, len)
- struct stab_demangle_info *minfo;
- const char *p;
- int len;
+stab_demangle_remember_type (struct stab_demangle_info *minfo,
+ const char *p, int len)
{
if (minfo->typestring_count >= minfo->typestring_alloc)
{
diff --git a/binutils/strings.c b/binutils/strings.c
index b5e88d05863..67c601f3b91 100644
--- a/binutils/strings.c
+++ b/binutils/strings.c
@@ -1,6 +1,6 @@
/* strings -- print the strings of printable characters in files
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002 Free Software Foundation, Inc.
+ 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -143,28 +143,18 @@ static struct option long_options[] =
{NULL, 0, NULL, 0}
};
-static void strings_a_section
- PARAMS ((bfd *, asection *, PTR));
-static bfd_boolean strings_object_file
- PARAMS ((const char *));
-static bfd_boolean strings_file
- PARAMS ((char *file));
-static int integer_arg
- PARAMS ((char *s));
-static void print_strings
- PARAMS ((const char *, FILE *, file_off, int, int, char *));
-static void usage
- PARAMS ((FILE *, int));
-static long get_char
- PARAMS ((FILE *, file_off *, int *, char **));
+static void strings_a_section (bfd *, asection *, void *);
+static bfd_boolean strings_object_file (const char *);
+static bfd_boolean strings_file (char *file);
+static int integer_arg (char *s);
+static void print_strings (const char *, FILE *, file_off, int, int, char *);
+static void usage (FILE *, int);
+static long get_char (FILE *, file_off *, int *, char **);
-int main
- PARAMS ((int, char **));
+int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int optc;
int exit_status = 0;
@@ -321,17 +311,14 @@ main (argc, argv)
set `got_a_section' and print the strings in it. */
static void
-strings_a_section (abfd, sect, filearg)
- bfd *abfd;
- asection *sect;
- PTR filearg;
+strings_a_section (bfd *abfd, asection *sect, void *filearg)
{
const char *file = (const char *) filearg;
if ((sect->flags & DATA_FLAGS) == DATA_FLAGS)
{
bfd_size_type sz = bfd_get_section_size_before_reloc (sect);
- PTR mem = xmalloc (sz);
+ void *mem = xmalloc (sz);
if (bfd_get_section_contents (abfd, sect, mem, (file_ptr) 0, sz))
{
@@ -349,8 +336,7 @@ strings_a_section (abfd, sect, filearg)
FALSE if not (such as if FILE is not an object file). */
static bfd_boolean
-strings_object_file (file)
- const char *file;
+strings_object_file (const char *file)
{
bfd *abfd = bfd_openr (file, target);
@@ -368,7 +354,7 @@ strings_object_file (file)
}
got_a_section = FALSE;
- bfd_map_over_sections (abfd, strings_a_section, (PTR) file);
+ bfd_map_over_sections (abfd, strings_a_section, (void *) file);
if (!bfd_close (abfd))
{
@@ -382,8 +368,7 @@ strings_object_file (file)
/* Print the strings in FILE. Return TRUE if ok, FALSE if an error occurs. */
static bfd_boolean
-strings_file (file)
- char *file;
+strings_file (char *file)
{
/* If we weren't told to scan the whole file,
try to open it as an object file and only look at
@@ -425,11 +410,7 @@ strings_file (file)
MAGICCOUNT is how many characters are in it. */
static long
-get_char (stream, address, magiccount, magic)
- FILE *stream;
- file_off *address;
- int *magiccount;
- char **magic;
+get_char (FILE *stream, file_off *address, int *magiccount, char **magic)
{
int c, i;
long r = EOF;
@@ -500,13 +481,8 @@ get_char (stream, address, magiccount, magic)
Those characters come at address ADDRESS and the data in STREAM follow. */
static void
-print_strings (filename, stream, address, stop_point, magiccount, magic)
- const char *filename;
- FILE *stream;
- file_off address;
- int stop_point;
- int magiccount;
- char *magic;
+print_strings (const char *filename, FILE *stream, file_off address,
+ int stop_point, int magiccount, char *magic)
{
char *buf = (char *) xmalloc (sizeof (char) * (string_min + 1));
@@ -607,8 +583,7 @@ print_strings (filename, stream, address, stop_point, magiccount, magic)
but allowing octal and hex numbers as in C. */
static int
-integer_arg (s)
- char *s;
+integer_arg (char *s)
{
int value;
int radix = 10;
@@ -650,9 +625,7 @@ integer_arg (s)
}
static void
-usage (stream, status)
- FILE *stream;
- int status;
+usage (FILE *stream, int status)
{
fprintf (stream, _("Usage: %s [option(s)] [file(s)]\n"), program_name);
fprintf (stream, _(" Display printable strings in [file(s)] (stdin by default)\n"));
diff --git a/binutils/sysdump.c b/binutils/sysdump.c
index 2d0362bcf7a..a1df1e05b7a 100644
--- a/binutils/sysdump.c
+++ b/binutils/sysdump.c
@@ -1,5 +1,5 @@
/* Sysroff object format dumper.
- Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -40,35 +40,31 @@ static int code;
static int addrsize = 4;
static FILE *file;
-static void dh PARAMS ((unsigned char *, int));
-static void itheader PARAMS ((char *, int));
-static void p PARAMS ((void));
-static void tabout PARAMS ((void));
-static void pbarray PARAMS ((barray *));
-static int getone PARAMS ((int));
-static int opt PARAMS ((int));
-static void must PARAMS ((int));
-static void tab PARAMS ((int, char *));
-static void dump_symbol_info PARAMS ((void));
-static void derived_type PARAMS ((void));
-static void module PARAMS ((void));
-static void show_usage PARAMS ((FILE *, int));
-
-extern char *getCHARS PARAMS ((unsigned char *, int *, int, int));
-extern int fillup PARAMS ((char *));
-extern barray getBARRAY PARAMS ((unsigned char *, int *, int, int));
-extern int getINT PARAMS ((unsigned char *, int *, int, int));
-extern int getBITS PARAMS ((char *, int *, int, int));
-extern void sysroff_swap_tr_in PARAMS ((void));
-extern void sysroff_print_tr_out PARAMS ((void));
-extern int main PARAMS ((int, char **));
+static void dh (unsigned char *, int);
+static void itheader (char *, int);
+static void p (void);
+static void tabout (void);
+static void pbarray (barray *);
+static int getone (int);
+static int opt (int);
+static void must (int);
+static void tab (int, char *);
+static void dump_symbol_info (void);
+static void derived_type (void);
+static void module (void);
+static void show_usage (FILE *, int);
+
+extern char *getCHARS (unsigned char *, int *, int, int);
+extern int fillup (char *);
+extern barray getBARRAY (unsigned char *, int *, int, int);
+extern int getINT (unsigned char *, int *, int, int);
+extern int getBITS (char *, int *, int, int);
+extern void sysroff_swap_tr_in (void);
+extern void sysroff_print_tr_out (void);
+extern int main (int, char **);
char *
-getCHARS (ptr, idx, size, max)
- unsigned char *ptr;
- int *idx;
- int size;
- int max;
+getCHARS (unsigned char *ptr, int *idx, int size, int max)
{
int oc = *idx / 8;
char *r;
@@ -93,9 +89,7 @@ getCHARS (ptr, idx, size, max)
}
static void
-dh (ptr, size)
- unsigned char *ptr;
- int size;
+dh (unsigned char *ptr, int size)
{
int i;
int j;
@@ -127,8 +121,7 @@ dh (ptr, size)
}
int
-fillup (ptr)
- char *ptr;
+fillup (char *ptr)
{
int size;
int sum;
@@ -151,11 +144,8 @@ fillup (ptr)
}
barray
-getBARRAY (ptr, idx, dsize, max)
- unsigned char *ptr;
- int *idx;
- int dsize ATTRIBUTE_UNUSED;
- int max ATTRIBUTE_UNUSED;
+getBARRAY (unsigned char *ptr, int *idx, int dsize ATTRIBUTE_UNUSED,
+ int max ATTRIBUTE_UNUSED)
{
barray res;
int i;
@@ -172,11 +162,7 @@ getBARRAY (ptr, idx, dsize, max)
}
int
-getINT (ptr, idx, size, max)
- unsigned char *ptr;
- int *idx;
- int size;
- int max;
+getINT (unsigned char *ptr, int *idx, int size, int max)
{
int n = 0;
int byte = *idx / 8;
@@ -212,10 +198,7 @@ getINT (ptr, idx, size, max)
}
int
-getBITS (ptr, idx, size, max)
- char *ptr;
- int *idx;
- int size, max;
+getBITS (char *ptr, int *idx, int size, int max)
{
int byte = *idx / 8;
int bit = *idx % 8;
@@ -229,9 +212,7 @@ getBITS (ptr, idx, size, max)
}
static void
-itheader (name, code)
- char *name;
- int code;
+itheader (char *name, int code)
{
printf ("\n%s 0x%02x\n", name, code);
}
@@ -239,7 +220,7 @@ itheader (name, code)
static int indent;
static void
-p ()
+p (void)
{
int i;
@@ -250,14 +231,13 @@ p ()
}
static void
-tabout ()
+tabout (void)
{
p ();
}
static void
-pbarray (y)
- barray *y;
+pbarray (barray *y)
{
int x;
@@ -283,7 +263,7 @@ pbarray (y)
#define IT_tr_CODE 0x7f
void
-sysroff_swap_tr_in()
+sysroff_swap_tr_in (void)
{
char raw[255];
@@ -292,14 +272,13 @@ sysroff_swap_tr_in()
}
void
-sysroff_print_tr_out()
+sysroff_print_tr_out (void)
{
itheader ("tr", IT_tr_CODE);
}
static int
-getone (type)
- int type;
+getone (int type)
{
int c = getc (file);
@@ -531,8 +510,7 @@ getone (type)
}
static int
-opt (x)
- int x;
+opt (int x)
{
return getone (x);
}
@@ -542,7 +520,7 @@ opt (x)
/* This is no longer used. */
static void
-unit_info_list ()
+unit_info_list (void)
{
while (opt (IT_un_CODE))
{
@@ -566,7 +544,7 @@ unit_info_list ()
/* This is no longer used. */
static void
-object_body_list ()
+object_body_list (void)
{
while (getone (IT_sh_CODE))
{
@@ -580,17 +558,14 @@ object_body_list ()
#endif
static void
-must (x)
- int x;
+must (int x)
{
if (!getone (x))
printf ("WANTED %x!!\n", x);
}
static void
-tab (i, s)
- int i;
- char *s;
+tab (int i, char *s)
{
indent += i;
@@ -603,7 +578,7 @@ tab (i, s)
}
static void
-dump_symbol_info ()
+dump_symbol_info (void)
{
tab (1, "SYMBOL INFO");
@@ -621,7 +596,7 @@ dump_symbol_info ()
}
static void
-derived_type ()
+derived_type (void)
{
tab (1, "DERIVED TYPE");
@@ -679,7 +654,7 @@ derived_type ()
/* This is no longer used. */
static void
-program_structure ()
+program_structure (void)
{
tab (1, "PROGRAM STRUCTURE");
while (opt (IT_dps_CODE))
@@ -699,7 +674,7 @@ program_structure ()
/* This is no longer used. */
static void
-debug_list ()
+debug_list (void)
{
tab (1, "DEBUG LIST");
@@ -714,7 +689,7 @@ debug_list ()
#endif
static void
-module ()
+module (void)
{
int c = 0;
int l = 0;
@@ -760,9 +735,7 @@ module ()
char *program_name;
static void
-show_usage (file, status)
- FILE *file;
- int status;
+show_usage (FILE *file, int status)
{
fprintf (file, _("Usage: %s [option(s)] in-file\n"), program_name);
fprintf (file, _("Print a human readable interpretation of a SYSROFF object file\n"));
@@ -776,9 +749,7 @@ show_usage (file, status)
}
int
-main (ac, av)
- int ac;
- char **av;
+main (int ac, char **av)
{
char *input_file = NULL;
int opt;
diff --git a/binutils/sysinfo.y b/binutils/sysinfo.y
index 4aa46073bbb..c67e9f63925 100644
--- a/binutils/sysinfo.y
+++ b/binutils/sysinfo.y
@@ -1,4 +1,4 @@
-/* Copyright 2001 Free Software Foundation, Inc.
+/* Copyright 2001, 2003 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
This file is part of GNU binutils.
@@ -415,9 +415,7 @@ int yydebug;
char writecode;
int
-main(ac,av)
-int ac;
-char **av;
+main (int ac, char **av)
{
yydebug=0;
if (ac > 1)
@@ -434,8 +432,7 @@ return 0;
}
int
-yyerror(s)
- char *s;
+yyerror (char *s)
{
fprintf(stderr, "%s\n" , s);
return 0;
diff --git a/binutils/syslex.l b/binutils/syslex.l
index 553cbdc8ddd..ffaf4fad2d6 100644
--- a/binutils/syslex.l
+++ b/binutils/syslex.l
@@ -1,5 +1,5 @@
%{
-/* Copyright 2001 Free Software Foundation, Inc.
+/* Copyright 2001, 2003 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -24,7 +24,7 @@ int number;
int unit;
#ifndef yywrap
-static int yywrap () { return 1; }
+static int yywrap (void) { return 1; }
#endif
%}
%%
diff --git a/binutils/unwind-ia64.c b/binutils/unwind-ia64.c
index 803a5fa5415..7c06c7b49ae 100644
--- a/binutils/unwind-ia64.c
+++ b/binutils/unwind-ia64.c
@@ -1,5 +1,5 @@
/* unwind-ia64.c -- utility routines to dump IA-64 unwind info for readelf.
- Copyright 2000, 2001 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GNU Binutils.
@@ -33,16 +33,14 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static bfd_vma unw_rlen = 0;
-static void unw_print_brmask PARAMS ((char *, unsigned int));
-static void unw_print_grmask PARAMS ((char *, unsigned int));
-static void unw_print_frmask PARAMS ((char *, unsigned int));
-static void unw_print_abreg PARAMS ((char *, unsigned int));
-static void unw_print_xyreg PARAMS ((char *, unsigned int, unsigned int));
+static void unw_print_brmask (char *, unsigned int);
+static void unw_print_grmask (char *, unsigned int);
+static void unw_print_frmask (char *, unsigned int);
+static void unw_print_abreg (char *, unsigned int);
+static void unw_print_xyreg (char *, unsigned int, unsigned int);
static void
-unw_print_brmask (cp, mask)
- char * cp;
- unsigned int mask;
+unw_print_brmask (char *cp, unsigned int mask)
{
int sep = 0;
int i;
@@ -63,9 +61,7 @@ unw_print_brmask (cp, mask)
}
static void
-unw_print_grmask (cp, mask)
- char * cp;
- unsigned int mask;
+unw_print_grmask (char *cp, unsigned int mask)
{
int sep = 0;
int i;
@@ -86,9 +82,7 @@ unw_print_grmask (cp, mask)
}
static void
-unw_print_frmask (cp, mask)
- char * cp;
- unsigned int mask;
+unw_print_frmask (char *cp, unsigned int mask)
{
int sep = 0;
int i;
@@ -115,9 +109,7 @@ unw_print_frmask (cp, mask)
}
static void
-unw_print_abreg (cp, abreg)
- char * cp;
- unsigned int abreg;
+unw_print_abreg (char *cp, unsigned int abreg)
{
static const char *special_reg[16] =
{
@@ -147,10 +139,7 @@ unw_print_abreg (cp, abreg)
}
static void
-unw_print_xyreg (cp, x, ytreg)
- char * cp;
- unsigned int x;
- unsigned int ytreg;
+unw_print_xyreg (char *cp, unsigned int x, unsigned int ytreg)
{
switch ((x << 1) | ((ytreg >> 7) & 1))
{
@@ -252,13 +241,13 @@ typedef bfd_vma unw_word;
} \
while (0)
-#define UNW_DEC_FRGR_MEM(fmt, grmask, frmask, arg) \
+#define UNW_DEC_FRGR_MEM(fmt, grmask, frmask, arg) \
do \
- { \
+ { \
char frstr[200], grstr[20]; \
- \
- unw_print_grmask (grstr, grmask); \
- unw_print_frmask (frstr, frmask); \
+ \
+ unw_print_grmask (grstr, grmask); \
+ unw_print_frmask (frstr, frmask); \
printf ("\t%s:frgr_mem(grmask=[%s],frmask=[%s])\n", fmt, grstr, frstr); \
} \
while (0)
@@ -360,8 +349,8 @@ typedef bfd_vma unw_word;
#define UNW_DEC_SPILL_MASK(fmt, dp, arg) \
do \
{ \
- static const char * spill_type = "-frb"; \
- unsigned const char * imaskp = dp; \
+ static const char *spill_type = "-frb"; \
+ unsigned const char *imaskp = dp; \
unsigned char mask = 0; \
bfd_vma insn = 0; \
\
@@ -390,13 +379,13 @@ typedef bfd_vma unw_word;
} \
while (0)
-#define UNW_DEC_SPILL_PSPREL(fmt, t, abreg, pspoff, arg) \
+#define UNW_DEC_SPILL_PSPREL(fmt, t, abreg, pspoff, arg) \
do \
- { \
- char regname[10]; \
- \
- unw_print_abreg (regname, abreg); \
- printf ("\t%s:spill_psprel(reg=%s,t=%lu,pspoff=0x10-0x%lx)\n", \
+ { \
+ char regname[10]; \
+ \
+ unw_print_abreg (regname, abreg); \
+ printf ("\t%s:spill_psprel(reg=%s,t=%lu,pspoff=0x10-0x%lx)\n", \
fmt, regname, (unsigned long) t, 4*(unsigned long)pspoff); \
} \
while (0)
@@ -424,12 +413,12 @@ typedef bfd_vma unw_word;
} \
while (0)
-#define UNW_DEC_SPILL_SPREL_P(fmt, qp, t, abreg, spoff, arg) \
+#define UNW_DEC_SPILL_SPREL_P(fmt, qp, t, abreg, spoff, arg) \
do \
- { \
- char regname[20]; \
- \
- unw_print_abreg (regname, abreg); \
+ { \
+ char regname[20]; \
+ \
+ unw_print_abreg (regname, abreg); \
printf ("\t%s:spill_sprel_p(qp=p%u,t=%lu,reg=%s,spoff=0x%lx)\n", \
fmt, qp, (unsigned long) t, regname, 4 * (unsigned long)spoff); \
} \
@@ -541,39 +530,38 @@ typedef bfd_vma unw_word;
* UNW_DEC_SPILL_SPREL_P(fmt,qp,t,abreg,pspoff,arg)
*/
-static unw_word unw_decode_uleb128 PARAMS ((const unsigned char **));
-static const unsigned char *unw_decode_x1 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_x2 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_x3 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_x4 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_r1 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_r2 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_r3 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_p1 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_p2_p5 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_p6 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_p7_p10 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_b1 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_b2 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_b3_x4 PARAMS ((const unsigned char *,
- unsigned int, void *));
+static unw_word unw_decode_uleb128 (const unsigned char **);
+static const unsigned char *unw_decode_x1
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_x2
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_x3
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_x4
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_r1
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_r2
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_r3
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_p1
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_p2_p5
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_p6
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_p7_p10
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_b1
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_b2
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_b3_x4
+ (const unsigned char *, unsigned int, void *);
static unw_word
-unw_decode_uleb128 (dpp)
- const unsigned char **dpp;
+unw_decode_uleb128 (const unsigned char **dpp)
{
unsigned shift = 0;
unw_word byte, result = 0;
@@ -596,10 +584,8 @@ unw_decode_uleb128 (dpp)
}
static const unsigned char *
-unw_decode_x1 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code ATTRIBUTE_UNUSED;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_x1 (const unsigned char *dp, unsigned int code ATTRIBUTE_UNUSED,
+ void *arg ATTRIBUTE_UNUSED)
{
unsigned char byte1, abreg;
unw_word t, off;
@@ -616,10 +602,8 @@ unw_decode_x1 (dp, code, arg)
}
static const unsigned char *
-unw_decode_x2 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code ATTRIBUTE_UNUSED;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_x2 (const unsigned char *dp, unsigned int code ATTRIBUTE_UNUSED,
+ void *arg ATTRIBUTE_UNUSED)
{
unsigned char byte1, byte2, abreg, x, ytreg;
unw_word t;
@@ -638,10 +622,8 @@ unw_decode_x2 (dp, code, arg)
}
static const unsigned char *
-unw_decode_x3 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code ATTRIBUTE_UNUSED;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_x3 (const unsigned char *dp, unsigned int code ATTRIBUTE_UNUSED,
+ void *arg ATTRIBUTE_UNUSED)
{
unsigned char byte1, byte2, abreg, qp;
unw_word t, off;
@@ -662,10 +644,8 @@ unw_decode_x3 (dp, code, arg)
}
static const unsigned char *
-unw_decode_x4 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code ATTRIBUTE_UNUSED;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_x4 (const unsigned char *dp, unsigned int code ATTRIBUTE_UNUSED,
+ void *arg ATTRIBUTE_UNUSED)
{
unsigned char byte1, byte2, byte3, qp, abreg, x, ytreg;
unw_word t;
@@ -688,10 +668,7 @@ unw_decode_x4 (dp, code, arg)
}
static const unsigned char *
-unw_decode_r1 (dp, code, arg)
- const unsigned char *dp;
- unsigned int code;
- void *arg;
+unw_decode_r1 (const unsigned char *dp, unsigned int code, void *arg)
{
int body = (code & 0x20) != 0;
unw_word rlen;
@@ -702,10 +679,7 @@ unw_decode_r1 (dp, code, arg)
}
static const unsigned char *
-unw_decode_r2 (dp, code, arg)
- const unsigned char *dp;
- unsigned int code;
- void *arg;
+unw_decode_r2 (const unsigned char *dp, unsigned int code, void *arg)
{
unsigned char byte1, mask, grsave;
unw_word rlen;
@@ -720,10 +694,7 @@ unw_decode_r2 (dp, code, arg)
}
static const unsigned char *
-unw_decode_r3 (dp, code, arg)
- const unsigned char *dp;
- unsigned int code;
- void *arg;
+unw_decode_r3 (const unsigned char *dp, unsigned int code, void *arg)
{
unw_word rlen;
@@ -733,10 +704,8 @@ unw_decode_r3 (dp, code, arg)
}
static const unsigned char *
-unw_decode_p1 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_p1 (const unsigned char *dp, unsigned int code,
+ void *arg ATTRIBUTE_UNUSED)
{
unsigned char brmask = (code & 0x1f);
@@ -745,10 +714,8 @@ unw_decode_p1 (dp, code, arg)
}
static const unsigned char *
-unw_decode_p2_p5 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_p2_p5 (const unsigned char *dp, unsigned int code,
+ void *arg ATTRIBUTE_UNUSED)
{
if ((code & 0x10) == 0)
{
@@ -826,10 +793,8 @@ unw_decode_p2_p5 (dp, code, arg)
}
static const unsigned char *
-unw_decode_p6 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_p6 (const unsigned char *dp, unsigned int code,
+ void *arg ATTRIBUTE_UNUSED)
{
int gregs = (code & 0x10) != 0;
unsigned char mask = (code & 0x0f);
@@ -842,10 +807,7 @@ unw_decode_p6 (dp, code, arg)
}
static const unsigned char *
-unw_decode_p7_p10 (dp, code, arg)
- const unsigned char *dp;
- unsigned int code;
- void *arg;
+unw_decode_p7_p10 (const unsigned char *dp, unsigned int code, void *arg)
{
unsigned char r, byte1, byte2;
unw_word t, size;
@@ -1018,10 +980,8 @@ unw_decode_p7_p10 (dp, code, arg)
}
static const unsigned char *
-unw_decode_b1 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_b1 (const unsigned char *dp, unsigned int code,
+ void *arg ATTRIBUTE_UNUSED)
{
unw_word label = (code & 0x1f);
@@ -1033,10 +993,8 @@ unw_decode_b1 (dp, code, arg)
}
static const unsigned char *
-unw_decode_b2 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_b2 (const unsigned char *dp, unsigned int code,
+ void *arg ATTRIBUTE_UNUSED)
{
unw_word t;
@@ -1046,10 +1004,7 @@ unw_decode_b2 (dp, code, arg)
}
static const unsigned char *
-unw_decode_b3_x4 (dp, code, arg)
- const unsigned char *dp;
- unsigned int code;
- void *arg;
+unw_decode_b3_x4 (const unsigned char *dp, unsigned int code, void *arg)
{
unw_word t, ecount, label;
@@ -1086,7 +1041,7 @@ unw_decode_b3_x4 (dp, code, arg)
}
typedef const unsigned char *(*unw_decoder)
- PARAMS ((const unsigned char *, unsigned int, void *));
+ (const unsigned char *, unsigned int, void *);
static unw_decoder unw_decode_table[2][8] =
{
@@ -1115,10 +1070,8 @@ static unw_decoder unw_decode_table[2][8] =
/* Decode one descriptor and return address of next descriptor. */
const unsigned char *
-unw_decode (dp, inside_body, ptr_inside_body)
- const unsigned char * dp;
- int inside_body;
- void * ptr_inside_body;
+unw_decode (const unsigned char *dp, int inside_body,
+ void *ptr_inside_body)
{
unw_decoder decoder;
unsigned char code;
diff --git a/binutils/unwind-ia64.h b/binutils/unwind-ia64.h
index 30f15b84a92..3b6ab2256ed 100644
--- a/binutils/unwind-ia64.h
+++ b/binutils/unwind-ia64.h
@@ -1,5 +1,5 @@
/* unwind-ia64.h -- dump IA-64 unwind info.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GNU Binutils.
@@ -28,4 +28,4 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000LL)
#define UNW_LENGTH(x) ((x) & 0x00000000ffffffffLL)
-extern const unsigned char * unw_decode PARAMS ((const unsigned char *, int, void *));
+extern const unsigned char *unw_decode (const unsigned char *, int, void *);
diff --git a/binutils/version.c b/binutils/version.c
index 0a7baa307d5..fb1cb848b78 100644
--- a/binutils/version.c
+++ b/binutils/version.c
@@ -1,5 +1,5 @@
/* version.c -- binutils version information
- Copyright 1991, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1991, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -27,13 +27,12 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
implements the --version option for the various programs. */
void
-print_version (name)
- const char *name;
+print_version (const char *name)
{
/* This output is intended to follow the GNU standards document. */
/* xgettext:c-format */
printf ("GNU %s %s\n", name, BFD_VERSION_STRING);
- printf (_("Copyright 2002 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 2003 Free Software Foundation, Inc.\n"));
printf (_("\
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License. This program has absolutely no warranty.\n"));
diff --git a/binutils/windres.c b/binutils/windres.c
index d874fc0873f..012c42b2300 100644
--- a/binutils/windres.c
+++ b/binutils/windres.c
@@ -104,15 +104,15 @@ static struct include_dir *include_dirs;
/* Static functions. */
-static void res_init PARAMS ((void));
-static int extended_menuitems PARAMS ((const struct menuitem *));
-static enum res_format format_from_name PARAMS ((const char *, int));
-static enum res_format format_from_filename PARAMS ((const char *, int));
-static void usage PARAMS ((FILE *, int));
-static int cmp_res_entry PARAMS ((const PTR, const PTR));
-static struct res_directory *sort_resources PARAMS ((struct res_directory *));
-static void reswr_init PARAMS ((void));
-static const char * quot PARAMS ((const char *));
+static void res_init (void);
+static int extended_menuitems (const struct menuitem *);
+static enum res_format format_from_name (const char *, int);
+static enum res_format format_from_filename (const char *, int);
+static void usage (FILE *, int);
+static int cmp_res_entry (const void *, const void *);
+static struct res_directory *sort_resources (struct res_directory *);
+static void reswr_init (void);
+static const char * quot (const char *);
/* When we are building a resource tree, we allocate everything onto
an obstack, so that we can free it all at once if we want. */
@@ -127,18 +127,17 @@ static struct obstack res_obstack;
/* Initialize the resource building obstack. */
static void
-res_init ()
+res_init (void)
{
obstack_init (&res_obstack);
}
/* Allocate space on the resource building obstack. */
-PTR
-res_alloc (bytes)
- size_t bytes;
+void *
+res_alloc (size_t bytes)
{
- return (PTR) obstack_alloc (&res_obstack, bytes);
+ return (void *) obstack_alloc (&res_obstack, bytes);
}
/* We also use an obstack to save memory used while writing out a set
@@ -149,28 +148,24 @@ static struct obstack reswr_obstack;
/* Initialize the resource writing obstack. */
static void
-reswr_init ()
+reswr_init (void)
{
obstack_init (&reswr_obstack);
}
/* Allocate space on the resource writing obstack. */
-PTR
-reswr_alloc (bytes)
- size_t bytes;
+void *
+reswr_alloc (size_t bytes)
{
- return (PTR) obstack_alloc (&reswr_obstack, bytes);
+ return (void *) obstack_alloc (&reswr_obstack, bytes);
}
/* Open a file using the include directory search list. */
FILE *
-open_file_search (filename, mode, errmsg, real_filename)
- const char *filename;
- const char *mode;
- const char *errmsg;
- char **real_filename;
+open_file_search (const char *filename, const char *mode, const char *errmsg,
+ char **real_filename)
{
FILE *e;
struct include_dir *d;
@@ -213,9 +208,7 @@ open_file_search (filename, mode, errmsg, real_filename)
section. */
int
-res_id_cmp (a, b)
- struct res_id a;
- struct res_id b;
+res_id_cmp (struct res_id a, struct res_id b)
{
if (! a.named)
{
@@ -263,10 +256,7 @@ res_id_cmp (a, b)
/* Print a resource ID. */
void
-res_id_print (stream, id, quote)
- FILE *stream;
- struct res_id id;
- int quote;
+res_id_print (FILE *stream, struct res_id id, int quote)
{
if (! id.named)
fprintf (stream, "%lu", id.u.id);
@@ -283,10 +273,7 @@ res_id_print (stream, id, quote)
/* Print a list of resource ID's. */
void
-res_ids_print (stream, cids, ids)
- FILE *stream;
- int cids;
- const struct res_id *ids;
+res_ids_print (FILE *stream, int cids, const struct res_id *ids)
{
int i;
@@ -301,9 +288,7 @@ res_ids_print (stream, cids, ids)
/* Convert an ASCII string to a resource ID. */
void
-res_string_to_id (res_id, string)
- struct res_id *res_id;
- const char *string;
+res_string_to_id (struct res_id *res_id, const char *string)
{
res_id->named = 1;
unicode_from_ascii (&res_id->u.n.length, &res_id->u.n.name, string);
@@ -318,11 +303,8 @@ res_string_to_id (res_id, string)
one. */
struct res_resource *
-define_resource (resources, cids, ids, dupok)
- struct res_directory **resources;
- int cids;
- const struct res_id *ids;
- int dupok;
+define_resource (struct res_directory **resources, int cids,
+ const struct res_id *ids, int dupok)
{
struct res_entry *re = NULL;
int i;
@@ -419,12 +401,8 @@ define_resource (resources, cids, ids, dupok)
that just takes type, name, and language arguments. */
struct res_resource *
-define_standard_resource (resources, type, name, language, dupok)
- struct res_directory **resources;
- int type;
- struct res_id name;
- int language;
- int dupok;
+define_standard_resource (struct res_directory **resources, int type,
+ struct res_id name, int language, int dupok)
{
struct res_id a[3];
@@ -439,9 +417,7 @@ define_standard_resource (resources, type, name, language, dupok)
/* Comparison routine for resource sorting. */
static int
-cmp_res_entry (p1, p2)
- const PTR p1;
- const PTR p2;
+cmp_res_entry (const void *p1, const void *p2)
{
const struct res_entry **re1, **re2;
@@ -453,8 +429,7 @@ cmp_res_entry (p1, p2)
/* Sort the resources. */
static struct res_directory *
-sort_resources (resdir)
- struct res_directory *resdir;
+sort_resources (struct res_directory *resdir)
{
int c, i;
struct res_entry *re;
@@ -496,8 +471,7 @@ sort_resources (resdir)
DIALOGEX. */
int
-extended_dialog (dialog)
- const struct dialog *dialog;
+extended_dialog (const struct dialog *dialog)
{
const struct dialog_control *c;
@@ -514,15 +488,13 @@ extended_dialog (dialog)
/* Return whether MENUITEMS are a MENU or a MENUEX. */
int
-extended_menu (menu)
- const struct menu *menu;
+extended_menu (const struct menu *menu)
{
return extended_menuitems (menu->items);
}
static int
-extended_menuitems (menuitems)
- const struct menuitem *menuitems;
+extended_menuitems (const struct menuitem *menuitems)
{
const struct menuitem *mi;
@@ -554,9 +526,7 @@ extended_menuitems (menuitems)
/* Convert a string to a format type, or exit if it can't be done. */
static enum res_format
-format_from_name (name, exit_on_error)
- const char *name;
- int exit_on_error;
+format_from_name (const char *name, int exit_on_error)
{
const struct format_map *m;
@@ -581,9 +551,7 @@ format_from_name (name, exit_on_error)
it's OK to look at the file itself. */
static enum res_format
-format_from_filename (filename, input)
- const char *filename;
- int input;
+format_from_filename (const char *filename, int input)
{
const char *ext;
FILE *e;
@@ -662,9 +630,7 @@ format_from_filename (filename, input)
/* Print a usage message and exit. */
static void
-usage (stream, status)
- FILE *stream;
- int status;
+usage (FILE *stream, int status)
{
fprintf (stream, _("Usage: %s [option(s)] [input-file] [output-file]\n"),
program_name);
@@ -707,8 +673,7 @@ No input-file is stdin, default rc. No output-file is stdout, default rc.\n"));
/* Quote characters that will confuse the shell when we run the preprocessor. */
static const char *
-quot (string)
- const char *string;
+quot (const char *string)
{
static char *buf = 0;
static int buflen = 0;
@@ -765,14 +730,12 @@ static const struct option long_options[] =
};
/* This keeps gcc happy when using -Wmissing-prototypes -Wstrict-prototypes. */
-int main PARAMS ((int, char **));
+int main (int, char **);
/* The main function. */
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
char *input_filename;
@@ -835,7 +798,7 @@ main (argc, argv)
if (* optarg == 0)
{
if (optind == argc)
- fatal (_("No filename following the -fo option.\n"));
+ fatal (_("No filename following the -fo option.\n"));
optarg = argv [optind++];
}
/* Fall through. */
@@ -897,7 +860,7 @@ main (argc, argv)
input_format = input_format_tmp;
break;
}
-
+
if (preprocargs == NULL)
{
quotedarg = quot (optarg);
@@ -1038,4 +1001,3 @@ main (argc, argv)
xexit (0);
return 0;
}
-
diff --git a/binutils/windres.h b/binutils/windres.h
index 52b53ca9e75..bd1c636c226 100644
--- a/binutils/windres.h
+++ b/binutils/windres.h
@@ -751,43 +751,40 @@ extern int verbose;
/* Function declarations. */
extern struct res_directory *read_rc_file
- PARAMS ((const char *, const char *, const char *, int, int));
-extern struct res_directory *read_res_file PARAMS ((const char *));
-extern struct res_directory *read_coff_rsrc
- PARAMS ((const char *, const char *));
-extern void write_rc_file
- PARAMS ((const char *, const struct res_directory *));
-extern void write_res_file
- PARAMS ((const char *, const struct res_directory *));
+ (const char *, const char *, const char *, int, int);
+extern struct res_directory *read_res_file (const char *);
+extern struct res_directory *read_coff_rsrc (const char *, const char *);
+extern void write_rc_file (const char *, const struct res_directory *);
+extern void write_res_file (const char *, const struct res_directory *);
extern void write_coff_file
- PARAMS ((const char *, const char *, const struct res_directory *));
+ (const char *, const char *, const struct res_directory *);
extern struct res_resource *bin_to_res
- PARAMS ((struct res_id, const unsigned char *, unsigned long, int));
-extern struct bindata *res_to_bin PARAMS ((const struct res_resource *, int));
+ (struct res_id, const unsigned char *, unsigned long, int);
+extern struct bindata *res_to_bin (const struct res_resource *, int);
extern FILE *open_file_search
- PARAMS ((const char *, const char *, const char *, char **));
+ (const char *, const char *, const char *, char **);
-extern PTR res_alloc PARAMS ((size_t));
-extern PTR reswr_alloc PARAMS ((size_t));
+extern void *res_alloc (size_t);
+extern void *reswr_alloc (size_t);
/* Resource ID handling. */
-extern int res_id_cmp PARAMS ((struct res_id, struct res_id));
-extern void res_id_print PARAMS ((FILE *, struct res_id, int));
-extern void res_ids_print PARAMS ((FILE *, int, const struct res_id *));
-extern void res_string_to_id PARAMS ((struct res_id *, const char *));
+extern int res_id_cmp (struct res_id, struct res_id);
+extern void res_id_print (FILE *, struct res_id, int);
+extern void res_ids_print (FILE *, int, const struct res_id *);
+extern void res_string_to_id (struct res_id *, const char *);
/* Manipulation of the resource tree. */
extern struct res_resource *define_resource
- PARAMS ((struct res_directory **, int, const struct res_id *, int));
+ (struct res_directory **, int, const struct res_id *, int);
extern struct res_resource *define_standard_resource
- PARAMS ((struct res_directory **, int, struct res_id, int, int));
+ (struct res_directory **, int, struct res_id, int, int);
-extern int extended_dialog PARAMS ((const struct dialog *));
-extern int extended_menu PARAMS ((const struct menu *));
+extern int extended_dialog (const struct dialog *);
+extern int extended_menu (const struct menu *);
/* Communication between the rc file support and the parser and lexer. */
@@ -796,64 +793,59 @@ extern FILE *yyin;
extern char *rc_filename;
extern int rc_lineno;
-extern int yyparse PARAMS ((void));
-extern int yylex PARAMS ((void));
-extern void yyerror PARAMS ((const char *));
-extern void rcparse_warning PARAMS ((const char *));
-extern void rcparse_set_language PARAMS ((int));
-extern void rcparse_discard_strings PARAMS ((void));
-extern void rcparse_rcdata PARAMS ((void));
-extern void rcparse_normal PARAMS ((void));
+extern int yyparse (void);
+extern int yylex (void);
+extern void yyerror (const char *);
+extern void rcparse_warning (const char *);
+extern void rcparse_set_language (int);
+extern void rcparse_discard_strings (void);
+extern void rcparse_rcdata (void);
+extern void rcparse_normal (void);
extern void define_accelerator
- PARAMS ((struct res_id, const struct res_res_info *, struct accelerator *));
+ (struct res_id, const struct res_res_info *, struct accelerator *);
extern void define_bitmap
- PARAMS ((struct res_id, const struct res_res_info *, const char *));
+ (struct res_id, const struct res_res_info *, const char *);
extern void define_cursor
- PARAMS ((struct res_id, const struct res_res_info *, const char *));
+ (struct res_id, const struct res_res_info *, const char *);
extern void define_dialog
- PARAMS ((struct res_id, const struct res_res_info *, const struct dialog *));
+ (struct res_id, const struct res_res_info *, const struct dialog *);
extern struct dialog_control *define_control
- PARAMS ((const struct res_id, unsigned long, unsigned long, unsigned long,
- unsigned long, unsigned long, unsigned long, unsigned long,
- unsigned long));
+ (const struct res_id, unsigned long, unsigned long, unsigned long,
+ unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
extern struct dialog_control *define_icon_control
- PARAMS ((struct res_id, unsigned long, unsigned long,
- unsigned long, unsigned long, unsigned long, unsigned long,
- struct rcdata_item *, struct dialog_ex *));
+ (struct res_id, unsigned long, unsigned long, unsigned long, unsigned long,
+ unsigned long, unsigned long, struct rcdata_item *, struct dialog_ex *);
extern void define_font
- PARAMS ((struct res_id, const struct res_res_info *, const char *));
+ (struct res_id, const struct res_res_info *, const char *);
extern void define_icon
- PARAMS ((struct res_id, const struct res_res_info *, const char *));
+ (struct res_id, const struct res_res_info *, const char *);
extern void define_menu
- PARAMS ((struct res_id, const struct res_res_info *, struct menuitem *));
+ (struct res_id, const struct res_res_info *, struct menuitem *);
extern struct menuitem *define_menuitem
- PARAMS ((const char *, int, unsigned long, unsigned long, unsigned long,
- struct menuitem *));
+ (const char *, int, unsigned long, unsigned long, unsigned long,
+ struct menuitem *);
extern void define_messagetable
- PARAMS ((struct res_id, const struct res_res_info *, const char *));
+ (struct res_id, const struct res_res_info *, const char *);
extern void define_rcdata
- PARAMS ((struct res_id, const struct res_res_info *, struct rcdata_item *));
+ (struct res_id, const struct res_res_info *, struct rcdata_item *);
extern struct rcdata_item *define_rcdata_string
- PARAMS ((const char *, unsigned long));
-extern struct rcdata_item *define_rcdata_number
- PARAMS ((unsigned long, int));
+ (const char *, unsigned long);
+extern struct rcdata_item *define_rcdata_number (unsigned long, int);
extern void define_stringtable
- PARAMS ((const struct res_res_info *, unsigned long, const char *));
+ (const struct res_res_info *, unsigned long, const char *);
extern void define_user_data
- PARAMS ((struct res_id, struct res_id, const struct res_res_info *,
- struct rcdata_item *));
+ (struct res_id, struct res_id, const struct res_res_info *,
+ struct rcdata_item *);
extern void define_user_file
- PARAMS ((struct res_id, struct res_id, const struct res_res_info *,
- const char *));
+ (struct res_id, struct res_id, const struct res_res_info *, const char *);
extern void define_versioninfo
- PARAMS ((struct res_id, int, struct fixed_versioninfo *,
- struct ver_info *));
+ (struct res_id, int, struct fixed_versioninfo *, struct ver_info *);
extern struct ver_info *append_ver_stringfileinfo
- PARAMS ((struct ver_info *, const char *, struct ver_stringinfo *));
+ (struct ver_info *, const char *, struct ver_stringinfo *);
extern struct ver_info *append_ver_varfileinfo
- PARAMS ((struct ver_info *, const char *, struct ver_varinfo *));
+ (struct ver_info *, const char *, struct ver_varinfo *);
extern struct ver_stringinfo *append_verval
- PARAMS ((struct ver_stringinfo *, const char *, const char *));
+ (struct ver_stringinfo *, const char *, const char *);
extern struct ver_varinfo *append_vertrans
- PARAMS ((struct ver_varinfo *, unsigned long, unsigned long));
+ (struct ver_varinfo *, unsigned long, unsigned long);
diff --git a/binutils/winduni.c b/binutils/winduni.c
index deb6a94d968..65bc6085f33 100644
--- a/binutils/winduni.c
+++ b/binutils/winduni.c
@@ -1,5 +1,5 @@
/* winduni.c -- unicode support for the windres program.
- Copyright 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -40,10 +40,7 @@
expanding chars to shorts, rather than doing something intelligent. */
void
-unicode_from_ascii (length, unicode, ascii)
- int *length;
- unichar **unicode;
- const char *ascii;
+unicode_from_ascii (int *length, unichar **unicode, const char *ascii)
{
int len;
const char *s;
@@ -73,10 +70,7 @@ unicode_from_ascii (length, unicode, ascii)
some Windows function, probably WideCharToMultiByte. */
void
-unicode_print (e, unicode, length)
- FILE *e;
- const unichar *unicode;
- int length;
+unicode_print (FILE *e, const unichar *unicode, int length)
{
while (1)
{
diff --git a/binutils/wrstabs.c b/binutils/wrstabs.c
index 77c7d72a306..0d301f6a249 100644
--- a/binutils/wrstabs.c
+++ b/binutils/wrstabs.c
@@ -173,115 +173,80 @@ struct stab_write_handle
};
static struct bfd_hash_entry *string_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
static bfd_boolean stab_write_symbol
- PARAMS ((struct stab_write_handle *, int, int, bfd_vma, const char *));
+ (struct stab_write_handle *, int, int, bfd_vma, const char *);
static bfd_boolean stab_push_string
- PARAMS ((struct stab_write_handle *, const char *, long, bfd_boolean,
- unsigned int));
+ (struct stab_write_handle *, const char *, long, bfd_boolean, unsigned int);
static bfd_boolean stab_push_defined_type
- PARAMS ((struct stab_write_handle *, long, unsigned int));
-static char *stab_pop_type
- PARAMS ((struct stab_write_handle *));
+ (struct stab_write_handle *, long, unsigned int);
+static char *stab_pop_type (struct stab_write_handle *);
static bfd_boolean stab_modify_type
- PARAMS ((struct stab_write_handle *, int, unsigned int, long **, size_t *));
+ (struct stab_write_handle *, int, unsigned int, long **, size_t *);
static long stab_get_struct_index
- PARAMS ((struct stab_write_handle *, const char *, unsigned int,
- enum debug_type_kind, unsigned int *));
+ (struct stab_write_handle *, const char *, unsigned int,
+ enum debug_type_kind, unsigned int *);
static bfd_boolean stab_class_method_var
- PARAMS ((struct stab_write_handle *, const char *, enum debug_visibility,
- bfd_boolean, bfd_boolean, bfd_boolean, bfd_vma, bfd_boolean));
-static bfd_boolean stab_start_compilation_unit
- PARAMS ((PTR, const char *));
-static bfd_boolean stab_start_source
- PARAMS ((PTR, const char *));
-static bfd_boolean stab_empty_type
- PARAMS ((PTR));
-static bfd_boolean stab_void_type
- PARAMS ((PTR));
-static bfd_boolean stab_int_type
- PARAMS ((PTR, unsigned int, bfd_boolean));
-static bfd_boolean stab_float_type
- PARAMS ((PTR, unsigned int));
-static bfd_boolean stab_complex_type
- PARAMS ((PTR, unsigned int));
-static bfd_boolean stab_bool_type
- PARAMS ((PTR, unsigned int));
+ (struct stab_write_handle *, const char *, enum debug_visibility,
+ bfd_boolean, bfd_boolean, bfd_boolean, bfd_vma, bfd_boolean);
+static bfd_boolean stab_start_compilation_unit (void *, const char *);
+static bfd_boolean stab_start_source (void *, const char *);
+static bfd_boolean stab_empty_type (void *);
+static bfd_boolean stab_void_type (void *);
+static bfd_boolean stab_int_type (void *, unsigned int, bfd_boolean);
+static bfd_boolean stab_float_type (void *, unsigned int);
+static bfd_boolean stab_complex_type (void *, unsigned int);
+static bfd_boolean stab_bool_type (void *, unsigned int);
static bfd_boolean stab_enum_type
- PARAMS ((PTR, const char *, const char **, bfd_signed_vma *));
-static bfd_boolean stab_pointer_type
- PARAMS ((PTR));
-static bfd_boolean stab_function_type
- PARAMS ((PTR, int, bfd_boolean));
-static bfd_boolean stab_reference_type
- PARAMS ((PTR));
-static bfd_boolean stab_range_type
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
+ (void *, const char *, const char **, bfd_signed_vma *);
+static bfd_boolean stab_pointer_type (void *);
+static bfd_boolean stab_function_type (void *, int, bfd_boolean);
+static bfd_boolean stab_reference_type (void *);
+static bfd_boolean stab_range_type (void *, bfd_signed_vma, bfd_signed_vma);
static bfd_boolean stab_array_type
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, bfd_boolean));
-static bfd_boolean stab_set_type
- PARAMS ((PTR, bfd_boolean));
-static bfd_boolean stab_offset_type
- PARAMS ((PTR));
-static bfd_boolean stab_method_type
- PARAMS ((PTR, bfd_boolean, int, bfd_boolean));
-static bfd_boolean stab_const_type
- PARAMS ((PTR));
-static bfd_boolean stab_volatile_type
- PARAMS ((PTR));
+ (void *, bfd_signed_vma, bfd_signed_vma, bfd_boolean);
+static bfd_boolean stab_set_type (void *, bfd_boolean);
+static bfd_boolean stab_offset_type (void *);
+static bfd_boolean stab_method_type (void *, bfd_boolean, int, bfd_boolean);
+static bfd_boolean stab_const_type (void *);
+static bfd_boolean stab_volatile_type (void *);
static bfd_boolean stab_start_struct_type
- PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int));
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int);
static bfd_boolean stab_struct_field
- PARAMS ((PTR, const char *, bfd_vma, bfd_vma, enum debug_visibility));
-static bfd_boolean stab_end_struct_type
- PARAMS ((PTR));
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
+static bfd_boolean stab_end_struct_type (void *);
static bfd_boolean stab_start_class_type
- PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int,
- bfd_boolean, bfd_boolean));
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int,
+ bfd_boolean, bfd_boolean);
static bfd_boolean stab_class_static_member
- PARAMS ((PTR, const char *, const char *, enum debug_visibility));
+ (void *, const char *, const char *, enum debug_visibility);
static bfd_boolean stab_class_baseclass
- PARAMS ((PTR, bfd_vma, bfd_boolean, enum debug_visibility));
-static bfd_boolean stab_class_start_method
- PARAMS ((PTR, const char *));
+ (void *, bfd_vma, bfd_boolean, enum debug_visibility);
+static bfd_boolean stab_class_start_method (void *, const char *);
static bfd_boolean stab_class_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
- bfd_vma, bfd_boolean));
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
+ bfd_vma, bfd_boolean);
static bfd_boolean stab_class_static_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean,
- bfd_boolean));
-static bfd_boolean stab_class_end_method
- PARAMS ((PTR));
-static bfd_boolean stab_end_class_type
- PARAMS ((PTR));
-static bfd_boolean stab_typedef_type
- PARAMS ((PTR, const char *));
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean);
+static bfd_boolean stab_class_end_method (void *);
+static bfd_boolean stab_end_class_type (void *);
+static bfd_boolean stab_typedef_type (void *, const char *);
static bfd_boolean stab_tag_type
- PARAMS ((PTR, const char *, unsigned int, enum debug_type_kind));
-static bfd_boolean stab_typdef
- PARAMS ((PTR, const char *));
-static bfd_boolean stab_tag
- PARAMS ((PTR, const char *));
-static bfd_boolean stab_int_constant
- PARAMS ((PTR, const char *, bfd_vma));
-static bfd_boolean stab_float_constant
- PARAMS ((PTR, const char *, double));
-static bfd_boolean stab_typed_constant
- PARAMS ((PTR, const char *, bfd_vma));
+ (void *, const char *, unsigned int, enum debug_type_kind);
+static bfd_boolean stab_typdef (void *, const char *);
+static bfd_boolean stab_tag (void *, const char *);
+static bfd_boolean stab_int_constant (void *, const char *, bfd_vma);
+static bfd_boolean stab_float_constant (void *, const char *, double);
+static bfd_boolean stab_typed_constant (void *, const char *, bfd_vma);
static bfd_boolean stab_variable
- PARAMS ((PTR, const char *, enum debug_var_kind, bfd_vma));
-static bfd_boolean stab_start_function
- PARAMS ((PTR, const char *, bfd_boolean));
+ (void *, const char *, enum debug_var_kind, bfd_vma);
+static bfd_boolean stab_start_function (void *, const char *, bfd_boolean);
static bfd_boolean stab_function_parameter
- PARAMS ((PTR, const char *, enum debug_parm_kind, bfd_vma));
-static bfd_boolean stab_start_block
- PARAMS ((PTR, bfd_vma));
-static bfd_boolean stab_end_block
- PARAMS ((PTR, bfd_vma));
-static bfd_boolean stab_end_function
- PARAMS ((PTR));
-static bfd_boolean stab_lineno
- PARAMS ((PTR, const char *, unsigned long, bfd_vma));
+ (void *, const char *, enum debug_parm_kind, bfd_vma);
+static bfd_boolean stab_start_block (void *, bfd_vma);
+static bfd_boolean stab_end_block (void *, bfd_vma);
+static bfd_boolean stab_end_function (void *);
+static bfd_boolean stab_lineno (void *, const char *, unsigned long, bfd_vma);
static const struct debug_write_fns stab_fns =
{
@@ -334,10 +299,8 @@ static const struct debug_write_fns stab_fns =
/* Routine to create an entry in a string hash table. */
static struct bfd_hash_entry *
-string_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+string_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table, const char *string)
{
struct string_hash_entry *ret = (struct string_hash_entry *) entry;
@@ -373,12 +336,8 @@ string_hash_newfunc (entry, table, string)
/* Add a symbol to the stabs debugging information we are building. */
static bfd_boolean
-stab_write_symbol (info, type, desc, value, string)
- struct stab_write_handle *info;
- int type;
- int desc;
- bfd_vma value;
- const char *string;
+stab_write_symbol (struct stab_write_handle *info, int type, int desc,
+ bfd_vma value, const char *string)
{
bfd_size_type strx;
bfd_byte sym[STAB_SYMBOL_SIZE];
@@ -435,12 +394,8 @@ stab_write_symbol (info, type, desc, value, string)
/* Push a string on to the type stack. */
static bfd_boolean
-stab_push_string (info, string, index, definition, size)
- struct stab_write_handle *info;
- const char *string;
- long index;
- bfd_boolean definition;
- unsigned int size;
+stab_push_string (struct stab_write_handle *info, const char *string,
+ long index, bfd_boolean definition, unsigned int size)
{
struct stab_type_stack *s;
@@ -464,10 +419,8 @@ stab_push_string (info, string, index, definition, size)
/* Push a type index which has already been defined. */
static bfd_boolean
-stab_push_defined_type (info, index, size)
- struct stab_write_handle *info;
- long index;
- unsigned int size;
+stab_push_defined_type (struct stab_write_handle *info, long index,
+ unsigned int size)
{
char buf[20];
@@ -479,8 +432,7 @@ stab_push_defined_type (info, index, size)
freeing the string. */
static char *
-stab_pop_type (info)
- struct stab_write_handle *info;
+stab_pop_type (struct stab_write_handle *info)
{
struct stab_type_stack *s;
char *ret;
@@ -507,14 +459,11 @@ stab_pop_type (info)
strings, and *PSTRINGSIZE to the size of the strings. */
bfd_boolean
-write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
- pstrings, pstringsize)
- bfd *abfd;
- PTR dhandle;
- bfd_byte **psyms;
- bfd_size_type *psymsize;
- bfd_byte **pstrings;
- bfd_size_type *pstringsize;
+write_stabs_in_sections_debugging_info (bfd *abfd, void *dhandle,
+ bfd_byte **psyms,
+ bfd_size_type *psymsize,
+ bfd_byte **pstrings,
+ bfd_size_type *pstringsize)
{
struct stab_write_handle info;
struct string_hash_entry *h;
@@ -558,7 +507,7 @@ write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
if (! stab_write_symbol (&info, N_SO, 0, 0, bfd_get_filename (abfd)))
return FALSE;
- if (! debug_write (dhandle, &stab_fns, (PTR) &info))
+ if (! debug_write (dhandle, &stab_fns, (void *) &info))
return FALSE;
assert (info.pending_lbrac == (bfd_vma) -1);
@@ -591,9 +540,7 @@ write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
/* Start writing out information for a compilation unit. */
static bfd_boolean
-stab_start_compilation_unit (p, filename)
- PTR p;
- const char *filename;
+stab_start_compilation_unit (void *p, const char *filename)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -610,9 +557,7 @@ stab_start_compilation_unit (p, filename)
/* Start writing out information for a particular source file. */
static bfd_boolean
-stab_start_source (p, filename)
- PTR p;
- const char *filename;
+stab_start_source (void *p, const char *filename)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -629,8 +574,7 @@ stab_start_source (p, filename)
void type. */
static bfd_boolean
-stab_empty_type (p)
- PTR p;
+stab_empty_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -656,8 +600,7 @@ stab_empty_type (p)
/* Push a void type. */
static bfd_boolean
-stab_void_type (p)
- PTR p;
+stab_void_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -682,10 +625,7 @@ stab_void_type (p)
/* Push an integer type. */
static bfd_boolean
-stab_int_type (p, size, unsignedp)
- PTR p;
- unsigned int size;
- bfd_boolean unsignedp;
+stab_int_type (void *p, unsigned int size, bfd_boolean unsignedp)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long *cache;
@@ -745,9 +685,7 @@ stab_int_type (p, size, unsignedp)
/* Push a floating point type. */
static bfd_boolean
-stab_float_type (p, size)
- PTR p;
- unsigned int size;
+stab_float_type (void *p, unsigned int size)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -788,9 +726,7 @@ stab_float_type (p, size)
/* Push a complex type. */
static bfd_boolean
-stab_complex_type (p, size)
- PTR p;
- unsigned int size;
+stab_complex_type (void *p, unsigned int size)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char buf[50];
@@ -808,9 +744,7 @@ stab_complex_type (p, size)
always recognizes them. */
static bfd_boolean
-stab_bool_type (p, size)
- PTR p;
- unsigned int size;
+stab_bool_type (void *p, unsigned int size)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long index;
@@ -841,11 +775,8 @@ stab_bool_type (p, size)
/* Push an enum type. */
static bfd_boolean
-stab_enum_type (p, tag, names, vals)
- PTR p;
- const char *tag;
- const char **names;
- bfd_signed_vma *vals;
+stab_enum_type (void *p, const char *tag, const char **names,
+ bfd_signed_vma *vals)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
size_t len;
@@ -911,12 +842,8 @@ stab_enum_type (p, tag, names, vals)
results in CACHE and CACHE_ALLOC. */
static bfd_boolean
-stab_modify_type (info, mod, size, cache, cache_alloc)
- struct stab_write_handle *info;
- int mod;
- unsigned int size;
- long **cache;
- size_t *cache_alloc;
+stab_modify_type (struct stab_write_handle *info, int mod,
+ unsigned int size, long **cache, size_t *cache_alloc)
{
long targindex;
long index;
@@ -997,8 +924,7 @@ stab_modify_type (info, mod, size, cache, cache_alloc)
/* Push a pointer type. */
static bfd_boolean
-stab_pointer_type (p)
- PTR p;
+stab_pointer_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -1010,10 +936,8 @@ stab_pointer_type (p)
/* Push a function type. */
static bfd_boolean
-stab_function_type (p, argcount, varargs)
- PTR p;
- int argcount;
- bfd_boolean varargs ATTRIBUTE_UNUSED;
+stab_function_type (void *p, int argcount,
+ bfd_boolean varargs ATTRIBUTE_UNUSED)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
int i;
@@ -1049,8 +973,7 @@ stab_function_type (p, argcount, varargs)
/* Push a reference type. */
static bfd_boolean
-stab_reference_type (p)
- PTR p;
+stab_reference_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -1062,10 +985,7 @@ stab_reference_type (p)
/* Push a range type. */
static bfd_boolean
-stab_range_type (p, low, high)
- PTR p;
- bfd_signed_vma low;
- bfd_signed_vma high;
+stab_range_type (void *p, bfd_signed_vma low, bfd_signed_vma high)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
bfd_boolean definition;
@@ -1091,11 +1011,8 @@ stab_range_type (p, low, high)
/* Push an array type. */
static bfd_boolean
-stab_array_type (p, low, high, stringp)
- PTR p;
- bfd_signed_vma low;
- bfd_signed_vma high;
- bfd_boolean stringp;
+stab_array_type (void *p, bfd_signed_vma low, bfd_signed_vma high,
+ bfd_boolean stringp)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
bfd_boolean definition;
@@ -1148,9 +1065,7 @@ stab_array_type (p, low, high, stringp)
/* Push a set type. */
static bfd_boolean
-stab_set_type (p, bitstringp)
- PTR p;
- bfd_boolean bitstringp;
+stab_set_type (void *p, bfd_boolean bitstringp)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
bfd_boolean definition;
@@ -1191,8 +1106,7 @@ stab_set_type (p, bitstringp)
/* Push an offset type. */
static bfd_boolean
-stab_offset_type (p)
- PTR p;
+stab_offset_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
bfd_boolean definition;
@@ -1220,11 +1134,8 @@ stab_offset_type (p)
/* Push a method type. */
static bfd_boolean
-stab_method_type (p, domainp, argcount, varargs)
- PTR p;
- bfd_boolean domainp;
- int argcount;
- bfd_boolean varargs;
+stab_method_type (void *p, bfd_boolean domainp, int argcount,
+ bfd_boolean varargs)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
bfd_boolean definition;
@@ -1322,8 +1233,7 @@ stab_method_type (p, domainp, argcount, varargs)
/* Push a const version of a type. */
static bfd_boolean
-stab_const_type (p)
- PTR p;
+stab_const_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -1334,8 +1244,7 @@ stab_const_type (p)
/* Push a volatile version of a type. */
static bfd_boolean
-stab_volatile_type (p)
- PTR p;
+stab_volatile_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -1347,12 +1256,9 @@ stab_volatile_type (p)
return -1 if it fails. */
static long
-stab_get_struct_index (info, tag, id, kind, psize)
- struct stab_write_handle *info;
- const char *tag;
- unsigned int id;
- enum debug_type_kind kind;
- unsigned int *psize;
+stab_get_struct_index (struct stab_write_handle *info, const char *tag,
+ unsigned int id, enum debug_type_kind kind,
+ unsigned int *psize)
{
if (id >= info->type_cache.struct_types_alloc)
{
@@ -1398,12 +1304,8 @@ stab_get_struct_index (info, tag, id, kind, psize)
stab_tag. */
static bfd_boolean
-stab_start_struct_type (p, tag, id, structp, size)
- PTR p;
- const char *tag;
- unsigned int id;
- bfd_boolean structp;
- unsigned int size;
+stab_start_struct_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp, unsigned int size)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long index;
@@ -1444,12 +1346,8 @@ stab_start_struct_type (p, tag, id, structp, size)
/* Add a field to a struct. */
static bfd_boolean
-stab_struct_field (p, name, bitpos, bitsize, visibility)
- PTR p;
- const char *name;
- bfd_vma bitpos;
- bfd_vma bitsize;
- enum debug_visibility visibility;
+stab_struct_field (void *p, const char *name, bfd_vma bitpos,
+ bfd_vma bitsize, enum debug_visibility visibility)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
bfd_boolean definition;
@@ -1511,8 +1409,7 @@ stab_struct_field (p, name, bitpos, bitsize, visibility)
/* Finish up a struct. */
static bfd_boolean
-stab_end_struct_type (p)
- PTR p;
+stab_end_struct_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
bfd_boolean definition;
@@ -1544,14 +1441,7 @@ stab_end_struct_type (p)
/* Start outputting a class. */
static bfd_boolean
-stab_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
- PTR p;
- const char *tag;
- unsigned int id;
- bfd_boolean structp;
- unsigned int size;
- bfd_boolean vptr;
- bfd_boolean ownvptr;
+stab_start_class_type (void *p, const char *tag, unsigned int id, bfd_boolean structp, unsigned int size, bfd_boolean vptr, bfd_boolean ownvptr)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
bfd_boolean definition;
@@ -1600,11 +1490,8 @@ stab_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
/* Add a static member to the class on the type stack. */
static bfd_boolean
-stab_class_static_member (p, name, physname, visibility)
- PTR p;
- const char *name;
- const char *physname;
- enum debug_visibility visibility;
+stab_class_static_member (void *p, const char *name, const char *physname,
+ enum debug_visibility visibility)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
bfd_boolean definition;
@@ -1657,11 +1544,8 @@ stab_class_static_member (p, name, physname, visibility)
/* Add a base class to the class on the type stack. */
static bfd_boolean
-stab_class_baseclass (p, bitpos, virtual, visibility)
- PTR p;
- bfd_vma bitpos;
- bfd_boolean virtual;
- enum debug_visibility visibility;
+stab_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual,
+ enum debug_visibility visibility)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
bfd_boolean definition;
@@ -1727,9 +1611,7 @@ stab_class_baseclass (p, bitpos, virtual, visibility)
/* Start adding a method to the class on the type stack. */
static bfd_boolean
-stab_class_start_method (p, name)
- PTR p;
- const char *name;
+stab_class_start_method (void *p, const char *name)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *m;
@@ -1759,16 +1641,11 @@ stab_class_start_method (p, name)
/* Add a variant, either static or not, to the current method. */
static bfd_boolean
-stab_class_method_var (info, physname, visibility, staticp, constp, volatilep,
- voffset, contextp)
- struct stab_write_handle *info;
- const char *physname;
- enum debug_visibility visibility;
- bfd_boolean staticp;
- bfd_boolean constp;
- bfd_boolean volatilep;
- bfd_vma voffset;
- bfd_boolean contextp;
+stab_class_method_var (struct stab_write_handle *info, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean staticp, bfd_boolean constp,
+ bfd_boolean volatilep, bfd_vma voffset,
+ bfd_boolean contextp)
{
bfd_boolean definition;
char *type;
@@ -1854,15 +1731,10 @@ stab_class_method_var (info, physname, visibility, staticp, constp, volatilep,
/* Add a variant to the current method. */
static bfd_boolean
-stab_class_method_variant (p, physname, visibility, constp, volatilep,
- voffset, contextp)
- PTR p;
- const char *physname;
- enum debug_visibility visibility;
- bfd_boolean constp;
- bfd_boolean volatilep;
- bfd_vma voffset;
- bfd_boolean contextp;
+stab_class_method_variant (void *p, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep,
+ bfd_vma voffset, bfd_boolean contextp)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -1873,12 +1745,9 @@ stab_class_method_variant (p, physname, visibility, constp, volatilep,
/* Add a static variant to the current method. */
static bfd_boolean
-stab_class_static_method_variant (p, physname, visibility, constp, volatilep)
- PTR p;
- const char *physname;
- enum debug_visibility visibility;
- bfd_boolean constp;
- bfd_boolean volatilep;
+stab_class_static_method_variant (void *p, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -1889,8 +1758,7 @@ stab_class_static_method_variant (p, physname, visibility, constp, volatilep)
/* Finish up a method. */
static bfd_boolean
-stab_class_end_method (p)
- PTR p;
+stab_class_end_method (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -1906,8 +1774,7 @@ stab_class_end_method (p)
/* Finish up a class. */
static bfd_boolean
-stab_end_class_type (p)
- PTR p;
+stab_end_class_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
size_t len;
@@ -1981,9 +1848,7 @@ stab_end_class_type (p)
/* Push a typedef which was previously defined. */
static bfd_boolean
-stab_typedef_type (p, name)
- PTR p;
- const char *name;
+stab_typedef_type (void *p, const char *name)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
struct string_hash_entry *h;
@@ -1997,11 +1862,8 @@ stab_typedef_type (p, name)
/* Push a struct, union or class tag. */
static bfd_boolean
-stab_tag_type (p, name, id, kind)
- PTR p;
- const char *name;
- unsigned int id;
- enum debug_type_kind kind;
+stab_tag_type (void *p, const char *name, unsigned int id,
+ enum debug_type_kind kind)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long index;
@@ -2017,9 +1879,7 @@ stab_tag_type (p, name, id, kind)
/* Define a typedef. */
static bfd_boolean
-stab_typdef (p, name)
- PTR p;
- const char *name;
+stab_typdef (void *p, const char *name)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long index;
@@ -2068,9 +1928,7 @@ stab_typdef (p, name)
/* Define a tag. */
static bfd_boolean
-stab_tag (p, tag)
- PTR p;
- const char *tag;
+stab_tag (void *p, const char *tag)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *s, *buf;
@@ -2093,10 +1951,7 @@ stab_tag (p, tag)
/* Define an integer constant. */
static bfd_boolean
-stab_int_constant (p, name, val)
- PTR p;
- const char *name;
- bfd_vma val;
+stab_int_constant (void *p, const char *name, bfd_vma val)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *buf;
@@ -2115,10 +1970,7 @@ stab_int_constant (p, name, val)
/* Define a floating point constant. */
static bfd_boolean
-stab_float_constant (p, name, val)
- PTR p;
- const char *name;
- double val;
+stab_float_constant (void *p, const char *name, double val)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *buf;
@@ -2137,10 +1989,7 @@ stab_float_constant (p, name, val)
/* Define a typed constant. */
static bfd_boolean
-stab_typed_constant (p, name, val)
- PTR p;
- const char *name;
- bfd_vma val;
+stab_typed_constant (void *p, const char *name, bfd_vma val)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *s, *buf;
@@ -2162,11 +2011,8 @@ stab_typed_constant (p, name, val)
/* Record a variable. */
static bfd_boolean
-stab_variable (p, name, kind, val)
- PTR p;
- const char *name;
- enum debug_var_kind kind;
- bfd_vma val;
+stab_variable (void *p, const char *name, enum debug_var_kind kind,
+ bfd_vma val)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *s, *buf;
@@ -2235,10 +2081,7 @@ stab_variable (p, name, kind, val)
/* Start outputting a function. */
static bfd_boolean
-stab_start_function (p, name, globalp)
- PTR p;
- const char *name;
- bfd_boolean globalp;
+stab_start_function (void *p, const char *name, bfd_boolean globalp)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *rettype, *buf;
@@ -2266,11 +2109,7 @@ stab_start_function (p, name, globalp)
/* Output a function parameter. */
static bfd_boolean
-stab_function_parameter (p, name, kind, val)
- PTR p;
- const char *name;
- enum debug_parm_kind kind;
- bfd_vma val;
+stab_function_parameter (void *p, const char *name, enum debug_parm_kind kind, bfd_vma val)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *s, *buf;
@@ -2320,9 +2159,7 @@ stab_function_parameter (p, name, kind, val)
/* Start a block. */
static bfd_boolean
-stab_start_block (p, addr)
- PTR p;
- bfd_vma addr;
+stab_start_block (void *p, bfd_vma addr)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -2375,9 +2212,7 @@ stab_start_block (p, addr)
/* End a block. */
static bfd_boolean
-stab_end_block (p, addr)
- PTR p;
- bfd_vma addr;
+stab_end_block (void *p, bfd_vma addr)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -2408,8 +2243,7 @@ stab_end_block (p, addr)
/* End a function. */
static bfd_boolean
-stab_end_function (p)
- PTR p ATTRIBUTE_UNUSED;
+stab_end_function (void *p ATTRIBUTE_UNUSED)
{
return TRUE;
}
@@ -2417,11 +2251,7 @@ stab_end_function (p)
/* Output a line number. */
static bfd_boolean
-stab_lineno (p, file, lineno, addr)
- PTR p;
- const char *file;
- unsigned long lineno;
- bfd_vma addr;
+stab_lineno (void *p, const char *file, unsigned long lineno, bfd_vma addr)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;