summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-03-02 09:34:56 +0000
committerManolo Gouy <Manolo>2015-03-02 09:34:56 +0000
commitad59d0cf8396809e1ddcaaf1bfbe67de5cfec92f (patch)
tree8ba5bbb72d0ef90bd3948efeb63c60e12e58b8a9 /src
parent372e707093022253b6dcb6b8cbc06151d7d03e96 (diff)
PostScript output: various cosmetic changes to easy readability of output code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10601 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_PostScript.cxx2
-rw-r--r--src/ps_image.cxx13
2 files changed, 7 insertions, 8 deletions
diff --git a/src/Fl_PostScript.cxx b/src/Fl_PostScript.cxx
index 706663248..30b1cad5c 100644
--- a/src/Fl_PostScript.cxx
+++ b/src/Fl_PostScript.cxx
@@ -1119,7 +1119,7 @@ static void transformed_draw_extra(const char* str, int n, double x, double y, i
di++;
}
}
- Fl_PostScript_Graphics_Driver::close_rle85(rle85);
+ Fl_PostScript_Graphics_Driver::close_rle85(rle85); fputc('\n', output);
delete[] mask;
}
diff --git a/src/ps_image.cxx b/src/ps_image.cxx
index c5954eb4a..7dbe928b4 100644
--- a/src/ps_image.cxx
+++ b/src/ps_image.cxx
@@ -99,10 +99,10 @@ void Fl_PostScript_Graphics_Driver::close85(void *data) // stops ASCII85-encodi
l = big->l4;
while (l < 4) big->bytes4[l++] = 0; // complete them with 0s
l = convert85(big->bytes4, big->chars5); // encode them
- if (l == 1) memcpy(big->chars5, "!!!!!", 5);
+ if (l == 1) memset(big->chars5, '!', 5);
fwrite(big->chars5, big->l4 + 1, 1, big->outfile);
}
- fputs("~>\n", big->outfile); // write EOD mark
+ fputs("~>", big->outfile); // write EOD mark
delete big;
}
@@ -141,7 +141,7 @@ void Fl_PostScript_Graphics_Driver::write_rle85(uchar b, void *data) // sends on
rle->run_length++;
return;
} else { // output the run
- uchar c = (uchar)(257 - rle->run_length);
+ c = (uchar)(257 - rle->run_length);
write85(rle->data85, &c, 1); // the run-length info
write85(rle->data85, rle->buffer, 1); // the byte of the run
rle->run_length = 0;
@@ -423,7 +423,7 @@ void Fl_PostScript_Graphics_Driver::draw_image(Fl_Draw_Image_Cb call, void *data
curdata += D;
}
}
- close_rle85(big);
+ close_rle85(big); fputc('\n', output);
big = prepare_rle85(output);
for (j = ih - 1; j >= 0; j--) { // output mask data
curmask = mask + j * (my/ih) * ((mx+7)/8);
@@ -467,8 +467,7 @@ void Fl_PostScript_Graphics_Driver::draw_image(Fl_Draw_Image_Cb call, void *data
}
}
close_rle85(big);
-
- fprintf(output,"restore\n");
+ fprintf(output,"\nrestore\n");
delete[] rgbdata;
}
@@ -637,7 +636,7 @@ void Fl_PostScript_Graphics_Driver::draw(Fl_Bitmap * bitmap,int XP, int YP, int
di++;
}
}
- close_rle85(rle85);
+ close_rle85(rle85); fputc('\n', output);
pop_clip();
}