mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 09:51:41 +00:00
Do a little bit of cleanup.
This commit is contained in:
parent
1eb3349510
commit
0872961269
16 changed files with 15 additions and 34 deletions
|
@ -37,7 +37,7 @@ void parse_cpp_name (void);
|
|||
void add_cpp_def (const char *arg);
|
||||
void intermediate_file (struct dstring_s *ifile, const char *filename,
|
||||
const char *ext, int local);
|
||||
FILE * preprocess_file (const char *filename, const char *ext);
|
||||
FILE *preprocess_file (const char *filename, const char *ext);
|
||||
extern const char *cpp_name;
|
||||
extern struct dstring_s *tempname;
|
||||
|
||||
|
|
|
@ -33,12 +33,8 @@
|
|||
|
||||
#include "QF/pr_debug.h"
|
||||
|
||||
void push_source_file (void);
|
||||
void pop_source_file (void);
|
||||
void line_info (char *text);
|
||||
pr_auxfunction_t *new_auxfunction (void);
|
||||
pr_lineno_t *new_lineno (void);
|
||||
struct ddef_s *new_local (void);
|
||||
|
||||
extern int lineno_base;
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#define __function_h
|
||||
|
||||
/** \defgroup qfcc_function Internal function structures.
|
||||
\ingroup qfcc
|
||||
*/
|
||||
|
||||
#include "QF/pr_comp.h"
|
||||
|
|
|
@ -36,5 +36,6 @@ extern int grab_other;
|
|||
|
||||
int do_grab (char *token);
|
||||
void add_frame_macro (char *token);
|
||||
void clear_frame_macros (void);
|
||||
|
||||
#endif//__grab_h
|
||||
|
|
|
@ -54,12 +54,12 @@ typedef struct selector_s {
|
|||
typedef struct methodlist_s {
|
||||
method_t *head;
|
||||
method_t **tail;
|
||||
int count; ///< used only for emitting
|
||||
int count; ///< used only for emitting
|
||||
int instance; ///< used only for emitting
|
||||
} methodlist_t;
|
||||
|
||||
typedef struct keywordarg_s {
|
||||
// the first two fields match the first two fiels of param_t in
|
||||
// the first two fields match the first two fields of param_t in
|
||||
// functionl.h
|
||||
struct keywordarg_s *next;
|
||||
const char *selector;
|
||||
|
|
|
@ -67,7 +67,7 @@ typedef struct qfo_header_s {
|
|||
pr_int_t num_funcs; ///< number of function records
|
||||
pr_int_t num_lines; ///< number of line records
|
||||
pr_int_t num_loose_relocs; ///< number of loose relocation records
|
||||
///< included in num_relocs
|
||||
///< (included in num_relocs)
|
||||
} qfo_header_t;
|
||||
|
||||
typedef enum qfos_type_e {
|
||||
|
|
|
@ -86,19 +86,10 @@ typedef struct pr_info_s {
|
|||
struct pr_lineno_s *linenos;
|
||||
int linenos_size;
|
||||
int num_linenos;
|
||||
|
||||
ddef_t *locals;
|
||||
int locals_size;
|
||||
int num_locals;
|
||||
} pr_info_t;
|
||||
|
||||
extern pr_info_t pr;
|
||||
|
||||
|
||||
extern char destfile[];
|
||||
|
||||
extern struct symtab_s *current_symtab;
|
||||
|
||||
#define GETSTR(s) (pr.strings->strings + (s))
|
||||
#define D_var(t, d) ((d)->space->data[(d)->offset].t##_var)
|
||||
#define D_FLOAT(d) D_var (float, d)
|
||||
|
@ -118,7 +109,6 @@ extern struct symtab_s *current_symtab;
|
|||
|
||||
const char *strip_path (const char *filename);
|
||||
|
||||
void clear_frame_macros (void);
|
||||
extern FILE *qc_yyin;
|
||||
extern FILE *qp_yyin;
|
||||
int qc_yyparse (void);
|
||||
|
|
|
@ -53,7 +53,7 @@ int lineno_base;
|
|||
|
||||
static srcline_t *free_srclines;
|
||||
|
||||
void
|
||||
static void
|
||||
push_source_file (void)
|
||||
{
|
||||
srcline_t *srcline;
|
||||
|
@ -64,7 +64,7 @@ push_source_file (void)
|
|||
pr.srcline_stack = srcline;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
pop_source_file (void)
|
||||
{
|
||||
srcline_t *tmp;
|
||||
|
@ -125,14 +125,3 @@ new_lineno (void)
|
|||
memset (&pr.linenos[pr.num_linenos], 0, sizeof (pr_lineno_t));
|
||||
return &pr.linenos[pr.num_linenos++];
|
||||
}
|
||||
|
||||
ddef_t *
|
||||
new_local (void)
|
||||
{
|
||||
if (pr.num_locals == pr.locals_size) {
|
||||
pr.locals_size += 1024;
|
||||
pr.locals = realloc (pr.locals, pr.locals_size * sizeof (ddef_t));
|
||||
}
|
||||
memset (&pr.locals[pr.num_locals], 0, sizeof (ddef_t));
|
||||
return &pr.locals[pr.num_locals++];
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include "function.h"
|
||||
#include "options.h"
|
||||
#include "reloc.h"
|
||||
#include "shared.h"
|
||||
#include "strpool.h"
|
||||
#include "struct.h"
|
||||
#include "symtab.h"
|
||||
|
|
|
@ -560,7 +560,6 @@ begin_function (symbol_t *sym, const char *nicename, symtab_t *parent,
|
|||
if (options.code.debug) {
|
||||
pr_lineno_t *lineno = new_lineno ();
|
||||
sym->s.func->line_info = lineno - pr.linenos;
|
||||
sym->s.func->local_defs = pr.num_locals;
|
||||
}
|
||||
|
||||
build_scope (sym, parent);
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
#include "method.h"
|
||||
#include "options.h"
|
||||
#include "reloc.h"
|
||||
#include "shared.h"
|
||||
#include "strpool.h"
|
||||
#include "struct.h"
|
||||
#include "symtab.h"
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include "options.h"
|
||||
#include "pragma.h"
|
||||
#include "qfcc.h"
|
||||
#include "shared.h"
|
||||
#include "strpool.h"
|
||||
#include "struct.h"
|
||||
#include "symtab.h"
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
#include "emit.h"
|
||||
#include "expr.h"
|
||||
#include "function.h"
|
||||
#include "grab.h"
|
||||
#include "idstuff.h"
|
||||
#include "linker.h"
|
||||
#include "method.h"
|
||||
|
@ -83,6 +84,7 @@
|
|||
#include "opcodes.h"
|
||||
#include "options.h"
|
||||
#include "reloc.h"
|
||||
#include "shared.h"
|
||||
#include "strpool.h"
|
||||
#include "struct.h"
|
||||
#include "symtab.h"
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "expr.h"
|
||||
#include "grab.h"
|
||||
#include "qfcc.h"
|
||||
#include "shared.h"
|
||||
#include "strpool.h"
|
||||
#include "symtab.h"
|
||||
#include "type.h"
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
#include "obj_type.h"
|
||||
#include "qfcc.h"
|
||||
#include "reloc.h"
|
||||
#include "shared.h"
|
||||
#include "strpool.h"
|
||||
#include "struct.h"
|
||||
#include "symtab.h"
|
||||
|
|
|
@ -28,7 +28,5 @@ void encode_type (struct dstring_s *str, type_t *type) {}
|
|||
codespace_t *codespace_new (void) {return 0;}
|
||||
void codespace_addcode (codespace_t *codespace, struct dstatement_s *code, int size) {}
|
||||
int function_parms (function_t *f, byte *parm_size) {return 0;}
|
||||
pr_auxfunction_t *new_auxfunction (void) {return 0;}
|
||||
ddef_t *new_local (void) {return 0;}
|
||||
void def_to_ddef (def_t *def, ddef_t *ddef, int aux) {}
|
||||
expr_t *warning (expr_t *e, const char *fmt, ...) {return 0;}
|
||||
|
|
Loading…
Reference in a new issue