Commit graph

2398 commits

Author SHA1 Message Date
d69dfc2b09 (set_dirs): New, factored out of emp_config(). Also fix for relative
file name argument.
2006-02-19 18:36:36 +00:00
0b1db8f379 (main): Fix for relative builtindir (pathological...). 2006-02-19 18:33:49 +00:00
b43d43392a Document interpretation of relative file names. 2006-02-19 18:33:02 +00:00
53a564d474 (lndchr): Document that members l_gun and l_shell are unused.
(lchr_ca): Remove selectors g_build and s_build.  Update land.config.
2006-02-19 18:30:13 +00:00
c9f530846e (uninstall): Implement. 2006-02-19 17:19:16 +00:00
9559abb506 (verify_fail): New.
(verify_row): Use it.
2006-02-19 17:08:35 +00:00
6bd0eabb21 (ef_init): Remove superflous size initialization for tables that are
initialized from builtin config files.
(ef_init_chr): Unused, remove.
2006-02-19 17:07:04 +00:00
fe53057977 (xuheader): Fix misleading diagnostics.
(xundump1): Fix table shrinking.
2006-02-19 17:03:33 +00:00
24910a0681 Fix the previous revision. 2006-02-19 15:42:48 +00:00
d4edc2761d Split excessively wide tables. No functional change. 2006-02-19 15:41:37 +00:00
3a73dce58e Permit field repetition in each part of vertically split tables,
provided the values all match:
(caseen): New.
(xundump): Initialize and finalize it.
(xundump2): Update it.
(deffld): Deal with repetition.
(fldval_must_match): New, considers repetition as well as NSC_CONST.
(setnum, setstr): Use it.
2006-02-19 15:25:35 +00:00
c12cc62875 (need_uid, is_partial): Rename.
(xuheader1, chkflds): Collect all code dealing with index field of
vertically split tables in chkflds().
2006-02-19 15:15:40 +00:00
c596577d32 (mchrstr, plchrstr, lchrstr, nchrstr): New member m_type, pl_type,
l_type, n_type.
(mchr_ca, plchr_ca, lchr_ca, nchr_ca): New selector type.  Update
builtin config files.
2006-02-19 09:47:26 +00:00
99c533fef7 Fix the previous revision. 2006-02-19 09:21:21 +00:00
b4161cd7e2 (mchr, plchr, lchr, nchr): Move initializer to new builtin config
files ship.config, plane.config, land.config, nuke.config.
(empfile): Declare the new config files.
(install, installdirs): Install them.
(builtins): New make variable.
2006-02-19 09:15:46 +00:00
dae17432ae (lndchr): Rename member l_mxland to l_nland for consistency with
similar unit characteristics.
2006-02-19 07:32:03 +00:00
9a30f30107 (builtindir): New econfig key, variable and make variable.
(subst.in): Substitute it.  Fix prerequisites.
(read_builtin_tables): New.
(main): Call it.  This doesn't do anything, because no builtin tables
have been defined.
2006-02-19 07:04:30 +00:00
ac0263d2ae (emp_config): Non-portable strndup() crept into rev. 1.33. Replace by
portable code.
2006-02-18 16:48:23 +00:00
3a9f9f6b3e (print_config): When km_comment starts with '#', don't prepend "\n#". 2006-02-18 16:12:50 +00:00
fd461e7bf5 (empfile, SYMTAB): Reorder so that symbol tables are together. Sort
them alphabetically.  Factor out commonalities into new SYMTAB().  No
functional changes.
2006-02-18 15:02:18 +00:00
a0bd72feed Collect all symbol tables in new symbol.c. No functional changes. 2006-02-18 14:55:29 +00:00
bd65a84eb5 New way to read configuration tables:
(config_tables): New econfig key.
(read_config_tables): New, implements config_tables.
(main): Call it.  Need to call ef_init() and chdir(configdir) first.
(ef_init_srv): Don't call ef_init(), since main() did it already.

Remove old way to do the same:
(ef_load): Remove, along with calls.
(empfile): Set configuration tables' member file back to NULL.
2006-02-18 13:57:52 +00:00
e4865d473e (configdir): New, to be used for loading configuration tables.
(emp_config): Set it to econfig's directory.
2006-02-18 12:43:17 +00:00
376d87c3a0 (main): Don't use access() before mkdir() to check whether the
directory to be created exists, just check errno afterwards.

[_WIN32] (F_OK, W_OK, R_OK): Unused, remove.
2006-02-18 09:29:49 +00:00
5282f500b5 (datadir, edatadir, gamedir): Rename to avoid confusion with Autoconf
output variable datadir and with configuration data.
2006-02-18 09:16:50 +00:00
58f67c8e19 Change xdump nat to show only own country, and xdump cou to show to
deities what xdump nat used to show:
(cou_ca): Remove initializer.
(ef_init_srv): Initialize cou_ca[] from nat_ca[].
(xdvisible): Change case EF_NATION to return true only for owner
even for deities.
2006-02-17 18:38:50 +00:00
3f96090ac5 (lost_ca, trade_ca): Provide proper ca_table for selector type. 2006-02-17 18:04:07 +00:00
09773ca8cc (xdvisible): Fix case EF_NATION for deities not to return true for
STAT_UNUSED.
2006-02-16 21:49:27 +00:00
4ad5bf51e1 (vers): Fix rev. 1.24 for money_ship, money_plane, money_land.
(vers): Fix rev. 1.25 for fallout_spread.  Beautify message.

