printdebug function with line and file names

This commit is contained in:
Scarlett
2025-03-31 11:43:30 -04:00
parent d587ed9f3b
commit be311c7418
3 changed files with 206 additions and 181 deletions

View File

@ -10,18 +10,18 @@ extern TableNode *chara;
extern TableNode *stri;
extern TableNode *boo;
extern bool DEBUG;
extern char * COLOR_YELLOW;
extern char * COLOR_BLUE;
extern char * COLOR_WHITE;
extern char *COLOR_YELLOW;
extern char *COLOR_BLUE;
extern char *COLOR_WHITE;
int main(int argc, char *argv[]) {
// if last argument is debug then set to true and ignore it for the rest of this file
// if last argument is debug then set to true and ignore it for the rest
// of this file
if (argc > 1 && strcmp(argv[argc - 1], "-debug") == 0) {
DEBUG = true;
argc--;
}
if (argc == 1) {
fprintf(stderr, INVALID);
return -1;