From: uz Date: Thu, 8 Oct 2009 11:34:36 +0000 (+0000) Subject: Use the new InvArg() function. X-Git-Tag: V2.13.1~177 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=45b469c786370ec49a734ae443317e9822bcfabd;p=cc65 Use the new InvArg() function. git-svn-id: svn://svn.cc65.org/cc65/trunk@4345 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/main.c b/src/cc65/main.c index 343e2a4c6..83109181a 100644 --- a/src/cc65/main.c +++ b/src/cc65/main.c @@ -373,7 +373,7 @@ static void OptCodeSize (const char* Opt, const char* Arg) /* Numeric argument expected */ if (sscanf (Arg, "%u%c", &Factor, &BoundsCheck) != 1 || Factor < 10 || Factor > 1000) { - AbEnd ("Argument for %s is invalid", Opt); + InvArg (Opt, Arg); } IS_Set (&CodeSizeFactor, Factor); } @@ -396,7 +396,7 @@ static void OptCPU (const char* Opt, const char* Arg) CPU = FindCPU (Arg); if (CPU != CPU_6502 && CPU != CPU_6502X && CPU != CPU_65SC02 && CPU != CPU_65C02 && CPU != CPU_65816 && CPU != CPU_HUC6280) { - AbEnd ("Invalid argument for %s: `%s'", Opt, Arg); + InvArg (Opt, Arg); } } @@ -584,7 +584,7 @@ static void OptRegisterSpace (const char* Opt, const char* Arg) { /* Numeric argument expected */ if (sscanf (Arg, "%u", &RegisterSpace) != 1 || RegisterSpace > 256) { - AbEnd ("Argument for option %s is invalid", Opt); + InvArg (Opt, Arg); } } @@ -626,7 +626,7 @@ static void OptStandard (const char* Opt, const char* Arg) /* Find the standard from the given name */ standard_t Std = FindStandard (Arg); if (Std == STD_UNKNOWN) { - AbEnd ("Invalid argument for %s: `%s'", Opt, Arg); + InvArg (Opt, Arg); } else if (IS_Get (&Standard) != STD_UNKNOWN) { AbEnd ("Option %s given more than once", Opt); } else {