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)
55 } else if(fp == outh) {
58 } else if(fp == outph) {
62 g_assert_not_reached();
64 fprintf(fp,"#line %d \"%s\"\n",line,filename);
68 out_addline_outfile(FILE *fp)
74 fprintf(fp,"#line %d \"%s.c\"\n",outline,filebase);
76 fprintf(fp,"#line %d \"%s.cc\"\n",outline,filebase);
78 } else if(fp == outh) {
81 fprintf(fp,"#line %d \"%s.h\"\n",outhline,filebase);
83 } else if(fp == outph) {
86 fprintf(fp,"#line %d \"%s-private.h\"\n",outphline,filebase);
89 g_assert_not_reached();