]> git.pond.sub.org Git - empserver/log
empserver
17 years ago(chance, roundavg): Simplify. No functional change.
Markus Armbruster [Sat, 17 Jun 2006 12:40:25 +0000 (12:40 +0000)]
(chance, roundavg): Simplify.  No functional change.

17 years ago(lnd_fortify): Round mobility fractions up always, not just to 1.
Markus Armbruster [Sat, 17 Jun 2006 08:42:23 +0000 (08:42 +0000)]
(lnd_fortify): Round mobility fractions up always, not just to 1.
Simplify.

(fort): Don't claim land unit can't be fortified when amount argument
is zero.

17 years ago(sector_mcost, bp_neighbors, lnd_mar_one_sector): Deal with disabled
Markus Armbruster [Fri, 16 Jun 2006 21:11:25 +0000 (21:11 +0000)]
(sector_mcost, bp_neighbors, lnd_mar_one_sector): Deal with disabled
road/rail infrastructure.

17 years ago(info.ps): New. Adapt TROFF.MAC. Result isn't exactly a readable
Markus Armbruster [Fri, 16 Jun 2006 20:51:40 +0000 (20:51 +0000)]
(info.ps): New.  Adapt TROFF.MAC.  Result isn't exactly a readable
book.

17 years ago(mission): Nicer diagnostics.
Markus Armbruster [Fri, 16 Jun 2006 20:44:23 +0000 (20:44 +0000)]
(mission): Nicer diagnostics.

17 years agoChe cannot target #0:
Markus Armbruster [Fri, 16 Jun 2006 20:01:30 +0000 (20:01 +0000)]
Che cannot target #0:
(guerrilla): Oops on it.
(doland, takeover): Clear them when che_target becomes 0.

(doland): Fix bogus message.

(guerrilla): Remove silly sanity check.

17 years ago(sctintrins): New member in_enable. Update infra.config. Use it
Markus Armbruster [Fri, 16 Jun 2006 18:39:35 +0000 (18:39 +0000)]
(sctintrins): New member in_enable.  Update infra.config.  Use it
instead of opt_DEFENSE_INFRA.
(improve): Test for it.
(show_sect_build): Show only enabled infrastructure.
(opt_DEFENSE_INFRA): Remove.  Deities can edit infra.config instead.

(improve): Dumb down prompt.

17 years agoFix the previous revision.
Markus Armbruster [Fri, 16 Jun 2006 17:16:42 +0000 (17:16 +0000)]
Fix the previous revision.

17 years agoUpdate copyright. Add `Preface to the Wolfpack Edition'. Spelling
Markus Armbruster [Fri, 16 Jun 2006 17:15:13 +0000 (17:15 +0000)]
Update copyright.  Add `Preface to the Wolfpack Edition'.  Spelling
fixes.  Change is authorized by Geoff Cashman.

17 years agoRevert the previous revision, it doesn't make sense.
Markus Armbruster [Fri, 16 Jun 2006 05:42:52 +0000 (05:42 +0000)]
Revert the previous revision, it doesn't make sense.

17 years ago(show_sect_stats): Display mobility cost of inaccessible sectors as
Markus Armbruster [Thu, 15 Jun 2006 21:27:45 +0000 (21:27 +0000)]
(show_sect_stats): Display mobility cost of inaccessible sectors as
`no way' instead of obscure magic numbers.

17 years ago(sector_strength): Back out rev. 1.53's oopses, because their
Markus Armbruster [Thu, 15 Jun 2006 21:19:03 +0000 (21:19 +0000)]
(sector_strength): Back out rev. 1.53's oopses, because their
conditions can happen.

17 years ago(map): Fix crash on empty argument introduced in rev. 1.18.
Markus Armbruster [Thu, 15 Jun 2006 21:17:37 +0000 (21:17 +0000)]
(map): Fix crash on empty argument introduced in rev. 1.18.

17 years ago(sector_mcost): New, simpler sector mobility cost formula. The cost
Markus Armbruster [Thu, 15 Jun 2006 21:12:53 +0000 (21:12 +0000)]
(sector_mcost): New, simpler sector mobility cost formula.  The cost
is a linear function of sector efficiency, with cost at 0% given by
dchstr member d_mcst and cost at 100% given by d_emcst.  The latter
used to be d_mcst - 1.  Mountain cost is no longer a special case.
Road infrastructure now reduces cost up to 90%, linear in road
efficiency (used to be close to that, but non-linear).  Same for rail
infrastructure, but 99%.  Double land unit minimum cost to 0.02.
Change land unit cost penalty in newly taken land to an extra 0.2
instead of a minimum of 0.2.
(dchrstr): New member d_emcst.  sector.config updated, with some
changes: cost of mountain now ranges from 2.4 to 1.2 instead of 2.174
to 1.304, wildernes 0.4 instead of 0.6 to 0.4, highway, bridge head,
bridge span and tower from 0.4 to 0.001 instead of 0.2 to 0.001.
While I'm at it, make bridge head match highway stats (dstr and value
reduced).
(show_sect_stats): Show d_emcst.
(dchr_ca): New selector emcst for d_emcst.

17 years ago(prmobcost): New.
Markus Armbruster [Thu, 15 Jun 2006 19:46:27 +0000 (19:46 +0000)]
(prmobcost): New.
(sinfra): Use it to display inaccessible sectors sensibly.
Inaccessible occurs for rail since src/lib/common/move.c rev. 1.12.

17 years ago(attack_val, defense_val): These functions overestimate unit strength,
Markus Armbruster [Thu, 15 Jun 2006 19:05:17 +0000 (19:05 +0000)]
(attack_val, defense_val): These functions overestimate unit strength,
because they ignore three facts.  Firstly, mil casualties decrease
strength linearly, while unit casualties decrease it quadratically
(unit strength scales with mil * eff).  Secondly, casualties decrease
strength proportional to the combat multiplier, hence twice as much
mil are more powerful than double multiplier.  Thirdly, units break
and retreat.  Change the estimate from mil * mult to mil * sqrt(mult).
Improves things in simulations, hope it works out in practice as well.
Closes #682571.

17 years ago(lnd_hit_mine): Remove silly use of double. Rounds fractional damage
Markus Armbruster [Thu, 15 Jun 2006 18:58:47 +0000 (18:58 +0000)]
(lnd_hit_mine): Remove silly use of double.  Rounds fractional damage
to engineers down instead of up.

(retreat_land1): Failed to reduce mine damage to engineers.

17 years ago(att_reacting_units, attack_val, defense_val, intelligence_report):
Markus Armbruster [Thu, 15 Jun 2006 18:55:15 +0000 (18:55 +0000)]
(att_reacting_units, attack_val, defense_val, intelligence_report):
Return double.  Callers changed.

(att_reacting_units): Remove silly truncation to int.

(get_dlist): Return void, simplify.

17 years ago(tcp_listen): Don't print null host.
Markus Armbruster [Thu, 15 Jun 2006 18:34:46 +0000 (18:34 +0000)]
(tcp_listen): Don't print null host.

17 years ago(as_search) [DEBUG]: Fix crash bug. We don't normally define DEBUG.
Markus Armbruster [Thu, 15 Jun 2006 17:53:55 +0000 (17:53 +0000)]
(as_search) [DEBUG]: Fix crash bug.  We don't normally define DEBUG.

17 years agoUpdate for 4.3.6.
Markus Armbruster [Wed, 14 Jun 2006 18:22:28 +0000 (18:22 +0000)]
Update for 4.3.6.

17 years agoDoc fix.
Markus Armbruster [Wed, 14 Jun 2006 18:14:40 +0000 (18:14 +0000)]
Doc fix.

17 years ago(options_cmd): login_opts[] lacked sentinel. Potential crash-bug.
Markus Armbruster [Wed, 14 Jun 2006 18:07:37 +0000 (18:07 +0000)]
(options_cmd): login_opts[] lacked sentinel.  Potential crash-bug.
Simplify.

17 years agoDocument signal use. Since Windows lacks real signals, it is only
Markus Armbruster [Wed, 14 Jun 2006 18:05:16 +0000 (18:05 +0000)]
Document signal use.  Since Windows lacks real signals, it is only
included if number register w is zero.

17 years agoUpdate for current code. Minor edits.
Markus Armbruster [Wed, 14 Jun 2006 18:02:20 +0000 (18:02 +0000)]
Update for current code.  Minor edits.

17 years ago(satmap, satdisp_units): Don't show landspies.
Markus Armbruster [Wed, 14 Jun 2006 17:56:26 +0000 (17:56 +0000)]
(satmap, satdisp_units): Don't show landspies.

(satdisp_units): Don't show land units loaded on ships or land units.

(satdisp_units): Align table header with body.

17 years ago(satdisp, satdisp_sect, satdisp_units): Split satdisp() into
Markus Armbruster [Wed, 14 Jun 2006 17:38:16 +0000 (17:38 +0000)]
(satdisp, satdisp_sect, satdisp_units): Split satdisp() into
satdisp_sect() and satdisp_units().
(satmap): Call only satdisp_sect().  No functional change.
(aircombat): Call both, and call satdisp_units() even over sea.  This
lets spy planes spot surface ships at sea.  Closes #906035.

17 years ago(MIN_MOBCOST, LND_MINMOBCOST): Just one use, inline and remove.
Markus Armbruster [Tue, 13 Jun 2006 21:21:02 +0000 (21:21 +0000)]
(MIN_MOBCOST, LND_MINMOBCOST): Just one use, inline and remove.

17 years ago(lnd_mobtype): New.
Markus Armbruster [Tue, 13 Jun 2006 21:07:44 +0000 (21:07 +0000)]
(lnd_mobtype): New.
(lnd_path): Use it.
(lnd_mobcost): Use it, remove last parameter.  Callers changed.  This
fixes mobility use of trains when retreating, both for retreat orders
and for failed morale checks.
(retreat_land1): Fix test for impassable terrain.  Before, trains
could retreat off rail.
(lnd_take_casualty): Test for impassable terrain.  Before, trains
could retreat off rail.

17 years agoMake land unit attack mobility cost consistent with march cost:
Markus Armbruster [Tue, 13 Jun 2006 20:29:47 +0000 (20:29 +0000)]
Make land unit attack mobility cost consistent with march cost:
(att_mobcost): New.
(ask_olist, take_move_in_mob): Use it.  Attacking land units can now
use roads and suffer the newly taken penalty.  No difference in most
cases, because the penalty commonly cancels the road bonus.
(get_mob_support, calc_mobcost, ask_move_in_off): Use it.  No
functional change now; ensures that military's attack mobility cost
will stay consistent with move cost.
(MOB_NONE): Unused, remove.
(sector_mcost): Simplify.

17 years ago(att_fight): Don't charge the defending sector any mobility when it's
Markus Armbruster [Tue, 13 Jun 2006 18:35:49 +0000 (18:35 +0000)]
(att_fight): Don't charge the defending sector any mobility when it's
already negative.  Used to charge proportional to its absolute value,
which makes no sense.

(att_fight): Oops when attacker's mobility is negative rather than
charging negative mobility.

Remove superflous casts and parenthesis.

17 years agoChange maximum population to 100 for plains (was 49), mountains (was
Markus Armbruster [Tue, 13 Jun 2006 17:52:46 +0000 (17:52 +0000)]
Change maximum population to 100 for plains (was 49), mountains (was
99), bridge spans and bridge towers (was 999), and to 1000 for the
other habitable sector types (was 999).

17 years ago(max_population): Deal gracefully with big city 10 * d_maxpop >
Markus Armbruster [Tue, 13 Jun 2006 17:46:04 +0000 (17:46 +0000)]
(max_population): Deal gracefully with big city 10 * d_maxpop >
ITEM_MAX: let value grow linearly from d_maxpop at 0% to the minimum
of 10 * d_maxpop and ITEM_MAX at 100%.

17 years agoReplace incorrect sea mine hit chance by reference to info Hitchance.
Markus Armbruster [Sun, 11 Jun 2006 19:30:19 +0000 (19:30 +0000)]
Replace incorrect sea mine hit chance by reference to info Hitchance.

17 years agoUpdate for changed plane abort chance.
Markus Armbruster [Sun, 11 Jun 2006 19:27:07 +0000 (19:27 +0000)]
Update for changed plane abort chance.

17 years ago(shp_sweep): New parameter takemob. Charge mobility only if it's
Markus Armbruster [Sun, 11 Jun 2006 18:09:09 +0000 (18:09 +0000)]
(shp_sweep): New parameter takemob.  Charge mobility only if it's
true.
(shp_nav_one_sector): Pass false.  This lets minesweepers move at the
speed their stats indicate.  Closes #1498801.
(navi): Pass true.  This ensures sweeping without moving still costs
mobility.

17 years ago(ac_planedamage): Planes may abort when damaged below 80% efficiency.
Markus Armbruster [Sun, 11 Jun 2006 16:02:13 +0000 (16:02 +0000)]
(ac_planedamage): Planes may abort when damaged below 80% efficiency.
Reduce abort chance from 100-eff to 80-eff.  This should make it
easier to punch through air defense, flak in particular, and increase
the risk of getting shot down.

17 years ago(ac_shipflak, ac_landflak): Reduce flak proportional to efficiency.
Markus Armbruster [Sun, 11 Jun 2006 05:12:47 +0000 (05:12 +0000)]
(ac_shipflak, ac_landflak): Reduce flak proportional to efficiency.
Rename some auto variables.  Closes #759402.

17 years ago(FLAK_GUN_MAX): New.
Markus Armbruster [Sat, 10 Jun 2006 18:26:57 +0000 (18:26 +0000)]
(FLAK_GUN_MAX): New.
(ac_doflak, ac_shipflak, ac_landflak): Use it.
(ac_shipflak, ac_landflak): Tally flak for all ships / units, then
limit to FLAK_GUN_MAX guns of average tech.  Used to limit to
FLAK_GUN_MAX guns *after* ship / land unit tech factor was applied by
exiting the loop early, then reduce *again* for nation tech of whoever
owns the last ship visited.  Makes no sense.  Exiting the loop early
is no good, because it can skip plane spotting.  This change and the
one below make low-tech ship and land unit flak more powerful;
rebalancing might be needed.

(ac_doflak, ac_landflak, ac_shipflak): Round flak randomly instead of
down.  This simplifies things.  In particular, you no longer have to
calculate how many low-tech ships to bunch together to get any flak.

17 years ago(ac_fireflak): Remove parameter other, all callers pass 0. Callers
Markus Armbruster [Sat, 10 Jun 2006 17:53:24 +0000 (17:53 +0000)]
(ac_fireflak): Remove parameter other, all callers pass 0.  Callers
changed.

17 years ago(calc_all): Match the real update sequence. Until removal of budget
Markus Armbruster [Sat, 10 Jun 2006 16:20:31 +0000 (16:20 +0000)]
(calc_all): Match the real update sequence.  Until removal of budget
priorities (rev. 1.25), calc_all() tried to match the real sequence,
but didn't quire succeed to cope with all variations.  Then it matched
until the update sequence change in src/lib/update/main.c rev. 1.25.
This is required but not sufficient for closing #1310407.

17 years ago(service_main) [_WIN32]: Added the missing empth_wait_for_signal() and
Ron Koenderink [Sat, 10 Jun 2006 04:11:16 +0000 (04:11 +0000)]
(service_main) [_WIN32]: Added the missing empth_wait_for_signal() and
shutdown() for when the server is running at WIN32 service.  This fix
incorporates the changes that where done to the main thread.

17 years ago(empth_wait_for_signal) [_WIN32]: Add thread block for the main thread,
Ron Koenderink [Sat, 10 Jun 2006 03:57:50 +0000 (03:57 +0000)]
(empth_wait_for_signal) [_WIN32]: Add thread block for the main thread,
otherwise the main thread blocks all others.

17 years ago(update_main): Remove unused local variables.
Ron Koenderink [Fri, 9 Jun 2006 00:43:33 +0000 (00:43 +0000)]
(update_main): Remove unused local variables.

17 years ago(journal_entry): Remove unused local variable.
Ron Koenderink [Fri, 9 Jun 2006 00:41:51 +0000 (00:41 +0000)]
(journal_entry): Remove unused local variable.

17 years ago(mtsymset, add2symset): Remove unused local variables.
Ron Koenderink [Fri, 9 Jun 2006 00:26:59 +0000 (00:26 +0000)]
(mtsymset, add2symset): Remove unused local variables.

17 years ago(starv_units): Remove unused local variable.
Ron Koenderink [Fri, 9 Jun 2006 00:25:39 +0000 (00:25 +0000)]
(starv_units): Remove unused local variable.

17 years ago(getpath): Remove unused local variables.
Ron Koenderink [Fri, 9 Jun 2006 00:24:06 +0000 (00:24 +0000)]
(getpath): Remove unused local variables.

17 years ago(feed_land): Remove unused local variables.
Ron Koenderink [Fri, 9 Jun 2006 00:17:44 +0000 (00:17 +0000)]
(feed_land): Remove unused local variables.

17 years ago(budg,calc_all): Remove unused local variables.
Ron Koenderink [Fri, 9 Jun 2006 00:16:48 +0000 (00:16 +0000)]
(budg,calc_all): Remove unused local variables.

17 years ago(cant_listen): Supply missing newline.
Markus Armbruster [Thu, 8 Jun 2006 20:55:17 +0000 (20:55 +0000)]
(cant_listen): Supply missing newline.

17 years ago(lnd_pathcost): New, factored out of lnd_mobcost().
Markus Armbruster [Thu, 8 Jun 2006 20:43:13 +0000 (20:43 +0000)]
(lnd_pathcost): New, factored out of lnd_mobcost().
(att_reacting_units): Use it.  Fixes overcharging of inefficient
units.  Broken when Empire3 changed land unit mobility use not to
depend on efficiency, except for supply units.
(lnd_sweep): Use it.  No functional change.

(speed_factor): New, factored out of lnd_pathcost() and shp_mobcost().

17 years ago(ef_verify): Check pchr[].p_level matches pchr[].p_type.
Markus Armbruster [Thu, 8 Jun 2006 20:22:58 +0000 (20:22 +0000)]
(ef_verify): Check pchr[].p_level matches pchr[].p_type.

17 years ago(teldir, motdfil, downfil, disablefil, telfil, annfil, timestampfil):
Markus Armbruster [Thu, 8 Jun 2006 20:22:11 +0000 (20:22 +0000)]
(teldir, motdfil, downfil, disablefil, telfil, annfil, timestampfil):
Change to arrays.

17 years ago(shutdwn) [_WIN32]: Not supposed to return, so don't.
Markus Armbruster [Thu, 8 Jun 2006 20:20:02 +0000 (20:20 +0000)]
(shutdwn) [_WIN32]: Not supposed to return, so don't.

17 years agoFinally merge the journal patch:
Markus Armbruster [Thu, 8 Jun 2006 20:11:26 +0000 (20:11 +0000)]
Finally merge the journal patch:
(keep_journal): New econfig key.
(player_main): Log player login and logout.
(recvclient): Log player input.
(ef_open_srv, ef_close_srv): Log startup and shutdown.
(update_main): Log update.

Support the common SIGHUP log rotation idiom:
(empth_wait_for_shutdown, empth_wait_for_signal): Rename.
[EMPTH_LWP, EMPTH_POSIX] (empth_init, empth_wait_for_signal): Wait for
SIGHUP as well.
(main) [SIGHUP]: Reopen journal when empth_wait_for_signal() returns
SIGHUP.

17 years ago(LwpContextPtr, lwpInitSystem): Use void ** for pointer to generic
Markus Armbruster [Thu, 8 Jun 2006 05:38:06 +0000 (05:38 +0000)]
(LwpContextPtr, lwpInitSystem): Use void ** for pointer to generic
pointer.  Users changed.

17 years ago(shutdwn): No longer a signal handler, no need to avoid sleeping.
Markus Armbruster [Wed, 7 Jun 2006 21:45:46 +0000 (21:45 +0000)]
(shutdwn): No longer a signal handler, no need to avoid sleeping.
This lets player threads send C_EXIT properly even when the server
shuts down on a signal.

17 years agoFix the previous revision.
Markus Armbruster [Wed, 7 Jun 2006 21:39:01 +0000 (21:39 +0000)]
Fix the previous revision.

17 years ago(empth_init_signals): Don't catch SIGINT and SIGTERM.
Markus Armbruster [Wed, 7 Jun 2006 21:01:16 +0000 (21:01 +0000)]
(empth_init_signals): Don't catch SIGINT and SIGTERM.
(empth_wait_for_shutdown): New.
(main): Use it to wait for shutdown signal, then shut down.  Closes
#770492.
(empth_exit): Remove the weird special case for main thread.

Implement empth_wait_for_shutdown() for EMPTH_LWP:
[EMPTH_LWP] (lwpInitSigWait, lwpSigWait, lwpSigWakeup): New.
Declaration of lwpSigWait was accidentally committed in the previous
revision of lwp.h.
[EMPTH_LWP] (lwpInitSystem): New parameter waitset, pass it on to
lwpInitSigWait().
[EMPTH_LWP] (lwpReschedule): Call lwpSigWakeup().
[EMPTH_LWP] (empth_init): Declare signals needed by
empth_wait_for_shutdown().
(empth_wait_for_shutdown): Implement on top of lwpSigWait().

Implement empth_wait_for_shutdown() for EMPTH_POSIX:
[EMPTH_POSIX] (empth_init): Block signals, so that
empth_wait_for_shutdown() can use sigwait() safely.
(empth_wait_for_shutdown): Implement on top of sigwait().

Implement empth_wait_for_shutdown() for EMPTH_W32:
(empth_wait_for_shutdown): Implement on top of loc_BlockMainThread().

17 years ago(lwpDestroy): Internal linkage.
Markus Armbruster [Wed, 7 Jun 2006 06:01:29 +0000 (06:01 +0000)]
(lwpDestroy): Internal linkage.
(lwpSelect, lwpStatus): Declare in lwpint.h instead of lwp.h.

17 years ago(lwpEntryPoint): Don't set *LwpContextPtr, that's just been done by
Markus Armbruster [Tue, 6 Jun 2006 21:01:28 +0000 (21:01 +0000)]
(lwpEntryPoint): Don't set *LwpContextPtr, that's just been done by
lwpReschedule().

17 years ago(lwpReschedule): Remove code permitting SIGALRM to be catched safely,
Markus Armbruster [Tue, 6 Jun 2006 20:57:03 +0000 (20:57 +0000)]
(lwpReschedule): Remove code permitting SIGALRM to be catched safely,
because there's no handler for it.
(LCOUNT, oldmask): Remove.
(lwpEntryPoint): Don't initialize oldmask.  Should have been done in
lwpInitSystem() anyway.

17 years agoReorder table entries for clarity. Document.
Markus Armbruster [Tue, 6 Jun 2006 19:27:11 +0000 (19:27 +0000)]
Reorder table entries for clarity.  Document.

17 years ago(P_MAX): New.
Markus Armbruster [Tue, 6 Jun 2006 17:57:30 +0000 (17:57 +0000)]
(P_MAX): New.
(pchr): Use it rather than P_URAN.
(P_SHELL, P_GUN, P_PETROL, P_IRON, P_DUST, P_BAR, P_FOOD, P_OIL)
(P_LCM, P_HCM, P_TLEV, P_RLEV, P_ELEV, P_HLEV, P_URAN): Unused,
remove.

17 years ago(grin): Grind up whatever banks produce instead of P_BAR. This is in
Markus Armbruster [Tue, 6 Jun 2006 17:53:59 +0000 (17:53 +0000)]
(grin): Grind up whatever banks produce instead of P_BAR.  This is in
preparation of getting rid of P_BAR & friends.

(grin): Avail use was wrong when amount was reduced due to the space
limit.

17 years ago(P_SHELL, P_GUN, P_PETROL, P_IRON, P_DUST, P_BAR, P_FOOD, P_OIL)
Markus Armbruster [Mon, 5 Jun 2006 17:44:25 +0000 (17:44 +0000)]
(P_SHELL, P_GUN, P_PETROL, P_IRON, P_DUST, P_BAR, P_FOOD, P_OIL)
(P_LCM, P_HCM, P_TLEV, P_RLEV, P_ELEV, P_HLEV, P_URAN): Use -1 instead
of 0 for `no product', shift down product indexes and update
product.config and sector.config accordingly.
(budg, prod, show_sect_capab, produce, produce_sect): Adapt test for
no product.
(ef_elt_byname): Remove the hack to hide pchr[0].
(prod_eff): Oops on no product.

17 years ago(prprod): New, factored out of prod().
Markus Armbruster [Mon, 5 Jun 2006 15:29:28 +0000 (15:29 +0000)]
(prprod): New, factored out of prod().

(prod): Separate enlistment code from production code.  Simplifies
control flow, and thus gets rid of several compiler warnings.

17 years agoMove signal stuff into src/lib/empthread/, no functional change:
Markus Armbruster [Mon, 5 Jun 2006 08:51:02 +0000 (08:51 +0000)]
Move signal stuff into src/lib/empthread/, no functional change:
(empth_init_signals): New, factored out of start_server().  Call from
empth_init().
(panic): Move to posix.c, internal linkage.
(empth_obj): Add new posix.o

(empth_start, empth_alarm) [EMPTH_POSIX]: Clean up pointless messing
with signal handlers.
(empth_init, empth_wakeup) [EMPTH_POSIX]: Clean up a bit.

17 years agoMissed a use of MOB_ROAD.
Markus Armbruster [Mon, 5 Jun 2006 07:05:43 +0000 (07:05 +0000)]
Missed a use of MOB_ROAD.

17 years ago4.0.2 made land unit mobility costs differ significantly from normal
Markus Armbruster [Sun, 4 Jun 2006 17:41:12 +0000 (17:41 +0000)]
4.0.2 made land unit mobility costs differ significantly from normal
move costs, but failed to make A* use these costs.  This broke land
unit path finding.  Fix:
(MOB_ROAD, MOB_MOVE, MOB_MARCH): Split MOB_ROAD into MOB_MOVE and
MOB_MARCH.  Users changed.
(lnd_mobcost, sector_mcost): Move minimum mobcost logic to
sector_mcost(), where it is visible to A*.  Also fixes unit reaction
path cost.

(lnd_path): Fix confusing message: don't claim there's no path when
all we really know is that there's no railway.

17 years agoPath finding for trains never worked; it ignored the need for rail:
Markus Armbruster [Sun, 4 Jun 2006 17:27:17 +0000 (17:27 +0000)]
Path finding for trains never worked; it ignored the need for rail:
(sector_mcost, bp_neighbors): Fix for MOB_RAIL and sct_rail == 0.
Closes #781528.

17 years ago(BestDistPath): All callers pass MOB_ROAD to parameter mob_type,
Markus Armbruster [Sun, 4 Jun 2006 16:49:24 +0000 (16:49 +0000)]
(BestDistPath): All callers pass MOB_ROAD to parameter mob_type,
remove it.  Callers changed.

17 years ago(P_WALKING): Unused, remove.
Markus Armbruster [Sun, 4 Jun 2006 16:42:36 +0000 (16:42 +0000)]
(P_WALKING): Unused, remove.
(getpath): Remove P_WALKING case.

17 years agoExplain why not to edit configs in-place.
Markus Armbruster [Sun, 4 Jun 2006 12:27:10 +0000 (12:27 +0000)]
Explain why not to edit configs in-place.

17 years ago(ichr, pchr, dchr, intrchr): Move initializer to new builtin config
Markus Armbruster [Sun, 4 Jun 2006 09:34:39 +0000 (09:34 +0000)]
(ichr, pchr, dchr, intrchr): Move initializer to new builtin config
files item.config, product.config, sect.config, infra.config.
(empfile): Declare the new config files.  Reorder table entries so
that read_builtin_tables() reads the config files in the right order.

(bigcity_dchr, opt_BIG_CITY, init_dchr): Remove.  Deities can edit
sect.config instead.

17 years agoFix the previous revision.
Markus Armbruster [Sun, 4 Jun 2006 09:01:51 +0000 (09:01 +0000)]
Fix the previous revision.

17 years agoDon't check values for immutable fields match when initializing an
Markus Armbruster [Sun, 4 Jun 2006 08:37:37 +0000 (08:37 +0000)]
Don't check values for immutable fields match when initializing an
empty table:
(initialized): New.
(xundump): Set it.
(fldval_must_match): Ignore NSC_CONST when it's clear.

17 years agoFix rev. 1.11.
Markus Armbruster [Sun, 4 Jun 2006 08:33:03 +0000 (08:33 +0000)]
Fix rev. 1.11.

17 years agoFix the revision before previous.
Markus Armbruster [Sun, 4 Jun 2006 08:26:12 +0000 (08:26 +0000)]
Fix the revision before previous.

17 years agoComments, whitespace.
Markus Armbruster [Fri, 2 Jun 2006 05:49:29 +0000 (05:49 +0000)]
Comments, whitespace.

17 years agoFix the previous revision.
Markus Armbruster [Fri, 2 Jun 2006 05:43:31 +0000 (05:43 +0000)]
Fix the previous revision.

17 years ago(pchrstr, pchr_ca, pchr, sctstr, dchr_ca, dchr): Replace pchrstr
Markus Armbruster [Fri, 2 Jun 2006 05:35:54 +0000 (05:35 +0000)]
(pchrstr, pchr_ca, pchr, sctstr, dchr_ca, dchr): Replace pchrstr
member p_effic by sctstr member d_peffic.  Tables updated.
(show_sect_capab): Adapted.
(prod_eff): Adapted; requires changing first parameter to sector type.
Callers changed.
(P_MDUST): Remove, because pchr[P_MDUST] now identical to
pchr[P_DUST].

17 years agoAllow symbolic references not just to symbol tables:
Markus Armbruster [Thu, 1 Jun 2006 19:15:30 +0000 (19:15 +0000)]
Allow symbolic references not just to symbol tables:
(xunsymbol1): Use ef_elt_byname().
(setsym): Accept any table reference, not just to symbol table.
(symval): New.
(setsym, add2symset): Use it.
(mtsymset): Last remaining user of getsymtab(); inline and simplify.
(getsymtab): Remove.

(xunsymbol1, xunsymbol): Rename.

17 years ago(xunsymbol1): Fix diagnostics.
Markus Armbruster [Thu, 1 Jun 2006 19:06:56 +0000 (19:06 +0000)]
(xunsymbol1): Fix diagnostics.

17 years agoFix the previous revision.
Markus Armbruster [Thu, 1 Jun 2006 18:57:42 +0000 (18:57 +0000)]
Fix the previous revision.

17 years ago(buil): Use ef_elt_byname() instead of typematch().
Markus Armbruster [Thu, 1 Jun 2006 18:57:03 +0000 (18:57 +0000)]
(buil): Use ef_elt_byname() instead of typematch().
(typematch): Unused, remove.

17 years agoSymbolic names for table entries in conditionals, closes #928376:
Markus Armbruster [Thu, 1 Jun 2006 18:48:42 +0000 (18:48 +0000)]
Symbolic names for table entries in conditionals, closes #928376:
(ef_elt_byname): New.
(nstr_match_val): Use it to generalize to arbitrary table with
uniquely named elements.  Use ca_type to find table, remove parameter
type.  Callers changed.
(nstr_mkselval): Adapt sanity check accordingly.
(NSC_TYPEID): No longer needed, remove, users changed to use
appropriate integer type instead.  This fixes signedness of sector
selectors des and newdes.
(meta_type): Remove entry for NSC_TYPEID.
(nstr_coerce_val): Can't detect typeid - integer mismatch anymore.
Was nice to have; perhaps revive it later.

17 years ago(getid): Restrict identifier syntax: outlaw conditional operators <>=#
Markus Armbruster [Thu, 1 Jun 2006 18:09:40 +0000 (18:09 +0000)]
(getid): Restrict identifier syntax: outlaw conditional operators <>=#
and meta-character ".

17 years ago(xufld, setstr): Improve diagnostics.
Markus Armbruster [Thu, 1 Jun 2006 18:06:03 +0000 (18:06 +0000)]
(xufld, setstr): Improve diagnostics.

17 years ago(prexpense, budg): Printing brackets around expenses that won't
Markus Armbruster [Thu, 1 Jun 2006 17:42:59 +0000 (17:42 +0000)]
(prexpense, budg): Printing brackets around expenses that won't
actually be paid in full didn't take the update sequence into account,
and wasn't implemented for sector building, military payroll and
capital maintenance.  Remove the feature, as fixing is hardly worth
the trouble.  This renders prexpense() trivial; inline and remove.

17 years ago(update_main): Change update sequence to repair ships, planes and land
Markus Armbruster [Thu, 1 Jun 2006 16:54:00 +0000 (16:54 +0000)]
(update_main): Change update sequence to repair ships, planes and land
units after sectors produce.  This makes repairs use new avail instead
of old.

17 years ago(land, nuke, plan, shi): Change stop prefix to `!'. Explain it in the
Markus Armbruster [Thu, 1 Jun 2006 16:29:54 +0000 (16:29 +0000)]
(land, nuke, plan, shi): Change stop prefix to `!'.  Explain it in the
footer when actually present.

17 years ago(lnd_support): Let land units on missions support, just like ships.
Markus Armbruster [Wed, 31 May 2006 19:58:16 +0000 (19:58 +0000)]
(lnd_support): Let land units on missions support, just like ships.

17 years ago(att_reacting_units): Don't let units loaded on a train react.
Markus Armbruster [Wed, 31 May 2006 19:56:02 +0000 (19:56 +0000)]
(att_reacting_units): Don't let units loaded on a train react.

17 years agoUpdate known contributors comment.
Markus Armbruster [Mon, 29 May 2006 21:23:33 +0000 (21:23 +0000)]
Update known contributors comment.

17 years agoFix the previous revision.
Markus Armbruster [Mon, 29 May 2006 21:20:09 +0000 (21:20 +0000)]
Fix the previous revision.

17 years agoLet players stop/start units:
Markus Armbruster [Mon, 29 May 2006 21:11:14 +0000 (21:11 +0000)]
Let players stop/start units:
(genitem, lndstr, nukstr, plnstr, shpstr): New members off, lnd_off,
nuk_off, pln_off, shp_off.
(NSC_GENITEM): New selector off.
(land, nuke, plan, shi): Display efficiency prefixed by `=' when off.
(start, stop, player_coms): Rewrite, new syntax.  Print only objects
that actually change.
(start_hdr, stop_hdr, start_stop_hdr): Consolidate.
(item_u, start_stop, start_stop_sector, proff, start_stop_unit)
(start_stop_unit_hdr, unit_type_name): New.
(upd_land, upd_plane, planerepair, upd_ship): Obey and clear stoppage.

17 years agoRemove budget priorities:
Markus Armbruster [Mon, 29 May 2006 20:43:30 +0000 (20:43 +0000)]
Remove budget priorities:
(budg, player_coms): Remove command arguments.
(PRI_SMAINT, PRI_PMAINT, PRI_LMAINT, PRI_SBUILD, PRI_PBUILD)
(PRI_LBUILD, PRI_MAX): Remove.
(natstr): Remove member nat_priorities.
(add, main): Remove its initialization.
(budg, cal_call, prexpense, prod, update_main, upd_land, upd_plane)
(upd_buildeff, produce_sect, upd_ship): Simplify.
(produce_sect): Last parameter now superflous, remove & simplify.
(change_prio, do_prod): Unused, remove.

(budg): Move land units output down, to match update sequence.

17 years agoUpdate for current code, and edited for clarity.
Markus Armbruster [Mon, 29 May 2006 20:06:34 +0000 (20:06 +0000)]
Update for current code, and edited for clarity.