]> git.pond.sub.org Git - empserver/log
empserver
19 years ago(info): Fix when with last character is special.
Ron Koenderink [Wed, 10 Nov 2004 00:02:29 +0000 (00:02 +0000)]
(info): Fix when with last character is special.
Also reorganized to check for special characters then blank.

(info): Add length boundary check to filename variable.
Change WIN32 to use the same code.

(info) [_WIN32]: Fix check for invalid file attributes.

(apro): Ensure the user does not see the directory information on error.
See #1028552 for reference.

(apro): Ensure the directories, operating system files, and
hidden files are skipped.

19 years agoi_type shift (include/item.h 1.12) broke the production of tech/res/edu/hap.
Ron Koenderink [Sun, 31 Oct 2004 15:01:19 +0000 (15:01 +0000)]
i_type shift (include/item.h 1.12) broke the production of tech/res/edu/hap.
Switch p_type to use I_NONE for products that to not produce items.

19 years ago(dchr): Negative d_cost now means that only deity can designate.
Ron Koenderink [Fri, 29 Oct 2004 01:38:06 +0000 (01:38 +0000)]
(dchr): Negative d_cost now means that only deity can designate.
(nullify_objects, do_desi): Simpify designate restrictions of options
NO_LCMS, NO_HCMS, NO_OIL.

(show_sect_build): Suppress printing of sectors only deity can
designate.  This was broken in rev. 1.15.

19 years agoCorrect the instructions for the Win32 build.
Ron Koenderink [Tue, 19 Oct 2004 12:52:59 +0000 (12:52 +0000)]
Correct the instructions for the Win32 build.

19 years ago(main,termio): Add the ability to set the username.
Ron Koenderink [Tue, 19 Oct 2004 01:48:24 +0000 (01:48 +0000)]
(main,termio): Add the ability to set the username.
Get it from environment variable LOGNAME if set,
else get the user name from the system.

19 years ago(main, termio): Add the ability to set the username.
Ron Koenderink [Tue, 19 Oct 2004 01:11:31 +0000 (01:11 +0000)]
(main, termio): Add the ability to set the username.
Get it from environment variable LOGNAME if set,
else get the user name from the system.

(main) [_DWIN32]: Add stdin redirection ability to the Win32 port.
The client reads until stdin redirection empty and then terminates.

19 years ago(var.h, plague.h): Since all that was left in var.h were some plague
Marc Olzheim [Tue, 12 Oct 2004 20:25:33 +0000 (20:25 +0000)]
(var.h, plague.h): Since all that was left in var.h were some plague
defines, import these defines into plague.h, drop var.h and include
plague.h where appropriate.
Remove some 'register' keywords at the same time.
No functional changes.

19 years agoDo not include var.h where no longer needed. Clean up register keywords in these...
Marc Olzheim [Tue, 12 Oct 2004 20:08:51 +0000 (20:08 +0000)]
Do not include var.h where no longer needed.  Clean up register keywords in these file at the same time.  No functional changes.

19 years ago(i_type, I_NONE): shift the enum down 1, so that I_NONE does not need to
Marc Olzheim [Tue, 12 Oct 2004 19:48:53 +0000 (19:48 +0000)]
(i_type, I_NONE): shift the enum down 1, so that I_NONE does not need to
be skipped or stored in arrays of size I_MAX. I_NONE's int equivalent
becomes -1 by this patch, so all array indices of type i_type have been
checked not to use I_NONE as index.  This change reduces the size of the
arrays stored in files.

19 years ago(i_type): one patch too many in the previous commit. No functional changes.
Marc Olzheim [Tue, 12 Oct 2004 15:55:10 +0000 (15:55 +0000)]
(i_type): one patch too many in the previous commit.  No functional changes.

19 years ago(ac_encounter): Ignore embarked land units when checking for planes
Markus Armbruster [Tue, 5 Oct 2004 18:49:59 +0000 (18:49 +0000)]
(ac_encounter): Ignore embarked land units when checking for planes
overflying land units.  Reported by Doug Wescott.

