[gs-cvs] gs/src

Ray Johnston ray at casper.ghostscript.com
Wed Aug 28 08:19:14 PDT 2002


Update of /cvs/ghostscript/gs/src
In directory casper:/tmp/cvs-serv3825/src

Modified Files:
	gdevps.c gdevpsu.c 
Log Message:
Fix: FILE_IMPLEMENTATION=fd results in mixed use of unbuffered and
buffered output but the rest of the driver always uses buffered output.
Flushing the buffer in several places solves the problem. Fixes bug
#427347. Fix and analysis by Alex Cherepanov.


Index: gdevps.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gdevps.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- gdevps.c	22 Aug 2002 07:12:28 -0000	1.28
+++ gdevps.c	28 Aug 2002 15:19:12 -0000	1.29
@@ -343,6 +343,7 @@
 	psw_print_lines(f, psw_1_5_procset);
     }
     psw_end_file_header(f);
+    fflush(f);
     return 0;
 }
 

Index: gdevpsu.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gdevpsu.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- gdevpsu.c	20 Mar 2002 20:20:11 -0000	1.11
+++ gdevpsu.c	28 Aug 2002 15:19:12 -0000	1.12
@@ -183,11 +183,14 @@
     psw_print_lines(f, psw_begin_prolog);
     fprintf(f, "%% %s\n", gs_copyright);
     fputs("%%BeginResource: procset ", f);
+    fflush(f);
     psw_print_procset_name(f, dev, pdpc);
     fputs("\n/", f);
+    fflush(f);
     psw_print_procset_name(f, dev, pdpc);
     fputs(" 80 dict dup begin\n", f);
     psw_print_lines(f, psw_ps_procset);
+    fflush(f);
 }
 
 /*
@@ -292,4 +295,5 @@
 	fprintf(f, "userdict /#copies %d put\n", num_copies);
     fprintf(f, "cleartomark end end pagesave restore %s\n%%%%PageTrailer\n",
 	    (flush ? "showpage" : "copypage"));
+    fflush(f);
 }




More information about the gs-cvs mailing list