MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / nextc

Function nextc

third-party/lua-5.5.0/src/liolib.c:440–450  ·  view source on GitHub ↗

** Add current char to buffer (if not out of space) and read next one */

Source from the content-addressed store, hash-verified

438** Add current char to buffer (if not out of space) and read next one
439*/
440static int nextc (RN *rn) {
441 if (l_unlikely(rn->n >= L_MAXLENNUM)) { /* buffer overflow? */
442 rn->buff[0] = '\0'; /* invalidate result */
443 return 0; /* fail */
444 }
445 else {
446 rn->buff[rn->n++] = cast_char(rn->c); /* save current char */
447 rn->c = l_getc(rn->f); /* read next one */
448 return 1;
449 }
450}
451
452
453/*

Callers 2

test2Function · 0.70
readdigitsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected