MCPcopy Create free account
hub / github.com/RsyncProject/rsync / EatWhitespace

Function EatWhitespace

params.c:104–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102 */
103
104static int EatWhitespace( FILE *InFile )
105 /* ------------------------------------------------------------------------ **
106 * Scan past whitespace (see ctype(3C)) and return the first non-whitespace
107 * character, or newline, or EOF.
108 *
109 * Input: InFile - Input source.
110 *
111 * Output: The next non-whitespace character in the input stream.
112 *
113 * Notes: Because the config files use a line-oriented grammar, we
114 * explicitly exclude the newline character from the list of
115 * whitespace characters.
116 * - Note that both EOF (-1) and the nul character ('\0') are
117 * considered end-of-file markers.
118 *
119 * ------------------------------------------------------------------------ **
120 */
121 {
122 int c;
123
124 for( c = getc( InFile ); isspace( c ) && ('\n' != c); c = getc( InFile ) )
125 ;
126 return( c );
127 } /* EatWhitespace */
128
129static int EatComment( FILE *InFile )
130 /* ------------------------------------------------------------------------ **

Callers 3

SectionFunction · 0.85
ParameterFunction · 0.85
ParseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected