10 static gboolean in_out = TRUE;
12 static gboolean in_outh = TRUE;
14 static gboolean in_outph = TRUE;
17 strchrcnt(char *s, char c)
27 out_printf(FILE *fp, char *format,...)
33 s = g_strdup_vprintf(format, ap);
37 outline += strchrcnt(s, '\n');
39 outhline += strchrcnt(s, '\n');
41 outphline += strchrcnt(s, '\n');
43 g_assert_not_reached();
50 out_addline_infile(FILE *fp, int line)
58 } else if(fp == outh) {
61 } else if(fp == outph) {
65 g_assert_not_reached();
67 fprintf(fp, "#line %d \"%s\"\n", line, filename);
71 out_addline_outfile(FILE *fp)
80 fprintf(fp,"#line %d \"%s.c\"\n",outline,filebase);
82 fprintf(fp,"#line %d \"%s.cc\"\n",outline,filebase);
84 } else if(fp == outh) {
87 fprintf(fp,"#line %d \"%s.h\"\n",outhline,filebase);
89 } else if(fp == outph) {
92 fprintf(fp,"#line %d \"%s-private.h\"\n",outphline,filebase);
95 g_assert_not_reached();