MCPcopy Create free account
hub / github.com/GJDuck/e9patch / getChar

Function getChar

src/e9tool/e9csv.cpp:90–105  ·  view source on GitHub ↗

* Checked getc. */

Source from the content-addressed store, hash-verified

88 * Checked getc.
89 */
90static char getChar(CSV &csv)
91{
92 char c = getc(csv.stream);
93 if (ferror(csv.stream))
94 error("failed to parse CSV file \"%s\" at line %u: %s", csv.filename,
95 csv.lineno, strerror(errno));
96 if (feof(csv.stream))
97 return EOF;
98 if (!isascii(c))
99 error("failed to parse CSV file \"%s\" at line %u; file contains a "
100 "non-ASCII character `\\x%.2X'", csv.filename, csv.lineno,
101 (unsigned)c);
102 if (c == '\n')
103 csv.lineno++;
104 return c;
105}
106
107/*
108 * Checked ungetc

Callers 2

parseEntryFunction · 0.85
parseRecordFunction · 0.85

Calls 5

getcFunction · 0.85
ferrorFunction · 0.85
errorFunction · 0.85
strerrorFunction · 0.85
feofFunction · 0.85

Tested by

no test coverage detected