X-Git-Url: http://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/b17287deb56775a49030d738d8c8c0e9cd15f9fe..3b10bbd3a88d6e16146414d91d06bb2f36347bfc:/src/out.c diff --git a/src/out.c b/src/out.c index 77dabd1..0803893 100644 --- 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++;