Occasionally running Tux Paint in Korean, Japanese, and possibly other
languages would cause Tux Paint to crash. This commit fixes it.
This bug was previously mentioned as the possible cause of these
previously reported crashes, though they were determined to be
unrelated:
https://sourceforge.net/p/tuxpaint/mailman/message/37364981/https://sourceforge.net/p/tuxpaint/mailman/message/37376574/
The cause of the crash turned out to be in the function that loads the
input method map (*.im). Some languages that use more than one
keystroke to produce one unicode character use this mapfile to track, in
a state machine, what keys have been pressed and what unicode character
should be output. This state machine's memory is increased dynamically
as needed when the input method map file is loaded. There was a line of
code that references the old memory that could have moved by the memory
increase. This line of code has been moved to prior to the memory
increase to avoid accessing memory that may have moved.
- Control debugging via debug.h (previously im.c had its own
defined constant to control this.)
- Remove reference to an undefined symbol im_event_fp within a DEBUG
block.
Also:
- Explicitly include i18n.h required by im.c (though it appears to be
getting included by another file indirectly.) This should be a no-op
change.
* Don't ignore a fscanf()'s output.
* Rewrite some increment/roll-overs to avoid, e.g.
src/im.c:1193:18: warning: operation on ‘cm.section’ may be undefined [-Wsequence-point]
cm.section = (++cm.section % SEC_TOTAL); /* Change section */
pre-release made in Dec. 2013):
* Fix OS X 10.9 issue of current directory set by Finder
to something else than folder where app bundle resides.
* Some Mac OS X build / project changes & updates.
* Adjustments to Mac OS X fontconfig config file, to avoid warnings
and make things more robust.
* Updates to some #include's to catch up with newer library revisions.
* Tweaks to pixel read/write on Apple.
* Introduction of 'intprt_t' casting to avoid warnings on x64.
* Some additional debugging output.
* Logging stderr & stdout to /tmp/tuxpaint.log
Untested (I don't have a Mac!)
Added icon for Kalidescope magic tool.
Added Canada map starter.
Added Japan map starter.
Improved comments near gettext() calls to improve POT and PO files.
Regenerated PO files and POT file.
Added .cvsignore to make sure tp_magic_api.h (which is generated) isn't noticed.