diff options
author | Ben Elliston <bje@au.ibm.com> | 2004-05-26 04:55:55 +0000 |
---|---|---|
committer | Ben Elliston <bje@au.ibm.com> | 2004-05-26 04:55:55 +0000 |
commit | 3e8f6abf1e13bfd39a48b297f2679f5dd5fe6a3a (patch) | |
tree | 7b9315a4e43b3f3b3afd4812669db89b236220c8 /gprof/gmon_io.c | |
parent | 37b1bfcd81b4c43b5a649535c6306713cb04dd69 (diff) | |
download | gdb-3e8f6abf1e13bfd39a48b297f2679f5dd5fe6a3a.zip gdb-3e8f6abf1e13bfd39a48b297f2679f5dd5fe6a3a.tar.gz gdb-3e8f6abf1e13bfd39a48b297f2679f5dd5fe6a3a.tar.bz2 |
* alpha.c, basic_blocks.c, basic_blocks.h, bb_exit_func.c,
call_graph.c, call_graph.h, cg_arcs.c, cg_arcs.h, cg_dfn.c,
cg_dfn.h, cg_print.c, cg_print.h, corefile.c, corefile.h,
gmon_io.c, gmon_io.h, gprof.c, gprof.h, hertz.h, hist.c, hist.h,
i386.c, mips.c, search_list.c, search_list.h, source.c, source.h,
sparc.c, sym_ids.c, sym_ids.h, symtab.c, symtab.h, tahoe.c,
utils.c, utils.h, vax.c, gen-c-prog.awk: Convert K&R C to ANSI C.
Diffstat (limited to 'gprof/gmon_io.c')
-rw-r--r-- | gprof/gmon_io.c | 68 |
1 files changed, 19 insertions, 49 deletions
diff --git a/gprof/gmon_io.c b/gprof/gmon_io.c index 6188631..6261d46 100644 --- a/gprof/gmon_io.c +++ b/gprof/gmon_io.c @@ -44,17 +44,17 @@ enum gmon_ptr_signedness { ptr_unsigned }; -static enum gmon_ptr_size gmon_get_ptr_size PARAMS ((void)); -static enum gmon_ptr_signedness gmon_get_ptr_signedness PARAMS ((void)); +static enum gmon_ptr_size gmon_get_ptr_size (void); +static enum gmon_ptr_signedness gmon_get_ptr_signedness (void); #ifdef BFD_HOST_U_64_BIT -static int gmon_io_read_64 PARAMS ((FILE *, BFD_HOST_U_64_BIT *)); -static int gmon_io_write_64 PARAMS ((FILE *, BFD_HOST_U_64_BIT)); +static int gmon_io_read_64 (FILE *, BFD_HOST_U_64_BIT *); +static int gmon_io_write_64 (FILE *, BFD_HOST_U_64_BIT); #endif static int gmon_read_raw_arc - PARAMS ((FILE *, bfd_vma *, bfd_vma *, unsigned long *)); + (FILE *, bfd_vma *, bfd_vma *, unsigned long *); static int gmon_write_raw_arc - PARAMS ((FILE *, bfd_vma, bfd_vma, unsigned long)); + (FILE *, bfd_vma, bfd_vma, unsigned long); int gmon_input = 0; int gmon_file_version = 0; /* 0 == old (non-versioned) file format. */ @@ -98,9 +98,7 @@ gmon_get_ptr_signedness () } int -gmon_io_read_32 (ifp, valp) - FILE *ifp; - unsigned int *valp; +gmon_io_read_32 (FILE *ifp, unsigned int *valp) { char buf[4]; @@ -112,9 +110,7 @@ gmon_io_read_32 (ifp, valp) #ifdef BFD_HOST_U_64_BIT static int -gmon_io_read_64 (ifp, valp) - FILE *ifp; - BFD_HOST_U_64_BIT *valp; +gmon_io_read_64 (FILE *ifp, BFD_HOST_U_64_BIT *valp) { char buf[8]; @@ -126,9 +122,7 @@ gmon_io_read_64 (ifp, valp) #endif int -gmon_io_read_vma (ifp, valp) - FILE *ifp; - bfd_vma *valp; +gmon_io_read_vma (FILE *ifp, bfd_vma *valp) { unsigned int val32; #ifdef BFD_HOST_U_64_BIT @@ -163,10 +157,7 @@ gmon_io_read_vma (ifp, valp) } int -gmon_io_read (ifp, buf, n) - FILE *ifp; - char *buf; - size_t n; +gmon_io_read (FILE *ifp, char *buf, size_t n) { if (fread (buf, 1, n, ifp) != n) return 1; @@ -174,9 +165,7 @@ gmon_io_read (ifp, buf, n) } int -gmon_io_write_32 (ofp, val) - FILE *ofp; - unsigned int val; +gmon_io_write_32 (FILE *ofp, unsigned int val) { char buf[4]; @@ -188,9 +177,7 @@ gmon_io_write_32 (ofp, val) #ifdef BFD_HOST_U_64_BIT static int -gmon_io_write_64 (ofp, val) - FILE *ofp; - BFD_HOST_U_64_BIT val; +gmon_io_write_64 (FILE *ofp, BFD_HOST_U_64_BIT val) { char buf[8]; @@ -202,9 +189,7 @@ gmon_io_write_64 (ofp, val) #endif int -gmon_io_write_vma (ofp, val) - FILE *ofp; - bfd_vma val; +gmon_io_write_vma (FILE *ofp, bfd_vma val) { switch (gmon_get_ptr_size ()) @@ -225,9 +210,7 @@ gmon_io_write_vma (ofp, val) } int -gmon_io_write_8 (ofp, val) - FILE *ofp; - unsigned int val; +gmon_io_write_8 (FILE *ofp, unsigned int val) { char buf[1]; @@ -238,10 +221,7 @@ gmon_io_write_8 (ofp, val) } int -gmon_io_write (ofp, buf, n) - FILE *ofp; - char *buf; - size_t n; +gmon_io_write (FILE *ofp, char *buf, size_t n) { if (fwrite (buf, 1, n, ofp) != n) return 1; @@ -249,11 +229,7 @@ gmon_io_write (ofp, buf, n) } static int -gmon_read_raw_arc (ifp, fpc, spc, cnt) - FILE *ifp; - bfd_vma *fpc; - bfd_vma *spc; - unsigned long *cnt; +gmon_read_raw_arc (FILE *ifp, bfd_vma *fpc, bfd_vma *spc, unsigned long *cnt) { #ifdef BFD_HOST_U_64_BIT BFD_HOST_U_64_BIT cnt64; @@ -284,11 +260,7 @@ gmon_read_raw_arc (ifp, fpc, spc, cnt) } static int -gmon_write_raw_arc (ofp, fpc, spc, cnt) - FILE *ofp; - bfd_vma fpc; - bfd_vma spc; - unsigned long cnt; +gmon_write_raw_arc (FILE *ofp, bfd_vma fpc, bfd_vma spc, unsigned long cnt) { if (gmon_io_write_vma (ofp, fpc) @@ -313,8 +285,7 @@ gmon_write_raw_arc (ofp, fpc, spc, cnt) } void -gmon_out_read (filename) - const char *filename; +gmon_out_read (const char *filename) { FILE *ifp; struct gmon_hdr ghdr; @@ -619,8 +590,7 @@ gmon_out_read (filename) void -gmon_out_write (filename) - const char *filename; +gmon_out_write (const char *filename) { FILE *ofp; struct gmon_hdr ghdr; |