MCPcopy Create free account
hub / github.com/ElementsProject/lightning / linenum

Function linenum

tools/check-bolt.c:189–203  ·  view source on GitHub ↗

Moves *pos to start of line. */

Source from the content-addressed store, hash-verified

187
188/* Moves *pos to start of line. */
189static unsigned linenum(const char *raw, const char **pos)
190{
191 unsigned line = 0; /* Out-by-one below */
192 const char *l = raw, *point = *pos;
193
194 while (l < point) {
195 *pos = l;
196 l = strchr(l, '\n');
197 line++;
198 if (!l)
199 break;
200 l++;
201 }
202 return line;
203}
204
205static void fail_mismatch(const char *filename,
206 const char *raw, const char *pos,

Callers 2

fail_mismatchFunction · 0.85
fail_noboltFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected