MCPcopy Create free account
hub / github.com/apache/nuttx / read_line

Function read_line

tools/cfgdefine.c:129–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127/* Read the next line from the configuration file */
128
129static char *read_line(FILE *stream)
130{
131 char *ptr;
132
133 for (; ; )
134 {
135 line[LINESIZE] = '\0';
136 if (!fgets(line, LINESIZE, stream))
137 {
138 return NULL;
139 }
140 else
141 {
142 ptr = skip_space(line);
143 if (*ptr && *ptr != '#' && *ptr != '\n')
144 {
145 return ptr;
146 }
147 }
148 }
149}
150
151/* Parse the line from the configuration file into a variable name
152 * string and a value string.

Callers 3

mainFunction · 0.70
mainFunction · 0.70
generate_definitionsFunction · 0.70

Calls 2

skip_spaceFunction · 0.70
fgetsFunction · 0.50

Tested by

no test coverage detected