More cleanup

This commit is contained in:
Dale Weiler 2015-01-13 21:46:52 -05:00
parent 9d89a059aa
commit a7b45ea14d
4 changed files with 4 additions and 23 deletions

12
main.c
View file

@ -36,8 +36,7 @@ static int usage(void) {
con_out("usage: %s [options] [files...]", app_name);
con_out("options:\n"
" -h, --help show this help message\n"
" -debug turns on compiler debug messages\n"
" -memchk turns on compiler memory leak check\n");
" -debug turns on compiler debug messages\n");
con_out(" -o, --output=file output file, defaults to progs.dat\n"
" -s filename add a progs.src file to be used\n");
con_out(" -E stop after preprocessing\n");
@ -123,7 +122,6 @@ static bool options_parse(int argc, char **argv) {
size_t itr;
char buffer[1024];
char *config = NULL;
char *memdumpcols = NULL;
while (!argend && argc > 1) {
char *argarg;
@ -202,10 +200,6 @@ static bool options_parse(int argc, char **argv) {
config = argarg;
continue;
}
if (options_long_gcc("memdumpcols", &argc, &argv, &memdumpcols)) {
OPTS_OPTION_U16(OPTION_MEMDUMPCOLS) = (uint16_t)strtol(memdumpcols, NULL, 10);
continue;
}
if (options_long_gcc("progsrc", &argc, &argv, &argarg)) {
OPTS_OPTION_STR(OPTION_PROGSRC) = argarg;
continue;
@ -246,10 +240,6 @@ static bool options_parse(int argc, char **argv) {
OPTS_OPTION_BOOL(OPTION_DUMPFIN) = true;
continue;
}
if (!strcmp(argv[0]+1, "memchk")) {
OPTS_OPTION_BOOL(OPTION_MEMCHK) = true;
continue;
}
if (!strcmp(argv[0]+1, "nocolor")) {
con_color(0);
continue;

1
opts.c
View file

@ -112,7 +112,6 @@ void opts_init(const char *output, int standard, size_t arraysize) {
OPTS_OPTION_STR(OPTION_OUTPUT) = output;
OPTS_OPTION_U32(OPTION_STANDARD) = standard;
OPTS_OPTION_U32(OPTION_MAX_ARRAY_SIZE) = arraysize;
OPTS_OPTION_U16(OPTION_MEMDUMPCOLS) = 16;
}
static bool opts_setflag_all(const char *name, bool on, uint32_t *flags, const opts_flag_def_t *list, size_t listsize) {

View file

@ -104,8 +104,6 @@
GMQCC_DEFINE_FLAG(G)
GMQCC_DEFINE_FLAG(STANDARD)
GMQCC_DEFINE_FLAG(DEBUG)
GMQCC_DEFINE_FLAG(MEMDUMPCOLS)
GMQCC_DEFINE_FLAG(MEMCHK)
GMQCC_DEFINE_FLAG(DUMPFIN)
GMQCC_DEFINE_FLAG(DUMP)
GMQCC_DEFINE_FLAG(FORCECRC)
@ -113,7 +111,6 @@
GMQCC_DEFINE_FLAG(PP_ONLY)
GMQCC_DEFINE_FLAG(MAX_ARRAY_SIZE)
GMQCC_DEFINE_FLAG(ADD_INFO)
GMQCC_DEFINE_FLAG(STATISTICS)
GMQCC_DEFINE_FLAG(PROGSRC)
GMQCC_DEFINE_FLAG(COVERAGE)
GMQCC_DEFINE_FLAG(STATE_FPS)

5
test.c
View file

@ -1279,7 +1279,6 @@ int main(int argc, char **argv) {
char *defs = NULL;
con_init();
OPTS_OPTION_U16(OPTION_MEMDUMPCOLS) = 16;
/*
* Command line option parsing commences now We only need to support
@ -1297,10 +1296,6 @@ int main(int argc, char **argv) {
OPTS_OPTION_BOOL(OPTION_DEBUG) = true;
continue;
}
if (!strcmp(argv[0]+1, "memchk")) {
OPTS_OPTION_BOOL(OPTION_MEMCHK) = true;
continue;
}
if (!strcmp(argv[0]+1, "nocolor")) {
con_color(0);
continue;