File z88-12.0-crashes.patch of Package z88
--- laserj88.c
+++ laserj88.c
@@ -54,6 +54,13 @@
printf("LaserJet- Commands to Z88O6.TXT ...");
+f6= fopen("z88o6.txt","rb");
+if (!f6) {
+ perror("z88o6.txt");
+ return(1);
+}
+rewind(f6);
+
ftmp= fopen("z88o6.tmp","wb");
rewind(ftmp);
@@ -64,9 +71,6 @@
/* HP-GL Mode */
fputs("\x01B\x025\x030\x042\x00D\x00A",ftmp);
-f6= fopen("z88o6.txt","rb");
-rewind(f6);
-
while( (c= fgetc(f6)) != EOF)
fputc(c,ftmp);
--- pxon88.c
+++ pxon88.c
@@ -48,14 +48,18 @@
printf("Xon/Xoff- Command to Z88O6.TXT ...");
+f6= fopen("z88o6.txt","rb");
+if (!f6) {
+ perror("z88o6.txt");
+ return(1);
+}
+rewind(f6);
+
ftmp= fopen("z88o6.tmp","wb");
rewind(ftmp);
fputs("\x01B.I256;;17:;\x01B.N;19:;\x00D\x00A",ftmp);
-f6= fopen("z88o6.txt","rb");
-rewind(f6);
-
while( (c= fgetc(f6)) != EOF)
fputc(c,ftmp);