MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / fill

Method fill

erpcgen/src/options.cpp:283–304  ·  view source on GitHub ↗

What we do is this: for each line of text in the istream, we use a OptStrTokIter to iterate over each token on the line. If the first non-white character on a line is c_COMMENT, then we consider the line to be a comment and we ignore it.

Source from the content-addressed store, hash-verified

281// consider the line to be a comment and we ignore it.
282//
283void OptIstreamIter::fill(void)
284{
285#ifdef USE_STDIO
286 return;
287#else
288 char buf[OptIstreamIter::MAX_LINE_LEN];
289 do
290 {
291 *buf = '\0';
292 is.getline(buf, sizeof(buf));
293 char *ptr = buf;
294 while (isspace(*ptr))
295 ++ptr;
296 if (*ptr && (*ptr != c_COMMENT))
297 {
298 delete tok_iter;
299 tok_iter = new OptStrTokIter(ptr);
300 return;
301 }
302 } while (is);
303#endif /* USE_STDIO */
304}
305
306// **************************************************** Options class utilities
307

Callers 3

warnFunction · 0.80
errFunction · 0.80
longBinaryTestMethod · 0.80

Calls

no outgoing calls

Tested by 1

longBinaryTestMethod · 0.64