Commit cf633f5b by Andreas Jaeger Committed by Andreas Jaeger

mips-tfile.c: Convert prototypes to ISO C90.


	* mips-tfile.c: Convert prototypes to ISO C90.
	* mips-tdump.c: Convert prototypes to ISO C90.

From-SVN: r69048
parent 0cea056b
2003-07-07 Andreas Jaeger <aj@suse.de>
* mips-tfile.c: Convert prototypes to ISO C90.
* mips-tdump.c: Convert prototypes to ISO C90.
2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
* rtl.h (emit_line_note): Take a location_t.
......
......@@ -234,19 +234,19 @@ ulong *rfile_desc; /* relative file tables */
PDR *proc_desc; /* procedure tables */
/* Forward reference for functions. */
static void *read_seek PARAMS ((void *, size_t, off_t, const char *));
static void read_tfile PARAMS ((void));
static void print_global_hdr PARAMS ((struct filehdr *));
static void print_sym_hdr PARAMS ((HDRR *));
static void print_file_desc PARAMS ((FDR *, int));
static void print_symbol PARAMS ((SYMR *, int, const char *, AUXU *, int, FDR *));
static void print_aux PARAMS ((AUXU, int, int));
static void emit_aggregate PARAMS ((char *, AUXU, AUXU, const char *, FDR *));
static const char *st_to_string PARAMS ((st_t));
static const char *sc_to_string PARAMS ((sc_t));
static const char *glevel_to_string PARAMS ((glevel_t));
static const char *lang_to_string PARAMS ((lang_t));
static const char *type_to_string PARAMS ((AUXU *, int, FDR *));
static void *read_seek (void *, size_t, off_t, const char *);
static void read_tfile (void);
static void print_global_hdr (struct filehdr *);
static void print_sym_hdr (HDRR *);
static void print_file_desc (FDR *, int);
static void print_symbol (SYMR *, int, const char *, AUXU *, int, FDR *);
static void print_aux (AUXU, int, int);
static void emit_aggregate (char *, AUXU, AUXU, const char *, FDR *);
static const char *st_to_string (st_t);
static const char *sc_to_string (sc_t);
static const char *glevel_to_string (glevel_t);
static const char *lang_to_string (lang_t);
static const char *type_to_string (AUXU *, int, FDR *);
extern char *optarg;
extern int optind;
......@@ -269,14 +269,13 @@ static const struct option options[] =
{ 0, 0, 0, 0 }
};
/* Read some bytes at a specified location, and return a pointer. */
/* Read some bytes at a specified location, and return a pointer.
Read_seek takes a pointer PTR to a buffer or NULL and reads SIZE
bytes from offset OFFSET. In case of errors CONTEXT is used as
error message. */
static void *
read_seek (ptr, size, offset, context)
void *ptr; /* pointer to buffer or NULL */
size_t size; /* # bytes to read */
off_t offset; /* offset to read at */
const char *context; /* context for error message */
read_seek (void *ptr, size_t size, off_t offset, const char *context)
{
long read_size = 0;
......@@ -308,8 +307,7 @@ read_seek (ptr, size, offset, context)
/* Convert language code to string format. */
static const char *
lang_to_string (lang)
lang_t lang;
lang_to_string (lang_t lang)
{
switch (lang)
{
......@@ -331,8 +329,7 @@ lang_to_string (lang)
/* Convert storage class to string. */
static const char *
sc_to_string(storage_class)
sc_t storage_class;
sc_to_string (sc_t storage_class)
{
switch(storage_class)
{
......@@ -369,8 +366,7 @@ sc_to_string(storage_class)
/* Convert symbol type to string. */
static const char *
st_to_string(symbol_type)
st_t symbol_type;
st_to_string (st_t symbol_type)
{
switch(symbol_type)
{
......@@ -410,8 +406,7 @@ st_to_string(symbol_type)
/* Convert debug level to string. */
static const char *
glevel_to_string (g_level)
glevel_t g_level;
glevel_to_string (glevel_t g_level)
{
switch(g_level)
{
......@@ -428,10 +423,7 @@ glevel_to_string (g_level)
/* Convert the type information to string format. */
static const char *
type_to_string (aux_ptr, index, fdp)
AUXU *aux_ptr;
int index;
FDR *fdp;
type_to_string (AUXU *aux_ptr, int index, FDR *fdp)
{
AUXU u;
struct qual {
......@@ -741,8 +733,7 @@ type_to_string (aux_ptr, index, fdp)
/* Print out the global file header for object files. */
static void
print_global_hdr (ptr)
struct filehdr *ptr;
print_global_hdr (struct filehdr *ptr)
{
char *time = ctime ((time_t *)&ptr->f_timdat);
ushort flags = ptr->f_flags;
......@@ -796,8 +787,7 @@ print_global_hdr (ptr)
/* Print out the symbolic header. */
static void
print_sym_hdr (sym_ptr)
HDRR *sym_ptr;
print_sym_hdr (HDRR *sym_ptr)
{
int width = 20;
......@@ -870,13 +860,8 @@ print_sym_hdr (sym_ptr)
/* Print out a symbol. */
static void
print_symbol (sym_ptr, number, strbase, aux_base, ifd, fdp)
SYMR *sym_ptr;
int number;
const char *strbase;
AUXU *aux_base;
int ifd;
FDR *fdp;
print_symbol (SYMR *sym_ptr, int number, const char *strbase, AUXU *aux_base,
int ifd, FDR *fdp)
{
sc_t storage_class = (sc_t) sym_ptr->sc;
st_t symbol_type = (st_t) sym_ptr->st;
......@@ -1050,10 +1035,7 @@ print_symbol (sym_ptr, number, strbase, aux_base, ifd, fdp)
/* Print out a word from the aux. table in various formats. */
static void
print_aux (u, auxi, used)
AUXU u;
int auxi;
int used;
print_aux (AUXU u, int auxi, int used)
{
printf ("\t%s#%-5d %11ld, [%4ld/%7ld], [%2d %1d:%1d %1x:%1x:%1x:%1x:%1x:%1x]\n",
(used) ? " " : "* ",
......@@ -1076,12 +1058,7 @@ print_aux (u, auxi, used)
/* Write aggregate information to a string. */
static void
emit_aggregate (string, u, u2, which, fdp)
char *string;
AUXU u;
AUXU u2;
const char *which;
FDR *fdp;
emit_aggregate (char *string, AUXU u, AUXU u2, const char *which, FDR *fdp)
{
unsigned int ifd = u.rndx.rfd;
unsigned int index = u.rndx.index;
......@@ -1116,9 +1093,7 @@ emit_aggregate (string, u, u2, which, fdp)
procedures, and line numbers within it. */
static void
print_file_desc (fdp, number)
FDR *fdp;
int number;
print_file_desc (FDR *fdp, int number)
{
char *str_base;
AUXU *aux_base;
......@@ -1344,7 +1319,7 @@ print_file_desc (fdp, number)
/* Read in the portions of the .T file that we will print out. */
static void
read_tfile ()
read_tfile (void)
{
short magic;
off_t sym_hdr_offset = 0;
......@@ -1436,12 +1411,10 @@ read_tfile ()
extern int main PARAMS ((int, char **));
extern int main (int, char **);
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
int i, opt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment