diff --git a/sourcepawn/compiler/sc.h b/sourcepawn/compiler/sc.h index 7dc5f699..20ea5b62 100644 --- a/sourcepawn/compiler/sc.h +++ b/sourcepawn/compiler/sc.h @@ -808,6 +808,7 @@ SC_VDECL int sc_needsemicolon;/* semicolon required to terminate expressions? */ SC_VDECL int sc_dataalign; /* data alignment value */ SC_VDECL int sc_alignnext; /* must frame of the next function be aligned? */ SC_VDECL int pc_docexpr; /* must expression be attached to documentation comment? */ +SC_VDECL int sc_showincludes; /* show include files? */ SC_VDECL int curseg; /* 1 if currently parsing CODE, 2 if parsing DATA */ SC_VDECL cell pc_stksize; /* stack size */ SC_VDECL cell pc_amxlimit; /* abstract machine size limit (code + data, or only code) */ diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index 0dfd810a..e1ab9d24 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -859,11 +859,11 @@ static void parseoptions(int argc,char **argv,char *oname,char *ename,char *pnam int arg,i,isoption; for (arg=1; arg window handle to send a notification message on finish\n"); #endif + pc_printf(" -h show included file paths\n"); pc_printf(" -i path for include files\n"); pc_printf(" -l create list file (preprocess only)\n"); pc_printf(" -o set base name of (P-code) output file\n"); diff --git a/sourcepawn/compiler/sc2.c b/sourcepawn/compiler/sc2.c index 4fb7d3b0..f7bb3d2c 100644 --- a/sourcepawn/compiler/sc2.c +++ b/sourcepawn/compiler/sc2.c @@ -153,6 +153,9 @@ static char *extensions[] = { ".inc", ".p", ".pawn" }; *ext='\0'; /* restore filename */ return FALSE; } /* if */ + if (sc_showincludes && sc_status==statFIRST) { + fprintf(stdout, "Note: including file: %s\n", name); + } PUSHSTK_P(inpf); PUSHSTK_P(inpfname); /* pointer to current file name */ PUSHSTK_P(curlibrary); diff --git a/sourcepawn/compiler/scvars.c b/sourcepawn/compiler/scvars.c index 0d2aedc3..7eed33e1 100644 --- a/sourcepawn/compiler/scvars.c +++ b/sourcepawn/compiler/scvars.c @@ -91,6 +91,7 @@ SC_VDEFINE char *pc_deprecate=NULL;/* if non-null, mark next declaration as depr SC_VDEFINE int sc_curstates=0; /* ID of the current state list */ SC_VDEFINE int pc_optimize=sOPTIMIZE_NOMACRO; /* (peephole) optimization level */ SC_VDEFINE int pc_memflags=0; /* special flags for the stack/heap usage */ +SC_VDEFINE int sc_showincludes=0; /* show include files */ SC_VDEFINE constvalue sc_automaton_tab = { NULL, "", 0, 0}; /* automaton table */ SC_VDEFINE constvalue sc_state_tab = { NULL, "", 0, 0}; /* state table */