@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 ); //=========================================================================== */
| 124 | Usually called as: nArgs = _Arg_Shift( iArg, nArgs ); |
| 125 | //=========================================================================== */ |
| 126 | int _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 | //=========================================================================== |
| 149 | int _Args_Insert( int iSrc, int iEnd, int nLen ) |
no outgoing calls
no test coverage detected