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

Function Sc_ScanDocBlock

Engine/source/console/CMDscan.cpp:2311–2336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

CMDscan.cppFile · 0.85

Calls 2

consoleAllocFunction · 0.85
dStrlenFunction · 0.50

Tested by

no test coverage detected