Commit graph

72 commits

Author SHA1 Message Date
b0ce8c0253 (xdump): Fail unless GUINEA_PIGS is enabled. 2004-12-16 22:05:15 +00:00
Marc Olzheim
d30942632b (I_NONE, I_CIVIL, I_MILIT, I_SHELL, I_GUN, I_PETROL, I_IRON, I_DUST,
I_BAR, I_FOOD, I_OIL, I_LCM, I_HCM, I_UW, I_RAD, I_MAX): Turn macros
into enumeration constants.
(i_type): New.  Use where appropriate.  No functional changes, except
that I_NONE is now catched properly in a few places.
2004-09-16 21:18:01 +00:00
aa6ad9d791 (NSC_SITYPE): New.
(dchr_ca): Use it to fix selector pkg's ca_type.
2004-09-11 15:25:38 +00:00
630e8e105a (valstr, nstr_exec, nstr_comp_val, nstr_exec_val, xdprval): Support
strings with length limit instead of zero termination.
(ship_ca, land_ca): New selectors rflags, rpath.  The latter is such a
string.
2004-09-11 08:45:17 +00:00
d446db0ac1 (mchr_ca, lchr_ca): Fix selector flag's ca_type.
(xdprval): Make sure floating-point numbers always contain a decimal
point, so they're easily distinguished from integers.
2004-09-10 18:58:30 +00:00
fac342ed49 Update copyright notice. 2004-09-07 15:07:16 +00:00
b3730786b5 (mchr_ca): Add missing entry for member `frnge'.
(xdprval): Silence compiler warning.
2004-09-07 06:12:15 +00:00
2dd13e096d (xdprval): Fix escaping of negative characters. 2004-09-04 13:11:02 +00:00
0262aaf464 (xdprval): Escape the space character so that a line can be simply
split into fields at space.
2004-09-04 08:15:33 +00:00
d89c268b8b (keymatch): Replace member km_func by km_type. Initializers adapted.
(emp_config, print_config): Cope with km_type.
(worldxset, intset, floatset, optstrset, doubleset, longset): Unused,
remove.

(emp_config): Fail if specified file can't be read or contains errors.
Used to succeed always, returning RET_OK.  RET_OK is not appropriate,
since this is not a command.  Return 0 on success, -1 on failure.
Callers ignore failure at the moment.  A missing or unreadable econfig
file used to be silently ignored.  It is still ignored, but no longer
silently.  It is questionable whether ignoring is wise, but that's
left for another day.

(emp_config): Improve diagnostic messages.

(set_option): Move diagnostics to caller.

(emp_config): Ignore leading whitespace in `#' comment lines.

(print_config): Simplify printing of km_comment.

(set_option): New parameter val, so it can set and clear options.
(delete_option): Remove.

(KM_ALLOC): Turn macro into enumeration constant.

(KM_INTERNAL): New.
(xdump, xdver): New version dump.

(keymatch, infodir, datadir, teldir, upfil, downfil, disablefil,
telfil, annfil, banfil, timestampfil, privname, privlog, update_times,
update_demandtimes, game_days, game_hours): Use plain char * instead
of s_char * for strings, void * for generic pointers.
2004-09-04 08:07:51 +00:00
4798d1466b (xdprval): Fix for strings containing backslashes. 2004-08-31 17:53:34 +00:00
5346422665 (xdprval): Fix for strings with characters printed as escapes. Print
null pointer as `nil' to distinguish it from empty string.
2004-08-31 17:45:45 +00:00
549347defa (xdump): New options dump.
(xdopt): New.
(xdhdr1): New, factored out of xdhdr().
2004-08-30 16:49:58 +00:00
8db5a84a8f (ship_ca): Fix selector name's ca_len.
(xflds): Ignore ca_len for NSC_STRINGY.
2004-08-30 16:20:05 +00:00
498fe97332 (chr_camap): Make table names differ from file empfile[] names, so
that they properly identify the dump.
2004-08-24 18:29:09 +00:00
083ce69713 (dchr_ca, intrchr_ca, rpt_ca, tchr_ca): New.
(chr_camap): Use them, but disable rpt_ca[], since rpt[] lacks a
sentinel.

(xhdr): Print `XDUMP' rather than `DUMP' to avoid confusion with old
dumps.  Don't print human readable timestamp.
2004-08-24 15:31:56 +00:00
3e5c0643db (NSC_EXTRA): New.
(sect_ca, NSC_GENITEM, plane_ca, land_ca): Use it for aliases and
cached functions of tech.
(xdflds, xdfldnam): Skip NSC_EXTRA fields.
2004-08-21 12:36:13 +00:00
0bd79fe5f3 (xdeval): Use NSC_NOTYPE instead of 0.
(xdprval): Cope with NSC_TYPEID.  Check for bad types.
2004-08-21 11:48:59 +00:00
5e381b6c57 (PLANENAMES, opt_PLANENAMES, Options, plchrstr, plchr_ca, plchr,
main): Remove nooption PLANENAMES.
2004-08-21 06:48:34 +00:00
914e21cdfd (xdprval): Passed ptrdiff_t as field width. 2004-08-21 06:20:25 +00:00
19f567bccf Comments, cosmetics. 2004-08-20 13:18:28 +00:00
fe50838824 (xdump): New command xdump (experimental).
(player_coms): Add xdump under #if 0.
2004-08-20 12:39:16 +00:00