From 7bd93e9e822b6cadcc58dbb1fdd05c742f649fb5 Mon Sep 17 00:00:00 2001 From: cuz Date: Thu, 22 Jun 2000 11:38:57 +0000 Subject: [PATCH] New long option: --debug git-svn-id: svn://svn.cc65.org/cc65/trunk@98 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/main.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/cc65/main.c b/src/cc65/main.c index cc8136f3c..0b0388bf0 100644 --- a/src/cc65/main.c +++ b/src/cc65/main.c @@ -113,6 +113,7 @@ static void Usage (void) "Long options:\n" " --ansi\t\tStrict ANSI mode\n" " --cpu type\t\tSet cpu type\n" + " --debug\t\tDebug mode\n" " --debug-info\t\tAdd debug info to object file\n" " --help\t\tHelp (this text)\n" " --include-dir dir\tSet an include directory search path\n" @@ -295,6 +296,14 @@ static void OptCPU (const char* Opt, const char* Arg) +static void OptDebug (const char* Opt, const char* Arg) +/* Compiler debug mode */ +{ + Debug = 1; +} + + + static void OptDebugInfo (const char* Opt, const char* Arg) /* Add debug info to the object file */ { @@ -375,6 +384,7 @@ int main (int argc, char* argv[]) { "--add-source", 0, OptAddSource }, { "--ansi", 0, OptAnsi }, { "--cpu", 1, OptCPU }, + { "--debug", 0, OptDebug }, { "--debug-info", 0, OptDebugInfo }, { "--help", 0, OptHelp }, { "--include-dir", 1, OptIncludeDir }, @@ -410,10 +420,10 @@ int main (int argc, char* argv[]) case '-': LongOption (&I, OptTab, sizeof(OptTab)/sizeof(OptTab[0])); - break; + break; - case 'd': /* debug mode */ - Debug = 1; + case 'd': + OptDebug (Arg, 0); break; case 'h': -- 2.39.5