No longer saying "By Bill Kendrick", since so many more people
have added so much to the project over the years.
(I'm basically website maintainer & project manager these days :) )
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().
Previously, testing in macOS required running `make install`, switching
over to the Finder, then double clicking TuxPaint.app, which was a time
consuming process. This change allows the tuxpaint binary to be run
directly from the command line (./tuxpaint) without `make install`, which
makes it easier to test any small code change. Now `make install` is only
required to build the TuxPaint.app bundle for execution from the
Finder.
FYI, `make install` also builds TuxPaint.dmg for distribution. A small
change is included in this commit to allow TuxPaint.dmg to be built without
building TuxPaint.app (if, for example, you delete TuxPaint.dmg by accident
and need to rebuild it.) This is done via `make TuxPaint.dmg`.
Running Tux Paint under macOS in Korean mode (and some other languages) causes
it to crash, unless "load system fonts" option is also enabled. Some
investigation showed the issue occurs when num_font_families is 0 in fonts.c.
This change removes the assumption from the code that assumes num_font_families
has at least one record.
Previously, the DMG's default window is slightly larger than the
background, exposing some whitespace. This fixes the window size to be
identical to the background image, so no whitespace is exposed.
Previously `make install` on macOS created TuxPaint.dmg, but it was a
simple disk image.
Now TuxPaint.dmg is formatted as one would expect from any other macOS app,
with a Tux folder icon, symlink to the /Applications folder, and a
background image with an arrow.
Beginning to document functions in src/tuxpaint.c, Docbook style
(description, @param's, @return). Also removed a few dead bits
of code.
Eventually, hoping to break this beastly file into pieces.
(Maybe for Tux Paint 0.9.24?)