]> git.pond.sub.org Git - empserver/log
empserver
16 years ago(execute): Use player->comtail[1] instead of player->argp[1]. This
Markus Armbruster [Sun, 25 Nov 2007 14:06:53 +0000 (14:06 +0000)]
(execute): Use player->comtail[1] instead of player->argp[1].  This
makes execute send everything after the command back to the client
verbatim, not just the first argument (with quotes and funny
characters stripped).  The client always expected that, and got
confused when the server sent something else.

16 years agoRecord raw arguments, to be used in the next changesets:
Markus Armbruster [Sun, 25 Nov 2007 13:55:52 +0000 (13:55 +0000)]
Record raw arguments, to be used in the next changesets:
(player): New member comtail.
(parse): New parameter tail.  Reorder parameter list.
(command, execute): Pass player->comtail.
(player_login, emp_config, do_unit_move): Pass NULL.  No functional
change.

16 years ago(set_fert): Limit fertility to 100 instead of 120, like the other
Ron Koenderink [Sat, 24 Nov 2007 02:08:19 +0000 (02:08 +0000)]
(set_fert): Limit fertility to 100 instead of 120, like the other
resources

16 years ago(resnoise): Remove the % from the change message for setsect().
Ron Koenderink [Sat, 24 Nov 2007 00:25:11 +0000 (00:25 +0000)]
(resnoise): Remove the % from the change message for setsect().
Percent does not make sense for most of the values that can be
changed.

16 years ago(M_XLIGHT, M_CHOPPER): Redundant, remove.
Markus Armbruster [Fri, 23 Nov 2007 18:50:46 +0000 (18:50 +0000)]
(M_XLIGHT, M_CHOPPER): Redundant, remove.
(init_mchr): Don't set them.
(carrier_planes): Use m_nxlight, m_nchoppers instead.

16 years ago(take_plane_off_land): Fix stupid pasto in assertion.
Markus Armbruster [Fri, 23 Nov 2007 18:39:31 +0000 (18:39 +0000)]
(take_plane_off_land): Fix stupid pasto in assertion.

16 years ago(getilist): Use pln_airbase_ok(). This fixes a number of bugs: planes
Markus Armbruster [Fri, 23 Nov 2007 18:38:10 +0000 (18:38 +0000)]
(getilist): Use pln_airbase_ok().  This fixes a number of bugs: planes
stuck in foreign bases, on inefficient ships or land units, or land
units loaded on ships or land units could still intercept.
(can_fly): Remove.

16 years ago(getilist): Remove bogus fuel check. It was inconsistent with the one
Markus Armbruster [Fri, 23 Nov 2007 18:23:06 +0000 (18:23 +0000)]
(getilist): Remove bogus fuel check.  It was inconsistent with the one
in mission_pln_equip(), which is called from ac_intercept().  The
inconsistency appeared in Empire3, and had no ill effect then.  But
rev. 1.42 screwed up the fuel test here: it made interceptors that
don't use fuel (SAMs) require petrol to be present to fly.

16 years ago(setsector): Limit fertility to 100 instead of 120, like the other
Ron Koenderink [Fri, 23 Nov 2007 13:24:18 +0000 (13:24 +0000)]
(setsector): Limit fertility to 100 instead of 120, like the other
resources

16 years ago(carrier_planes): New parameter msl.
Markus Armbruster [Thu, 22 Nov 2007 19:33:14 +0000 (19:33 +0000)]
(carrier_planes): New parameter msl.
(carriersatxy, pln_onewaymission): Pass zero.  No functional change.
(pln_airbase_ok): Pass whether the plane is a missile.  This fixes
non-x-light missiles on ships without capability M_FLY.  Broken in
rev. 1.76.  Launch and interdict weren't affected.  Air defense was,
but the stock game has only x-light SAMs.

16 years ago(nav_ship): Move the special autofeed code to a separate
Ron Koenderink [Thu, 22 Nov 2007 12:57:00 +0000 (12:57 +0000)]
(nav_ship): Move the special autofeed code to a separate
function nav_load_ship_at_sea().
(nav_load_ship_at_sea): New code. Generalize the autofeed to
support ships with M_OIL.

16 years ago(nav_ship): Await fish only in water, not just any unowned sector.
Ron Koenderink [Thu, 22 Nov 2007 03:46:23 +0000 (03:46 +0000)]
(nav_ship): Await fish only in water, not just any unowned sector.

16 years ago(pln_sel): Remove unused local variables.
Ron Koenderink [Thu, 22 Nov 2007 03:21:27 +0000 (03:21 +0000)]
(pln_sel): Remove unused local variables.

16 years ago(sendmessage): Internal linkage.
Markus Armbruster [Sun, 18 Nov 2007 11:58:30 +0000 (11:58 +0000)]
(sendmessage): Internal linkage.

16 years agoExplain briefly why clients may not support execute.
Markus Armbruster [Sun, 18 Nov 2007 11:57:34 +0000 (11:57 +0000)]
Explain briefly why clients may not support execute.

16 years ago(play): Continue after input read error, treating it like EOF. This
Markus Armbruster [Sun, 18 Nov 2007 09:51:16 +0000 (09:51 +0000)]
(play): Continue after input read error, treating it like EOF.  This
fixes error handling when a script can be opened but not read: it
switches back to standard input.  And it handles errors on standard
input more gracefully: orderly shutdown, buffered output is still
written out.

16 years agoFix redirections with execute. Redirection consumed the remembered
Markus Armbruster [Sun, 18 Nov 2007 09:41:59 +0000 (09:41 +0000)]
Fix redirections with execute.  Redirection consumed the remembered
input, and execute couldn't find it and mistakenly raised the
tampering deity alarm.  Closes #804644:
(saved_bytes): New.
(save_input): Set it.
(forget_input): New.
(seen_input): Don't discard, return a value for forget_input().
(save_input): Return a value for forget_input(), just because it makes
sense.
(input_to_forget, redir_authorized, prompt): Save value of
seen_input() to new input_to_forget in redir_authorized(), pass it to
forget_input() in prompt().

16 years ago(redir_authorized): New, factored out of users in prepraration of next
Markus Armbruster [Sun, 18 Nov 2007 09:32:16 +0000 (09:32 +0000)]
(redir_authorized): New, factored out of users in prepraration of next
changeset.
(doredir, dopipe, doexecute): Use it.

16 years ago(save_input, seen_input): Assert argument ends with a newline.
Markus Armbruster [Sun, 18 Nov 2007 09:17:49 +0000 (09:17 +0000)]
(save_input, seen_input): Assert argument ends with a newline.

16 years agoRemove extraneous declaration that crept into the previous revision.
Markus Armbruster [Sun, 18 Nov 2007 08:18:55 +0000 (08:18 +0000)]
Remove extraneous declaration that crept into the previous revision.

16 years ago(ring_discard): Tighten assertion.
Markus Armbruster [Sun, 18 Nov 2007 08:17:33 +0000 (08:17 +0000)]
(ring_discard): Tighten assertion.

16 years ago(doexecute): Fix to set input_fd on failure, so that play() terminates
Markus Armbruster [Sat, 17 Nov 2007 18:57:06 +0000 (18:57 +0000)]
(doexecute): Fix to set input_fd on failure, so that play() terminates
the execute correctly.  Closes #723756.

16 years ago(path): Fix to print every step of the path not every second step of the path.
Ron Koenderink [Sat, 17 Nov 2007 17:05:48 +0000 (17:05 +0000)]
(path): Fix to print every step of the path not every second step of the path.
Broken in rev. 1.10.

16 years agoDoc fix.
Markus Armbruster [Sat, 17 Nov 2007 16:52:07 +0000 (16:52 +0000)]
Doc fix.

16 years ago(parse): Simplify. No functional change.
Markus Armbruster [Sat, 17 Nov 2007 16:48:01 +0000 (16:48 +0000)]
(parse): Simplify.  No functional change.

16 years ago(doredir): Open the file with mode 0666 instead of 0600, for
Markus Armbruster [Sat, 17 Nov 2007 14:36:03 +0000 (14:36 +0000)]
(doredir): Open the file with mode 0666 instead of 0600, for
consistency with redirections in pipes.  Users should use umask to
restrict permissions.

16 years agoRewrite much of client's playing phase code:
Markus Armbruster [Sat, 17 Nov 2007 14:17:38 +0000 (14:17 +0000)]
Rewrite much of client's playing phase code:
(EOF_COOKIE, INTR_COOKIE, input_fd, send_intr, recv_output)
(recv_input, intr, play): New playing phase code.  No native Windows
support yet.  Sends just one EOF cookie on EOF on standard input
instead of up to three.  Old servers (before recvclient.c rev. 1.16)
fail to terminate the session when they receive an EOF cookie at an
argument prompt.  The session then hangs; use SIGINT to get out.  No
longer blocks on sending input, which could deadlock the session.
Closes #827090.  Fixes error handling for select().  Fixes race
condition that could cause server output to be discarded on EOF on
standard input.
(main): Replace old playing phase code by a call to play().
(intr, sock, interrupt, handleintr): Replaced by play(), remove.
[_WIN32] (hStdIn): Ditto.
(auxfp): New.
(servercmd, prompt, doexecute): Remove parameter auxfi, use auxfp.
(eight_bit_clean): Move to servcmd.c.
(servercmd): Work on a single non-C_DATA line instead of getting lines
from an ioqueue.
(servercmd, output, screen, outch): Deal with all ids in servercmd()
rather than some there and some in output().  Don't treat C_NOECHO,
C_ABORT, C_CMDERR, C_BADCMD specially.  Fix C_FLASH and C_EXIT to
ignore redirections; they used to ignore them only for some parts.
Replace output() by outch(), fold screen into outch().
(servercmd): Truncate long prompts and telegram infos to prevent
buffer overflow.
(prompt): Use new parameters code, prompt, teles instead of global
variables mode, the_prompt, num_teles.
(num_teles, the_prompt, mode, nbtu, nmin): Remove.
(prompt): Don't write an empty line before argument prompts to auxfp.
(servercmd): Don't strip newline from redirections and execute,
doredir(), dopipe() and doexecute() need it now.
(doredir, dopipe, doexecute): Use new seen_input() instead of gettag().
(doexecute): Set input_fd and leave reading the script file to play().
(serverio, termio, sendeof): Replaced by play(), remove.
(LBUF_LEN_MAX, lbuf, lbuf_init, lbuf_len, lbuf_full, lbuf_line)
(lbuf_putc): New.
(RING_SIZE, ring, ring_init, ring_len, ring_space, ring_peek)
(ring_getc, ring_putc, ring_putm, ring_discard, ring_search)
(ring_from_file, ring_to_file): New.
(clear_recent_input, save_input, seen_input): New.
(MAX): New.
(ioqueue, io, ioq_init, ioq_dequeue, ioq_read, ioq_write, ioq_qsize)
(ioq_drain, ioq_gets, ioqtobuf, enqueuecc, dequeuecc): Unused, remove.
(QEMPTY, qelem, insque, remque, initque): Unused, remove.
(tagstruct, taglist, io_init, gettag): Unused, remove.

16 years ago(main): Don't bother to close socket before exit().
Markus Armbruster [Sat, 17 Nov 2007 10:17:00 +0000 (10:17 +0000)]
(main): Don't bother to close socket before exit().

16 years ago(doexecute): Use fname(). Simplify convoluted logic. Fix check for
Markus Armbruster [Sat, 17 Nov 2007 09:41:16 +0000 (09:41 +0000)]
(doexecute): Use fname().  Simplify convoluted logic.  Fix check for
empty argument.  Improve error messages.

16 years ago(main): Fix rev. 1.43.
Markus Armbruster [Sat, 17 Nov 2007 09:38:06 +0000 (09:38 +0000)]
(main): Fix rev. 1.43.

16 years ago(dopipe): Check whether argument starts with '|'. Simplify convoluted
Markus Armbruster [Sat, 17 Nov 2007 09:10:29 +0000 (09:10 +0000)]
(dopipe): Check whether argument starts with '|'.  Simplify convoluted
logic.  Improve error messages.

16 years ago(fname): New.
Markus Armbruster [Sat, 17 Nov 2007 09:08:57 +0000 (09:08 +0000)]
(fname): New.
(doredir): Use it.  Check whether argument starts with '>'.  Simplify
convoluted logic.  Improve error messages.  Check value of fdopen().

16 years ago(main) [_WIN32]: Don't call WSAStartup() until after option
Markus Armbruster [Sat, 17 Nov 2007 08:07:30 +0000 (08:07 +0000)]
(main) [_WIN32]: Don't call WSAStartup() until after option
processing, so that we can version and help even when it fails.  Fix
program exit status on failure.

16 years agoBelatedly update standalone build for last night's changeset:
Markus Armbruster [Sat, 17 Nov 2007 07:04:36 +0000 (07:04 +0000)]
Belatedly update standalone build for last night's changeset:
(main): Rewrite argument parsing to use getopt().  New options -h and
-v.
(print_usage): New.

16 years ago(main): Rewrite argument parsing to use getopt(). New options -h and
Markus Armbruster [Fri, 16 Nov 2007 20:33:08 +0000 (20:33 +0000)]
(main): Rewrite argument parsing to use getopt().  New options -h and
-v.
(print_usage): New.

16 years ago(saveargv): Lame attempt at protecting users who foolishly specify
Markus Armbruster [Fri, 16 Nov 2007 20:27:09 +0000 (20:27 +0000)]
(saveargv): Lame attempt at protecting users who foolishly specify
passwords on the command line.  Antisocially zaps the complete command
line, not just the password.  Remove, at least for now.
(main): Update accordingly.

16 years ago(install): Be a bit more verbose about the update of econfig.
Markus Armbruster [Fri, 16 Nov 2007 19:23:30 +0000 (19:23 +0000)]
(install): Be a bit more verbose about the update of econfig.

(uninstall): Point to the unremoved configuration directory, not just
to econfig.

16 years ago(journal_entry): Flush journal if debug is on.
Markus Armbruster [Thu, 15 Nov 2007 19:46:04 +0000 (19:46 +0000)]
(journal_entry): Flush journal if debug is on.

16 years ago(lnd_count): Remove unused local variable.
Markus Armbruster [Thu, 15 Nov 2007 19:43:41 +0000 (19:43 +0000)]
(lnd_count): Remove unused local variable.

16 years ago(load_plane_ship, load_land_ship, load_plane_land, load_land_land):
Markus Armbruster [Thu, 15 Nov 2007 19:42:28 +0000 (19:42 +0000)]
(load_plane_ship, load_land_ship, load_plane_land, load_land_land):
isdigit() can return anything, not just 0 or 1, and you can't combine
its values with &=!  The bug could make loading operations fail
noisily instead of silently, depending on the system's implementation
of isdigit().

16 years ago(pinflak_planedamage): Printed extra '%' since rev. 1.40, fix.
Markus Armbruster [Thu, 15 Nov 2007 19:31:00 +0000 (19:31 +0000)]
(pinflak_planedamage): Printed extra '%' since rev. 1.40, fix.

16 years agoShut down session on receipt of "ctld\n" even when reading arguments:
Markus Armbruster [Thu, 15 Nov 2007 19:10:04 +0000 (19:10 +0000)]
Shut down session on receipt of "ctld\n" even when reading arguments:
(player): New member eof.
(recvclient): Return -1 without receiving input when it is set.  Set
it on receipt of "ctld\n".
(execute): Clear it after receiving the script.

16 years ago(execute): Prompted for a missing argument, but then passed a null
Markus Armbruster [Thu, 15 Nov 2007 19:03:27 +0000 (19:03 +0000)]
(execute): Prompted for a missing argument, but then passed a null
pointer to prexec() instead.  Some systems (GNU, Windows) deal
gracefully with printing null strings, others crash.

16 years agoIf the directory already exists, the failing script cleans it up.
Markus Armbruster [Thu, 15 Nov 2007 07:15:05 +0000 (07:15 +0000)]
If the directory already exists, the failing script cleans it up.
Oops.  Create it before setting the cleanup trap.

16 years ago(tarball): Fix missing -e required by shell script.
Markus Armbruster [Thu, 15 Nov 2007 07:11:15 +0000 (07:11 +0000)]
(tarball): Fix missing -e required by shell script.

16 years agoFix the test scripts for the players for the new world -R 1 for fairland
Ron Koenderink [Mon, 12 Nov 2007 20:08:15 +0000 (20:08 +0000)]
Fix the test scripts for the players for the new world -R 1 for fairland
and for -R 1 for the server.  Cleanup the shell selection for the current builds
and the push the shell fixes to the config files.  Add PATCH and
CVSROOT environment variables to add flexibility.  Add the changes for
the new autoconf build and remove build.conf and makedepend.
Swiitch All patch to use the source code All patches.
Fix the spelling of sandbox.

16 years ago(carriersatxy): Remove parameters wantflags, nowantflags, and use
Markus Armbruster [Sun, 4 Nov 2007 16:05:06 +0000 (16:05 +0000)]
(carriersatxy): Remove parameters wantflags, nowantflags, and use
carrier_planes() instead, ignoring carriers that can only operate
x-light planes.  No functional change.
(carrier_planes): External linkage.

16 years ago(carrier_planes): New.
Markus Armbruster [Sun, 4 Nov 2007 15:07:43 +0000 (15:07 +0000)]
(carrier_planes): New.
(pln_onewaymission): Use it.  No functional change.
(pln_airbase_ok): Use it to enforce capabilities.  Before, a plane
could fly once it got on the ship.  Because ships can load only planes
that can fly from them, this has no effect other than make that sanity
check redundant; remove it.

(pln_airbase_ok): Update land unit case to keep it similar to the ship
case.

16 years ago(pln_airbase_ok): New parameter noisy to allow suppressing messages.
Markus Armbruster [Sat, 3 Nov 2007 09:29:45 +0000 (09:29 +0000)]
(pln_airbase_ok): New parameter noisy to allow suppressing messages.
Check player->cnum only when noisy.  Update existing caller to pass 1.
No functional change.

(mission_pln_airbase_ok): Remove, use pln_airbase_ok() instead.  No
functional change.

16 years agoComment and white-space cleanup.
Markus Armbruster [Sat, 3 Nov 2007 08:57:05 +0000 (08:57 +0000)]
Comment and white-space cleanup.

16 years ago(pln_airbase_ok): Check pp->pln_own instead of player->cnum, in
Markus Armbruster [Sat, 3 Nov 2007 08:53:21 +0000 (08:53 +0000)]
(pln_airbase_ok): Check pp->pln_own instead of player->cnum, in
preparation of replacing mission_pln_airbase_ok().  No functional
change.

16 years ago(pln_airbase_ok): Plug information leak: carrier owner was checked
Markus Armbruster [Sat, 3 Nov 2007 08:20:54 +0000 (08:20 +0000)]
(pln_airbase_ok): Plug information leak: carrier owner was checked
last, so when it was (no longer) allied, attempting to fly off it let
you test the conditions checked before that.  Check owner first.
(mission_pln_airbase_ok): Matching change, to avoid diverging from
pln_airbase_ok().

16 years ago(pln_airbase_ok, mission_pln_airbase_ok): Oops when plane's carrier is
Markus Armbruster [Sat, 3 Nov 2007 08:09:38 +0000 (08:09 +0000)]
(pln_airbase_ok, mission_pln_airbase_ok): Oops when plane's carrier is
bad.  Before, the plane was destroyed, and the player got a message.

(pln_airbase_ok, mission_pln_airbase_ok): Oops when plane's base
sector is bad.

(pln_airbase_ok): Oops when the player doesn't own the plane.  Before,
this was checked only for planes on carriers, and the plane was
destroyed, and the player got a misleading message.

16 years ago(pln_airbase_ok, mission_pln_airbase_ok): Simplify conditional. Don't
Markus Armbruster [Sat, 3 Nov 2007 07:52:50 +0000 (07:52 +0000)]
(pln_airbase_ok, mission_pln_airbase_ok): Simplify conditional.  Don't
check a land carrier when the plane is already on a ship.

16 years ago(mission_pln_airbase_ok): New, factored out of mission_pln_sel(). No
Markus Armbruster [Fri, 2 Nov 2007 19:39:26 +0000 (19:39 +0000)]
(mission_pln_airbase_ok): New, factored out of mission_pln_sel().  No
functional change.

16 years ago(pln_airbase_ok): New, factored out of pln_sel(). No functional
Markus Armbruster [Fri, 2 Nov 2007 19:39:06 +0000 (19:39 +0000)]
(pln_airbase_ok): New, factored out of pln_sel().  No functional
change.

16 years ago(pln_wanted, pln_capable): Rename.
Markus Armbruster [Fri, 2 Nov 2007 19:13:10 +0000 (19:13 +0000)]
(pln_wanted, pln_capable): Rename.

16 years ago(mission_pln_wanted): Broken like its cousin pln_wanted() was, only
Markus Armbruster [Thu, 1 Nov 2007 19:50:37 +0000 (19:50 +0000)]
(mission_pln_wanted): Broken like its cousin pln_wanted() was, only
more so: additionally, any of P_E, P_K, P_L satisfied any subset of
P_E, P_K, P_L.  Chainsaw fixed this one in plnsub.c, but not here.
Remove, use the fixed pln_wanted() instead.
(pln_wanted): External linkage.

16 years ago(pln_wanted): Rewrite. Old version was incomprehensible, slow and
Markus Armbruster [Thu, 1 Nov 2007 19:16:29 +0000 (19:16 +0000)]
(pln_wanted): Rewrite.  Old version was incomprehensible, slow and
buggy: any P_E, P_L, P_K in wantflags were ignored when the plane
lacked P_ESC.  The bug bit only when non-escort interceptors escorted
a one-way mission to a carrier.  pln_oneway_to_carrier_ok() then could
not fit the plane on the carrier, and the command failed complaining
about lack of room on the carrier.  Broken since Chainsaw added
escorts, abusable before 4.2.17 catched it.  Also change behavior when
only one of P_F and P_ESC is in wantflags: new version requires that
flag, while old version treats it as if both flags were in wantflags:
a plane having either is okay.  Current code never passes such
wantflags.

16 years ago(mission_pln_wanted): New, factored out of mission_pln_sel(). No
Markus Armbruster [Thu, 1 Nov 2007 16:59:02 +0000 (16:59 +0000)]
(mission_pln_wanted): New, factored out of mission_pln_sel().  No
functional change.

16 years ago(pln_wanted): New, factored out of pln_sel(). No functional change.
Markus Armbruster [Thu, 1 Nov 2007 16:54:02 +0000 (16:54 +0000)]
(pln_wanted): New, factored out of pln_sel().  No functional change.

16 years ago(fit_plane_on_ship, fit_plane_off_ship): Change how planes are fit on
Markus Armbruster [Thu, 1 Nov 2007 11:59:28 +0000 (11:59 +0000)]
(fit_plane_on_ship, fit_plane_off_ship): Change how planes are fit on
ships, so that order of loading no longer matters: choppers can use
chopper or plane slots, x-lights can use x-light or plane slots, light
planes can use plane slots.  However, plane slots require M_FLY or
M_MSL to hold missiles or x-lights, and M_FLY to hold anything else.
Choppers and x-lights can now use plane slots even when not light.
X-light choppers, which don't exist in the stock game, can no longer
use x-light slots.

16 years ago(could_be_on_ship): Fix rev. 1.61.
Markus Armbruster [Thu, 1 Nov 2007 10:15:54 +0000 (10:15 +0000)]
(could_be_on_ship): Fix rev. 1.61.

16 years ago(load_plane_ship): Use load limits instead of flags to test whether a
Markus Armbruster [Thu, 1 Nov 2007 07:29:38 +0000 (07:29 +0000)]
(load_plane_ship): Use load limits instead of flags to test whether a
ship type can load planes.

16 years ago(fit_plane_on_ship, fit_plane_off_ship): Don't require M_CHOPPER for
Markus Armbruster [Thu, 1 Nov 2007 07:25:21 +0000 (07:25 +0000)]
(fit_plane_on_ship, fit_plane_off_ship): Don't require M_CHOPPER for
use of chopper slot.  Same for M_XLIGHT and x-light slot.  No
functional change, because presence of slots implies the flags (see
init_mchr()).

16 years ago(could_be_on_ship): Not consistent with fit_plane_on_ship(). Fix by
Markus Armbruster [Thu, 1 Nov 2007 06:35:50 +0000 (06:35 +0000)]
(could_be_on_ship): Not consistent with fit_plane_on_ship().  Fix by
using that.  Less efficient, but that doesn't really matter here.

16 years ago(can_be_on_ship, could_be_on_ship): Take pointer rather than UID
Markus Armbruster [Wed, 31 Oct 2007 06:39:37 +0000 (06:39 +0000)]
(can_be_on_ship, could_be_on_ship): Take pointer rather than UID
arguments.  Rename.  Callers changed.

16 years agoCollect the test whether a plane fits on a carrier in one place:
Markus Armbruster [Tue, 30 Oct 2007 07:09:31 +0000 (07:09 +0000)]
Collect the test whether a plane fits on a carrier in one place:
(fit_plane_on_ship, fit_plane_on_land): New.
(pln_oneway_to_carrier_ok, put_plane_on_ship, count_planes)
(put_plane_on_land, count_land_planes): Use them.  No functional
change.
(fit_plane_off_ship, fit_plane_off_land): New.
(take_plane_off_ship, take_plane_off_land): Use them.  This oopses
when the carriers plane counter underflows.

(take_plane_off_ship): Document that carrier's plane counters may be
screwed up.

(take_plane_off_ship, take_plane_off_land): Oops when the plane isn't
on the carrier.

(take_plane_off_ship, take_plane_off_land): Don't fail when the plane
to be taken off can't go on this type of carrier, just take it off.
No error condition left, so return void.  Callers couldn't do anything
useful with the status anyway, and most didn't bother.  Change those
that did.

16 years ago(__set_errno): Switch to _MSC_VER define instead of HAVE__SET_ERRNO
Ron Koenderink [Mon, 29 Oct 2007 13:25:05 +0000 (13:25 +0000)]
(__set_errno): Switch to _MSC_VER define instead of HAVE__SET_ERRNO
define.

(int32_t) [_WIN32]: Remove commented define..

16 years ago(show_bridge, show_tower, show_ship_stats): Simplify, no functional
Markus Armbruster [Sun, 28 Oct 2007 07:41:39 +0000 (07:41 +0000)]
(show_bridge, show_tower, show_ship_stats): Simplify, no functional
change.

16 years ago(ef_init_srv): Rev. 1.27 set NSC_CONST in all nat_ca[] instead of
Markus Armbruster [Sat, 27 Oct 2007 17:07:09 +0000 (17:07 +0000)]
(ef_init_srv): Rev. 1.27 set NSC_CONST in all nat_ca[] instead of
cou_ca[] as before.  Fix by not setting it at all.

16 years ago(recvline): Simplify parsing out output ids. Also tighten sanity
Markus Armbruster [Sat, 27 Oct 2007 16:21:26 +0000 (16:21 +0000)]
(recvline): Simplify parsing out output ids.  Also tighten sanity
check some.

16 years ago(load): Fix misleading message that assumed that only SCT_CAPIT
Markus Armbruster [Sat, 27 Oct 2007 16:13:50 +0000 (16:13 +0000)]
(load): Fix misleading message that assumed that only SCT_CAPIT
sectors can be canals.

16 years ago(dispatch): Oops on bad command return value. Log RET_SYS more
Markus Armbruster [Sat, 27 Oct 2007 16:06:06 +0000 (16:06 +0000)]
(dispatch): Oops on bad command return value.  Log RET_SYS more
clearly.

16 years agoKeep log open, rotate it just like the journal:
Markus Armbruster [Sat, 27 Oct 2007 15:49:45 +0000 (15:49 +0000)]
Keep log open, rotate it just like the journal:
(logfd, logopen): New.
(loginit): Set logfd, return success.
(logerror): Use logfd.
(logreopen): New.
(relo, main): Use it.

16 years ago(typed_wu) [_WIN32]: Remove special case, just use writev().
Markus Armbruster [Sat, 27 Oct 2007 14:40:10 +0000 (14:40 +0000)]
(typed_wu) [_WIN32]: Remove special case, just use writev().

16 years ago(__set_errno) [_WIN32]: Remove CR.
Ron Koenderink [Thu, 25 Oct 2007 03:13:18 +0000 (03:13 +0000)]
(__set_errno) [_WIN32]: Remove CR.

16 years ago(__set_errno) [_WIN32]: Add macro for __set_errno() for MinGW as it
Ron Koenderink [Thu, 25 Oct 2007 01:45:51 +0000 (01:45 +0000)]
(__set_errno) [_WIN32]: Add macro for __set_errno() for MinGW as it
does not have a _set_errno().

16 years ago(__setstate) [_WIN32]: Make the function prototype match the
Ron Koenderink [Tue, 23 Oct 2007 03:10:55 +0000 (03:10 +0000)]
(__setstate) [_WIN32]: Make the function prototype match the
function declaration.

16 years ago(main, init_server, emp_server.6): Add -R command line option to set
Ron Koenderink [Tue, 23 Oct 2007 03:05:56 +0000 (03:05 +0000)]
(main, init_server, emp_server.6): Add -R command line option to set
a seed for the random function.

(nightlybuild.sh): Add the -R 1 for the server.
(nightlybuild.sh): Switch to -R 1 for the fairland as 1 is safer.
Some systems might generate lousy randomness from a
zero seed.

(prng.patch): Not required anymore, -R 1 is used instead.

(main, emp_server.6): Rename -r and -R to -u and -U.  "-R" is now used for random seed.

16 years ago(random, srandom) [_WIN32]: Provide random and srandom
Ron Koenderink [Sun, 21 Oct 2007 15:34:27 +0000 (15:34 +0000)]
(random, srandom) [_WIN32]: Provide random and srandom
POSIX equivalents instead of using the WIN32 rand/srand functions.
The files were derived from GNU libc source.

(empth_threadMain) [_WIN32]: Remove the srandom() as the
POSIX equivalent are not thread specific as the WIN32 functions were.

16 years agoUpdate patch for pr.c:1.41
Ron Koenderink [Sun, 21 Oct 2007 15:12:49 +0000 (15:12 +0000)]
Update patch for pr.c:1.41

16 years agoUpdate patch for constants.c:1.40
Ron Koenderink [Sun, 21 Oct 2007 15:12:25 +0000 (15:12 +0000)]
Update patch for constants.c:1.40

16 years ago(empth_sleep) [_WIN32]: Remove a change to the random seeding
Ron Koenderink [Sat, 20 Oct 2007 12:59:49 +0000 (12:59 +0000)]
(empth_sleep) [_WIN32]: Remove a change to the random seeding
that accidently got committed in rev 1.65.  Was incorrect in rev 1.66.

(empth_sleep) [_WIN32]: Switch srand() to srandom() to be consistent
with the rest of the empire code.

16 years ago(empth_sleep) [_WIN32]: Remove a change to the random seeding
Ron Koenderink [Sat, 20 Oct 2007 12:15:45 +0000 (12:15 +0000)]
(empth_sleep) [_WIN32]: Remove a change to the random seeding
that accidently got committed in rev 1.65.

16 years ago(empth_sleep) [_WIN32]: Ensure the thread does not waking up early.
Ron Koenderink [Sat, 20 Oct 2007 11:51:50 +0000 (11:51 +0000)]
(empth_sleep) [_WIN32]: Ensure the thread does not waking up early.
It has been seen which caused an update to be missed.

16 years ago(empth_sleep) [_WIN32]: Change if to while to ensure the time has
Ron Koenderink [Sun, 30 Sep 2007 15:39:48 +0000 (15:39 +0000)]
(empth_sleep) [_WIN32]: Change if to while to ensure the time has
actually been reached.  There has been examples where the time
expired early by one second probably due a resolution error.  This
caused a scheduled update to be missed.  Broken in rev. 1.56.

16 years ago(upda): Add linefeed to the 'Please use "show updates".' line.
Ron Koenderink [Sun, 30 Sep 2007 15:31:05 +0000 (15:31 +0000)]
(upda): Add linefeed to the 'Please use "show updates".' line.

16 years agoFix how tech is factored into power. Broken in 1.31 and almost fixed
Ron Koenderink [Thu, 20 Sep 2007 02:48:52 +0000 (02:48 +0000)]
Fix how tech is factored into power.  Broken in 1.31 and almost fixed
in 1.33.

16 years ago(distclean): Remove config.h and ipglob.c.
Markus Armbruster [Sun, 9 Sep 2007 10:56:46 +0000 (10:56 +0000)]
(distclean): Remove config.h and ipglob.c.

16 years agoBump version to 4.3.11.
Markus Armbruster [Sun, 9 Sep 2007 10:16:59 +0000 (10:16 +0000)]
Bump version to 4.3.11.

16 years ago(datarootdir): New; Autoconf 2.60 wants it. v4.3.10
Markus Armbruster [Thu, 6 Sep 2007 18:16:45 +0000 (18:16 +0000)]
(datarootdir): New; Autoconf 2.60 wants it.

16 years agoFinal polish for 4.3.10.
Markus Armbruster [Thu, 6 Sep 2007 18:02:57 +0000 (18:02 +0000)]
Final polish for 4.3.10.

16 years agoDoc fix.
Markus Armbruster [Thu, 6 Sep 2007 17:47:42 +0000 (17:47 +0000)]
Doc fix.

16 years agoClarify .NA.
Markus Armbruster [Thu, 6 Sep 2007 17:47:32 +0000 (17:47 +0000)]
Clarify .NA.

16 years ago4.3.10 late changes.
Markus Armbruster [Sun, 2 Sep 2007 18:05:09 +0000 (18:05 +0000)]
4.3.10 late changes.

16 years agoComments.
Markus Armbruster [Sun, 2 Sep 2007 18:01:15 +0000 (18:01 +0000)]
Comments.

16 years agoWhite-space fix.
Markus Armbruster [Sun, 2 Sep 2007 17:59:28 +0000 (17:59 +0000)]
White-space fix.

16 years agoRequire POSIX.1-2001 instead of SUSv2.
Markus Armbruster [Sun, 2 Sep 2007 17:58:25 +0000 (17:58 +0000)]
Require POSIX.1-2001 instead of SUSv2.

16 years ago(update_sched): The indefinite sleep when there's no scheduled update
Ron Koenderink [Sun, 2 Sep 2007 15:04:23 +0000 (15:04 +0000)]
(update_sched): The indefinite sleep when there's no scheduled update
went into a tight loop instead, freezing the server.