-E switch to set opt_pp_only

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-02 17:58:21 +01:00
parent ab86b0470c
commit a195e296a9
2 changed files with 7 additions and 0 deletions

View file

@ -1012,6 +1012,7 @@ extern bool opts_dump;
extern bool opts_werror;
extern bool opts_forcecrc;
extern uint16_t opts_forced_crc;
extern bool opts_pp_only;
/*===================================================================*/
#define OPTS_FLAG(i) (!! (opts_flags[(i)/32] & (1<< ((i)%32))))

6
main.c
View file

@ -34,6 +34,7 @@ bool opts_memchk = false;
bool opts_dump = false;
bool opts_werror = false;
bool opts_forcecrc = false;
bool opts_pp_only = false;
uint16_t opts_forced_crc;
@ -61,6 +62,7 @@ static int usage() {
printf(" -o, --output=file output file, defaults to progs.dat\n"
" -a filename add an asm file to be assembled\n"
" -s filename add a progs.src file to be used\n");
printf(" -E stop after preprocessing\n");
printf(" -f<flag> enable a flag\n"
" -fno-<flag> disable a flag\n"
" -std standard select one of the following standards\n"
@ -212,6 +214,10 @@ static bool options_parse(int argc, char **argv) {
exit(0);
break;
case 'E':
opts_pp_only = true;
break;
/* handle all -fflags */
case 'f':
util_strtocmd(argv[0]+2, argv[0]+2, strlen(argv[0]+2)+1);