19 years ago(new): When first sanctuary is a wilderness, but second isn't, code
Markus Armbruster [Tue, 5 Oct 2004 18:45:49 +0000 (18:45 +0000)]
(new): When first sanctuary is a wilderness, but second isn't, code
complained about the first one.

19 years ago(mcost): Unused, remove.
Markus Armbruster [Tue, 5 Oct 2004 18:41:18 +0000 (18:41 +0000)]
(mcost): Unused, remove.

19 years ago(info): Don't leak potentially sensitive information to player in
Ron Koenderink [Tue, 5 Oct 2004 01:17:08 +0000 (01:17 +0000)]
(info): Don't leak potentially sensitive information to player in
error messages.  Properly log all system errors and return RET_SYS.
Closes #1028552.

(info): Fix use of uninitialized variable when fopen() succeeds but
fstat() or the st_mode check fails.

(info) [_WIN32]: Fix '//' to be '\\'.  Add file type check to prevent
opening hidden or operating system files.

19 years agoWork around for broken MSC C++ 6.0 (VC98) choking on empty macro arguments.
Ron Koenderink [Tue, 5 Oct 2004 01:08:21 +0000 (01:08 +0000)]
Work around for broken MSC C++ 6.0 (VC98) choking on empty macro arguments.
Fixed in MSC C++ 7.0.

19 years agoRemove the unused/not needed code.
Ron Koenderink [Sun, 3 Oct 2004 16:16:05 +0000 (16:16 +0000)]
Remove the unused/not needed code.

19 years ago(item_prewrite): New.
Markus Armbruster [Sun, 19 Sep 2004 07:56:57 +0000 (07:56 +0000)]
(item_prewrite): New.
(checksect, shp_prewrite, lnd_prewrite): Use it.

19 years ago(shoo): Code to enfore the mobility limit assumed double m were
Markus Armbruster [Sun, 19 Sep 2004 07:16:44 +0000 (07:16 +0000)]
(shoo): Code to enfore the mobility limit assumed double m were
integer.  When 5 * sect.sct_mobil - 4 < nshot < 5 * sect.sct_mobil,
nshot was rounded up to the next multiple of 5.  This could shoot more
people than present, resulting in negative population.  Before
rev. 1.3, putvar() swept this error under the rug.

19 years ago(load_it): Loaded negative amount if ship had more cargo than ordered.
Markus Armbruster [Fri, 17 Sep 2004 13:06:08 +0000 (13:06 +0000)]
(load_it): Loaded negative amount if ship had more cargo than ordered.
This can happen when unload_it() can't unload, e.g. because sector is
full.  This can push the sector's amount beyond ITEM_MAX, and can even
overflow to negative amounts.

19 years ago(dodistribute): Import could export a civilian when the dist center
Markus Armbruster [Fri, 17 Sep 2004 12:58:51 +0000 (12:58 +0000)]
(dodistribute): Import could export a civilian when the dist center
didn't have any.

19 years ago(ac_doflak): Don't supply more shells than actually required for flak.
Markus Armbruster [Fri, 17 Sep 2004 12:56:48 +0000 (12:56 +0000)]
(ac_doflak): Don't supply more shells than actually required for flak.

19 years agoDoc fix.
Markus Armbruster [Fri, 17 Sep 2004 12:55:52 +0000 (12:55 +0000)]
Doc fix.

19 years ago(scra): Obey ITEM_MAX.
Markus Armbruster [Fri, 17 Sep 2004 12:55:33 +0000 (12:55 +0000)]
(scra): Obey ITEM_MAX.

19 years ago(multifire): Remove some dead code.
Markus Armbruster [Fri, 17 Sep 2004 12:54:49 +0000 (12:54 +0000)]
(multifire): Remove some dead code.

19 years ago(do_demo): Simplify.
Markus Armbruster [Fri, 17 Sep 2004 12:54:14 +0000 (12:54 +0000)]
(do_demo): Simplify.

19 years ago(dchr): Init the packaging of trailing dummy structs with IPKG instead
Marc Olzheim [Fri, 17 Sep 2004 09:22:12 +0000 (09:22 +0000)]
(dchr): Init the packaging of trailing dummy structs with IPKG instead
of 0.  No functional change.

19 years ago(I_NONE, I_CIVIL, I_MILIT, I_SHELL, I_GUN, I_PETROL, I_IRON, I_DUST,
Marc Olzheim [Thu, 16 Sep 2004 21:18:01 +0000 (21:18 +0000)]
(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.

19 years agoFix the previous rev.
Markus Armbruster [Sun, 12 Sep 2004 05:00:48 +0000 (05:00 +0000)]
Fix the previous rev.

19 years ago(NSC_SITYPE): New.
Markus Armbruster [Sat, 11 Sep 2004 15:25:38 +0000 (15:25 +0000)]
(NSC_SITYPE): New.
(dchr_ca): Use it to fix selector pkg's ca_type.

19 years ago(sect_ca, ship_ca, plane_ca, land_ca, nuke_ca): Make selector coastal,
Markus Armbruster [Sat, 11 Sep 2004 12:50:32 +0000 (12:50 +0000)]
(sect_ca, ship_ca, plane_ca, land_ca, nuke_ca): Make selector coastal,
nplane, nland, nchoppers, nxlight, timestamp NSC_EXTRA.

19 years ago(ship_ca): New selectors xstart, xend, ystart, yend, cargostart,
Markus Armbruster [Sat, 11 Sep 2004 09:36:14 +0000 (09:36 +0000)]
(ship_ca): New selectors xstart, xend, ystart, yend, cargostart,
cargoend, amtstart, amtend (for order) and mobquota, path, follow (for
sail).
(news_ca): New selector uid.
Selectors are now believed to be complete, except for nat_ca[], which
is not used.

19 years ago(valstr, nstr_exec, nstr_comp_val, nstr_exec_val, xdprval): Support
Markus Armbruster [Sat, 11 Sep 2004 08:45:17 +0000 (08:45 +0000)]
(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.

19 years ago(comtch, stmtch): Make more similar, document. No functional changes.
Markus Armbruster [Fri, 10 Sep 2004 19:36:02 +0000 (19:36 +0000)]
(comtch, stmtch): Make more similar, document.  No functional changes.

19 years agoDoc fix.
Markus Armbruster [Fri, 10 Sep 2004 19:04:05 +0000 (19:04 +0000)]
Doc fix.

19 years ago(mchr_ca, lchr_ca): Fix selector flag's ca_type.
Markus Armbruster [Fri, 10 Sep 2004 18:58:30 +0000 (18:58 +0000)]
(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.

19 years ago(fldoff): Use offsetof() instead. Rest of struct.h is unused, remove.
Markus Armbruster [Fri, 10 Sep 2004 18:41:58 +0000 (18:41 +0000)]
(fldoff): Use offsetof() instead.  Rest of struct.h is unused, remove.

19 years ago(plnstr): Member pln_fuel was always equal to plchr[pln_type].pl_fuel.
Markus Armbruster [Fri, 10 Sep 2004 18:27:53 +0000 (18:27 +0000)]
(plnstr): Member pln_fuel was always equal to plchr[pln_type].pl_fuel.
Replace all uses, so pln_fuel can be removed later.

19 years agoUse plain char * instead of s_char *.
Markus Armbruster [Fri, 10 Sep 2004 18:18:31 +0000 (18:18 +0000)]
Use plain char * instead of s_char *.

19 years agoUpdate copyright notice. v4.2.18
Markus Armbruster [Tue, 7 Sep 2004 15:07:16 +0000 (15:07 +0000)]
Update copyright notice.

19 years agoFix incomplete comment.
Markus Armbruster [Tue, 7 Sep 2004 14:16:36 +0000 (14:16 +0000)]
Fix incomplete comment.

19 years agoUpdate for 4.2.18.
Markus Armbruster [Tue, 7 Sep 2004 14:16:24 +0000 (14:16 +0000)]
Update for 4.2.18.

19 years ago(info): `info' was not checking for all types of common files in
Ron Koenderink [Tue, 7 Sep 2004 14:04:19 +0000 (14:04 +0000)]
(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.

19 years agoExplain roots of LWP.
Markus Armbruster [Tue, 7 Sep 2004 08:49:46 +0000 (08:49 +0000)]
Explain roots of LWP.

19 years agoUnused, remove.
Markus Armbruster [Tue, 7 Sep 2004 08:47:00 +0000 (08:47 +0000)]
Unused, remove.

19 years ago(tran_plane): Fix major, abusable bug: getsect() before move_ground(),
Markus Armbruster [Tue, 7 Sep 2004 06:34:08 +0000 (06:34 +0000)]
(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.

19 years ago(news): Add a comment to explain why argument is ignored when HIDDEN
Markus Armbruster [Tue, 7 Sep 2004 06:16:23 +0000 (06:16 +0000)]
(news): Add a comment to explain why argument is ignored when HIDDEN
is on.

19 years ago(mchr_ca): Add missing entry for member `frnge'.
Markus Armbruster [Tue, 7 Sep 2004 06:12:15 +0000 (06:12 +0000)]
(mchr_ca): Add missing entry for member `frnge'.

(xdprval): Silence compiler warning.

19 years ago(NEWS_PERIOD, news_keep_days): Replace macro NEWS_PERIOD by new
Markus Armbruster [Sat, 4 Sep 2004 19:32:48 +0000 (19:32 +0000)]
(NEWS_PERIOD, news_keep_days): Replace macro NEWS_PERIOD by new
configuration key news_keep_days.

19 years ago(xdprval): Fix escaping of negative characters.
Markus Armbruster [Sat, 4 Sep 2004 13:11:02 +0000 (13:11 +0000)]
(xdprval): Fix escaping of negative characters.

19 years ago(xdprval): Escape the space character so that a line can be simply
Markus Armbruster [Sat, 4 Sep 2004 08:15:33 +0000 (08:15 +0000)]
(xdprval): Escape the space character so that a line can be simply
split into fields at space.

19 years ago(keymatch): Replace member km_func by km_type. Initializers adapted.
Markus Armbruster [Sat, 4 Sep 2004 08:07:51 +0000 (08:07 +0000)]
(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.

19 years ago(xdprval): Fix for strings containing backslashes.
Markus Armbruster [Tue, 31 Aug 2004 17:53:34 +0000 (17:53 +0000)]
(xdprval): Fix for strings containing backslashes.

19 years ago(xdprval): Fix for strings with characters printed as escapes. Print
Markus Armbruster [Tue, 31 Aug 2004 17:45:45 +0000 (17:45 +0000)]
(xdprval): Fix for strings with characters printed as escapes.  Print
null pointer as `nil' to distinguish it from empty string.

19 years ago(hard_tech): Unused, remove.
Markus Armbruster [Mon, 30 Aug 2004 21:12:15 +0000 (21:12 +0000)]
(hard_tech): Unused, remove.
(configkeys): Fix km_flags of key anno_keep_days.

19 years agoUndo the previous revision (bad idea).
Markus Armbruster [Mon, 30 Aug 2004 20:28:15 +0000 (20:28 +0000)]
Undo the previous revision (bad idea).

19 years ago(EMPCF_COMMENT): New; for readability.
Markus Armbruster [Mon, 30 Aug 2004 17:41:39 +0000 (17:41 +0000)]
(EMPCF_COMMENT): New; for readability.

19 years ago(keymatch, configkeys): Move to from optlist.h to emp_config.c; static
Markus Armbruster [Mon, 30 Aug 2004 17:36:50 +0000 (17:36 +0000)]
(keymatch, configkeys): Move to from optlist.h to emp_config.c; static
linkage.

19 years ago(xdump): New options dump.
Markus Armbruster [Mon, 30 Aug 2004 16:49:58 +0000 (16:49 +0000)]
(xdump): New options dump.
(xdopt): New.
(xdhdr1): New, factored out of xdhdr().

19 years ago(ship_ca): Fix selector name's ca_len.
Markus Armbruster [Mon, 30 Aug 2004 16:20:05 +0000 (16:20 +0000)]
(ship_ca): Fix selector name's ca_len.
(xflds): Ignore ca_len for NSC_STRINGY.

19 years ago(pln_arm): Callers don't use parameter tech; remove it. Callers
Markus Armbruster [Mon, 30 Aug 2004 16:13:37 +0000 (16:13 +0000)]
(pln_arm): Callers don't use parameter tech; remove it.  Callers
changed.

19 years ago(ANNO_KEEP_DAYS, anno_keep_days): Replace macro ANNO_KEEP_DAYS by
Markus Armbruster [Sat, 28 Aug 2004 15:28:54 +0000 (15:28 +0000)]
(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.

19 years ago(trad, set): Treat trade file slots with zero owner as unused, so that
Markus Armbruster [Sat, 28 Aug 2004 15:22:50 +0000 (15:22 +0000)]
(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.

19 years ago(show_land_build, show_plane_build): Adjust the position of the $ column to match
Ron Koenderink [Sat, 28 Aug 2004 13:52:20 +0000 (13:52 +0000)]
(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.

19 years ago(gift): Default case can't happen. Make that explicit for safety and
Markus Armbruster [Sat, 28 Aug 2004 12:52:34 +0000 (12:52 +0000)]
(gift): Default case can't happen.  Make that explicit for safety and
to silence compiler.

19 years ago(launch_missile): Simplify to avoid compiler warning.
Markus Armbruster [Sat, 28 Aug 2004 12:51:04 +0000 (12:51 +0000)]
(launch_missile): Simplify to avoid compiler warning.

19 years ago(empth_ctx_t): Unused, remove.
Markus Armbruster [Sat, 28 Aug 2004 12:49:13 +0000 (12:49 +0000)]
(empth_ctx_t): Unused, remove.

19 years ago(min_to_next_daytime): Happily returned zero if DTIME happend to be in
Markus Armbruster [Sat, 28 Aug 2004 11:24:25 +0000 (11:24 +0000)]
(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.

19 years ago(last_demand_update): Write-only. Removed.
Markus Armbruster [Sat, 28 Aug 2004 09:35:38 +0000 (09:35 +0000)]
(last_demand_update): Write-only.  Removed.

19 years agoReplace incorrect comment on distribution mobility cost by a reference
Markus Armbruster [Sat, 28 Aug 2004 09:05:27 +0000 (09:05 +0000)]
Replace incorrect comment on distribution mobility cost by a reference
to info Mobility.

19 years ago(IPKG): New.
Markus Armbruster [Sat, 28 Aug 2004 08:43:57 +0000 (08:43 +0000)]
(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.

19 years ago(dodeliver): Move from sect.c to deliver.c. No functional changes.
Markus Armbruster [Sat, 28 Aug 2004 07:10:38 +0000 (07:10 +0000)]
(dodeliver): Move from sect.c to deliver.c.  No functional changes.
(deliver): Static linkage.

19 years agoretreat.h is unused, remove it.
Marc Olzheim [Fri, 27 Aug 2004 16:46:49 +0000 (16:46 +0000)]
retreat.h is unused, remove it.

19 years ago(build_land): unused variable natp, remove.
Marc Olzheim [Fri, 27 Aug 2004 16:45:52 +0000 (16:45 +0000)]
(build_land): unused variable natp, remove.

19 years ago(news_ca): Change type of selector action to NSC_TYPEID.
Markus Armbruster [Tue, 24 Aug 2004 18:54:32 +0000 (18:54 +0000)]
(news_ca): Change type of selector action to NSC_TYPEID.

(nat_ca): Split awkward selector level into selectors tech, research,
education and happiness.

19 years ago(nstr_exec_val): Failed to update category when evaluating symbolic
Markus Armbruster [Tue, 24 Aug 2004 18:40:29 +0000 (18:40 +0000)]
(nstr_exec_val): Failed to update category when evaluating symbolic
value.

19 years ago(chr_camap): Make table names differ from file empfile[] names, so
Markus Armbruster [Tue, 24 Aug 2004 18:29:09 +0000 (18:29 +0000)]
(chr_camap): Make table names differ from file empfile[] names, so
that they properly identify the dump.

19 years ago(dchr_ca, intrchr_ca, rpt_ca, tchr_ca): New.
Markus Armbruster [Tue, 24 Aug 2004 15:31:56 +0000 (15:31 +0000)]
(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.

19 years ago(improve): Fix confusing diagnostics when refusing to improve defense
Markus Armbruster [Tue, 24 Aug 2004 08:23:09 +0000 (08:23 +0000)]
(improve): Fix confusing diagnostics when refusing to improve defense
because option DEFENSE_INFRA is off.

(improve): Simplify use of `value' to avoid compiler warning.

19 years ago(move, explore): Simplify computation of destination sector's work and
Markus Armbruster [Tue, 24 Aug 2004 07:08:59 +0000 (07:08 +0000)]
(move, explore): Simplify computation of destination sector's work and
loyalty to get rid of compiler warnings.

19 years ago(sect_ca): Fix selector che.
Markus Armbruster [Tue, 24 Aug 2004 05:54:11 +0000 (05:54 +0000)]
(sect_ca): Fix selector che.

19 years ago(getsect, putsect, getsectp): Remove superflous casts, parenthesize
Markus Armbruster [Mon, 23 Aug 2004 18:35:50 +0000 (18:35 +0000)]
(getsect, putsect, getsectp): Remove superflous casts, parenthesize
macro parameters properly.

19 years agocaddr_t is obsolete. Replace by void *, except for struct empfile
Markus Armbruster [Mon, 23 Aug 2004 18:29:44 +0000 (18:29 +0000)]
caddr_t is obsolete.  Replace by void *, except for struct empfile
member cache, which becomes char * to keep pointer arithmetic simple.

19 years ago(sctstr, sect_ca): Make sct_mines signed for same reasons as
Markus Armbruster [Mon, 23 Aug 2004 15:50:32 +0000 (15:50 +0000)]
(sctstr, sect_ca): Make sct_mines signed for same reasons as
sct_item[] (see sect.h rev. 1.10).

19 years agoRemoved unnecessary #ifdef's for Windows.
Ron Koenderink [Sat, 21 Aug 2004 22:10:10 +0000 (22:10 +0000)]
Removed unnecessary #ifdef's for Windows.

19 years ago(nstr_exec): Fix the previous rev.
Markus Armbruster [Sat, 21 Aug 2004 15:06:37 +0000 (15:06 +0000)]
(nstr_exec): Fix the previous rev.

19 years ago(NSC_STRINGY): New.
Markus Armbruster [Sat, 21 Aug 2004 14:09:31 +0000 (14:09 +0000)]
(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.

19 years ago(sect_ca): New selectors loyal, access.
Markus Armbruster [Sat, 21 Aug 2004 13:35:35 +0000 (13:35 +0000)]
(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.

19 years agoDoc clarifications.
Markus Armbruster [Sat, 21 Aug 2004 13:25:57 +0000 (13:25 +0000)]
Doc clarifications.

19 years agoReorder selectors to match struct member order, for easier consistency
Markus Armbruster [Sat, 21 Aug 2004 12:50:58 +0000 (12:50 +0000)]
Reorder selectors to match struct member order, for easier consistency
checking.

19 years ago(NSC_EXTRA): New.
Markus Armbruster [Sat, 21 Aug 2004 12:36:13 +0000 (12:36 +0000)]
(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.

19 years ago(ldump): Remove superflous casts.
Markus Armbruster [Sat, 21 Aug 2004 12:07:42 +0000 (12:07 +0000)]
(ldump): Remove superflous casts.

19 years ago(NSC_NATID): New.
Markus Armbruster [Sat, 21 Aug 2004 11:59:23 +0000 (11:59 +0000)]
(NSC_NATID): New.
(sect_ca, NSC_GENITEM, nuke_ca, treaty_ca, loan_ca, news_ca, lost_ca,
commodity_ca, trade_ca, nat_ca): Use it.  Fixes sector selector
che_target.

(NSC_IELT, NSC_GENITEM, ship_ca, plane_ca, nuke_ca, treaty_ca,
news_ca, lost_ca, commodity_ca, trade_ca, nat_ca): Fix initializers
for ca_type.  Harmless signed/unsigned mismatches, except for plane
selectors att, def, nuke selector types, treaty selector exp, news
selector time, commodity selectors type, xbuy, ybuy.

(commodity_ca): Remove NSC_DEITY from selector price.

19 years ago(xdeval): Use NSC_NOTYPE instead of 0.
Markus Armbruster [Sat, 21 Aug 2004 11:48:59 +0000 (11:48 +0000)]
(xdeval): Use NSC_NOTYPE instead of 0.

(xdprval): Cope with NSC_TYPEID.  Check for bad types.

19 years agoDoc fixes & clarifications.
Markus Armbruster [Sat, 21 Aug 2004 11:47:17 +0000 (11:47 +0000)]
Doc fixes & clarifications.

19 years ago(plchr): Fix the previous rev.
Markus Armbruster [Sat, 21 Aug 2004 06:51:49 +0000 (06:51 +0000)]
(plchr): Fix the previous rev.

19 years ago(PLANENAMES, opt_PLANENAMES, Options, plchrstr, plchr_ca, plchr,
Markus Armbruster [Sat, 21 Aug 2004 06:48:34 +0000 (06:48 +0000)]
(PLANENAMES, opt_PLANENAMES, Options, plchrstr, plchr_ca, plchr,
main): Remove nooption PLANENAMES.

19 years ago(xdprval): Passed ptrdiff_t as field width.
Markus Armbruster [Sat, 21 Aug 2004 06:20:25 +0000 (06:20 +0000)]
(xdprval): Passed ptrdiff_t as field width.

19 years ago(delete_old_announcements, copy_and_expire): Split off
Ron Koenderink [Sat, 21 Aug 2004 00:44:20 +0000 (00:44 +0000)]
(delete_old_announcements, copy_and_expire): Split off
copy_and_expire() to simplify cleanup.  Previously, cleanup was
missing or incomplete on many less common code paths, which leaked
file descriptors and memory, and could corrupt the anno file.  Use
stdio instead of POSIX I/O for writing.  Check for I/O errors
properly.  Treat bad telegram type just like bad telegram length (give
up).  Closes #1013234.

19 years agoCombine the definitions of include/optlist.h and the use thereof in
Marc Olzheim [Fri, 20 Aug 2004 15:44:24 +0000 (15:44 +0000)]
Combine the definitions of include/optlist.h and the use thereof in
src/lib/gen/emp_config.c into a single file: include/econfig-spec.h.

19 years agoComments, cosmetics.
Markus Armbruster [Fri, 20 Aug 2004 13:18:28 +0000 (13:18 +0000)]
Comments, cosmetics.