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

Function EatSpace

engine/dlib/src/dlib/configfile.cpp:303–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301 }
302
303 static void EatSpace(Context* context)
304 {
305 int c;
306 bool comment = false;
307 bool line_start = true;
308 do
309 {
310 c = GetChar(context);
311 if (line_start && (c == '#' || c == ';'))
312 {
313 comment = true;
314 }
315 if (c == '\n')
316 {
317 context->m_Line++;
318 comment = false;
319 line_start = true;
320 }
321 else
322 {
323 line_start = false;
324 }
325 } while (comment || isspace(c));
326
327 BufferUngetChar(c, context);
328 }
329
330 static void EatBlank(Context* context)
331 {

Callers 1

ParseFunction · 0.85

Calls 2

BufferUngetCharFunction · 0.85
GetCharFunction · 0.70

Tested by

no test coverage detected