]> git.pond.sub.org Git - empserver/log
empserver
19 years ago4.2.17 last minute changes. v4.2.17
Markus Armbruster [Mon, 16 Aug 2004 16:24:56 +0000 (16:24 +0000)]
4.2.17 last minute changes.

19 years ago(drop, fly): Fix previous rev. not to prohibit flying civilians to an
Markus Armbruster [Mon, 16 Aug 2004 14:35:06 +0000 (14:35 +0000)]
(drop, fly): Fix previous rev. not to prohibit flying civilians to an
ally.  Since you can load them onto their ships, you should be able to
fly them over.

19 years agoUpdate for 4.2.17.
Markus Armbruster [Sat, 14 Aug 2004 20:03:08 +0000 (20:03 +0000)]
Update for 4.2.17.

19 years agoAdded srand call to thread startup as each thread needs to be seeded in Windows.
Ron Koenderink [Sat, 14 Aug 2004 19:35:38 +0000 (19:35 +0000)]
Added srand call to thread startup as each thread needs to be seeded in Windows.

19 years ago(pln_mine, pln_dropoff): Split off aerial mining into new pln_mine().
Markus Armbruster [Sat, 14 Aug 2004 17:12:20 +0000 (17:12 +0000)]
(pln_mine, pln_dropoff): Split off aerial mining into new pln_mine().
Callers changed.

(drop): Do not disclose anything about target sector before planes
actually got there, unless the target sector is owned by the player or
an ally.  This plugs a major loophole.  Consequently, the command can
no longer always refuse to attempt to drop stuff where it won't work.
Instead, the planes fly out to try.  Other plane commands (para, bomb)
behave exactly the same.  Also closes #909859.
(pln_dropoff): Cope with planes trying to drop where they can't.

(drop): Refuse to drop civilians into allied sectors, for consistency
with other means to move around stuff.

19 years agoMaking directories worked only when CVS was the first sub-directory
Markus Armbruster [Sat, 14 Aug 2004 08:23:37 +0000 (08:23 +0000)]
Making directories worked only when CVS was the first sub-directory
found by find.

19 years ago(fly): Prohibit flying of civilians into occupied or allied sectors.
Markus Armbruster [Sat, 14 Aug 2004 07:27:05 +0000 (07:27 +0000)]
(fly): Prohibit flying of civilians into occupied or allied sectors.
Before, civilians magically changed allegiance on disembarking planes.

19 years ago(fly): Failed to re-get target sector after asking for cargo, and thus
Markus Armbruster [Fri, 13 Aug 2004 21:00:11 +0000 (21:00 +0000)]
(fly): Failed to re-get target sector after asking for cargo, and thus
passed potentially invalid argument to pln_onewaymission().

19 years ago(pln_oneway_to_carrier_ok): New.
Markus Armbruster [Fri, 13 Aug 2004 20:22:03 +0000 (20:22 +0000)]
(pln_oneway_to_carrier_ok): New.
(fly, reco): Use it to prevent flying to a carrier that doesn't have
space for the planes.  Previously, planes that did this were
teleported home, which could be abused.

(fly): Fail if pln_sel() comes up empty, just like the other commands
to fly planes.

19 years ago(bomb): Don't tell the player that target is a sanctuary before his
Markus Armbruster [Fri, 13 Aug 2004 12:02:35 +0000 (12:02 +0000)]
(bomb): Don't tell the player that target is a sanctuary before his
planes got there.  This closes a loophole that allowed players with
any planes to find all sanctuaries.

19 years ago(move, explore): Return early when interdiction destroys everything
Markus Armbruster [Fri, 13 Aug 2004 10:05:32 +0000 (10:05 +0000)]
(move, explore): Return early when interdiction destroys everything
moved.  Without that, loyalty computation divided by zero and crashed
when moving civilians to a sector without civilians.  Found and
debugged by Jeff Cotter.  Closes #1005005.

19 years agoNo C99/C++ comments.
Markus Armbruster [Fri, 13 Aug 2004 09:57:58 +0000 (09:57 +0000)]
No C99/C++ comments.

19 years ago(gamedown): Printed down message with pr(), as a printf()-like format
Markus Armbruster [Tue, 10 Aug 2004 13:34:41 +0000 (13:34 +0000)]
(gamedown): Printed down message with pr(), as a printf()-like format
string!  This reads and formats junk from the stack when message
contains '%', and can even crash.  Use prnf() instead.  Catched by Ron
Koenderink.

