MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / copy_comment

Function copy_comment

extern/btyacc/reader.c:358–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358void copy_comment(FILE *f1, FILE *f2)
359{
360register int c;
361
362 if ((c = *cptr) == '/') {
363 OUTC('*');
364 while ((c = *++cptr) != '\n') {
365 OUTC(c);
366 if (c == '*' && cptr[1] == '/')
367 OUTC(' '); }
368 OUTC('*'); OUTC('/'); }
369 else if (c == '*') {
370 int c_lineno = lineno;
371 char *c_line = dup_line();
372 char *c_cptr = c_line + (cptr - line - 1);
373 OUTC(c);
374 while ((c = *++cptr) != '*' || cptr[1] != '/') {
375 OUTC(c);
376 if (c == '\n') {
377 if (get_line() == 0)
378 unterminated_comment(c_lineno, c_line, c_cptr); } }
379 OUTC(c);
380 OUTC('/');
381 FREE(c_line);
382 cptr += 2; }
383}
384
385#undef OUTC
386

Callers 3

copy_textFunction · 0.85
copy_unionFunction · 0.85
copy_actionFunction · 0.85

Calls 3

dup_lineFunction · 0.85
unterminated_commentFunction · 0.85
get_lineFunction · 0.70

Tested by

no test coverage detected