mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-30 15:41:12 +00:00
Move some things around
This commit is contained in:
parent
c8c25ef6f7
commit
a9ab865add
5 changed files with 38 additions and 29 deletions
2
conout.c
2
conout.c
|
@ -327,6 +327,7 @@ int con_out(const char *fmt, ...) {
|
|||
return ln;
|
||||
}
|
||||
|
||||
#ifndef QCVM_EXECUTOR
|
||||
/*
|
||||
* Utility console message writes for lexer contexts. These will allow
|
||||
* for reporting of file:line based on lexer context, These are used
|
||||
|
@ -445,3 +446,4 @@ bool GMQCC_WARN compile_warning(lex_ctx ctx, int warntype, const char *fmt, ...)
|
|||
va_end(ap);
|
||||
return r;
|
||||
}
|
||||
#endif
|
||||
|
|
31
gmqcc.h
31
gmqcc.h
|
@ -1008,18 +1008,13 @@ void opts_restore_non_Wall(void);
|
|||
void opts_backup_non_Werror_all(void);
|
||||
void opts_restore_non_Werror_all(void);
|
||||
|
||||
|
||||
enum {
|
||||
# define GMQCC_TYPE_FLAGS
|
||||
# define GMQCC_DEFINE_FLAG(X) X,
|
||||
# include "opts.def"
|
||||
COUNT_FLAGS
|
||||
};
|
||||
static const opts_flag_def opts_flag_list[] = {
|
||||
# define GMQCC_TYPE_FLAGS
|
||||
# define GMQCC_DEFINE_FLAG(X) { #X, LONGBIT(X) },
|
||||
# include "opts.def"
|
||||
{ NULL, LONGBIT(0) }
|
||||
};
|
||||
|
||||
enum {
|
||||
# define GMQCC_TYPE_WARNS
|
||||
|
@ -1027,12 +1022,6 @@ enum {
|
|||
# include "opts.def"
|
||||
COUNT_WARNINGS
|
||||
};
|
||||
static const opts_flag_def opts_warn_list[] = {
|
||||
# define GMQCC_TYPE_WARNS
|
||||
# define GMQCC_DEFINE_FLAG(X) { #X, LONGBIT(WARN_##X) },
|
||||
# include "opts.def"
|
||||
{ NULL, LONGBIT(0) }
|
||||
};
|
||||
|
||||
enum {
|
||||
# define GMQCC_TYPE_OPTIMIZATIONS
|
||||
|
@ -1040,18 +1029,6 @@ enum {
|
|||
# include "opts.def"
|
||||
COUNT_OPTIMIZATIONS
|
||||
};
|
||||
static const opts_flag_def opts_opt_list[] = {
|
||||
# define GMQCC_TYPE_OPTIMIZATIONS
|
||||
# define GMQCC_DEFINE_FLAG(NAME, MIN_O) { #NAME, LONGBIT(OPTIM_##NAME) },
|
||||
# include "opts.def"
|
||||
{ NULL, LONGBIT(0) }
|
||||
};
|
||||
static const unsigned int opts_opt_oflag[] = {
|
||||
# define GMQCC_TYPE_OPTIMIZATIONS
|
||||
# define GMQCC_DEFINE_FLAG(NAME, MIN_O) MIN_O,
|
||||
# include "opts.def"
|
||||
0
|
||||
};
|
||||
|
||||
enum {
|
||||
# define GMQCC_TYPE_OPTIONS
|
||||
|
@ -1060,7 +1037,11 @@ enum {
|
|||
OPTION_COUNT
|
||||
};
|
||||
|
||||
extern unsigned int opts_optimizationcount[COUNT_OPTIMIZATIONS];
|
||||
extern const opts_flag_def opts_flag_list[COUNT_FLAGS+1];
|
||||
extern const opts_flag_def opts_warn_list[COUNT_WARNINGS+1];
|
||||
extern const opts_flag_def opts_opt_list[COUNT_OPTIMIZATIONS+1];
|
||||
extern const unsigned int opts_opt_oflag[COUNT_OPTIMIZATIONS+1];
|
||||
extern unsigned int opts_optimizationcount[COUNT_OPTIMIZATIONS];
|
||||
|
||||
/* other options: */
|
||||
typedef enum {
|
||||
|
|
|
@ -16,8 +16,8 @@ LIBS += -lm
|
|||
#objects
|
||||
OBJ_C = main.o lexer.o parser.o fs.o stat.o util.o code.o ast.o ir.o conout.o ftepp.o opts.o utf8.o correct.o
|
||||
OBJ_P = util.o fs.o conout.o opts.o pak.o stat.o
|
||||
OBJ_T = test.o util.o conout.o fs.o stat.o
|
||||
OBJ_X = exec-standalone.o util.o conout.o fs.o stat.o
|
||||
OBJ_T = test.o util.o opts.o conout.o fs.o stat.o
|
||||
OBJ_X = exec-standalone.o util.o opts.o conout.o fs.o stat.o
|
||||
|
||||
#gource flags
|
||||
GOURCEFLAGS = \
|
||||
|
|
1
main.c
1
main.c
|
@ -45,7 +45,6 @@ static ppitem *ppems = NULL;
|
|||
#define TYPE_ASM 1
|
||||
#define TYPE_SRC 2
|
||||
|
||||
|
||||
static const char *app_name;
|
||||
|
||||
static void version(void) {
|
||||
|
|
29
opts.c
29
opts.c
|
@ -26,6 +26,34 @@
|
|||
|
||||
#include "gmqcc.h"
|
||||
|
||||
const unsigned int opts_opt_oflag[COUNT_OPTIMIZATIONS+1] = {
|
||||
# define GMQCC_TYPE_OPTIMIZATIONS
|
||||
# define GMQCC_DEFINE_FLAG(NAME, MIN_O) MIN_O,
|
||||
# include "opts.def"
|
||||
0
|
||||
};
|
||||
|
||||
const opts_flag_def opts_opt_list[COUNT_OPTIMIZATIONS+1] = {
|
||||
# define GMQCC_TYPE_OPTIMIZATIONS
|
||||
# define GMQCC_DEFINE_FLAG(NAME, MIN_O) { #NAME, LONGBIT(OPTIM_##NAME) },
|
||||
# include "opts.def"
|
||||
{ NULL, LONGBIT(0) }
|
||||
};
|
||||
|
||||
const opts_flag_def opts_warn_list[COUNT_WARNINGS+1] = {
|
||||
# define GMQCC_TYPE_WARNS
|
||||
# define GMQCC_DEFINE_FLAG(X) { #X, LONGBIT(WARN_##X) },
|
||||
# include "opts.def"
|
||||
{ NULL, LONGBIT(0) }
|
||||
};
|
||||
|
||||
const opts_flag_def opts_flag_list[COUNT_FLAGS+1] = {
|
||||
# define GMQCC_TYPE_FLAGS
|
||||
# define GMQCC_DEFINE_FLAG(X) { #X, LONGBIT(X) },
|
||||
# include "opts.def"
|
||||
{ NULL, LONGBIT(0) }
|
||||
};
|
||||
|
||||
unsigned int opts_optimizationcount[COUNT_OPTIMIZATIONS];
|
||||
opts_cmd_t opts; /* command lien options */
|
||||
|
||||
|
@ -351,7 +379,6 @@ void opts_ini_init(const char *file) {
|
|||
size_t line;
|
||||
FILE *ini;
|
||||
|
||||
|
||||
if (!file) {
|
||||
/* try ini */
|
||||
if (!(ini = fs_file_open((file = "gmqcc.ini"), "r")))
|
||||
|
|
Loading…
Reference in a new issue