(vers): Align collateral damage heading with the columns in the body.
2006-02-16 19:54:47 +00:00
Ron Koenderink
b7d0b66161 (buil, drnuke_const, opt_DRNUKE, show, show_nuke_build)
(show_nuke_capab, vers, xdvisible, build.t, Options.t):
Remove opt_DRNUKE and replace with the following check
drnuke_const > MIN_DRNUKE_CONST.
Set MIN_DRNUKE_CONST to 0.001 to prevent issues with tiny values.
Change the default drnuke_const to 0.0 because in the stock game
opt_DRNUKE was disabled.
2006-02-16 02:14:08 +00:00
d5f6d74d05 (buil): Fix rev. 1.32: information on how to list nukes was incorrect
for opt_DRNUKE.
2006-02-15 19:47:56 +00:00
78578a0521 (info.nr/all, info.html/all.html): Don't pass -F to ls, it has no
effect here.  Was mindlessly copied from old info/Makefile.
2006-02-15 07:35:32 +00:00
8b97f10ea3 (verify_row): Passed uninitialized val->val_as.sym.len to nstr_exec_val(),
which broke NSC_STRINGY.
2006-02-14 19:54:08 +00:00
c73613ea26 (defellipsis, chkflds, xundump2, need_uid): Use new need_uid to
require index field in all parts of a split table.
2006-02-14 18:04:44 +00:00
fc676cb53a Support vertically split configuration tables (human-readable only):
(ellipsis): New.
(xuheader1): Initialize it.  Compute nflds.  Allow repetition of index
field in continued tables.
(xundump): Don't set nflds.
(xufldname, defellipsis): Accept ... and call new defellipsis().
(xufldname, chkflds): Update and elaborate check for missing fields,
move it to new chkflds().  Require repetition of index field in
continued tables.
(xundump2): New, factored out of xundump().  Parse continued tables.
2006-02-14 07:30:06 +00:00
46fcc27c6f Xdumps don't contain records not in use, cope with that:
(xundump1, setnum, setstr, getobj, cur_id): Delay table lookup until
first field is about to be assigned.
(xundump1): Record largest ID, because it's no longer given by final
value of row.

(xuheader1, xundump1, xundump): Move initialization of cur_type to
xundump().
2006-02-13 21:22:05 +00:00
eae1e590cc (xundump1): Don't suppress table growth just because it has NSC_CONST
selectors.  That's wrong for EF_SECTOR_CHR and EF_PRODUCT.  Don't
allow table shrinking just because it has no NSC_CONST selectors.
That's wrong for EF_NEWS_CHR.  Allow it for game state and unit
characteristics.
(has_const): Unused, remove.
2006-02-13 21:16:41 +00:00
69c23f554e (sect_ca): Make selectors xloc, yloc NSC_CONST.
(realm_ca): Make selectors cnum, realm NSC_CONST.
2006-02-13 20:48:00 +00:00
1a4deb9fde (setnum): Fix computation of old for cases NSC_XCOORD, NSC_YCOORD. 2006-02-13 20:44:18 +00:00
9e362de34f (xuheader, xundump): Return -2 for empty input, so it can be
distinguished from bad input.
2006-02-13 19:07:31 +00:00
6ed05a024c (setstr): Fix for NSC_STRINGY without terminating zero. 2006-02-13 07:06:47 +00:00
4ff857507e Doc fix. 2006-02-12 23:01:47 +00:00
87af0f7fc4 Polish messages. 2006-02-12 23:00:06 +00:00
Ron Koenderink
22c7319aab (sect_ca[]): Remove NSC_EXTRA for sct_coastal
so the field is dumped.
2006-02-12 20:40:18 +00:00
Ron Koenderink
eca40469e7 (perform_mission): Disqualify land units from performing
missions when they are on ship or a train.
2006-02-12 20:37:27 +00:00
86a0a43960 (xuheader1): New, factored out of xundump(). 2006-02-12 15:52:10 +00:00
94fb350e40 Change dchrstr member d_mnem to char. 2006-02-12 13:56:12 +00:00
94ef2f4275 Change ichrstr member i_mnen to char. 2006-02-11 07:41:34 +00:00
c50c2d2518 (xdeval): Passed uninitialized val->val_as.sym.len to nstr_exec_val(),
which broke NSC_STRINGY.  Initialize from new parameter len.  Callers
changed.
2006-02-11 07:25:28 +00:00
87528230f2 New. 2006-02-10 19:30:19 +00:00