summaryrefslogtreecommitdiff
blob: d2f3afd9328b9d7725a0e2c6e0c6306f24d2b8a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Source: http://pkgs.fedoraproject.org/cgit/rpms/poster.git/plain/poster.fixes_gs_crash.patch
See also https://bugs.gentoo.org/show_bug.cgi?id=471238

--- a/poster.c	2006-02-22 13:27:39.000000000 +0100
+++ b/poster.c	2012-11-17 01:30:45.303051611 +0100
@@ -856,21 +856,13 @@
 	int row, col, page;
 
 	printprolog();
-	for ( page = 0; page < number_pages; page++ )
-	{
-		printf( "/print_content_of_complete_page_%d\n", page);
-		printf( "{\n");
-		printfile (page);
-		printf( "} bind def\n\n");
-	
 		if ( pages == NULL )
-		{
+		for ( page = 0; page < number_pages; page++ )
 			for (row = 1; row <= nrows; row++)
 				for (col = 1; col <= ncols; col++)
 					tile( row, col, page);
-		}
 		else
-		{
+		for ( page = 0; page < number_pages; page++ )
 			for ( row = 0; row < pages_length; row++ )
 			{
 				int p = pages[ row ]-1;
@@ -878,8 +870,6 @@
 					fprintf( stderr, "Warning: page index out of range: %d\n", p+1 );
 				tile( p/ncols+1, p%ncols+1, page );
 			}
-		}
-	}
 	printf ("%%%%EOF\n");
 
 	if (tail_cntl_D)
@@ -1027,7 +1017,7 @@
 	printf ("\n%%%%Page: (%d,%d) %d\n", pagetoprint+1, ((row-1)*ncols+col), page);
 	printf ("%d %d tileprolog\n", row, col);
 	printf ("%%%%BeginDocument: %s\n", infile);
-	printf( "print_content_of_complete_page_%d\n", pagetoprint);
+	printfile (pagetoprint);	
 	printf ("%%%%EndDocument\n");
 	printf ("tileepilog\n");