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

Function read_line

tools/cfgparser.c:89–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87/* Read the next line from the configuration file */
88
89static char *read_line(FILE *stream)
90{
91 char *ptr;
92
93 for (; ; )
94 {
95 line[LINESIZE] = '\0';
96 if (!fgets(line, LINESIZE, stream))
97 {
98 return NULL;
99 }
100 else
101 {
102 ptr = skip_space(line);
103 if (*ptr && *ptr != '#' && *ptr != '\n')
104 {
105 return ptr;
106 }
107 }
108 }
109}
110
111/* Parse the line from the configuration file into a variable name
112 * string and a value string.

Callers 1

parse_fileFunction · 0.70

Calls 2

skip_spaceFunction · 0.70
fgetsFunction · 0.50

Tested by

no test coverage detected