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

309 Commits

Author SHA1 Message Date
John Zaitseff
1c3afc571b Minor whitespace cleanup in #define statements 2018-08-04 22:14:03 +10:00
John Zaitseff
192b749018 Use a better check for Solaris (SunOS 5.x)
The __sun__ macro is not always defined by Oracle Solaris Studio, but
__sun is, as it is in GCC and Clang.  By itself, __sun__ also matches the
very obsolete SunOS 4.x BSD-based operating system, hence the need for
__SVR4 as well.

See https://web.archive.org/web/20180221212835/http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system
for more information on operating system macro checks.
2018-08-04 18:03:33 +10:00
John Zaitseff
2d6a339fb1 Define _XOPEN_SOURCE correctly for Solaris systems 2018-08-04 16:48:29 +10:00
John Zaitseff
de6f113d12 Change parameters of apply_xor() from void * to char *
Arithmetic on void * pointers is undefined, according to Section 6.5.6
Paragraph 2, Section 6.2.5 Paragraph 1 and Section 6.2.5 Paragraph 19 of
the ISO/IEC 9899:1999 C99 standard: the void type is incomplete and thus
its size cannot be determined.

GCC allows pointer arithmetic on void * as an extension (and only warns
if "-Wpointer-arith" is given); the Oracle Developer Studio C compiler
issues a warning by default.
2018-08-04 14:31:45 +10:00
John Zaitseff
a47e8528dc Force redefinition of _XOPEN_SOURCE if required
Newer versions of libncurses/libncursesw "#define _XOPEN_SOURCE 600" in
their pkg-config file.  This change forces _XOPEN_SOURCE to be redefined
to 700 in that case.
2018-07-27 18:39:18 +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
c550549783 Correct spelling mistake in utils.c 2018-07-24 18:41:59 +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
d0e1141355 utils.c: Rename the variable from "signed char c" to "int v" 2017-06-18 05:47:25 +10:00
John Zaitseff
6433c44dee Bug fix: if "char" is unsigned (as on some architectures), b64decode() fails 2017-06-15 11:40:24 +10:00
John Zaitseff
24ec66e00e Change "prints" to imperative "print" in a translator comment in help.c 2017-05-24 20:38:32 +10:00
John Zaitseff
e226e6e676 Tweak global game constants for more dynamic play 2017-05-24 07:10:17 +10:00
John Zaitseff
ecf1cfc983 Revise the comments for global game constants 2017-05-24 06:43:49 +10:00
John Zaitseff
e4d884afc9 Replace U+0060 GRAVE ACCENT with U+0027 APOSTROPHE
In the past, GNU tools used quotes `like this'.  Modern practice is to
use quotes 'like this'.  Update Star Traders to follow this newer
standard, including all PO files.
2017-05-20 09:55:20 +10:00
John Zaitseff
bb06d81534 Update ax_with_curses.m4 to latest version from the GNU Autoconf archive
This version changes CURSES_LIB to the plural CURSES_LIBS, and adds the
CURSES_CFLAGS variable.  It also uses pkg-config(1) if that is available.
2017-05-17 09:21:30 +10: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
5edd10177c Ensure no label has to start with a new-line character 2016-04-16 07:39:51 +10:00
John Zaitseff
a486cd15aa Update the copyright year to 2016 2016-01-05 09:25:51 +11:00
John Zaitseff
09e1db13b0 Allow right-hand column labels in the Exchange window to be wider
In particular, these column labels may now be more than 18 characters
long.  This will only work if the left-hand side is not too wide.
2015-08-26 21:26:39 +10:00
John Zaitseff
f02dba9fad Change "Gemeni Inc" to "Gemini Inc"
This spelling mistake has been present from at least 1990!
2015-08-26 19:11:14 +10:00
John Zaitseff
bd11c1cd9d Update the copyright date to 2015 2015-08-18 08:19:56 +10:00
John Zaitseff
f16f78a509 Update the copyright date to 2015 2015-08-18 07:27:22 +10:00
John Zaitseff
bad1e27f8f Update a translator comment and regenerate the PO files 2014-10-03 09:17:05 +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
4ef0578792 Change minimum and maximum share return percentages to -15% and 25% 2014-08-13 11:32:27 +10:00
John Zaitseff
be276094ea Rearrange library includes to allow compilation under Cygwin 2014-06-18 20:56:09 +10:00
John Zaitseff
9cb3a46693 Completely rewrite the scramble() and unscramble() functions
The file output is now completely in ASCII---and will be much harder to
break for casual cheating!
2014-05-23 18:56:24 +10:00
John Zaitseff
3d20e0b307 Add the CRC32 functions from the GNU Portability Library 2014-05-22 18:17:02 +10:00
John Zaitseff
549b2d517d Use separate input and output buffers for scramble() and unscramble() 2014-05-22 15:34:32 +10:00
John Zaitseff
9450fed943 Update the copyright year to 2014 2014-05-22 11:05:51 +10:00
John Zaitseff
207be54145 Default keys are now set by a locale string, not by macros 2013-04-25 22:18:54 +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
674de34873 Adjust the Stock Exchange windows slightly by one line
The company listing is now one line shorter, and the menu of choices
window is one line longer.
2012-04-14 12:36:43 +10:00
John Zaitseff
48bf36b719 The author and maintainer (me!) is willing to help with formatting
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.
2012-04-14 12:19:52 +10:00
John Zaitseff
36cc55ee7f Add more comments regarding the column width of various labels 2012-03-31 10:57:29 +11:00
John Zaitseff
2a5bbc456c Fix an off-by-one error in load_game()
Obviously no one has tried to load a game with MAX_PLAYERS (8) before!
2012-03-29 20:05:51 +11:00
John Zaitseff
71e1cd593e Clarify that help page count is fixed for any given language
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.
2012-03-29 07:39:53 +11:00
John Zaitseff
5ac3b3787a Update translator comments for company names
Company names should be, ideally, related to constellations and stars in
our galaxy.
2012-03-28 11:45:17 +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
c1c580c133 Add a new-line to the end of empty help text strings
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).
2012-03-25 19:19:02 +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
8bbee054ad Change the handling of default value keycodes to be configurable 2011-08-30 12:45:45 +10: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