Commit graph

555 commits

Author SHA1 Message Date
fac342ed49 Update copyright notice. 2004-09-07 15:07:16 +00:00
351a4f6d2f Fix incomplete comment. 2004-09-07 14:16:36 +00:00
0f7097c319 Update for 4.2.18. 2004-09-07 14:16:24 +00:00
Ron Koenderink
9e670d8dc7 (info): `info' was not checking for all types of common files in
Windows, therefore could miss info files depending on the status
(archive, read-only).  Also changed the error message to user to
provide a more accurate description of the problem.  Closes #1018297.
2004-09-07 14:04:19 +00:00
7f73d82073 Explain roots of LWP. 2004-09-07 08:49:46 +00:00
532d3051b6 Unused, remove. 2004-09-07 08:47:00 +00:00
5bd904f825 (tran_plane): Fix major, abusable bug: getsect() before move_ground(),
putsect() afterwards.  This allowed two cooperating countries to
duplicate items.

(tran_plane): Don't report interdiction damage twice.

(tran_plane): Simplify loop collecting planes.
2004-09-07 06:34:08 +00:00
d4fe345edb (news): Add a comment to explain why argument is ignored when HIDDEN
is on.
2004-09-07 06:16:23 +00:00
b3730786b5 (mchr_ca): Add missing entry for member `frnge'.
(xdprval): Silence compiler warning.
2004-09-07 06:12:15 +00:00
3dc73b39d2 (NEWS_PERIOD, news_keep_days): Replace macro NEWS_PERIOD by new
configuration key news_keep_days.
2004-09-04 19:32:48 +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
7a4f133d1c (hard_tech): Unused, remove.
(configkeys): Fix km_flags of key anno_keep_days.
2004-08-30 21:12:15 +00:00
7362ad6c19 Undo the previous revision (bad idea). 2004-08-30 20:28:15 +00:00
cc9efeb13d (EMPCF_COMMENT): New; for readability. 2004-08-30 17:41:39 +00:00
fd4d6b3108 (keymatch, configkeys): Move to from optlist.h to emp_config.c; static
linkage.
2004-08-30 17:36:50 +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
8982ff2e18 (pln_arm): Callers don't use parameter tech; remove it. Callers
changed.
2004-08-30 16:13:37 +00:00
f0b4381c98 (ANNO_KEEP_DAYS, anno_keep_days): Replace macro ANNO_KEEP_DAYS by
new configuration key.  Closes #780425.
(delete_old_announcements): Do nothing when anno_keep_days is
negative.
2004-08-28 15:28:54 +00:00
e16e38dfab (trad, set): Treat trade file slots with zero owner as unused, so that
freshly extended trade file makes sense.  When set() removes a lot,
simply zero the slot.

(set): Initialize trd_uid.

(trade_check_ok): Use check_land_ok() & friends instead of doing it by
hand, but wrong.  This fixes bying planes and land units loaded on
ships that moved after loading.

(check_trade_ok): New.
(trade_check_ok): Use it.  Remove unused argument lot.  Callers
changed.
2004-08-28 15:22:50 +00:00
Ron Koenderink
133c1754f9 (show_land_build, show_plane_build): Adjust the position of the $ column to match
'show ship b'.  Adjust the crew column (show_plane_build) and the adjacent columns
to be right-justified.
2004-08-28 13:52:20 +00:00
a0e7a04f89 (gift): Default case can't happen. Make that explicit for safety and
to silence compiler.
2004-08-28 12:52:34 +00:00
00ba173baa (launch_missile): Simplify to avoid compiler warning. 2004-08-28 12:51:04 +00:00
baabcc563e (empth_ctx_t): Unused, remove. 2004-08-28 12:49:13 +00:00
2eb3b4a4d2 (min_to_next_daytime): Happily returned zero if DTIME happend to be in
TIMES.  This can make callers fire another update right away, possibly
several times.  Observed for update policy UDP_TIMES while updates
were disabled, which makes them complete in much less than a second.
Fills up server.log real fast.  Fix to consider DTIME tomorrow.
2004-08-28 11:24:25 +00:00
240eb32b76 (last_demand_update): Write-only. Removed. 2004-08-28 09:35:38 +00:00
b6d64279b9 Replace incorrect comment on distribution mobility cost by a reference
to info Mobility.
2004-08-28 09:05:27 +00:00
5ec392227a (IPKG): New.
(ichr): Set IPKG packing bonus for all sectors to 1.
(move): Use it.  No functional change.
(deliver, dodistribute): Use it.  Inefficient sectors now get IPKG
instead of NPKG packing bonus, cutting civilian packing bonus from 10
to 1.

(dodistribute): Export uses the better of sector or distribution
center packing bonus.  Previously, it assumed that distribution center
WPKG packing is always best.  Which is currently true, but needlessly
breaks the abstraction.
2004-08-28 08:43:57 +00:00
92799db17b (dodeliver): Move from sect.c to deliver.c. No functional changes.
(deliver): Static linkage.
2004-08-28 07:10:38 +00:00
Marc Olzheim
5ca57434dd retreat.h is unused, remove it. 2004-08-27 16:46:49 +00:00
Marc Olzheim
f7e9440bfe (build_land): unused variable natp, remove. 2004-08-27 16:45:52 +00:00
9c75164a0c (news_ca): Change type of selector action to NSC_TYPEID.
(nat_ca): Split awkward selector level into selectors tech, research,
education and happiness.
2004-08-24 18:54:32 +00:00
a537629d50 (nstr_exec_val): Failed to update category when evaluating symbolic
value.
2004-08-24 18:40:29 +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
b74f48fcc9 (improve): Fix confusing diagnostics when refusing to improve defense
because option DEFENSE_INFRA is off.

(improve): Simplify use of `value' to avoid compiler warning.
2004-08-24 08:23:09 +00:00
01e7ea7916 (move, explore): Simplify computation of destination sector's work and
loyalty to get rid of compiler warnings.
2004-08-24 07:08:59 +00:00
c06b330426 (sect_ca): Fix selector che. 2004-08-24 05:54:11 +00:00
eaa90d0590 (getsect, putsect, getsectp): Remove superflous casts, parenthesize
macro parameters properly.
2004-08-23 18:35:50 +00:00
dcfd251f95 caddr_t is obsolete. Replace by void *, except for struct empfile
member cache, which becomes char * to keep pointer arithmetic simple.
2004-08-23 18:29:44 +00:00
059353e957 (sctstr, sect_ca): Make sct_mines signed for same reasons as
sct_item[] (see sect.h rev. 1.10).
2004-08-23 15:50:32 +00:00
Ron Koenderink
4c4d5b7b94 Removed unnecessary #ifdef's for Windows. 2004-08-21 22:10:10 +00:00
b39e9ba094 (nstr_exec): Fix the previous rev. 2004-08-21 15:06:37 +00:00
ba9748027b (NSC_STRINGY): New.
(nstr_promote, nstr_exec_val): Implement.

(nstr_exec_val): Ignored IDX for NSC_STRING values.

(nstr_exec): Implement NSC_STRING.

(ship_ca): New selector name.
2004-08-21 14:09:31 +00:00
7c4433c54b (sect_ca): New selectors loyal, access.
(NSC_GENITEM): New selector radius.

(ship_ca): New selectors nland, access, xbuilt, ybuilt, builder.

(plane_ca): New selectors access, theta.

(land_ca): New selectors react, nland, access.

(lost_ca): New selector id.
2004-08-21 13:35:35 +00:00
75c03fba80 Doc clarifications. 2004-08-21 13:25:57 +00:00