MCPcopy Create free account
hub / github.com/crownengine/crown / getF

Function getF

3rdparty/lua/src/lauxlib.c:529–540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527
528
529static const char *getF (lua_State *L, void *ud, size_t *size) {
530 LoadF *lf = (LoadF *)ud;
531 (void)L;
532 if (lf->extraline) {
533 lf->extraline = 0;
534 *size = 1;
535 return "\n";
536 }
537 if (feof(lf->f)) return NULL;
538 *size = fread(lf->buff, 1, sizeof(lf->buff), lf->f);
539 return (*size > 0) ? lf->buff : NULL;
540}
541
542
543static int errfile (lua_State *L, const char *what, int fnameindex) {

Callers

nothing calls this directly

Calls 2

feofFunction · 0.85
freadFunction · 0.85

Tested by

no test coverage detected