]> git.draconx.ca Git - gob-dx.git/blobdiff - src/out.c
Release 0.91.1
[gob-dx.git] / src / out.c
index 6b3f48fdbfaf45665021e8a3945cda2c8968b6c8..ee1d3289d3853cda215208b390f3900e0d6acd9b 100644 (file)
--- a/src/out.c
+++ b/src/out.c
@@ -6,6 +6,7 @@
 
 extern FILE *out;
 extern FILE *outh;
+extern FILE *outph;
 
 extern gboolean for_cpp;
 
@@ -14,6 +15,7 @@ extern char *filebase;
 
 int outline = 1;
 int outhline = 1;
+int outphline = 1;
 
 static int
 strchrcnt(char *s, char c)
@@ -39,6 +41,8 @@ out_printf(FILE *fp,char *format,...)
                outline += strchrcnt(s,'\n');
        else if(fp == outh)
                outhline += strchrcnt(s,'\n');
+       else if(fp == outph)
+               outphline += strchrcnt(s,'\n');
        else
                g_assert_not_reached();
 
@@ -53,6 +57,8 @@ out_addline_infile(FILE *fp, int line)
                outline++;
        else if(fp == outh)
                outhline++;
+       else if(fp == outph)
+               outphline++;
        else
                g_assert_not_reached();
 
@@ -71,6 +77,9 @@ out_addline_outfile(FILE *fp)
        } else if(fp == outh) {
                outhline++;
                fprintf(fp,"#line %d \"%s.h\"\n",outhline,filebase);
+       } else if(fp == outph) {
+               outphline++;
+               fprintf(fp,"#line %d \"%s-private.h\"\n",outphline,filebase);
        } else
                g_assert_not_reached();