Translating the help text is particularly challenging when taking into
account the necessity for correct whitespacing. Clarify that the author
and maintainer (me!) is willing to help.
The number of pages used by the help text is fixed for any given
language. Different languages, depending on the actual translation, may
use differing number of pages.
In summary: share returns can now be negative, decreasing a player's
income; the bank interest rate now has a minimum; algorithms for changing
share price, share return and bank interest rate are much "smoother" (as
modelled with Gnuplot!); many minimum, maximum and typical values have
been revised.
This allows translators to do the same: msgmerge(1) complains if the
translated string ends in "\n" where the original string does not (and
vice versa).
In particular, bankruptcy affects both players and companies, and the
strings may need to be translated differently. Also update PO files
appropriately.
Firstly, Ncurses addchstr() and family do not work, it seems, with
multibyte strings, so use addch() instead. Secondly, PRINTABLE_MAP_VAL
returns a wchar_t wide character, not a byte-sized char.
The %lc format is actually of type wint_t, according to printf(3), not
wchar_t, even though these are of the same underlying type on most (all?)
platforms.
Wide-char character constants is not strictly needed for most (all?)
modern C compilers, as ASCII maps to wchar_t directly (as long as
__STDC_ISO_10646__ is defined). However, it doesn't hurt to be pedantic!
Move the keycode_company, printable_map_val, chtype_map_val,
keycode_game_move, printable_game_move and chtype_game_move global
variables to intf.c and intf.h.
Convert all input routines, and most internal strings, to use
wide-character functions. All extended characters are supported,
including those having column widths of zero (eg, combining characters),
one (eg, normal Western characters) and two (eg, many East Asian
characters). This was quite a major undertaking!
The xwcrtomb() and xmbstowcs() functions replace illegal characters with
EILSEQ_REPL ('?'). Adjust other functions, particularly mkchstr() and
friends, to suit.
On some systems the return string from setlocale() may be opaque, so we
need to explicitly set the locale to "C", then test the return value from
that.