1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-12-04 14:46:45 -05:00
Commit Graph

650 Commits

Author SHA1 Message Date
John Zaitseff
6c1c272780 Place all output strings within gettext invocations 2011-08-16 21:03:41 +10:00
John Zaitseff
bf76fa312c Assume MOD_POSIX_CURRENCY_SYMBOL contains only ASCII characters
The GNU library now has "C.UTF-8" as a locale (which is NOT a single-byte
locale!), but we assume the currency symbol in MOD_POSIX_CURRENCY_SYMBOL
contains only ASCII characters.
2011-08-16 20:55:42 +10:00
John Zaitseff
d20cc2b5ec Use chstr-style output functions in gettxline() 2011-08-16 20:45:47 +10:00
John Zaitseff
de6a4e3e66 Remove obsolete old_attrpr, old_center, old_center2 and old_center3 2011-08-16 18:51:56 +10:00
John Zaitseff
cf30933614 Continue to rewrite the interface code to use the new interfaces 2011-08-16 18:48:56 +10:00
John Zaitseff
135842b87d Bug fix for non-colour mode
If the background has A_REVERSE, then A_NORMAL will have no effect.  For
that reason, specify A_NORMAL as the default background after creating a
new window.
2011-08-16 16:25:28 +10:00
John Zaitseff
82647cf691 Move to the new left/center/right functions; add maxlines parameter 2011-08-15 23:54:44 +10:00
John Zaitseff
22677c0d89 Handle floating-point numbers in mkchstr(), with optional precision 2011-08-15 23:12:10 +10:00
John Zaitseff
665605d144 Add convenience functions left(), center() and right() 2011-08-15 21:04:07 +10:00
John Zaitseff
a6c362d2e8 Rename pr_left, pr_center and pr_right to leftch, centerch and rightch 2011-08-15 19:46:26 +10:00
John Zaitseff
907a995b98 Refactor function names; "old_" functions will be removed
Rename prepstr, vprepstr, chbufdup, center, center2, center3 and attrpr
to mkchstr, vmkchstr, chstrdup, old_center, old_center2, old_center3 and
old_attrpr respectively.
2011-08-15 19:12:26 +10:00
John Zaitseff
0c319738a8 Continue to move code to prepstr() and friends 2011-08-15 17:07:00 +10:00
John Zaitseff
3ad62688da Do parse of format string in prepstr_parse(); add the "%c" specifier 2011-08-15 15:53:56 +10:00
John Zaitseff
746155078b Continue to move text output to the new interfaces 2011-08-15 10:08:44 +10:00
John Zaitseff
5bb48fe35f Add wrapper functions xmalloc() and xstrdup() to do error handling 2011-08-13 08:50:34 +10:00
John Zaitseff
c50b8a4649 Move error handling into vprepstr(), to save doing it over and over 2011-08-13 08:17:30 +10:00
John Zaitseff
06b66716cf Add the function chbufdup() to duplicate a chtype array 2011-08-13 07:59:20 +10:00
John Zaitseff
7d9bf097b9 Replace discrete calls to newtxwin() etc. with calls to txdlgbox() 2011-08-12 18:24:35 +10:00
John Zaitseff
184c07d19d Add a comment about multibyte character handling in prepstr() 2011-08-12 16:35:13 +10:00
John Zaitseff
15f06bdc79 Move some functions from center() to pr_center() 2011-08-12 16:32:32 +10:00
John Zaitseff
b27af38537 Minimise flickering when resizing the console window 2011-08-12 16:09:38 +10:00
John Zaitseff
6594ff3daa Add the function txdlgbox() to display a dialog box 2011-08-12 16:02:01 +10:00
John Zaitseff
4e7699f192 Add vprepstr() with a va_list argument: for the future txdlgbox() 2011-08-12 15:10:05 +10:00
John Zaitseff
2612eddf3d Add functions prepstr(), pr_left(), pr_center() and pr_right()
These functions allow multiple lines to be printed left-aligned, centered
or right-aligned, with automatic line-wrapping where needed.
2011-08-12 14:28:15 +10:00
John Zaitseff
3984468894 Handle KEY_RESIZE events (where defined) in a simple manner
Unfortunately, the implementation of Curses (even Ncurses) requires that
to truely handle resizing, one must destroy and recreate every window
(and, of course, repaint it)--a lot of work that is not done at this
time.
2011-08-10 01:27:11 +10:00
John Zaitseff
738ffcd69a Block SIGINT, SIGTERM and SIGQUIT when in the signal handler 2011-08-10 00:30:38 +10:00
John Zaitseff
040e1a5ad6 Rework the signal handler
Rework the signal handler to be somewhat more unsafe, but conceptually
cleaner, in operation.  It now ends the use of Curses, then reraises the
signal.  Remove almost all references to abort_game.
2011-08-09 23:20:56 +10:00
John Zaitseff
5f995f1d36 Move the initialisation of the game title into its own function 2011-08-09 13:11:22 +10:00
John Zaitseff
8a2bc51f28 Rearrange function prototypes to match the order in the source file 2011-08-09 13:06:21 +10:00
John Zaitseff
4d133cf662 Rework the definition of USE_UTF8_GAME_FILE a little 2011-08-09 12:27:56 +10:00
John Zaitseff
bbdae69de4 Add a signal handler for SIGINT and SIGTERM
Add a signal handler for SIGINT and SIGTERM, as well as sprinklings of
checks to abort_game.  Although Ncurses DOES define handlers for SIGINT
and SIGTERM, they do not always seem to work correctly under many
operating systems.
2011-08-08 20:47:52 +10:00
John Zaitseff
91eb4d65d8 Add some TODO notes to NEWS 2011-08-08 12:33:49 +10:00
John Zaitseff
2401bea19c Document the need for GPerf, and the --disable-nls configure option 2011-08-08 12:33:25 +10:00
John Zaitseff
32ed55a0cd Convert strings to UTF-8 if possible during file save and load 2011-08-08 11:15:44 +10:00
John Zaitseff
1e7c6c098a Add checks for the C.UTF-8 (C.utf8) locale for adding a currency symbol 2011-08-08 10:21:24 +10:00
John Zaitseff
601678313d As much as I don't like it, change the help string to American spelling 2011-08-01 20:52:40 +10:00
John Zaitseff
ee6e48fd45 Add a README file to the po directory 2011-08-01 20:35:16 +10:00
John Zaitseff
c7e1f6096f Replace PACKAGE_NAME with "Star Traders"
The gettext utilities don't like C macros in gettext() invocations, so
replace each occurrence of PACKAGE_NAME with "Star Traders".
2011-08-01 19:49:16 +10:00
John Zaitseff
1ee27fda20 Minor modifications to allow the first pass to compile! 2011-08-01 19:43:55 +10:00
John Zaitseff
9251ca0463 First pass at adding _() and N_() to allow string translation 2011-08-01 19:30:19 +10:00
John Zaitseff
36b1a13254 Add languages currently enabled; add source files to internationalise 2011-08-01 18:59:54 +10:00
John Zaitseff
686b3b0e0e Rearrange order of linked libraries; move definition of LOCALEDIR 2011-08-01 18:59:11 +10:00
John Zaitseff
378b7e64b0 Add preliminary support for GNU gettext internationalisation 2011-08-01 18:17:02 +10:00
John Zaitseff
3167306af4 Start preparing for version 7.2
In this version, hopefully, internationalisation and multibyte strings
will be handled correctly.
2011-08-01 15:10:17 +10:00
John Zaitseff
9599707f67 Add information about version 7.1 of Star Traders 2011-07-29 12:17:16 +10:00
John Zaitseff
d1d7716667 Update ax_with_curses.m4 to latest version from the Autoconf Archive 2011-07-29 11:51:21 +10:00
John Zaitseff
6afcaa0532 Correct a bug in the AC_DEFINE wording 2011-07-28 22:51:40 +10:00
John Zaitseff
d4e8ee09e6 Add the word "working" to some checks 2011-07-28 22:33:24 +10:00
John Zaitseff
880a63ee95 Define a check for <ncurses.h> under NcursesW, as used in FreeBSD 2011-07-28 22:29:55 +10:00
John Zaitseff
b16a785f3e Add _XOPEN_SOURCE_EXTENDED for parts of the compile and link checks
Older versions of NcursesW require _XOPEN_SOURCE_EXTENDED to be defined
to access the wide-character interfaces.
2011-07-28 22:21:52 +10:00