MCPcopy Create free account
hub / github.com/JACoders/OpenJK / ReadData

Function ReadData

code/qcommon/strip.cpp:311–334  ·  view source on GitHub ↗

* ReadData * * inputs: * * return: * ************************************************************************************************/

Source from the content-addressed store, hash-verified

309 *
310 ************************************************************************************************/
311bool ReadData(char *&Data, int &Size, char *Result, int Result_Size)
312{
313 char *pos;
314
315 Result[0] = 0;
316
317 if (Size <= 0)
318 {
319 return false;
320 }
321 pos = Result;
322 do
323 {
324 *pos = *Data;
325 pos++;
326 Data++;
327 Size--;
328 Result_Size--;
329 } while(Size > 0 && Result_Size > 0 && *(Data-1) != '\n');
330
331 *pos = 0;
332
333 return true;
334}
335
336/************************************************************************************************
337 * GetLine

Callers 1

GetLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected