From 0136b8575e3b2b0318a2b78f911acaf19db343bb Mon Sep 17 00:00:00 2001 From: mpohoreski Date: Tue, 27 Jun 2006 05:37:11 +0000 Subject: [PATCH] .15 Fixed Help Category comma syntax parsing .14 Fixed BP comma syntax parsing --- AppleWin/source/Debug.cpp | 4 ++-- AppleWin/source/Debugger_Help.cpp | 23 ++++++++--------------- AppleWin/source/Debugger_Parser.cpp | 2 +- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/AppleWin/source/Debug.cpp b/AppleWin/source/Debug.cpp index e24ef02f..b85bea40 100644 --- a/AppleWin/source/Debug.cpp +++ b/AppleWin/source/Debug.cpp @@ -41,7 +41,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // TODO: COLOR LOAD ["filename"] // See Debugger_Changelong.txt for full details - const int DEBUGGER_VERSION = MAKE_VERSION(2,5,4,13); + const int DEBUGGER_VERSION = MAKE_VERSION(2,5,4,15); // Public _________________________________________________________________________________________ @@ -1851,7 +1851,7 @@ bool _CmdBreakpointAddCommonArg ( int iArg, int nArg, BreakpointSource_t iSrc, B #if DEBUG_VAL_2 int nLen = g_aArgs[iArg].nVal2; #endif - int nLen = 1; + int nLen = 0; if (g_aArgs[ iArg + 1 ].eToken == TOKEN_COMMA) nLen = g_aArgs[ iArg + 2 ].nValue; diff --git a/AppleWin/source/Debugger_Help.cpp b/AppleWin/source/Debugger_Help.cpp index c9b66c67..7860aba0 100644 --- a/AppleWin/source/Debugger_Help.cpp +++ b/AppleWin/source/Debugger_Help.cpp @@ -204,7 +204,8 @@ Update_t CmdHelpSpecific (int nArgs) int iCmdEnd = 0; for (iArg = 1; iArg <= nArgs; iArg++ ) { - int nFoundCategory = FindParam( g_aArgs[ iArg ].sArg, MATCH_EXACT, iParam, _PARAM_HELPCATEGORIES_BEGIN, _PARAM_HELPCATEGORIES_END ); +// int nFoundCategory = FindParam( g_aArgs[ iArg ].sArg, MATCH_EXACT, iParam, _PARAM_HELPCATEGORIES_BEGIN, _PARAM_HELPCATEGORIES_END ); + int nFoundCategory = FindParam( g_aArgs[ iArg ].sArg, MATCH_FUZZY, iParam, _PARAM_HELPCATEGORIES_BEGIN, _PARAM_HELPCATEGORIES_END ); switch( iParam ) { case PARAM_CAT_BREAKPOINTS: iCmdBegin = CMD_BREAKPOINT ; iCmdEnd = CMD_BREAKPOINT_SAVE + 1; break; @@ -233,13 +234,7 @@ Update_t CmdHelpSpecific (int nArgs) #if DEBUG_VAL_2 g_aArgs[ iArg ].nVal2 = iCmdBegin + iArg - 1; #endif - // insert: ,# - _Args_Insert( iArg, nArgs, 2 ); - g_aArgs[ iArg + 1 ].eToken = TOKEN_COMMA; - g_aArgs[ iArg + 2 ].nValue = iCmdBegin + iArg - 1; - - nArgs += 2; - iArg += 2; + g_aArgs[ iArg ].nValue = iCmdBegin + iArg - 1; } } @@ -248,20 +243,18 @@ Update_t CmdHelpSpecific (int nArgs) for (iArg = 1; iArg <= nArgs; iArg++ ) { int iCommand = 0; - int nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); + int nFound = 0; if (bCategory) { - if (g_aArgs[ iArg + 1 ].eToken == TOKEN_COMMA) - { - if ((iArg + 2) <= nArgs) - iCommand = g_aArgs[ iArg + 2 ].nValue; - } #if DEBUG_VAL_2 iCommand = g_aArgs[iArg].nVal2; #endif + iCommand = g_aArgs[ iArg ].nValue; nFound = 1; } + else + nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); if (bAllCommands) { @@ -458,7 +451,7 @@ Update_t CmdHelpSpecific (int nArgs) ConsoleBufferPush( sText ); wsprintf( sText, TEXT(" Usage: [%s | %s | %s]") , g_aParameters[ PARAM_LOAD ].m_sName - , g_aParameters[ PARAM_SAVE ].m_sName + , g_aParameters[ PARAM_SAVE ].m_sName , g_aParameters[ PARAM_RESET ].m_sName ); ConsoleBufferPush( sText ); ConsoleBufferPush( TEXT(" Set breakpoint at PC if no args.") ); diff --git a/AppleWin/source/Debugger_Parser.cpp b/AppleWin/source/Debugger_Parser.cpp index 400c7532..526c153a 100644 --- a/AppleWin/source/Debugger_Parser.cpp +++ b/AppleWin/source/Debugger_Parser.cpp @@ -173,7 +173,7 @@ void ArgsClear () pArg->eDevice = NUM_DEVICES; // none pArg->eToken = NO_TOKEN ; // none pArg->bType = TYPE_STRING; - pArg->nValue = 0; + pArg->nValue = 0; #if DEBUG_VAL_2 pArg->nVal2 = 0; #endif