1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-06-09 19:20:43 +00:00
Commit Graph

69 Commits

Author SHA1 Message Date
John Zaitseff
cc5ee96ceb Update the copyright year to 2024 2024-01-02 12:33:37 +11:00
John Zaitseff
1231c084b8 Update the copyright year to 2022 2022-08-01 04:46:15 +10:00
John Zaitseff
0d2462ef41 Update the copyright year to 2021 2021-01-07 17:07:55 +11:00
John Zaitseff
814ce71842 Update the copyright year to 2020 2020-01-02 08:37:36 +11:00
John Zaitseff
fa0cb153ff Update copyright year to 2019 2019-01-05 08:10:28 +11:00
John Zaitseff
5caf1ef165 Keep the Intel C compiler quiet
By default, the Intel C compiler warns "enumerated type mixed with
another type" when compiling this code.  Explicit casts keep it quiet.
2018-08-06 13:59:25 +10:00
John Zaitseff
f45986e88d Pedantically type-cast integer comparisons
The latest versions of the GNU Compiler Collection complain about signed
and unsigned integer comparisons when run with the "-Wextra" flag.  Keep
those compilers happy.
2018-07-27 18:33:14 +10:00
John Zaitseff
1427eb683f Change label from "New Stock:" to "New stock:" for consistency
This inconsistency (between the "Old stock:" and "New Stock:" labels) has
been present since August 2011!
2018-03-30 14:50:47 +11:00
John Zaitseff
abc9b77bd6 Change all relevant http references to https (secure HTTP) 2018-03-30 12:46:37 +11:00
John Zaitseff
8c6d009611 Update the copyright date to 2018 2018-03-30 11:38:29 +11:00
John Zaitseff
e6493b4184 Fix an off-by-one bug in the macros GALAXY_MAP_RIGHT and GALAXY_MAP_DOWN
This bug has been present since commit e2dbe549b2
dated Sat Jul 16 13:34:13 2011 +1000: almost six years ago!
2017-05-17 09:12:52 +10:00
John Zaitseff
2f79514910 Update the copyright date to 2017 2017-05-14 06:29:44 +10:00
John Zaitseff
a486cd15aa Update the copyright year to 2016 2016-01-05 09:25:51 +11:00
John Zaitseff
f16f78a509 Update the copyright date to 2015 2015-08-18 07:27:22 +10:00
John Zaitseff
cbb6f58afb Minor change to the translator comment 2014-10-03 08:41:40 +10:00
John Zaitseff
a846f48904 Automatically select between left and right justification of the prompt 2014-10-03 08:38:21 +10:00
John Zaitseff
9450fed943 Update the copyright year to 2014 2014-05-22 11:05:51 +10:00
John Zaitseff
c25ec91e99 Update the copyright year to 2013, and the version number to 7.5 2013-02-02 10:48:43 +11:00
John Zaitseff
36cc55ee7f Add more comments regarding the column width of various labels 2012-03-31 10:57:29 +11:00
John Zaitseff
35abce5052 Revise the game algorithms extensively
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.
2012-03-27 10:13:57 +11:00
John Zaitseff
e4c2fa9423 Document the difference between "turn" and "move" for translators 2012-03-22 22:11:01 +11:00
John Zaitseff
adde1ed5d1 Simplify a number of translator's comments 2012-03-16 10:13:53 +11:00
John Zaitseff
b44e032953 Add translation comments explaining a number of strings
In particular, bankruptcy affects both players and companies, and the
strings may need to be translated differently.  Also update PO files
appropriately.
2012-03-15 09:09:12 +11:00
John Zaitseff
bc3e1a06a1 Update the copyright year to 2012 2012-03-15 02:36:23 +11:00
John Zaitseff
74aa3e84df Fix a couple of display bugs
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.
2011-08-30 09:15:15 +10:00
John Zaitseff
4ca99815b8 Be a little more diligent when it comes to wchar_t vs. wint_t
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.
2011-08-29 14:13:29 +10:00
John Zaitseff
1c2518a78b Minor clean-up: replace character constants with wide-char versions
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!
2011-08-25 21:34:41 +10:00
John Zaitseff
20473ae409 Use wide-character functions for input routines and most strings
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!
2011-08-25 13:19:31 +10:00
John Zaitseff
b5b211313e Move chstrdup() to utils.c and rename it to xchstrdup()
The new name is for consistency with other XXXdup() functions used in
this program.
2011-08-20 15:17:09 +10:00
John Zaitseff
4d6f1478e6 Remove the superfluous argument to chstrdup()
This argument is not required: we KNOW that we have initialised chtype
arrays with an ending NUL!
2011-08-18 14:53:03 +10:00
John Zaitseff
6ef7c7b6da Allow localisation of company letters and map moves (choices) 2011-08-18 12:10:33 +10:00
John Zaitseff
b674c05d56 Add many comments for translators; use pgettext() where appropriate 2011-08-17 19:13:05 +10:00
John Zaitseff
d953154e5d Mark up strings with xgettext:c-format comments where appropriate 2011-08-17 10:04:57 +10:00
John Zaitseff
6c1c272780 Place all output strings within gettext invocations 2011-08-16 21:03:41 +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
82647cf691 Move to the new left/center/right functions; add maxlines parameter 2011-08-15 23:54:44 +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
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
7d9bf097b9 Replace discrete calls to newtxwin() etc. with calls to txdlgbox() 2011-08-12 18:24:35 +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
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
961e989bd7 Replace the WCENTER(x) macro with WCENTER; refactor newtxwin() to suit 2011-07-23 10:16:03 +10:00
John Zaitseff
fc60a9fef1 Rework the handling of character renditions
Rather than querying use_color each and every time a rendition is used,
do it once in init_screen(), assigning the renditions to global
variables.
2011-07-23 09:47:13 +10:00
John Zaitseff
6704c358ce Make compiler quieter about signed and unsigned comparisons 2011-07-22 13:07:14 +10:00
John Zaitseff
ac55800e90 Continue moving comments from source files to headers
Also refactor some code, primarily in process_move(), to reduce the level
of indentation.
2011-07-22 12:11:19 +10:00
John Zaitseff
4b4efd7851 Replace the global variable localeconv_info with lconvinfo
In general, verbosity is not really to be encouraged...
2011-07-22 10:23:58 +10:00