luser-dr00g / xpost

A PostScript interpreter in C
Other
93 stars 12 forks source link

Bug in device base class's buffer implementation #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. buffer is implemented as ps arrays
2. array contents are subject to save/restore
3. thus, buffer contents are modified by save/restore

What is the expected output? What do you see instead?

save/restore resets the contents of all arrays and dictionaries. The raster 
output of the device should be immune to these effects.

Therefore the buffers should be implemented as strings. Best as 1 single string 
accessed by an array of substrings. Thus the "array contents" do not "change" 
and restore won't affect anything, and the string contents are immune to 
save/restore naturally.

This change will affect data/pgmimage.ps data/ppmimage.ps and 
src/lib/xpost_dev_bgr.c 

Please use labels and text to provide additional information.

Original issue reported on code.google.com by luser.droog on 13 Oct 2014 at 7:59