Previously Tux Paint was raising an error informing the user it could not
print even when it did print successfully. This appears to be due to our
lpr printing routine's assumption that errno is reset on success whereas
the C library in macOS does not appear to do so. To address this issue,
errno is reset before calling pclose() (on macOS and macOS only - just in
case this code has an unintended side-effect on other platforms). This
code change assumes we're only interested in errno set by pclose(), and
that our lpr printing routine is not interested in errno raised prior to
pclose().
errors when attempting to issue a print command (e.g., trying to use
"lpr", but that command is not available) should appear in Tux Paint.
(SourceForge bug #2205528)
PostScript printing now uses libprint to determine papersize, and scale and
position image accordingly. Thanks to Henry House.
"--papersize" option added to allow PostScript printing code to use a
different size than libpaper reports as the user's or system's default.