MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / Sc_ScanDocBlock

Function Sc_ScanDocBlock

Engine/source/console/CMDscan.cpp:2314–2339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2312}
2313
2314static int Sc_ScanDocBlock()
2315{
2316 S32 len = dStrlen(CMDtext);
2317 char* text = (char *) consoleAlloc(len + 1);
2318 S32 line = lineIndex;
2319
2320 for( S32 i = 0, j = 0; j <= len; j++ )
2321 {
2322 if( ( j <= (len - 2) ) && ( CMDtext[j] == '/' ) && ( CMDtext[j + 1] == '/' ) && ( CMDtext[j + 2] == '/' ) )
2323 {
2324 j += 2;
2325 continue;
2326 }
2327
2328 if( CMDtext[j] == '\r' )
2329 continue;
2330
2331 if( CMDtext[j] == '\n' )
2332 lineIndex++;
2333
2334 text[i++] = CMDtext[j];
2335 }
2336
2337 CMDlval.str = MakeToken< char* >( text, line );
2338 return(DOCBLOCK);
2339}
2340
2341static int Sc_ScanString(int ret)
2342{

Callers 1

CMDscan.cppFile · 0.85

Calls 2

consoleAllocFunction · 0.85
dStrlenFunction · 0.50

Tested by

no test coverage detected