MCPcopy Create free account
hub / github.com/defold/defold / SafeGetChar

Function SafeGetChar

engine/dlib/src/dlib/configfile.cpp:274–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272 }
273
274 static int SafeGetChar(Context* context)
275 {
276 int c = BufferGetChar(context);
277 // Ignore '\r' in order to accept DOS-lineendings
278 while (c == '\r')
279 {
280 c = BufferGetChar(context);
281 }
282 if (c == EOF)
283 ParseError(context, RESULT_UNEXPECTED_EOF);
284 return c;
285 }
286
287 static int PeekChar(Context* context)
288 {

Callers 1

ExpectFunction · 0.85

Calls 2

BufferGetCharFunction · 0.85
ParseErrorFunction · 0.70

Tested by

no test coverage detected