mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-07 08:21:59 +00:00
rename qfo_function_t to qfo_func_t and similar for other qfo *function* in
obj_file.[ch]
This commit is contained in:
parent
0d95bc71ff
commit
b9a237b13d
4 changed files with 52 additions and 53 deletions
|
@ -47,7 +47,7 @@ typedef struct qfo_header_s {
|
||||||
int strings_size;
|
int strings_size;
|
||||||
int num_relocs;
|
int num_relocs;
|
||||||
int num_defs;
|
int num_defs;
|
||||||
int num_functions;
|
int num_funcs;
|
||||||
int num_lines;
|
int num_lines;
|
||||||
int types_size;
|
int types_size;
|
||||||
} qfo_header_t;
|
} qfo_header_t;
|
||||||
|
@ -74,7 +74,7 @@ typedef struct qfo_def_s {
|
||||||
#define QFOD_EXTERNAL (1u<<4)
|
#define QFOD_EXTERNAL (1u<<4)
|
||||||
#define QFOD_LOCAL (1u<<5)
|
#define QFOD_LOCAL (1u<<5)
|
||||||
|
|
||||||
typedef struct qfo_function_s {
|
typedef struct qfo_func_s {
|
||||||
string_t name;
|
string_t name;
|
||||||
string_t file;
|
string_t file;
|
||||||
int line;
|
int line;
|
||||||
|
@ -95,7 +95,7 @@ typedef struct qfo_function_s {
|
||||||
|
|
||||||
int relocs;
|
int relocs;
|
||||||
int num_relocs;
|
int num_relocs;
|
||||||
} qfo_function_t;
|
} qfo_func_t;
|
||||||
|
|
||||||
typedef struct qfo_reloc_s {
|
typedef struct qfo_reloc_s {
|
||||||
int ofs;
|
int ofs;
|
||||||
|
@ -116,8 +116,8 @@ typedef struct qfo_s {
|
||||||
int num_relocs;
|
int num_relocs;
|
||||||
qfo_def_t *defs;
|
qfo_def_t *defs;
|
||||||
int num_defs;
|
int num_defs;
|
||||||
qfo_function_t *functions;
|
qfo_func_t *funcs;
|
||||||
int num_functions;
|
int num_funcs;
|
||||||
pr_lineno_t *lines;
|
pr_lineno_t *lines;
|
||||||
int num_lines;
|
int num_lines;
|
||||||
char *types;
|
char *types;
|
||||||
|
@ -147,7 +147,7 @@ void qfo_add_far_data (qfo_t *qfo, pr_type_t *far_data, int far_data_size);
|
||||||
void qfo_add_strings (qfo_t *qfo, const char *strings, int strings_size);
|
void qfo_add_strings (qfo_t *qfo, const char *strings, int strings_size);
|
||||||
void qfo_add_relocs (qfo_t *qfo, qfo_reloc_t *relocs, int num_relocs);
|
void qfo_add_relocs (qfo_t *qfo, qfo_reloc_t *relocs, int num_relocs);
|
||||||
void qfo_add_defs (qfo_t *qfo, qfo_def_t *defs, int num_defs);
|
void qfo_add_defs (qfo_t *qfo, qfo_def_t *defs, int num_defs);
|
||||||
void qfo_add_functions (qfo_t *qfo, qfo_function_t *functions, int num_functions);
|
void qfo_add_funcs (qfo_t *qfo, qfo_func_t *funcs, int num_funcs);
|
||||||
void qfo_add_lines (qfo_t *qfo, pr_lineno_t *lines, int num_lines);
|
void qfo_add_lines (qfo_t *qfo, pr_lineno_t *lines, int num_lines);
|
||||||
void qfo_add_types (qfo_t *qfo, const char *types, int types_size);
|
void qfo_add_types (qfo_t *qfo, const char *types, int types_size);
|
||||||
void qfo_delete (qfo_t *qfo);
|
void qfo_delete (qfo_t *qfo);
|
||||||
|
|
|
@ -75,7 +75,7 @@ static struct {
|
||||||
} relocs;
|
} relocs;
|
||||||
static defgroup_t global_defs, local_defs, defs;
|
static defgroup_t global_defs, local_defs, defs;
|
||||||
static struct {
|
static struct {
|
||||||
qfo_function_t *funcs;
|
qfo_func_t *funcs;
|
||||||
int num_funcs;
|
int num_funcs;
|
||||||
int max_funcs;
|
int max_funcs;
|
||||||
} funcs;
|
} funcs;
|
||||||
|
@ -212,7 +212,7 @@ fixup_def (qfo_t *qfo, qfo_def_t *def, int def_num)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
qfo_reloc_t *reloc;
|
qfo_reloc_t *reloc;
|
||||||
qfo_function_t *func;
|
qfo_func_t *func;
|
||||||
|
|
||||||
def->full_type = strpool_addstr (type_strings,
|
def->full_type = strpool_addstr (type_strings,
|
||||||
qfo->types + def->full_type);
|
qfo->types + def->full_type);
|
||||||
|
@ -260,16 +260,16 @@ add_funcs (qfo_t *qfo)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (funcs.num_funcs + qfo->num_functions > funcs.max_funcs) {
|
if (funcs.num_funcs + qfo->num_funcs > funcs.max_funcs) {
|
||||||
funcs.max_funcs = RUP (funcs.num_funcs + qfo->num_functions, 16384);
|
funcs.max_funcs = RUP (funcs.num_funcs + qfo->num_funcs, 16384);
|
||||||
funcs.funcs = realloc (funcs.funcs,
|
funcs.funcs = realloc (funcs.funcs,
|
||||||
funcs.max_funcs * sizeof (qfo_function_t));
|
funcs.max_funcs * sizeof (qfo_func_t));
|
||||||
}
|
}
|
||||||
funcs.num_funcs += qfo->num_functions;
|
funcs.num_funcs += qfo->num_funcs;
|
||||||
memcpy (funcs.funcs + func_base, qfo->functions,
|
memcpy (funcs.funcs + func_base, qfo->funcs,
|
||||||
qfo->num_functions * sizeof (qfo_function_t));
|
qfo->num_funcs * sizeof (qfo_func_t));
|
||||||
for (i = func_base; i < funcs.num_funcs; i++) {
|
for (i = func_base; i < funcs.num_funcs; i++) {
|
||||||
qfo_function_t *func = funcs.funcs + i;
|
qfo_func_t *func = funcs.funcs + i;
|
||||||
func->name = strpool_addstr (strings, qfo->strings + func->name);
|
func->name = strpool_addstr (strings, qfo->strings + func->name);
|
||||||
func->file = strpool_addstr (strings, qfo->strings + func->file);
|
func->file = strpool_addstr (strings, qfo->strings + func->file);
|
||||||
if (func->code)
|
if (func->code)
|
||||||
|
@ -379,7 +379,7 @@ merge_defgroups (void)
|
||||||
{
|
{
|
||||||
int local_base, i, j;
|
int local_base, i, j;
|
||||||
qfo_def_t *def;
|
qfo_def_t *def;
|
||||||
qfo_function_t *func;
|
qfo_func_t *func;
|
||||||
|
|
||||||
defgroup_add_defs (&defs, global_defs.defs, global_defs.num_defs);
|
defgroup_add_defs (&defs, global_defs.defs, global_defs.num_defs);
|
||||||
local_base = defs.num_defs;
|
local_base = defs.num_defs;
|
||||||
|
@ -502,7 +502,7 @@ linker_finish (void)
|
||||||
qfo_add_strings (qfo, strings->strings, strings->size);
|
qfo_add_strings (qfo, strings->strings, strings->size);
|
||||||
qfo_add_relocs (qfo, relocs.relocs, relocs.num_relocs);
|
qfo_add_relocs (qfo, relocs.relocs, relocs.num_relocs);
|
||||||
qfo_add_defs (qfo, defs.defs, defs.num_defs);
|
qfo_add_defs (qfo, defs.defs, defs.num_defs);
|
||||||
qfo_add_functions (qfo, funcs.funcs, funcs.num_funcs);
|
qfo_add_funcs (qfo, funcs.funcs, funcs.num_funcs);
|
||||||
qfo_add_lines (qfo, lines.lines, lines.num_lines);
|
qfo_add_lines (qfo, lines.lines, lines.num_lines);
|
||||||
qfo_add_types (qfo, type_strings->strings, type_strings->size);
|
qfo_add_types (qfo, type_strings->strings, type_strings->size);
|
||||||
return qfo;
|
return qfo;
|
||||||
|
|
|
@ -58,8 +58,8 @@ static const char rcsid[] =
|
||||||
|
|
||||||
static qfo_def_t *defs;
|
static qfo_def_t *defs;
|
||||||
static int num_defs;
|
static int num_defs;
|
||||||
static qfo_function_t *functions;
|
static qfo_func_t *funcs;
|
||||||
static int num_functions;
|
static int num_funcs;
|
||||||
static qfo_reloc_t *relocs;
|
static qfo_reloc_t *relocs;
|
||||||
static int num_relocs;
|
static int num_relocs;
|
||||||
static strpool_t *types;
|
static strpool_t *types;
|
||||||
|
@ -82,7 +82,7 @@ allocate_stuff (void)
|
||||||
function_t *func;
|
function_t *func;
|
||||||
|
|
||||||
num_defs = pr.scope->num_defs;
|
num_defs = pr.scope->num_defs;
|
||||||
num_functions = pr.num_functions - 1;
|
num_funcs = pr.num_functions - 1;
|
||||||
num_relocs = 0;
|
num_relocs = 0;
|
||||||
for (def = pr.scope->head; def; def = def->def_next) {
|
for (def = pr.scope->head; def; def = def->def_next) {
|
||||||
num_relocs += count_relocs (def->refs);
|
num_relocs += count_relocs (def->refs);
|
||||||
|
@ -98,7 +98,7 @@ allocate_stuff (void)
|
||||||
}
|
}
|
||||||
num_relocs += count_relocs (pr.relocs);
|
num_relocs += count_relocs (pr.relocs);
|
||||||
defs = calloc (num_defs, sizeof (qfo_def_t));
|
defs = calloc (num_defs, sizeof (qfo_def_t));
|
||||||
functions = calloc (num_functions, sizeof (qfo_function_t));
|
funcs = calloc (num_funcs, sizeof (qfo_func_t));
|
||||||
relocs = calloc (num_relocs, sizeof (qfo_reloc_t));
|
relocs = calloc (num_relocs, sizeof (qfo_reloc_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ setup_data (void)
|
||||||
{
|
{
|
||||||
qfo_def_t *def = defs;
|
qfo_def_t *def = defs;
|
||||||
def_t *d;
|
def_t *d;
|
||||||
qfo_function_t *func = functions;
|
qfo_func_t *func = funcs;
|
||||||
function_t *f;
|
function_t *f;
|
||||||
qfo_reloc_t *reloc = relocs;
|
qfo_reloc_t *reloc = relocs;
|
||||||
dstatement_t *st;
|
dstatement_t *st;
|
||||||
|
@ -198,7 +198,7 @@ setup_data (void)
|
||||||
func->num_parms = LittleLong (function_parms (f, func->parm_size));
|
func->num_parms = LittleLong (function_parms (f, func->parm_size));
|
||||||
func->relocs = LittleLong (reloc - relocs);
|
func->relocs = LittleLong (reloc - relocs);
|
||||||
func->num_relocs = LittleLong (count_relocs (f->refs));
|
func->num_relocs = LittleLong (count_relocs (f->refs));
|
||||||
write_relocs (f->refs, &reloc, func - functions);
|
write_relocs (f->refs, &reloc, func - funcs);
|
||||||
|
|
||||||
if (f->scope)
|
if (f->scope)
|
||||||
for (d = f->scope->head; d; d = d->def_next)
|
for (d = f->scope->head; d; d = d->def_next)
|
||||||
|
@ -244,13 +244,13 @@ qfo_from_progs (pr_info_t *pr)
|
||||||
qfo_add_strings (qfo, pr->strings->strings, pr->strings->size);
|
qfo_add_strings (qfo, pr->strings->strings, pr->strings->size);
|
||||||
qfo_add_relocs (qfo, relocs, num_relocs);
|
qfo_add_relocs (qfo, relocs, num_relocs);
|
||||||
qfo_add_defs (qfo, defs, num_defs);
|
qfo_add_defs (qfo, defs, num_defs);
|
||||||
qfo_add_functions (qfo, functions, num_functions);
|
qfo_add_funcs (qfo, funcs, num_funcs);
|
||||||
qfo_add_lines (qfo, linenos, num_linenos);
|
qfo_add_lines (qfo, linenos, num_linenos);
|
||||||
qfo_add_types (qfo, types->strings, types->size);
|
qfo_add_types (qfo, types->strings, types->size);
|
||||||
|
|
||||||
free (defs);
|
free (defs);
|
||||||
free (relocs);
|
free (relocs);
|
||||||
free (functions);
|
free (funcs);
|
||||||
strpool_delete (types);
|
strpool_delete (types);
|
||||||
return qfo;
|
return qfo;
|
||||||
}
|
}
|
||||||
|
@ -273,7 +273,7 @@ qfo_write (qfo_t *qfo, const char *filename)
|
||||||
hdr.strings_size = LittleLong (qfo->strings_size);
|
hdr.strings_size = LittleLong (qfo->strings_size);
|
||||||
hdr.num_relocs = LittleLong (qfo->num_relocs);
|
hdr.num_relocs = LittleLong (qfo->num_relocs);
|
||||||
hdr.num_defs = LittleLong (qfo->num_defs);
|
hdr.num_defs = LittleLong (qfo->num_defs);
|
||||||
hdr.num_functions = LittleLong (qfo->num_functions);
|
hdr.num_funcs = LittleLong (qfo->num_funcs);
|
||||||
hdr.num_lines = LittleLong (qfo->num_lines);
|
hdr.num_lines = LittleLong (qfo->num_lines);
|
||||||
hdr.types_size = LittleLong (qfo->types_size);
|
hdr.types_size = LittleLong (qfo->types_size);
|
||||||
|
|
||||||
|
@ -290,9 +290,8 @@ qfo_write (qfo_t *qfo, const char *filename)
|
||||||
Qwrite (file, qfo->relocs, qfo->num_relocs * sizeof (qfo_reloc_t));
|
Qwrite (file, qfo->relocs, qfo->num_relocs * sizeof (qfo_reloc_t));
|
||||||
if (qfo->num_defs)
|
if (qfo->num_defs)
|
||||||
Qwrite (file, qfo->defs, qfo->num_defs * sizeof (qfo_def_t));
|
Qwrite (file, qfo->defs, qfo->num_defs * sizeof (qfo_def_t));
|
||||||
if (qfo->num_functions)
|
if (qfo->num_funcs)
|
||||||
Qwrite (file, qfo->functions,
|
Qwrite (file, qfo->funcs, qfo->num_funcs * sizeof (qfo_func_t));
|
||||||
qfo->num_functions * sizeof (qfo_function_t));
|
|
||||||
if (qfo->num_lines)
|
if (qfo->num_lines)
|
||||||
Qwrite (file, qfo->lines, qfo->num_lines * sizeof (pr_lineno_t));
|
Qwrite (file, qfo->lines, qfo->num_lines * sizeof (pr_lineno_t));
|
||||||
if (qfo->types_size)
|
if (qfo->types_size)
|
||||||
|
@ -310,7 +309,7 @@ qfo_read (const char *filename)
|
||||||
qfo_header_t hdr;
|
qfo_header_t hdr;
|
||||||
qfo_t *qfo;
|
qfo_t *qfo;
|
||||||
qfo_def_t *def;
|
qfo_def_t *def;
|
||||||
qfo_function_t *func;
|
qfo_func_t *func;
|
||||||
qfo_reloc_t *reloc;
|
qfo_reloc_t *reloc;
|
||||||
dstatement_t *st;
|
dstatement_t *st;
|
||||||
pr_type_t *var;
|
pr_type_t *var;
|
||||||
|
@ -339,7 +338,7 @@ qfo_read (const char *filename)
|
||||||
qfo->strings_size = LittleLong (hdr.strings_size);
|
qfo->strings_size = LittleLong (hdr.strings_size);
|
||||||
qfo->num_relocs = LittleLong (hdr.num_relocs);
|
qfo->num_relocs = LittleLong (hdr.num_relocs);
|
||||||
qfo->num_defs = LittleLong (hdr.num_defs);
|
qfo->num_defs = LittleLong (hdr.num_defs);
|
||||||
qfo->num_functions = LittleLong (hdr.num_functions);
|
qfo->num_funcs = LittleLong (hdr.num_funcs);
|
||||||
qfo->num_lines = LittleLong (hdr.num_lines);
|
qfo->num_lines = LittleLong (hdr.num_lines);
|
||||||
qfo->types_size = LittleLong (hdr.types_size);
|
qfo->types_size = LittleLong (hdr.types_size);
|
||||||
|
|
||||||
|
@ -359,7 +358,7 @@ qfo_read (const char *filename)
|
||||||
qfo->strings = malloc (qfo->strings_size);
|
qfo->strings = malloc (qfo->strings_size);
|
||||||
qfo->relocs = malloc (qfo->num_relocs * sizeof (qfo_reloc_t));
|
qfo->relocs = malloc (qfo->num_relocs * sizeof (qfo_reloc_t));
|
||||||
qfo->defs = malloc (qfo->num_defs * sizeof (qfo_def_t));
|
qfo->defs = malloc (qfo->num_defs * sizeof (qfo_def_t));
|
||||||
qfo->functions = malloc (qfo->num_functions * sizeof (qfo_function_t));
|
qfo->funcs = malloc (qfo->num_funcs * sizeof (qfo_func_t));
|
||||||
qfo->lines = malloc (qfo->num_lines * sizeof (pr_lineno_t));
|
qfo->lines = malloc (qfo->num_lines * sizeof (pr_lineno_t));
|
||||||
qfo->types = malloc (qfo->types_size);
|
qfo->types = malloc (qfo->types_size);
|
||||||
|
|
||||||
|
@ -370,7 +369,7 @@ qfo_read (const char *filename)
|
||||||
Qread (file, qfo->strings, qfo->strings_size);
|
Qread (file, qfo->strings, qfo->strings_size);
|
||||||
Qread (file, qfo->relocs, qfo->num_relocs * sizeof (qfo_reloc_t));
|
Qread (file, qfo->relocs, qfo->num_relocs * sizeof (qfo_reloc_t));
|
||||||
Qread (file, qfo->defs, qfo->num_defs * sizeof (qfo_def_t));
|
Qread (file, qfo->defs, qfo->num_defs * sizeof (qfo_def_t));
|
||||||
Qread (file, qfo->functions, qfo->num_functions * sizeof (qfo_function_t));
|
Qread (file, qfo->funcs, qfo->num_funcs * sizeof (qfo_func_t));
|
||||||
if (qfo->num_lines)
|
if (qfo->num_lines)
|
||||||
Qread (file, qfo->lines, qfo->num_lines * sizeof (pr_lineno_t));
|
Qread (file, qfo->lines, qfo->num_lines * sizeof (pr_lineno_t));
|
||||||
Qread (file, qfo->types, qfo->types_size);
|
Qread (file, qfo->types, qfo->types_size);
|
||||||
|
@ -405,8 +404,8 @@ qfo_read (const char *filename)
|
||||||
def->file = LittleLong (def->file);
|
def->file = LittleLong (def->file);
|
||||||
def->line = LittleLong (def->line);
|
def->line = LittleLong (def->line);
|
||||||
}
|
}
|
||||||
for (func = qfo->functions;
|
for (func = qfo->funcs;
|
||||||
func - qfo->functions < qfo->num_functions; func++) {
|
func - qfo->funcs < qfo->num_funcs; func++) {
|
||||||
func->name = LittleLong (func->name);
|
func->name = LittleLong (func->name);
|
||||||
func->file = LittleLong (func->file);
|
func->file = LittleLong (func->file);
|
||||||
func->line = LittleLong (func->line);
|
func->line = LittleLong (func->line);
|
||||||
|
@ -447,7 +446,7 @@ qfo_to_progs (qfo_t *qfo, pr_info_t *pr)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
function_t *pf;
|
function_t *pf;
|
||||||
qfo_function_t *qf;
|
qfo_func_t *qf;
|
||||||
def_t *pd;
|
def_t *pd;
|
||||||
qfo_def_t *qd;
|
qfo_def_t *qd;
|
||||||
reloc_t *relocs;
|
reloc_t *relocs;
|
||||||
|
@ -492,11 +491,11 @@ qfo_to_progs (qfo_t *qfo, pr_info_t *pr)
|
||||||
pd->line = qd->line;
|
pd->line = qd->line;
|
||||||
}
|
}
|
||||||
|
|
||||||
pr->num_functions = qfo->num_functions + 1;
|
pr->num_functions = qfo->num_funcs + 1;
|
||||||
pr->func_head = calloc (qfo->num_functions, sizeof (function_t));
|
pr->func_head = calloc (qfo->num_funcs, sizeof (function_t));
|
||||||
pr->func_tail = &pr->func_head;
|
pr->func_tail = &pr->func_head;
|
||||||
for (i = 0, pf = pr->func_head, qf = qfo->functions;
|
for (i = 0, pf = pr->func_head, qf = qfo->funcs;
|
||||||
i < qfo->num_functions; i++, pf++, qf++) {
|
i < qfo->num_funcs; i++, pf++, qf++) {
|
||||||
*pr->func_tail = pf;
|
*pr->func_tail = pf;
|
||||||
pr->func_tail = &pf->next;
|
pr->func_tail = &pf->next;
|
||||||
pf->aux = new_auxfunction ();
|
pf->aux = new_auxfunction ();
|
||||||
|
@ -594,13 +593,13 @@ qfo_add_defs (qfo_t *qfo, qfo_def_t *defs, int num_defs)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
qfo_add_functions (qfo_t *qfo, qfo_function_t *functions, int num_functions)
|
qfo_add_funcs (qfo_t *qfo, qfo_func_t *funcs, int num_funcs)
|
||||||
{
|
{
|
||||||
if (!num_functions)
|
if (!num_funcs)
|
||||||
return;
|
return;
|
||||||
qfo->functions = malloc (num_functions * sizeof (qfo_function_t));
|
qfo->funcs = malloc (num_funcs * sizeof (qfo_func_t));
|
||||||
qfo->num_functions = num_functions;
|
qfo->num_funcs = num_funcs;
|
||||||
memcpy (qfo->functions, functions, num_functions * sizeof (qfo_function_t));
|
memcpy (qfo->funcs, funcs, num_funcs * sizeof (qfo_func_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -640,8 +639,8 @@ qfo_delete (qfo_t *qfo)
|
||||||
free (qfo->relocs);
|
free (qfo->relocs);
|
||||||
if (qfo->defs)
|
if (qfo->defs)
|
||||||
free (qfo->defs);
|
free (qfo->defs);
|
||||||
if (qfo->functions)
|
if (qfo->funcs)
|
||||||
free (qfo->functions);
|
free (qfo->funcs);
|
||||||
if (qfo->lines)
|
if (qfo->lines)
|
||||||
free (qfo->lines);
|
free (qfo->lines);
|
||||||
if (qfo->types)
|
if (qfo->types)
|
||||||
|
|
|
@ -94,7 +94,7 @@ dump_defs (qfo_t *qfo)
|
||||||
// qfo->strings + qfo->data[def->ofs].string_var);
|
// qfo->strings + qfo->data[def->ofs].string_var);
|
||||||
} else if (def->basic_type == ev_func) {
|
} else if (def->basic_type == ev_func) {
|
||||||
printf (" %4d %s\n", qfo->data[def->ofs].func_var,
|
printf (" %4d %s\n", qfo->data[def->ofs].func_var,
|
||||||
qfo->strings + qfo->functions[qfo->data[def->ofs].func_var - 1].name);
|
qfo->strings + qfo->funcs[qfo->data[def->ofs].func_var - 1].name);
|
||||||
} else {
|
} else {
|
||||||
// printf (" %4d\n", qfo->data[def->ofs].integer_var);
|
// printf (" %4d\n", qfo->data[def->ofs].integer_var);
|
||||||
}
|
}
|
||||||
|
@ -103,14 +103,14 @@ dump_defs (qfo_t *qfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dump_functions (qfo_t *qfo)
|
dump_funcs (qfo_t *qfo)
|
||||||
{
|
{
|
||||||
qfo_function_t *func;
|
qfo_func_t *func;
|
||||||
int i;
|
int i;
|
||||||
const char *str = qfo->strings;
|
const char *str = qfo->strings;
|
||||||
|
|
||||||
for (i = 0; i < qfo->num_functions; i++) {
|
for (i = 0; i < qfo->num_funcs; i++) {
|
||||||
func = qfo->functions + i;
|
func = qfo->funcs + i;
|
||||||
printf ("%s %s:%d %d %d %d\n",
|
printf ("%s %s:%d %d %d %d\n",
|
||||||
str + func->name, str + func->file, func->line,
|
str + func->name, str + func->file, func->line,
|
||||||
func->builtin, func->code, func->def);
|
func->builtin, func->code, func->def);
|
||||||
|
@ -161,7 +161,7 @@ main (int argc, char **argv)
|
||||||
if (!qfo)
|
if (!qfo)
|
||||||
return 1;
|
return 1;
|
||||||
dump_defs (qfo);
|
dump_defs (qfo);
|
||||||
dump_functions (qfo);
|
dump_funcs (qfo);
|
||||||
dump_relocs (qfo);
|
dump_relocs (qfo);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue