]> git.draconx.ca Git - gob-dx.git/blobdiff - src/out.c
Release 2.0.19
[gob-dx.git] / src / out.c
index 56fe45969146c1d9f1b9f36276225349555f816d..2d66570a72040059af0a18dbe0408c8bc59425a2 100644 (file)
--- a/src/out.c
+++ b/src/out.c
@@ -13,6 +13,8 @@ static gboolean in_outh = TRUE;
 int outphline = 1;
 static gboolean in_outph = TRUE;
 
+extern char file_sep;
+
 static int
 strchrcnt(char *s, char c)
 {
@@ -29,6 +31,9 @@ out_printf(FILE *fp, const char *format,...)
        va_list ap;
        char *s;
 
+       if (no_write)
+               return;
+
        va_start(ap, format);
        s = g_strdup_vprintf(format, ap);
        va_end(ap);
@@ -49,7 +54,7 @@ out_printf(FILE *fp, const char *format,...)
 void
 out_addline_infile(FILE *fp, int line)
 {
-       if(no_lines)
+       if(no_lines || no_write)
                return;
 
        if(fp == out) {
@@ -70,7 +75,7 @@ out_addline_infile(FILE *fp, int line)
 void
 out_addline_outfile(FILE *fp)
 {
-       if(no_lines)
+       if(no_lines || no_write)
                return;
 
        if(fp == out) {
@@ -87,9 +92,12 @@ out_addline_outfile(FILE *fp)
                fprintf(fp,"#line %d \"%s.h\"\n",outhline,filebase);
                in_outh = TRUE;
        } else if(fp == outph) {
+               char sep[2] = {0,0};
                if(in_outph) return;
                outphline++;
-               fprintf(fp,"#line %d \"%s-private.h\"\n",outphline,filebase);
+               if (file_sep != 0)
+                       sep[0] = file_sep;
+               fprintf(fp,"#line %d \"%s%sprivate.h\"\n",outphline,filebase,sep);
                in_outph = TRUE;
        } else
                g_assert_not_reached();