19 years ago(infect_people): Use max_pop() to compute space. This makes all
Markus Armbruster [Tue, 10 Aug 2004 07:56:34 +0000 (07:56 +0000)]
(infect_people): Use max_pop() to compute space.  This makes all
crowded sectors equally vulnerable, including mountains, plains, and
inefficient big cities.  Closes #917488.
Update info.

19 years ago(show_motd): Printed motd with pr(), as a printf()-like format string!
Markus Armbruster [Tue, 10 Aug 2004 05:52:58 +0000 (05:52 +0000)]
(show_motd): Printed motd with pr(), as a printf()-like format string!
This reads and formats junk from the stack when motd contains '%', and
can even crash.  Use prnf() instead.

19 years agoDon't drill (and deplete) more oil than the ship can hold.
Ron Koenderink [Thu, 5 Aug 2004 01:32:09 +0000 (01:32 +0000)]
Don't drill (and deplete) more oil than the ship can hold.
Closes #955071.

19 years ago(sarg_xy, sarg_getrange, sarg_range, sarg_list): These choke on
Markus Armbruster [Wed, 4 Aug 2004 20:04:37 +0000 (20:04 +0000)]
(sarg_xy, sarg_getrange, sarg_range, sarg_list): These choke on
trailing junk since the previous rev.  That's too strict.  Silently
ignore trailing junk as long as it starts with whitespace.  That's
somewhat lax, but will do for now.  Closes #982018.

19 years ago(nstr_comp_val): Since rev. 1.10, selectors were always preferred to
Markus Armbruster [Wed, 4 Aug 2004 14:47:24 +0000 (14:47 +0000)]
(nstr_comp_val): Since rev. 1.10, selectors were always preferred to
type literals, unless type inference rejects the selector.  This
doesn't work for NSC_TYPE selectors: `?des=n' is interpreted as
`?des=newdes'.  Prefer type literal to NSC_TYPE selector.  Closes
#982021.

19 years agoNow that src/scripts/nightly/patches/All/prng.patch:1.5 makes sure that
Marc Olzheim [Sun, 20 Jun 2004 17:58:10 +0000 (17:58 +0000)]
Now that src/scripts/nightly/patches/All/prng.patch:1.5 makes sure that
all randomness is predictable and repeatable, we're ready for some
real scripts.

19 years agoFour calls to random() fixed that escaped my previous patch to
Marc Olzheim [Sun, 20 Jun 2004 17:42:51 +0000 (17:42 +0000)]
Four calls to random() fixed that escaped my previous patch to
emp_random().

19 years agoAlways seed with '1' instead of the supplied value of emp_srandom()
Marc Olzheim [Sun, 20 Jun 2004 17:14:56 +0000 (17:14 +0000)]
Always seed with '1' instead of the supplied value of emp_srandom()
fot the nightly build.

19 years agoMake it possible to skip steps of the build by specifying so in the
Marc Olzheim [Sun, 20 Jun 2004 16:36:51 +0000 (16:36 +0000)]
Make it possible to skip steps of the build by specifying so in the
environment variable "NIGHTLY_SKIP_STEP", making it easier to debug
problems in the build.

19 years agoInstead of patching Make.sysdefs, introduce emp_{,s}random() and patch
Marc Olzheim [Sun, 20 Jun 2004 15:30:41 +0000 (15:30 +0000)]
Instead of patching Make.sysdefs, introduce emp_{,s}random() and patch
all files to use it.  Output from the nightly build machines should
now be the same for the different platforms.

19 years agoUse non-standard port for the nightly servers, so that the servers
Marc Olzheim [Sun, 20 Jun 2004 14:08:42 +0000 (14:08 +0000)]
Use non-standard port for the nightly servers, so that the servers
do not conflict with other possible test servers.

19 years agoMake emp_client shut up about TERM variable.
Marc Olzheim [Sun, 20 Jun 2004 14:01:20 +0000 (14:01 +0000)]
Make emp_client shut up about TERM variable.

19 years agoActually use the RANDOM defines and define NIGHTLY. Code is patched
Marc Olzheim [Sun, 20 Jun 2004 14:00:31 +0000 (14:00 +0000)]
Actually use the RANDOM defines and define NIGHTLY.  Code is patched
into src/lib/gen/chance.c

19 years agoMake sure that the same prng is used on all systems, namely *rand48().
Marc Olzheim [Sat, 19 Jun 2004 13:54:49 +0000 (13:54 +0000)]
Make sure that the same prng is used on all systems, namely *rand48().
For now, only fairland.c is "fixed".  We'll have to patch the random
calls in the server to use the RANDOM and SRANDOM macros to make
things completely reproducible.

19 years agoUpdate for 4.2.16. v4.2.16
Markus Armbruster [Wed, 16 Jun 2004 19:03:41 +0000 (19:03 +0000)]
Update for 4.2.16.

19 years agoRemove spurious "Clean sandbox"...
Marc Olzheim [Wed, 16 Jun 2004 18:54:36 +0000 (18:54 +0000)]
Remove spurious "Clean sandbox"...

19 years agoAlways report 0 minutes login time and 640 btus to ease diff-ing.
Marc Olzheim [Wed, 16 Jun 2004 18:32:46 +0000 (18:32 +0000)]
Always report 0 minutes login time and 640 btus to ease diff-ing.

19 years agoUse "Thu Jan 1 00:00:00 GMT 1970\n" as output for the ctime() hack,
Marc Olzheim [Wed, 16 Jun 2004 18:19:40 +0000 (18:19 +0000)]
Use "Thu Jan  1 00:00:00 GMT 1970\n" as output for the ctime() hack,
instead of an empty string.

19 years agoNew, more comprehensive guidelines. Compiled existing Empire
Markus Armbruster [Wed, 16 Jun 2004 18:18:08 +0000 (18:18 +0000)]
New, more comprehensive guidelines.  Compiled existing Empire
practice, rounded off with classical C usage, edited into a readable
form.  Work in progress.

19 years agoFirst step to add testing of the server to the nightlybuild.
Marc Olzheim [Wed, 16 Jun 2004 16:06:17 +0000 (16:06 +0000)]
First step to add testing of the server to the nightlybuild.
For now, just some simple checks are added.

19 years agoPatch to make ctime return "" for ease test output diff-ing.
Marc Olzheim [Wed, 16 Jun 2004 16:04:31 +0000 (16:04 +0000)]
Patch to make ctime return "" for ease test output diff-ing.

19 years ago(upd_buildeff): Previous revision broke work after sector
Markus Armbruster [Tue, 15 Jun 2004 19:52:14 +0000 (19:52 +0000)]
(upd_buildeff): Previous revision broke work after sector
construction.  Closes #972065.

19 years ago4.2.15 last minute changes. v4.2.15
Markus Armbruster [Wed, 26 May 2004 17:57:40 +0000 (17:57 +0000)]
4.2.15 last minute changes.

19 years agoPoorly structured and not entirely accurate. Rewrite. Closes
Markus Armbruster [Wed, 26 May 2004 17:54:14 +0000 (17:54 +0000)]
Poorly structured and not entirely accurate.  Rewrite.  Closes
#934465

19 years agoDidn't quite match the code and was confusing. Rewrite.
Markus Armbruster [Wed, 26 May 2004 17:53:37 +0000 (17:53 +0000)]
Didn't quite match the code and was confusing.  Rewrite.

19 years agoFix missing include.
Markus Armbruster [Mon, 17 May 2004 06:15:31 +0000 (06:15 +0000)]
Fix missing include.

19 years ago(nstr_comp): Fix handling of condition type mismatch. This bug could
Markus Armbruster [Sun, 16 May 2004 20:14:59 +0000 (20:14 +0000)]
(nstr_comp): Fix handling of condition type mismatch.  This bug could
trigger oopses in nstr_exec().

(cond_type_mismatch): Clearer diagnostic message.

19 years ago(rada): Fix embarrassing coding error in previous rev.
Markus Armbruster [Sun, 16 May 2004 16:40:28 +0000 (16:40 +0000)]
(rada): Fix embarrassing coding error in previous rev.

19 years agoUpdate for 4.2.15.
Markus Armbruster [Sun, 16 May 2004 15:00:22 +0000 (15:00 +0000)]
Update for 4.2.15.

19 years ago(doship, doplane, dounit): Fix warnings introduced by previous rev.
Markus Armbruster [Sun, 16 May 2004 14:24:57 +0000 (14:24 +0000)]
(doship, doplane, dounit): Fix warnings introduced by previous rev.

19 years ago(shp_set_tech, pln_set_tech, lnd_set_tech): New, factored out of build
Markus Armbruster [Sun, 16 May 2004 14:19:38 +0000 (14:19 +0000)]
(shp_set_tech, pln_set_tech, lnd_set_tech): New, factored out of build
and upgrade code.
(build_ship, build_plane, build_land, supgr, pupgr, lupgr): Use them.
Upgrading planes no longer sets plane range to maximum.

(pupgr): Just clear the mission, don't bother to clear op area.

(doship, doplane, dounit): Editing tech now updates stats, like an
upgrade command.  Proper range checking.
(warn_deprecated): New.
(pr_ship, doship): Deprecate key 'D'.
(pr_land, dounit): Deprecate key 'A' and 'D'.

19 years ago(move): Don't ask user whether he wants to abandon the sector when
Markus Armbruster [Sun, 16 May 2004 11:40:14 +0000 (11:40 +0000)]
(move): Don't ask user whether he wants to abandon the sector when
running on behalf of the test command.  Closes #935470.

19 years ago(explore): Clear start sector's MOVE_IN_PROGRESS after updating end
Markus Armbruster [Sun, 16 May 2004 11:23:43 +0000 (11:23 +0000)]
(explore): Clear start sector's MOVE_IN_PROGRESS after updating end
sector.  Otherwise, clearing MOVE_IN_PROGRESS can abandon the start
sector when it shouldn't, leading to bogus records in the `lost' file.
Closes #931184.

19 years ago(dship, dounit, doplane): No longer accept efficiency values that
Markus Armbruster [Sat, 15 May 2004 15:06:07 +0000 (15:06 +0000)]
(dship, dounit, doplane): No longer accept efficiency values that
would destroy the edited unit.  Deities can still delete a units by
setting the owner to zero.  Efficiency values less than 10 used to
delete the unit without informing the owner.  Ship efficiency values
between 10 and 20 did inform the owner, but didn't give him any clue
about the reason.

19 years ago(SCT_BLD_WORK, SHP_BLD_WORK, PLN_BLD_WORK, LND_BLD_WORK,
Markus Armbruster [Sat, 15 May 2004 13:23:39 +0000 (13:23 +0000)]
(SCT_BLD_WORK, SHP_BLD_WORK, PLN_BLD_WORK, LND_BLD_WORK,
NUK_BLD_WORK): New, to encapsulate the formula in one place.

(SCT_MINEFF): New.  Use it instead of literal 20.

(buil): Use CANT_HAPPEN() for internal error.

(build_ship, build_land, build_bridge, build_nuke, build_plane,
build_tower): Simplify avail calculation.

(lupgr, supgr, pupgr): Charge 15% of total build avail instead of an
undocumented amount computed from build lcm and hcm.

(build_ship, build_land, build_bridge, build_nuke, build_plane,
build_tower, lupgr, supgr, pupgr): Fix reporting of required avail
when there's not enough.  Closes #942823.

(lupgr, supgr, pupgr): Code printed cost rounded down, but required
and charged unrounded cost.  Confusing.  Round cost down, like the
build command.  Closes #942811.

(UPGR_COST, UPGR_EFF, lupgr, supgr, pupgr): New UPGR_COST, UPGR_COST replace
literal values.

(show_bridge, show_tower): Don't claim bridge building requires
`workers' (whatever that is), since it doesn't.

19 years ago(eff_bomb, sect_damage): Damage avail just like efficiency.
Markus Armbruster [Sat, 15 May 2004 09:41:23 +0000 (09:41 +0000)]
(eff_bomb, sect_damage): Damage avail just like efficiency.

19 years ago(do_feed): Rev. 1.4 accidentally limited avail after rollover to 999,
Markus Armbruster [Fri, 14 May 2004 20:21:46 +0000 (20:21 +0000)]
(do_feed): Rev. 1.4 accidentally limited avail after rollover to 999,
even when option ROLLOVER_AVAIL was off.  Previous revision correctly
limits rollover to rollover_avail_max, but missed the limiting after
rollover.  Fix.

19 years ago(prod): Change variable work from double to int. This matches actual
Markus Armbruster [Fri, 14 May 2004 19:53:17 +0000 (19:53 +0000)]
(prod): Change variable work from double to int.  This matches actual
production code better, and fixes a small inaccuracy introduced in
rev. 1.10.

(prod): Production is limited to 999 units.  Fix for production
efficiency > 1, e.g. agribusiness.

(prod): Raw material consumption was incorrectly limited to 999.

(prod): Production backlog was handled incorrectly; it claimed `will
make' lots, `max' less, which is backwards.

19 years ago(prod): Match materials_cost() more closely. No functional changes.
Markus Armbruster [Fri, 14 May 2004 19:40:49 +0000 (19:40 +0000)]
(prod): Match materials_cost() more closely.  No functional changes.

19 years ago(produce, prod): Remove some code related to depletion that has no
Markus Armbruster [Fri, 14 May 2004 17:26:53 +0000 (17:26 +0000)]
(produce, prod): Remove some code related to depletion that has no
effect and makes no sense.

19 years ago(prod): Rename variables to match produce() more closely. No
Markus Armbruster [Fri, 14 May 2004 17:19:20 +0000 (17:19 +0000)]
(prod): Rename variables to match produce() more closely.  No
functional changes.

19 years ago(new_work, do_feed, prod, newe): Factor out calculation of work into
Markus Armbruster [Mon, 10 May 2004 20:30:38 +0000 (20:30 +0000)]
(new_work, do_feed, prod, newe): Factor out calculation of work into
new_work().

(ROLLOVER_AVAIL, opt_ROLLOVER_AVAIL, opt_ROLLOVER_AVAIL, Options,
rollover_avail_max, configkeys, vers, new_work): Replace option
ROLLOVER_AVAIL by configuration parameter rollover_avail_max.

19 years agoShould have been committed yesterday, together with sona.c.
Markus Armbruster [Mon, 10 May 2004 20:20:50 +0000 (20:20 +0000)]
Should have been committed yesterday, together with sona.c.

19 years ago(multifire): After charging ship mobility (option NOMOBCOST off), the
Markus Armbruster [Mon, 10 May 2004 19:48:42 +0000 (19:48 +0000)]
(multifire): After charging ship mobility (option NOMOBCOST off), the
code sometimes failed to call putship().  Firing at ships was usually
free.

19 years ago(M_TORP_SHELLS): New.
Markus Armbruster [Sun, 9 May 2004 20:55:30 +0000 (20:55 +0000)]
(M_TORP_SHELLS): New.
(perform_mission, torp, fire_torp, quiet_bigdef, use_ammo): Use it.
Closes #917459.

19 years ago(do_desi): Don't complain unless FOR_REAL. Closes #923105.
Markus Armbruster [Sun, 9 May 2004 20:19:54 +0000 (20:19 +0000)]
(do_desi): Don't complain unless FOR_REAL.  Closes #923105.

19 years ago(stre): Always report mines to deities. Closes #917911.
Markus Armbruster [Sun, 9 May 2004 19:57:28 +0000 (19:57 +0000)]
(stre): Always report mines to deities.  Closes #917911.

19 years ago(opt_SHIP_DECAY, Options, shiprepair): Remove option SHIP_DECAY.
Markus Armbruster [Sun, 9 May 2004 19:06:48 +0000 (19:06 +0000)]
(opt_SHIP_DECAY, Options, shiprepair): Remove option SHIP_DECAY.

19 years ago(do_desi): Zap efficiency only when sct_type really changes. Closes
Markus Armbruster [Sun, 9 May 2004 17:00:16 +0000 (17:00 +0000)]
(do_desi): Zap efficiency only when sct_type really changes.  Closes
#935750.

19 years ago(line_of_sight): Normalize coordinates before indexing. Closes
Markus Armbruster [Sun, 9 May 2004 15:54:00 +0000 (15:54 +0000)]
(line_of_sight): Normalize coordinates before indexing.  Closes
#950514.

(line_of_sight): There's just one straight line between two points on
a plane, but on a torus there are four.  Code assumed plane, and thus
could screw up near the origin.  Pick a shortest line of the four.
Partial fix for #950510.

19 years ago(nstr_exec, nstr_comp_val, nstr_exec_val): Values of type NSTR aren't
Markus Armbruster [Sun, 9 May 2004 15:44:54 +0000 (15:44 +0000)]
(nstr_exec, nstr_comp_val, nstr_exec_val): Values of type NSTR aren't
implemented and thus cannot occur.  Document this more clearly.

(nstr_comp_val): More logical order.  No functional changes.

19 years agoRemove superflous include.
Markus Armbruster [Sun, 9 May 2004 15:22:17 +0000 (15:22 +0000)]
Remove superflous include.

20 years ago(flash, wall): Long arguments could smash the stack; fix insufficient
Markus Armbruster [Sun, 25 Apr 2004 13:09:41 +0000 (13:09 +0000)]
(flash, wall): Long arguments could smash the stack; fix insufficient
buffers.  Closes #940792.

(wall): Don't strip first word from message.  Closes #940790.

20 years agoDon't try to let patch read from unreadable or nonexisting files.
Marc Olzheim [Wed, 14 Apr 2004 23:25:31 +0000 (23:25 +0000)]
Don't try to let patch read from unreadable or nonexisting files.

20 years ago(comstr, buy, check_market, display_mark, reset, sell): Change comstr
Markus Armbruster [Sat, 10 Apr 2004 18:48:30 +0000 (18:48 +0000)]
(comstr, buy, check_market, display_mark, reset, sell): Change comstr
member com_type from mnemo character to item type.
(whichitem): Unused, remove.

(check_market): Use full item name instead of mnemo in telegrams.

(display_mark): Separate arguments for item type and cheapest only.
Cheapest only of specific item type is not implemented.

(rese): Guard against bad com_type.  Delete some code that had no
effect.

20 years ago(commfil, comminit, make): Unused, remove.
Markus Armbruster [Sat, 10 Apr 2004 17:07:43 +0000 (17:07 +0000)]
(commfil, comminit, make): Unused, remove.

20 years ago(buy, mark, display_mark): Move argument evaluation from
Markus Armbruster [Sat, 10 Apr 2004 08:43:19 +0000 (08:43 +0000)]
(buy, mark, display_mark): Move argument evaluation from
display_mark() to callers.  buy() no longer accepts "all".  It used to
display all lots, but didn't let you buy any.  Similar nonsense
happened for "" if buy() prompted for it.

(display_mark): Fix size of cheapest_items[].

(player_coms): Document mark accepting "all".

20 years ago(i_packing): New. Use where appropriate.
Markus Armbruster [Fri, 9 Apr 2004 06:30:21 +0000 (06:30 +0000)]
(i_packing): New.  Use where appropriate.
(NPKG, WPKG, UPKG, BPKG, NUMPKG): Turn macros into enumeration
constants.
(NPKG, WPKG, UPKG, BPKG): Move from sect.h to item.h.

20 years ago(iop, iop_t): Unused, remove.
Markus Armbruster [Thu, 8 Apr 2004 19:53:17 +0000 (19:53 +0000)]
(iop, iop_t): Unused, remove.

20 years agoRemove types that no longer exist.
Markus Armbruster [Thu, 8 Apr 2004 19:47:51 +0000 (19:47 +0000)]
Remove types that no longer exist.

20 years ago(player_coms): Fix move and test syntax.
Markus Armbruster [Thu, 8 Apr 2004 19:30:12 +0000 (19:30 +0000)]
(player_coms): Fix move and test syntax.

20 years ago(item_by_name): New, factored out of whatitem(). Use it to simplify
Markus Armbruster [Thu, 8 Apr 2004 19:26:55 +0000 (19:26 +0000)]
(item_by_name): New, factored out of whatitem().  Use it to simplify
some uses of whatitem().

20 years ago(build_ship, orde, qorde, nav_loadship, load_it, unload_it): Store
Markus Armbruster [Thu, 8 Apr 2004 19:14:09 +0000 (19:14 +0000)]
(build_ship, orde, qorde, nav_loadship, load_it, unload_it): Store
item types instead of mnemo characters in shpstr members shp_tstart[]
and shp_tend[].
(com_num): No longer used, remove.

(orde): Simplify swap code.

(prhold): New, factored out of qorde().

20 years ago(I_NONE): New. To be used as item type error value and such.
Markus Armbruster [Thu, 8 Apr 2004 19:05:42 +0000 (19:05 +0000)]
(I_NONE): New.  To be used as item type error value and such.

20 years ago(getstring, getstarg): Use plain char * instead of s_char *.
Markus Armbruster [Thu, 8 Apr 2004 17:56:12 +0000 (17:56 +0000)]
(getstring, getstarg): Use plain char * instead of s_char *.

20 years ago(ac_doflak, ac_shipflak): Simplify, no functional changes.
Markus Armbruster [Thu, 8 Apr 2004 16:42:19 +0000 (16:42 +0000)]
(ac_doflak, ac_shipflak): Simplify, no functional changes.

20 years ago(prod, upd_buildeff): Truncated work to even before sector building.
Markus Armbruster [Thu, 8 Apr 2004 16:31:31 +0000 (16:31 +0000)]
(prod, upd_buildeff): Truncated work to even before sector building.
Fix.

20 years ago(prod): The production limit due to work was rounded incorrectly.
Ron Koenderink [Wed, 7 Apr 2004 22:06:48 +0000 (22:06 +0000)]
(prod): The production limit due to work was rounded incorrectly.

20 years ago(OFFSET): Remove, use standard offsetof().
Markus Armbruster [Wed, 7 Apr 2004 17:38:43 +0000 (17:38 +0000)]
(OFFSET): Remove, use standard offsetof().
(SETOFF): Unused, remove.

20 years ago(strtox, strtoy): New. Use it instead of inputxy() to avoid the
Markus Armbruster [Wed, 7 Apr 2004 17:13:47 +0000 (17:13 +0000)]
(strtox, strtoy): New.  Use it instead of inputxy() to avoid the
double-remainder problem: x-coordinate SHRT_MAX+1 is truncated to 0 by
cast to coord, then converted by xabs().  This is wrong unless WORLD_X
divides SHRT_MAX+1.
(sarg_xy, sarg_getrange, sarg_range): Use them.
(inputxy): No longer used, remove.

(sarg_type): Use NS_UNDEF instead of 0.

(sarg_list): Change confusing loop control.  Properly diagnose
overlong lists; used to silently ignore list tail and return MAX+1,
which made a later snxtitem_list() fail.

(atoip): No longer used, remove.  Parsing was broken anyway.

(sarg_type, sarg_xy, sarg_area, sarg_range, sarg_list, sarg_getrange):
Use plain char * instead of s_char *.

20 years ago(NS_UNDEF, NS_LIST, NS_DIST, NS_AREA, NS_ALL, NS_XY, NS_GROUP): Turn
Markus Armbruster [Tue, 6 Apr 2004 21:37:52 +0000 (21:37 +0000)]
(NS_UNDEF, NS_LIST, NS_DIST, NS_AREA, NS_ALL, NS_XY, NS_GROUP): Turn
macros into enumeration constants.
(ns_seltype): New.  Use where appropriate.

20 years ago(snxtitem): Assigning NS_UNDEF to NP->type is an application domain
Markus Armbruster [Tue, 6 Apr 2004 18:47:54 +0000 (18:47 +0000)]
(snxtitem): Assigning NS_UNDEF to NP->type is an application domain
type error not reflected in C.  The former is a selection type, the
latter is a file type.  Harmless, as the variable is overwritten on
all paths to successful return.

20 years agoUse CANT_HAPPEN() rather than logerror() for some internal errors.
Markus Armbruster [Tue, 6 Apr 2004 18:33:40 +0000 (18:33 +0000)]
Use CANT_HAPPEN() rather than logerror() for some internal errors.

20 years ago(weekday, daytime, daytime_range): New; replace kw_parse(). Parsing
Markus Armbruster [Sun, 4 Apr 2004 15:52:26 +0000 (15:52 +0000)]
(weekday, daytime, daytime_range): New; replace kw_parse().  Parsing
is somewhat stricter.
(is_wday_allowed, is_daytime_allowed, is_daytime_nar,
min_to_next_daytime): New.
(demand_update_time, scheduled_update_time, next_scheduled_time,
update_time, gamehours): Use them to replace kw_parse().
(kw_parse): No longer used, remove.

20 years ago(gamehours): All callers ignore the value assigned to hour[]. Remove
Markus Armbruster [Sun, 4 Apr 2004 14:20:30 +0000 (14:20 +0000)]
(gamehours): All callers ignore the value assigned to hour[].  Remove
parameter.  Remove calls without effect.  Other callers changed.

20 years ago(getminleft): Parameter hours unused since the previous rev., remove.
Markus Armbruster [Sun, 4 Apr 2004 14:07:51 +0000 (14:07 +0000)]
(getminleft): Parameter hours unused since the previous rev., remove.
Change parameter mpd from int * to int, because its only use is *mpd
as r-value.  Callers changed.

20 years ago(kw_read, kw_find, kwtab, kw_list): Were used to evaluate the hours
Markus Armbruster [Sun, 4 Apr 2004 13:54:30 +0000 (13:54 +0000)]
(kw_read, kw_find, kwtab, kw_list): Were used to evaluate the hours
file until 4.2.7.  Since then kw_read() is unused, and kw_find()
always returns NULL.  Remove.  kw_find() callers changed.

20 years ago(player_coms): Fix survey syntax.
Markus Armbruster [Sun, 4 Apr 2004 11:13:43 +0000 (11:13 +0000)]
(player_coms): Fix survey syntax.

20 years agoIncomplete, inadequate, rewrite.
Markus Armbruster [Sun, 4 Apr 2004 11:12:18 +0000 (11:12 +0000)]
Incomplete, inadequate, rewrite.

20 years agoSelector rewrite: values other than long, interpret identifiers
Markus Armbruster [Fri, 2 Apr 2004 19:02:12 +0000 (19:02 +0000)]
Selector rewrite: values other than long, interpret identifiers
according to context, to make `lstat * ?type#spy&spy>1' work.  Closes
bug#825363, #905809, #905814 and #922968.
(nsc_type, packed_nsc_type, nsc_cat, packed_nsc_cat, nsc_flags): New.
(valstr): New.  Old code encoded values in type long, which was
somewhat hard to read and could only support signed integer values.
(nscstr): Redesign.  Use valstr.  Typed operator.
(castr): Split ca_code into ca_type, ca_flags, ca_off.  Tables
changed.
(nstr_comp, nstr_exec): Redesign and rewrite.  Callers changed.  They
used the old design incorrectly, which let players smash the stack
by supplying more than NCOND conditions.
(encode, nstr_comp_val, decode, nstr_exec_val): Rename, redesign, and
rewrite.  Callers changed.
(nstr_coerce_val): New.
(var_ca, sect_ca, ship_ca, land_ca): Checking both var_ca[] and the
object's ca complicates proper recognition of unique abbreviations.
Copy contents of var_ca[] into the ca of objects, remove var_ca[].

(surv): Reject values with category other than NSC_OFF and types that
can't be coerced to NSC_LONG.  Old code happily passed values with
category NSC_VAL to code_char().  The previous version interpreted
them correctly, but earlier versions interpreted them as NSC_OFF, then
logged `bad type in decode: 0' and evaluated them into zero.

(code_char): Used to test category NSC_VAR to decide whether to
display tens or hundreds.  NSC_VAR no longer exists.  Test type
instead.  Makes more sense anyway.

20 years ago(debug): New.
Markus Armbruster [Fri, 2 Apr 2004 15:40:43 +0000 (15:40 +0000)]
(debug): New.
(main): Set it on -d.
(oops, CANT_HAPPEN): New.

20 years agoFiring from fortresses needs 5 mil, not 2. Closes bug#923723.
Marc Olzheim [Thu, 1 Apr 2004 08:12:14 +0000 (08:12 +0000)]
Firing from fortresses needs 5 mil, not 2.  Closes bug#923723.

20 years agoRemove CVS keywords Source and Id. No functional change.
Marc Olzheim [Tue, 23 Mar 2004 19:08:38 +0000 (19:08 +0000)]
Remove CVS keywords Source and Id.  No functional change.

20 years agoA sandbox system to automate the building of the source tree and
Marc Olzheim [Tue, 23 Mar 2004 16:32:45 +0000 (16:32 +0000)]
A sandbox system to automate the building of the source tree and
reporting differences in compiler output with the output of the
previous build.

20 years agoDon't shadow existing variables. No functional changes.
Marc Olzheim [Tue, 23 Mar 2004 16:02:41 +0000 (16:02 +0000)]
Don't shadow existing variables.  No functional changes.

20 years ago(qprint): Change it into a printf()-like function. Simplify callers.
Markus Armbruster [Tue, 23 Mar 2004 15:20:17 +0000 (15:20 +0000)]
(qprint): Change it into a printf()-like function.  Simplify callers.
No functional changes.  From Marc Olzheim.

20 years ago(RANDOM, SRANDOM): New, to allow overriding the PRNG on the compiler
Markus Armbruster [Tue, 23 Mar 2004 15:05:20 +0000 (15:05 +0000)]
(RANDOM, SRANDOM): New, to allow overriding the PRNG on the compiler
command line for reproducible automated tests.  This is expected to be
a temporary solution until we get more capable system configuration.
Callers of random(), srandom() changed.  From Marc Olzheim.