]> git.draconx.ca Git - gob-dx.git/blobdiff - src/out.c
Release 0.93.0
[gob-dx.git] / src / out.c
index 77dabd1b752be2e049878612fa2bc3ae72afabbb..0803893528be99d0e6ac14a90b05a2b77fa0f11c 100644 (file)
--- a/src/out.c
+++ b/src/out.c
@@ -24,31 +24,34 @@ strchrcnt(char *s, char c)
 }
 
 void
-out_printf(FILE *fp,char *format,...)
+out_printf(FILE *fp, char *format,...)
 {
        va_list ap;
        char *s;
 
-       va_start(ap,format);
-       s = g_strdup_vprintf(format,ap);
+       va_start(ap, format);
+       s = g_strdup_vprintf(format, ap);
        va_end(ap);
 
        if(fp == out)
-               outline += strchrcnt(s,'\n');
+               outline += strchrcnt(s, '\n');
        else if(fp == outh)
-               outhline += strchrcnt(s,'\n');
+               outhline += strchrcnt(s, '\n');
        else if(fp == outph)
-               outphline += strchrcnt(s,'\n');
+               outphline += strchrcnt(s, '\n');
        else
                g_assert_not_reached();
 
-       fprintf(fp,"%s",s);
+       fprintf(fp, "%s", s);
        g_free(s);
 }
 
 void
 out_addline_infile(FILE *fp, int line)
 {
+       if(no_lines)
+               return;
+
        if(fp == out) {
                outline++;
                in_out = FALSE;
@@ -61,12 +64,15 @@ out_addline_infile(FILE *fp, int line)
        } else
                g_assert_not_reached();
 
-       fprintf(fp,"#line %d \"%s\"\n",line,filename);
+       fprintf(fp, "#line %d \"%s\"\n", line, filename);
 }
 
 void
 out_addline_outfile(FILE *fp)
 {
+       if(no_lines)
+               return;
+
        if(fp == out) {
                if(in_out) return;
                outline++;