]> git.pond.sub.org Git - empserver/log
empserver
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.

20 years ago(rnd_seed, main, parse_args, allocate_memory): New option -R to set
Markus Armbruster [Tue, 23 Mar 2004 14:54:48 +0000 (14:54 +0000)]
(rnd_seed, main, parse_args, allocate_memory): New option -R to set
the PRNG seed.  Print the seed.  From Marc Olzheim.

20 years agoUse .ig to comment out stuff, it doesn't produce empty lines. v4.2.14
Markus Armbruster [Mon, 22 Mar 2004 10:40:15 +0000 (10:40 +0000)]
Use .ig to comment out stuff, it doesn't produce empty lines.

20 years agoImplement request ig, except for argument.
Markus Armbruster [Mon, 22 Mar 2004 10:34:49 +0000 (10:34 +0000)]
Implement request ig, except for argument.

20 years agoFix markup.
Markus Armbruster [Mon, 22 Mar 2004 10:12:28 +0000 (10:12 +0000)]
Fix markup.

20 years agoThe previous revision screwed up intentation.
Markus Armbruster [Mon, 22 Mar 2004 09:54:58 +0000 (09:54 +0000)]
The previous revision screwed up intentation.

20 years ago4.2.14 last minute changes.
Markus Armbruster [Mon, 22 Mar 2004 09:21:24 +0000 (09:21 +0000)]
4.2.14 last minute changes.

20 years agoCan't use gcc function attribute `format' when s_char is not plain
Markus Armbruster [Mon, 22 Mar 2004 08:51:10 +0000 (08:51 +0000)]
Can't use gcc function attribute `format' when s_char is not plain
char; gcc chokes on it.

20 years ago(configkeys): Rev 1.5 failed to update member km_func for keys s_p_etu
Markus Armbruster [Sat, 20 Mar 2004 21:33:19 +0000 (21:33 +0000)]
(configkeys): Rev 1.5 failed to update member km_func for keys s_p_etu
and adj_update.  From Marc Olzheim.

20 years agoFix RES_POP maximum population formula.
Markus Armbruster [Sat, 20 Mar 2004 21:23:26 +0000 (21:23 +0000)]
Fix RES_POP maximum population formula.

20 years agoDocument all undocumented capabilities and stats. Clarify meaning of
Markus Armbruster [Sat, 20 Mar 2004 21:21:32 +0000 (21:21 +0000)]
Document all undocumented capabilities and stats.  Clarify meaning of
land unit capability `light'.  Closes #781116.

Document submarine's ability to carry landspies.  Closes #907978.

20 years agoSaid `enemy civilians', but code happily lets you shoot your own
Markus Armbruster [Sat, 20 Mar 2004 21:13:38 +0000 (21:13 +0000)]
Said `enemy civilians', but code happily lets you shoot your own
civilians.  Fix.  Closes #905200.

Claimed security troops shoot more than you asked for.  This is
wrong.  They save you mobility.  Fix.  Closes #781117.

20 years agoDelete lie about Steve still heading Wolfpack. Closes #902831.
Markus Armbruster [Sat, 20 Mar 2004 21:02:25 +0000 (21:02 +0000)]
Delete lie about Steve still heading Wolfpack.  Closes #902831.

20 years agoUpdate for 4.2.14.
Markus Armbruster [Wed, 17 Mar 2004 07:29:39 +0000 (07:29 +0000)]
Update for 4.2.14.

20 years agoFix 4.2.10's release date to match doc/CHANGES4.X.
Markus Armbruster [Wed, 17 Mar 2004 07:24:40 +0000 (07:24 +0000)]
Fix 4.2.10's release date to match doc/CHANGES4.X.

20 years ago(lwpStackCheckUsed): Fix confusing output.
Markus Armbruster [Wed, 17 Mar 2004 07:12:31 +0000 (07:12 +0000)]
(lwpStackCheckUsed): Fix confusing output.

20 years agoShould have been removed along with the commands.
Markus Armbruster [Wed, 17 Mar 2004 07:06:45 +0000 (07:06 +0000)]
Should have been removed along with the commands.

20 years agoCommand has been commented out for ages. Remove until it isn't.
Markus Armbruster [Wed, 17 Mar 2004 07:06:45 +0000 (07:06 +0000)]
Command has been commented out for ages.  Remove until it isn't.

20 years agoRegenerated.
Markus Armbruster [Wed, 17 Mar 2004 07:04:15 +0000 (07:04 +0000)]
Regenerated.

20 years ago(main, write_newcap_script): Don't warn when resources were added,
Markus Armbruster [Wed, 17 Mar 2004 06:53:57 +0000 (06:53 +0000)]
(main, write_newcap_script): Don't warn when resources were added,
that's expected nowadays.  Warn when resources were not added.  Don't
mention the ore program, as it doesn't work and we no longer
distribute it.

20 years ago(gen_power): Force mtime update under Windows. From Ron Koenderink.
Markus Armbruster [Wed, 17 Mar 2004 06:40:44 +0000 (06:40 +0000)]
(gen_power): Force mtime update under Windows.  From Ron Koenderink.

20 years agoUpdate to match code. There's currently no command that allows trade
Markus Armbruster [Tue, 16 Mar 2004 21:24:30 +0000 (21:24 +0000)]
Update to match code.  There's currently no command that allows trade
and commodity selectors; comment them out.

20 years ago(loan_ca): Remove selector "sell".
Markus Armbruster [Tue, 16 Mar 2004 21:19:54 +0000 (21:19 +0000)]
(loan_ca): Remove selector "sell".

20 years agoTalks about files that were removed. Remove.
Markus Armbruster [Tue, 16 Mar 2004 20:15:12 +0000 (20:15 +0000)]
Talks about files that were removed.  Remove.

20 years ago(growfood): Simplify. Rev. 1.6 made it less robust against overflow;
Markus Armbruster [Tue, 16 Mar 2004 19:45:38 +0000 (19:45 +0000)]
(growfood): Simplify.  Rev. 1.6 made it less robust against overflow;
fix that.

20 years ago(produce): Fix consumed materials when production hits the 999 limit.
Markus Armbruster [Tue, 16 Mar 2004 19:25:13 +0000 (19:25 +0000)]
(produce): Fix consumed materials when production hits the 999 limit.
This can't happen currently, because produce() never gets called with
work>999.

(produce): Fix rounding of consumed materials on production backlog.
Broken by the previous revision.

20 years ago(buy, move, prod, dodistribute, produce): Obey ITEM_MAX. Previous
Markus Armbruster [Tue, 16 Mar 2004 18:56:14 +0000 (18:56 +0000)]
(buy, move, prod, dodistribute, produce): Obey ITEM_MAX.  Previous
change to move() was incomplete.

20 years ago(play_list): Cast time_t to long for printing.
Markus Armbruster [Fri, 12 Mar 2004 06:14:52 +0000 (06:14 +0000)]
(play_list): Cast time_t to long for printing.

20 years ago(sell): Simplify.
Markus Armbruster [Thu, 11 Mar 2004 22:12:49 +0000 (22:12 +0000)]
(sell): Simplify.

20 years agoFix plague formula. Fix markup.
Markus Armbruster [Thu, 11 Mar 2004 22:10:58 +0000 (22:10 +0000)]
Fix plague formula.  Fix markup.

20 years agoRemove unused variables and such. No functional changes.
Markus Armbruster [Thu, 11 Mar 2004 22:10:19 +0000 (22:10 +0000)]
Remove unused variables and such.  No functional changes.

20 years ago(getvec, putvec): No longer used, remove.
Markus Armbruster [Thu, 11 Mar 2004 22:08:16 +0000 (22:08 +0000)]
(getvec, putvec): No longer used, remove.

20 years ago(produce_sect): Unless player->simulation, work directly on item
Markus Armbruster [Thu, 11 Mar 2004 22:00:58 +0000 (22:00 +0000)]
(produce_sect): Unless player->simulation, work directly on item
arrays instead of copies made by getvec().  This is safe, because the
old code made single copies and always flushed them back into the unit
structures.  Else make copies by hand, not with getvec.
(starv_sects): Replace getvec() by direct, read-only item access.
(upd_buildeff, enlist, materials_charge, materials_cost, produce,
grow_people, growfood, trunc_people, do_feed, feed_people): Change
argument type to match uncopied item arrays.
(growfood): Obey ITEM_MAX.

20 years ago(feed_people): Simplify. No functional changes.
Markus Armbruster [Thu, 11 Mar 2004 20:20:35 +0000 (20:20 +0000)]
(feed_people): Simplify.  No functional changes.

20 years ago(do_fallout, meltitems): Work directly on item arrays instead of
Markus Armbruster [Thu, 11 Mar 2004 18:36:43 +0000 (18:36 +0000)]
(do_fallout, meltitems): Work directly on item arrays instead of
copies made by getvec().  This is safe, because the old code made
single copies and always flushed them back into the unit structures.

(meltitems): Don't claim more items were lost than existed.

20 years ago(upd_ship, upd_land, do_plague): Work directly on item arrays instead
Markus Armbruster [Thu, 11 Mar 2004 18:10:25 +0000 (18:10 +0000)]
(upd_ship, upd_land, do_plague): Work directly on item arrays instead
of copies made by getvec().  This is safe, because the new code
changes the item array precisely when the old code writes back a
changed copy.
(starv_ships, starv_units): Replace getvec() by direct, read-only item
access.
(feed_ship, feed_land): Remove parameter vec, work with sp->shp_item[]
and lp->lnd_item[] instead.
(plague_people): Change argument type to match uncopied item arrays.

20 years ago(infect_people): Remove parameters vec, eff, mobil and work with
Markus Armbruster [Thu, 11 Mar 2004 17:18:05 +0000 (17:18 +0000)]
(infect_people): Remove parameters vec, eff, mobil and work with
sp->sct_item, sp->sct_effic, sp->sct_mobil instead.  This is safe,
because the only caller passed a copy of sp->sct_item created with
getvec(), and infect_people() doesn't change it.  Caller changed.
(infect_people): Rewrite plague risk computation for clarity.

20 years ago(feed_land): Simplify. Amount of food taken from ship could be off by
Markus Armbruster [Thu, 11 Mar 2004 15:27:59 +0000 (15:27 +0000)]
(feed_land): Simplify.  Amount of food taken from ship could be off by
one due to rounding, fix.  However, the fixed code is currently
unreachable, as caller runs resupply_commod() before feed_land().
(feed_ship): Simplify.  No functional changes.

20 years ago(upd_ship, upd_land): Simplify. No functional changes.
Markus Armbruster [Thu, 11 Mar 2004 13:31:28 +0000 (13:31 +0000)]
(upd_ship, upd_land): Simplify.  No functional changes.

20 years ago(shiprepair): Remove parameter vec, work with ship->shp_item[]
Markus Armbruster [Thu, 11 Mar 2004 13:15:02 +0000 (13:15 +0000)]
(shiprepair): Remove parameter vec, work with ship->shp_item[]
instead.  This is safe, because the only caller passed a copy of the
latter created with getvec(), and shiprepair() doesn't change it.
Caller changed.

20 years ago(feed_ship): Work directly on land item arrays instead of copies made
Markus Armbruster [Thu, 11 Mar 2004 13:04:58 +0000 (13:04 +0000)]
(feed_ship): Work directly on land item arrays instead of copies made
by getvec().  This is safe, because the new code changes the item
array precisely when the old code writes back a changed copy.

20 years ago(landrepair): Remove unused parameter `vec'. Caller changed.
Markus Armbruster [Thu, 11 Mar 2004 12:57:33 +0000 (12:57 +0000)]
(landrepair): Remove unused parameter `vec'.  Caller changed.

20 years ago(feed_land): Work directly on ship item arrays instead of copies made
Markus Armbruster [Thu, 11 Mar 2004 12:51:34 +0000 (12:51 +0000)]
(feed_land): Work directly on ship item arrays instead of copies made
by getvec().  This is safe, because the new code changes the item
array precisely when the old code writes back a changed copy.

20 years ago(opt_NEWPOWER, Options, gen_power): Remove nooption NEWPOWER.
Markus Armbruster [Thu, 11 Mar 2004 10:36:55 +0000 (10:36 +0000)]
(opt_NEWPOWER, Options, gen_power): Remove nooption NEWPOWER.

(opt_NEW_STARVE, Options, feed_ship, feed_people): Remove nooption
NEW_STARVE.

(opt_NEW_WORK, Options, move, explore): Remove nooption NEW_WORK.

20 years ago(set_option, delete_option): Gripe about unknown options. If multiple
Markus Armbruster [Thu, 11 Mar 2004 10:07:38 +0000 (10:07 +0000)]
(set_option, delete_option): Gripe about unknown options.  If multiple
options have identical names in Options[], all but the first are
ignored.  This should never happen.

20 years ago(get_materials): Work directly on item arrays instead of copies made
Markus Armbruster [Thu, 11 Mar 2004 09:04:44 +0000 (09:04 +0000)]
(get_materials): Work directly on item arrays instead of copies made
by getvec().  This is safe, because the new code changes the item
array precisely when the old code writes back a changed copy.

20 years ago(opt_GRAB_THINGS, Options, get_materials): Remove option GRAB_THINGS.
Markus Armbruster [Thu, 11 Mar 2004 08:53:27 +0000 (08:53 +0000)]
(opt_GRAB_THINGS, Options, get_materials): Remove option GRAB_THINGS.

20 years ago(dodistribute): Work directly on item arrays instead of copies made by
Markus Armbruster [Wed, 10 Mar 2004 18:32:42 +0000 (18:32 +0000)]
(dodistribute): Work directly on item arrays instead of copies made by
getvec().  This is safe, because the old code made single copies and
always flushed them back into the unit structures.

20 years ago(dodeliver): Remove parameter vec, work with sp->sct_item[] instead.
Markus Armbruster [Wed, 10 Mar 2004 18:25:05 +0000 (18:25 +0000)]
(dodeliver): Remove parameter vec, work with sp->sct_item[] instead.
This is safe, because the only caller passed a copy of the latter
created with getvec(), and dodeliver() doesn't change it.  Caller
changed.  Return value no longer needed, remove.

20 years ago(populace): Remove parameter vec, work with sp->sct_item[] instead.
Markus Armbruster [Wed, 10 Mar 2004 17:59:37 +0000 (17:59 +0000)]
(populace): Remove parameter vec, work with sp->sct_item[] instead.
This is safe, because the only caller passed a copy of the latter
created with getvec(), and populace() doesn't change it.
(tax): Replace getvec() by direct, read-only item access.

20 years ago(pln_equip, mission_pln_equip): Work directly on item arrays instead
Markus Armbruster [Wed, 10 Mar 2004 13:35:54 +0000 (13:35 +0000)]
(pln_equip, mission_pln_equip): Work directly on item arrays instead
of copies made by getvec().  This is safe, because the old code made
single copies and always flushed them back into the unit structures
before flushing those.  Simplify.

20 years ago(pln_equip, mission_pln_equip): Rename item to itype. Use struct
Markus Armbruster [Wed, 10 Mar 2004 13:22:48 +0000 (13:22 +0000)]
(pln_equip, mission_pln_equip): Rename item to itype.  Use struct
ichrstr member i_vtype instead of pointer arithmetic to map from
`struct ichrstr *' to item type.  No functional changes.

20 years ago(sd, shp_missile_defense): Replace getvec() by direct, read-only item
Markus Armbruster [Wed, 10 Mar 2004 13:16:46 +0000 (13:16 +0000)]
(sd, shp_missile_defense): Replace getvec() by direct, read-only item
access.  This is correct, because the old code doesn't use the copy
after it changes the original in the unit structure.
(dd): Remove call of getvec() that has no effect.

20 years ago(quiet_bigdef): Work directly on item arrays instead of copies made by
Markus Armbruster [Wed, 10 Mar 2004 12:52:24 +0000 (12:52 +0000)]
(quiet_bigdef): Work directly on item arrays instead of copies made by
getvec().  This is safe, because the old code made single copies and
always flushed them back into the unit structures before flushing
those, in use_ammo(), or discarded both the copy and the unit
structure.

20 years agoSpelling fix. Closes #913151.
Markus Armbruster [Wed, 10 Mar 2004 07:24:56 +0000 (07:24 +0000)]
Spelling fix.  Closes #913151.

20 years agoSpelling fix. Closes #912922.
Markus Armbruster [Wed, 10 Mar 2004 07:20:56 +0000 (07:20 +0000)]
Spelling fix.  Closes #912922.