MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / skipBOM

Function skipBOM

extlibs/lua/src/lauxlib.c:718–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

716
717
718static int skipBOM (LoadF *lf) {
719 const char *p = "\xEF\xBB\xBF"; /* UTF-8 BOM mark */
720 int c;
721 lf->n = 0;
722 do {
723 c = getc(lf->f);
724 if (c == EOF || c != *(const unsigned char *)p++) return c;
725 lf->buff[lf->n++] = c; /* to be read by the parser */
726 } while (*p != '\0');
727 lf->n = 0; /* prefix matched; discard it */
728 return getc(lf->f); /* return next character */
729}
730
731
732/*

Callers 1

skipcommentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected