From 5fdc889b24f2a7d3c9911eac04beea4b2373bbf0 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 16 Dec 2008 04:17:48 +0000 Subject: [PATCH] - Restored old -d parameter handling so that I can use "acc -d test.acs" to send debugging output to the console again. - Restored missing lines from ProcessQuoteToken() that prevented proper string parsing with backslashes. SVN r1320 (trunk) --- acc.c | 6 +++--- token.c | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/acc.c b/acc.c index 01cea68..8cadea2 100644 --- a/acc.c +++ b/acc.c @@ -196,9 +196,9 @@ static void ProcessArgs(void) case 'D': acs_DebugMode = YES; acs_VerboseMode = YES; - if((i + 1) < ArgCount) + if(*text != 0) { - OpenDebugFile(ArgVector[++i]); + OpenDebugFile(text); } break; @@ -261,7 +261,7 @@ static void DisplayUsage(void) { puts("\nUsage: ACC [options] source[.acs] [object[.o]]\n"); puts("-i [path] Add include path to find include files"); - puts("-d [file] Output debugging information"); + puts("-d[file] Output debugging information"); puts("-h Create pcode compatible with Hexen and old ZDooms"); exit(1); } diff --git a/token.c b/token.c index d2556af..cdc4d48 100644 --- a/token.c +++ b/token.c @@ -1008,7 +1008,10 @@ static void ProcessQuoteToken(void) *text++ = Chr; } // escape the character after a backslash [JB] - escaped ^= (Chr == ASCII_BACKSLASH); + if(Chr == ASCII_BACKSLASH) + escaped ^= (Chr == ASCII_BACKSLASH); + else + escaped = FALSE; NextChr(); } *text = 0;