MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / _Arg_Shift

Function _Arg_Shift

source/Debugger/Debugger_Parser.cpp:126–146  ·  view source on GitHub ↗

@description Copies Args[iSrc .. iEnd] to Args[0] @param iSrc First argument to copy @param iEnd Last argument to end @return nArgs Number of new args Usually called as: nArgs = _Arg_Shift( iArg, nArgs ); //=========================================================================== */

Source from the content-addressed store, hash-verified

124 Usually called as: nArgs = _Arg_Shift( iArg, nArgs );
125//=========================================================================== */
126int _Arg_Shift( int iSrc, int iEnd, int iDst )
127{
128 if (iDst < 0)
129 return ARG_SYNTAX_ERROR;
130 if (iDst >= MAX_ARGS)
131 return ARG_SYNTAX_ERROR;
132
133 int nArgs = (iEnd - iSrc);
134 int nLen = nArgs + 1;
135
136 if ((iDst + nLen) > MAX_ARGS)
137 return ARG_SYNTAX_ERROR;
138
139 while (nLen--)
140 {
141 g_aArgs[iDst] = g_aArgs[iSrc];
142 iSrc++;
143 iDst++;
144 }
145 return nArgs;
146}
147
148//===========================================================================
149int _Args_Insert( int iSrc, int iEnd, int nLen )

Callers 2

ArgsCookFunction · 0.85
_CmdSymbolsCommonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected