Commit graph

1611 commits

Author SHA1 Message Date
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
1feb0c433d (verify_row): Fix for flags that don't fit into int. 2006-02-05 19:16:37 +00:00
1e17cc77cb (verify_row): if/else with negated condition is confusing. Negate
condition, swap conditional statements.
2006-02-05 19:13:58 +00:00
b11b81da8f (verify_row): Plug memory leak. 2006-02-05 19:08:49 +00:00
8add5fbb86 (realm_ca): Remove selector uid. It's not useful for players, and not
needed for xdump, because it doesn't occur as ca_table.

(lost_ca): Remove selector uid.  Reasons as for realm_ca.  The value
is incorrect in unused records, which is semantically tolerable, but
needlessly complicated to check in ef_verify.c.

(news_ca): Remove selector uid.  Reasons as for realm_ca, plus the
value is incorrect, because nws_uid is not used.
2006-02-05 19:01:41 +00:00
6ece883b87 Fix bad line breaks. 2006-02-05 17:58:16 +00:00
a507f5a54c Doc fix. 2006-02-05 17:43:00 +00:00
40f3ed2e5a When sources.mk is needed to find directories, don't test whether it's
there, just use it.  If it's not there, things will fail down the
road.  Better to fail early.
2006-02-05 17:41:17 +00:00
Ron Koenderink
9f5aa41084 (vers): Add collateral damage matrix to version report.
Add unit_damage and collateral_dam to the collateral damage matrix.
Move people_damage into matrix.
2006-02-05 17:37:58 +00:00
Ron Koenderink
d7dab3ddd1 (vers): Add the following the configuration values to the version report:
torpedo_damage, flakscale, people_damage, assault_penalty,
decay_per_etu, fallout_spread, fuel_mult, max_btus and max_idle.
2006-02-05 15:52:26 +00:00
Ron Koenderink
1a539f9128 (main) [_WIN32]: Upgrade to winsock version 2.
Remove version 1.1 include files.
2006-02-05 15:47:13 +00:00