.15 Fixed Help Category comma syntax parsing

.14 Fixed BP comma syntax parsing
This commit is contained in:
mpohoreski 2006-06-27 05:37:11 +00:00
parent f1c1779069
commit d36b7c6aa2
3 changed files with 11 additions and 18 deletions

View File

@ -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;

View File

@ -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.") );

View File

@ -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