* basic_blocks.c: Replace uses of PTR with void * throughout.
* cg_arcs.c: Likewise.
* cg_print.c: Likewise.
* hist.c: Likewise.
* source.h: Likewise.
* symtab.c: Likewise.
#include "symtab.h"
#include "sym_ids.h"
-static int cmp_bb (const PTR, const PTR);
-static int cmp_ncalls (const PTR, const PTR);
+static int cmp_bb (const void *, const void *);
+static int cmp_ncalls (const void *, const void *);
static void fskip_string (FILE *);
-static void annotate_with_count (char *, unsigned int, int, PTR);
+static void annotate_with_count (char *, unsigned int, int, void *);
/* Default option values: */
bool bb_annotate_all_lines = false;
number, and address (in that order). */
static int
-cmp_bb (const PTR lp, const PTR rp)
+cmp_bb (const void *lp, const void *rp)
{
int r;
const Sym *left = *(const Sym **) lp;
/* Helper for sorting. Order basic blocks in decreasing number of
calls, ties are broken in increasing order of line numbers. */
static int
-cmp_ncalls (const PTR lp, const PTR rp)
+cmp_ncalls (const void *lp, const void *rp)
{
const Sym *left = *(const Sym **) lp;
const Sym *right = *(const Sym **) rp;
that starts the basic-block. */
static void
-annotate_with_count (char *buf, unsigned int width, int line_num, PTR arg)
+annotate_with_count (char *buf, unsigned int width, int line_num, void *arg)
{
Source_File *sf = (Source_File *) arg;
Sym *b;
#include "utils.h"
#include "sym_ids.h"
-static int cmp_topo (const PTR, const PTR);
+static int cmp_topo (const void *, const void *);
static void propagate_time (Sym *);
static void cycle_time (void);
static void cycle_link (void);
static void inherit_flags (Sym *);
static void propagate_flags (Sym **);
-static int cmp_total (const PTR, const PTR);
+static int cmp_total (const void *, const void *);
Sym *cycle_header;
unsigned int num_cycles;
static int
-cmp_topo (const PTR lp, const PTR rp)
+cmp_topo (const void *lp, const void *rp)
{
const Sym *left = *(const Sym **) lp;
const Sym *right = *(const Sym **) rp;
* first. All else being equal, compare by names.
*/
static int
-cmp_total (const PTR lp, const PTR rp)
+cmp_total (const void *lp, const void *rp)
{
const Sym *left = *(const Sym **) lp;
const Sym *right = *(const Sym **) rp;
static void sort_children (Sym *);
static void print_children (Sym *);
static void print_line (Sym *);
-static int cmp_name (const PTR, const PTR);
-static int cmp_arc_count (const PTR, const PTR);
-static int cmp_fun_nuses (const PTR, const PTR);
+static int cmp_name (const void *, const void *);
+static int cmp_arc_count (const void *, const void *);
+static int cmp_fun_nuses (const void *, const void *);
static void order_and_dump_functions_by_arcs
(Arc **, unsigned long, int, Arc **, unsigned long *);
static int
-cmp_name (const PTR left, const PTR right)
+cmp_name (const void *left, const void *right)
{
const Sym **npp1 = (const Sym **) left;
const Sym **npp2 = (const Sym **) right;
We want to sort in descending order. */
static int
-cmp_arc_count (const PTR left, const PTR right)
+cmp_arc_count (const void *left, const void *right)
{
const Arc **npp1 = (const Arc **) left;
const Arc **npp2 = (const Arc **) right;
We want to sort in descending order. */
static int
-cmp_fun_nuses (const PTR left, const PTR right)
+cmp_fun_nuses (const void *left, const void *right)
{
const Sym **npp1 = (const Sym **) left;
const Sym **npp2 = (const Sym **) right;
static void scale_and_align_entries (void);
static void print_header (int);
static void print_line (Sym *, double);
-static int cmp_time (const PTR, const PTR);
+static int cmp_time (const void *, const void *);
/* Declarations of automatically generated functions to output blurbs. */
extern void flat_blurb (FILE * fp);
lexicographic order of the function names. */
static int
-cmp_time (const PTR lp, const PTR rp)
+cmp_time (const void *lp, const void *rp)
{
const Sym *left = *(const Sym **) lp;
const Sym *right = *(const Sym **) rp;
is not stdout, it should be closed when done with it. */
extern FILE *annotate_source
(Source_File *sf, unsigned int max_width,
- void (*annote) (char *, unsigned int, int, PTR arg),
- PTR arg);
+ void (*annote) (char *, unsigned int, int, void *),
+ void *arg);
#endif /* source_h */
#include "cg_arcs.h"
#include "corefile.h"
-static int cmp_addr (const PTR, const PTR);
+static int cmp_addr (const void *, const void *);
Sym_Table symtab;
the global symbol survives. */
static int
-cmp_addr (const PTR lp, const PTR rp)
+cmp_addr (const void *lp, const void *rp)
{
const Sym *left = (const Sym *) lp;
const Sym *right = (const Sym *) rp;