Commit graph

1621 commits

Author SHA1 Message Date
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
fa63f87bc0 (cou_ca, symbol_ca, mdchr_ca): Make all selectors NSC_CONST.
(empfile_ca): Make selector name NSC_CONST.
2006-02-10 19:12:10 +00:00
8c8bf88730 (cou_ca): Fix ca_type for selector stat. 2006-02-10 19:00:38 +00:00
244b2b7887 (options_cmd): Sent two prompts when listing options. 2006-02-10 18:28:55 +00:00
5d50b2accf Doc update. 2006-02-09 19:48:21 +00:00
10096cbf98 (xundump): Rev. 1.44 broke ef_load(). Fix. 2006-02-09 18:34:57 +00:00
Ron Koenderink
524fe1aa50 (lchr_ca[]): Change the name for l_rnd from "rad" to "rmax".
This removes a conflict between rad items and reaction radius.
Now the name matches the equivalent name in land_ca[].
2006-02-09 13:31:05 +00:00
66669be655 (xundump, xundump1): Fix treatment of empty lines. 2006-02-09 07:10:18 +00:00
Ron Koenderink
f76a128f5c (mtsymset, xutrailer, xundump1): Remove unused variables. 2006-02-09 00:28:28 +00:00
f5621c5a49 Accept fields out of order in human-readable syntax (indexes must
still be in order), support abbreviated field names:
(nxt_sel, nxt_idx, nxtfld, ca4fld): Remove.
(nflds, fldca, fldidx, caflds, getfld): New.
(xundump): Initialize and finalize them.
(xundump1): New, factored out of xundump().
(deffld): Match names, record field order in fldca[], fldidx[] for
getfld().  Use caflds[] to detect duplicates.
(xufldname): Catch negative index.  Used to pass it to deffld(), which
now interprets it as no index.
(setnum, setstr, setsym, mtsymset, add2symset): Use getfld().

(xufld): Improve error message.

(setstr): Fix for NULL strings.

(xuheader): Catch null ef_cadef().

(xuheader): Don't oops when an unexpected table can't be undumped.
2006-02-08 23:23:48 +00:00
28787caa95 Improve error messages. 2006-02-08 22:44:22 +00:00
b11aa718ce The separation between parsing and semantic actions is awkward and
leaks memory; rework it:
(deffld): New; semantic action for field headers.
(xufldname): Use it instead of storing a value for xucolumnheader().
(xucolumnheader): Remove, use xuflds() directly instead.
(setnum, setstr, setsym): New; semantic actions for field values.
(xufld): Use it instead of storing a value for xuloadrow().
(xuloadrow): Remove.  Was incomplete.
(xufldname, xufld, xuflds): Remove parameter values.  Callers
changed.
(cur_type, cur_obj, nxt_sel, nxt_idx, nxtfld, ca4fld, getsymtab): New
helpers.
(xundump): Initialize them.
(enum_value, value, freeflds, xunsymbol): Remove.

(mtsymset, add2symset): New.
(xufld): Use them to build a symbol set along the parse.

(xufldname, xufld, xuheader, xutrailer, xundump): Increment lineno
when and only when a linefeed is consumed, to make sure it is correct.
Move some semantic checks so that errors get reported for the correct
line.

(xundump): Use compare filenames as pointers, not strings, when
checking whether to reset lineno.

(xundump): Keep empfile[type] consistent during parse, to make
ef_ptr() usable.

(xundump): Don't call ep->init() on sentinels.
(xuinitrow): Unused, remove.
2006-02-08 22:32:53 +00:00
054d59b323 (xundump): Precise value for need_sentinel. 2006-02-08 22:02:13 +00:00
d329c4f8e6 (xutrailer): Fix parsing of /config. Change human-readable syntax not
to accept number of records.  Don't skip empty lines after trailer.
2006-02-08 21:53:04 +00:00
72127c838f (xuheader): Check for unexpected table before oopsing on !EFF_MEM. 2006-02-08 21:41:48 +00:00
8a6438b4e0 (xufldname, xufld): New, factored out of xuflds and specialized for
headers and for body lines, respectively.
(xflds): Call them through new parameter parse.  Callers changed.
2006-02-08 20:56:39 +00:00
361e33d70f (xucolumnheader): Don't gripe when xuflds() fails, because that one
already griped.
2006-02-08 20:49:47 +00:00
2dcf1fd1c8 (MIN, MAX): Fix insufficiently parenthesized macro expansion. 2006-02-06 21:56:38 +00:00
25c9f2c66f (nation_status): Lacked sentinel. 2006-02-06 20:12:42 +00:00
973da267eb (verify_row): Check all values against symbol tables, not just
non-negative ones.

(verify_row): Fix off by one in non-symbol table index check.
2006-02-06 07:57:04 +00:00
8ae71216d4 (verify_row): Check table references regardless of target table. Also
fixes the previous revision.
2006-02-06 07:53:42 +00:00
7261d6a3e0 (level): Add value -1. 2006-02-06 07:41:55 +00:00
3879ab9643 (meta_type): Fix NSC_TYPE entry to match specification. 2006-02-05 20:20:46 +00:00
e71509b32f (verify_row): Check uid. 2006-02-05 19:59:08 +00:00
b121b58e91 (verify_row): NSC_BITS implies symbol_ca. Oops if violated. 2006-02-05 19:57:10 +00:00
afd93afbd3 (verify_row): Simplify control structure. No functional change. 2006-02-05 19:55:05 +00:00
2258ec7703 Document uid selector convention. 2006-02-05 19:30:20 +00:00
Ron Koenderink
b677413cfd (zdon): Display current number of missed updates and number of
missed updates before vetoing begins.
2006-02-05 19:19:00 +00:00