From 81520a58247d998b7069c1fd1d28270ddc72b0f6 Mon Sep 17 00:00:00 2001 From: cuz Date: Mon, 30 Jul 2001 21:40:32 +0000 Subject: [PATCH] Make --list-opt-steps exclusive git-svn-id: svn://svn.cc65.org/cc65/trunk@833 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/cc65/main.c b/src/cc65/main.c index 2a4d9b9ae..63a4c0834 100644 --- a/src/cc65/main.c +++ b/src/cc65/main.c @@ -109,7 +109,7 @@ static void Usage (void) " --enable-opt name\tEnable an optimization step\n" " --help\t\tHelp (this text)\n" " --include-dir dir\tSet an include directory search path\n" - " --list-opt-steps\tList all optimizer steps\n" + " --list-opt-steps\tList all optimizer steps and exit\n" " --rodata-name seg\tSet the name of the RODATA segment\n" " --signed-chars\tDefault characters are signed\n" " --static-locals\tMake local variables static\n" @@ -238,7 +238,7 @@ static void DefineSym (const char* Def) } /* No value given. Define the macro with the value 1 */ AddNumericMacro (Def, 1); - } else { + } else { /* We have a value, P points to the '=' character. Since the argument * is const, create a copy and replace the '=' in the copy by a zero * terminator. @@ -484,8 +484,12 @@ static void OptIncludeDir (const char* Opt, const char* Arg) static void OptListOptSteps (const char* Opt, const char* Arg) /* List all optimizer steps */ -{ - ListOptSteps (stdout); +{ + /* List the optimizer steps */ + ListOptSteps (stdout); + + /* Terminate */ + exit (EXIT_SUCCESS); } -- 2.39.5