MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / nextc

Function nextc

3rd/lua-5.4.3/src/liolib.c:438–448  ·  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

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

Callers 2

test2Function · 0.85
readdigitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected