| 156 | // the maximum number of tokens occurs in a string of length CONSOLE_MAX_STR_LENGTH with tokens size 1 separated by single spaces |
| 157 | |
| 158 | int CConsole::ParseStart(CResult *pResult, const char *pString, int Length) |
| 159 | { |
| 160 | char *pStr; |
| 161 | int Len = sizeof(pResult->m_aStringStorage); |
| 162 | if(Length < Len) |
| 163 | Len = Length; |
| 164 | |
| 165 | str_copy(pResult->m_aStringStorage, pString, Len); |
| 166 | pStr = pResult->m_aStringStorage; |
| 167 | |
| 168 | // get command |
| 169 | pStr = str_skip_whitespaces(pStr); |
| 170 | pResult->m_pCommand = pStr; |
| 171 | pStr = str_skip_to_whitespace(pStr); |
| 172 | |
| 173 | if(*pStr) |
| 174 | { |
| 175 | pStr[0] = 0; |
| 176 | pStr++; |
| 177 | } |
| 178 | |
| 179 | pResult->m_pArgsStart = pStr; |
| 180 | return 0; |
| 181 | } |
| 182 | |
| 183 | int CConsole::ParseArgs(CResult *pResult, const char *pFormat) |
| 184 | { |
nothing calls this directly
no test coverage detected