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

Function nextc

extlibs/lua/src/liolib.c:424–434  ·  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

422** Add current char to buffer (if not out of space) and read next one
423*/
424static int nextc (RN *rn) {
425 if (rn->n >= L_MAXLENNUM) { /* buffer overflow? */
426 rn->buff[0] = '\0'; /* invalidate result */
427 return 0; /* fail */
428 }
429 else {
430 rn->buff[rn->n++] = rn->c; /* save current char */
431 rn->c = l_getc(rn->f); /* read next one */
432 return 1;
433 }
434}
435
436
437/*

Callers 2

test2Function · 0.85
readdigitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected