Added an error message, in case there's a typo in the definitions of long command-line options.
This commit is contained in:
@@ -256,7 +256,7 @@ static void SetSys (const char* Sys)
|
|||||||
case TGT_TELESTRAT:
|
case TGT_TELESTRAT:
|
||||||
DefineNumericMacro ("__TELESTRAT__", 1);
|
DefineNumericMacro ("__TELESTRAT__", 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TGT_NES:
|
case TGT_NES:
|
||||||
DefineNumericMacro ("__NES__", 1);
|
DefineNumericMacro ("__NES__", 1);
|
||||||
break;
|
break;
|
||||||
@@ -302,6 +302,10 @@ static void FileNameOption (const char* Opt, const char* Arg, StrBuf* Name)
|
|||||||
if (SB_NotEmpty (Name)) {
|
if (SB_NotEmpty (Name)) {
|
||||||
AbEnd ("Cannot use option `%s' twice", Opt);
|
AbEnd ("Cannot use option `%s' twice", Opt);
|
||||||
}
|
}
|
||||||
|
/* A typo in OptTab[] might allow a NULL Arg */
|
||||||
|
if (Arg == 0) {
|
||||||
|
Internal ("Typo in OptTab[]; option '%s' should require an argument", Opt);
|
||||||
|
}
|
||||||
/* Remember the file name for later */
|
/* Remember the file name for later */
|
||||||
SB_CopyStr (Name, Arg);
|
SB_CopyStr (Name, Arg);
|
||||||
SB_Terminate (Name);
|
SB_Terminate (Name);
|
||||||
@@ -558,7 +562,7 @@ static void OptDebugOpt (const char* Opt attribute ((unused)), const char* Arg)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void OptDebugOptOutput (const char* Opt attribute ((unused)),
|
static void OptDebugOptOutput (const char* Opt attribute ((unused)),
|
||||||
const char* Arg attribute ((unused)))
|
const char* Arg attribute ((unused)))
|
||||||
/* Output optimization steps */
|
/* Output optimization steps */
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user