]> git.pond.sub.org Git - empserver/log
empserver
16 years ago(fltelemstr, fltheadstr): Move from ship.h to sail.c.
Markus Armbruster [Sat, 18 Aug 2007 13:48:15 +0000 (13:48 +0000)]
(fltelemstr, fltheadstr): Move from ship.h to sail.c.

16 years ago(exec_fd): Useless junk inherited all the way from BSD Empire 1.1.
Markus Armbruster [Sat, 18 Aug 2007 09:24:05 +0000 (09:24 +0000)]
(exec_fd): Useless junk inherited all the way from BSD Empire 1.1.
Remove.

16 years ago(setsockopt): Fix type of argument optval to conform to spec.
Markus Armbruster [Sat, 18 Aug 2007 07:00:16 +0000 (07:00 +0000)]
(setsockopt): Fix type of argument optval to conform to spec.

16 years agoAdd additional includes for compiling in MinGW.
Ron Koenderink [Fri, 17 Aug 2007 20:45:55 +0000 (20:45 +0000)]
Add additional includes for compiling in MinGW.

16 years agoSwitch the !__GNUC__ with _MSC_VER to be more reflective of the
Ron Koenderink [Fri, 17 Aug 2007 20:43:32 +0000 (20:43 +0000)]
Switch the !__GNUC__ with _MSC_VER to be more reflective of the
purpose.

(strptime) [_WIN32]: Add time.h for extern prototypes.

16 years ago(tcp_listen, posix_setsockopt) [_WIN32]: Move the special
Ron Koenderink [Fri, 17 Aug 2007 03:11:45 +0000 (03:11 +0000)]
(tcp_listen, posix_setsockopt) [_WIN32]: Move the special
SO_REUSEADDR code for _WIN32 from tcp_listen() to
posix_setsockopt().

[_WIN32] (posix_open): Switch to _sopen() for _sopen_s() as MinGW
does not support _sopen_s() yet.

[_WIN32] (posix_fd2socket): Fix typo.

16 years agoInclude sys/uio.h unconditionally.
Ron Koenderink [Fri, 17 Aug 2007 03:06:35 +0000 (03:06 +0000)]
Include sys/uio.h unconditionally.

16 years ago[_WIN32] (readv, writev, iovec): New. POSIX equivalents.
Ron Koenderink [Thu, 16 Aug 2007 21:43:20 +0000 (21:43 +0000)]
[_WIN32] (readv, writev, iovec): New.  POSIX equivalents.
(ioq_makeiov, ioqtoiov): Compile unconditionally.
(io_output): Use POSIX code unconditionally.
[_WIN32] (ioq_makebuf): Remove.

16 years agoBack out the previous revision and remove the include of sys/types.h
Markus Armbruster [Thu, 16 Aug 2007 10:41:30 +0000 (10:41 +0000)]
Back out the previous revision and remove the include of sys/types.h
instead.

16 years agoFor w32misc.h add the POSIX equivalent include file for each
Ron Koenderink [Thu, 16 Aug 2007 03:15:33 +0000 (03:15 +0000)]
For w32misc.h add the POSIX equivalent include file for each
declaration.

16 years ago(ssize_t, pid_t) [_WIN32]: Back out the previous revision of unistd.h
Ron Koenderink [Thu, 16 Aug 2007 03:03:22 +0000 (03:03 +0000)]
(ssize_t, pid_t) [_WIN32]: Back out the previous revision of unistd.h
and move to w32misc.h instead.  Belong into sys/types.h but we can't
fix system headers.

16 years agoInclude sys/uio.h unconditionally.
Ron Koenderink [Wed, 15 Aug 2007 02:46:08 +0000 (02:46 +0000)]
Include sys/uio.h unconditionally.

16 years ago[_WIN32] Provide POSIX-style sys/socket.h. Use it rather than
Ron Koenderink [Wed, 15 Aug 2007 02:40:53 +0000 (02:40 +0000)]
[_WIN32] Provide POSIX-style sys/socket.h.  Use it rather than
winsock2.h.

16 years ago[_WIN32]: Remove unnecessary <io.h> for WIN32.
Ron Koenderink [Wed, 15 Aug 2007 02:18:25 +0000 (02:18 +0000)]
[_WIN32]: Remove unnecessary <io.h> for WIN32.

16 years agoMove WIN32 equivalent function defines to w32/w32misc.h from misc.h.
Ron Koenderink [Wed, 15 Aug 2007 02:15:17 +0000 (02:15 +0000)]
Move WIN32 equivalent function defines to w32/w32misc.h from misc.h.
Move Microsoft C compiler warning to w32/w32misc.h from misc.h.

16 years ago(ssize_t, pid_t) [_WIN32]: Move from misc.h to POSIX's location
Ron Koenderink [Wed, 15 Aug 2007 01:48:40 +0000 (01:48 +0000)]
(ssize_t, pid_t) [_WIN32]: Move from misc.h to POSIX's location
in unistd.h.

16 years ago(serverio, sendoef) [_WIN32]: For WIN32 use closesocket() instead of
Ron Koenderink [Wed, 15 Aug 2007 01:18:48 +0000 (01:18 +0000)]
(serverio, sendoef) [_WIN32]: For WIN32 use closesocket() instead of
close() as close() is not valid for WIN32 sockets.

16 years agoCreate w32misc.h to contain information that does not fit in Windows
Ron Koenderink [Wed, 15 Aug 2007 01:16:26 +0000 (01:16 +0000)]
Create w32misc.h to contain information that does not fit in Windows
equivalent include file.
(strptime) [_WIN32]: Add extern for WIN32 equivalent for strptime().

16 years ago[_WIN32] (S_IRUSR, S_IWUSR, S_IXUSR, S_IRWXU, S_IRGRP, S_IWGRP)
Ron Koenderink [Tue, 14 Aug 2007 03:38:18 +0000 (03:38 +0000)]
[_WIN32] (S_IRUSR, S_IWUSR, S_IXUSR, S_IRWXU, S_IRGRP, S_IWGRP)
(S_IXGRP, S_IRWXG, S_IROTH, S_IWOTH, S_IXOTH, S_IRWXO): Move from
include/misc.h to new src/lib/w32/unistd.h.

16 years agoSimple POSIX I/O emulation layer to work around Windows's defective
Ron Koenderink [Tue, 14 Aug 2007 03:33:28 +0000 (03:33 +0000)]
Simple POSIX I/O emulation layer to work around Windows's defective
Unix I/O:
[_WIN32] (socklen_t, accept, posix_accept, bind. posix_bind, listen)
(posix_listen, setsockopt, posix_setsockopt, shutdown, posix_shutdown)
(socket, posix_socket, close, posix_close, creat, fstat, posix_fstat)
(lseek, posix_lseek, open, posix_open, read, posix_read, write)
(posix_write, fileno, posix_fileno, fcntl, O_NONBLOCK, F_RDLCK)
(F_WRLCK, F_GETFL, F_SETFL, F_SETLK, EWOULDBLOCK, ENOTSOCK)
(flock, fsync, posix_fsync):
New.
(ef_open, io_close, io_input, io_output, io_shutdown, io_noblocking)
(player_accept): Use them to simplify.
[_WIN32] (posix_fd2socket): New.
(empth_select): Use it.
(gen_power): Use it.

16 years ago[_WIN32] (posix_mkdir): New.
Ron Koenderink [Tue, 14 Aug 2007 03:11:26 +0000 (03:11 +0000)]
[_WIN32] (posix_mkdir): New.
[_WIN32] (mkdir): Use it.  Last argument is no longer ignored, which
was a bug.  Move declaration to unistd.h, which isn't quite right, but
works for us.

16 years agoReal unistd.h declares getopt() & friends. Approximate that in
Ron Koenderink [Tue, 14 Aug 2007 00:15:21 +0000 (00:15 +0000)]
Real unistd.h declares getopt() & friends.  Approximate that in
src/lib/w32/unistd.h by including getopt.h.  Simplify users

16 years agoRemove bogus _WIN32 conditional.
Ron Koenderink [Sat, 11 Aug 2007 19:54:42 +0000 (19:54 +0000)]
Remove bogus _WIN32 conditional.

16 years agoNow compiled only for Windows, remove unnecessary #if.
Ron Koenderink [Sat, 11 Aug 2007 19:07:46 +0000 (19:07 +0000)]
Now compiled only for Windows, remove unnecessary #if.

16 years ago(strptime) [_WIN32]: Provide missing functionality from WIN32.
Ron Koenderink [Thu, 9 Aug 2007 03:44:52 +0000 (03:44 +0000)]
(strptime) [_WIN32]: Provide missing functionality from WIN32.
Source taken from FreeBSD.

16 years ago(info.html/all.html): Fix to use the full 80 columns for the table.
Markus Armbruster [Wed, 8 Aug 2007 06:15:33 +0000 (06:15 +0000)]
(info.html/all.html): Fix to use the full 80 columns for the table.

(info.nr/all): Fix race between ls and output redirection.

16 years agoMoving getopt.h to src/lib/w32/ broke the Windows build. Fix.
Markus Armbruster [Wed, 8 Aug 2007 05:27:49 +0000 (05:27 +0000)]
Moving getopt.h to src/lib/w32/ broke the Windows build.  Fix.

16 years ago(xufooter, xubody): Rename some variables. No functional change.
Markus Armbruster [Sun, 5 Aug 2007 18:58:36 +0000 (18:58 +0000)]
(xufooter, xubody): Rename some variables.  No functional change.

16 years ago(xundump): Use malloc() instead of calloc() for fldca and fldidx,
Markus Armbruster [Sun, 5 Aug 2007 18:52:16 +0000 (18:52 +0000)]
(xundump): Use malloc() instead of calloc() for fldca and fldidx,
because the used part of these arrays is explicitely initialized by
deffld().

16 years ago(xufld): Clarify.
Markus Armbruster [Sun, 5 Aug 2007 18:47:51 +0000 (18:47 +0000)]
(xufld): Clarify.

16 years ago(xufldname): Don't bother to catch ... in field 1, because the check
Markus Armbruster [Sun, 5 Aug 2007 18:46:04 +0000 (18:46 +0000)]
(xufldname): Don't bother to catch ... in field 1, because the check
for the required join field catches that.

16 years ago(defellipsis): Set ellipsis to 1 instead of field number, because all
Markus Armbruster [Sun, 5 Aug 2007 18:42:24 +0000 (18:42 +0000)]
(defellipsis): Set ellipsis to 1 instead of field number, because all
uses just compare to 0.  Parameter now unused, remove.  Caller
changed.

16 years agoFix fields checks for split tables:
Markus Armbruster [Sun, 5 Aug 2007 18:38:37 +0000 (18:38 +0000)]
Fix fields checks for split tables:
(caseen): Remove.
(xufldhdr, deffld): Record only fields in this part in caflds[].  This
fixes the check for duplicate fields in parts other than the first.
(cafldspp): New, to record fields in previous parts.
(xundump): Initialize and finalize it.
(xufooter): Update it.  Requires new parameter ca.  Caller changed.
(fldval_must_match): Use it to do the right thing for split arrays.
(chkflds): Adapt for changed caflds[].
(chkflds): The check for missing fields was skipped for all parts of a
split table instead of for all but the final part.

16 years ago(xufldhdr): ellipsis wasn't cleared for machine-readable input. This
Markus Armbruster [Sun, 5 Aug 2007 18:23:09 +0000 (18:23 +0000)]
(xufldhdr): ellipsis wasn't cleared for machine-readable input.  This
broke reading machine-readable input after reading a split table
failed before seeing the last part.  Luckily, callers never tried
that.

16 years ago(xutail): Remove parameter type. Use cur_type instead. Caller
Markus Armbruster [Sun, 5 Aug 2007 17:36:01 +0000 (17:36 +0000)]
(xutail): Remove parameter type.  Use cur_type instead.  Caller
changed.

16 years ago(getobj, setnum): Move override of cur_id from getobj() to setnum().
Markus Armbruster [Sun, 5 Aug 2007 17:34:24 +0000 (17:34 +0000)]
(getobj, setnum): Move override of cur_id from getobj() to setnum().
Remove the now unused parameters of getobj().  Callers changed.

16 years ago(xuheader1, xufldhdr, xutrailer, xufooter, xundump2, xutail)
Markus Armbruster [Sun, 5 Aug 2007 17:25:01 +0000 (17:25 +0000)]
(xuheader1, xufldhdr, xutrailer, xufooter, xundump2, xutail)
(xundump1, xubody): Rename.

16 years ago(xundump1, xundump2): Move call of xutrailer() from xundump1() to its
Markus Armbruster [Sun, 5 Aug 2007 17:19:52 +0000 (17:19 +0000)]
(xundump1, xundump2): Move call of xutrailer() from xundump1() to its
caller xundump2().  Make xundump1() return number of records read for
that.

16 years ago(xundump1): Remove parameter type. Use cur_type instead. Caller
Markus Armbruster [Sun, 5 Aug 2007 17:05:22 +0000 (17:05 +0000)]
(xundump1): Remove parameter type.  Use cur_type instead.  Caller
changed.

16 years ago(xuheader1, xutrailer, xundump1): Remove unused parameters. Callers
Markus Armbruster [Sun, 5 Aug 2007 17:03:07 +0000 (17:03 +0000)]
(xuheader1, xutrailer, xundump1): Remove unused parameters.  Callers
changed.

16 years ago(xundump): Count lines in a saner way: pass line number in and out.
Markus Armbruster [Sun, 5 Aug 2007 16:22:41 +0000 (16:22 +0000)]
(xundump): Count lines in a saner way: pass line number in and out.
Callers changed.

16 years agoNew home for stuff specific to Windows: src/lib/w32/
Markus Armbruster [Sat, 4 Aug 2007 05:23:39 +0000 (05:23 +0000)]
New home for stuff specific to Windows: src/lib/w32/
Move getopt.c getopt.h service.c from src/lib/gen/ there.
(lib/libw32.a): New.
(libs): Add it under Windows.

16 years ago(gamedir): Not all programs treat relative names the same. Document
Markus Armbruster [Fri, 3 Aug 2007 04:44:54 +0000 (04:44 +0000)]
(gamedir): Not all programs treat relative names the same.  Document
the lossage.

16 years agoDoc fix.
Markus Armbruster [Fri, 3 Aug 2007 04:06:18 +0000 (04:06 +0000)]
Doc fix.

16 years ago(bmaps_intersect): Simplify. No functional change.
Markus Armbruster [Fri, 3 Aug 2007 04:05:04 +0000 (04:05 +0000)]
(bmaps_intersect): Simplify.  No functional change.

16 years ago(fmttime2822) [_WIN32]: Replace localtime_s() with localtime().
Ron Koenderink [Fri, 3 Aug 2007 01:47:02 +0000 (01:47 +0000)]
(fmttime2822) [_WIN32]: Replace localtime_s() with localtime().
Replace _snprintf_s() with _snprintf().  These secure functions are
not supported by MinGW yet.

16 years ago(main): Use the same initial anchor as the server.
Markus Armbruster [Wed, 1 Aug 2007 18:23:51 +0000 (18:23 +0000)]
(main): Use the same initial anchor as the server.

(main): Exit unsuccessfully when read_schedule() fails.

16 years agoFix include missing since misc.h rev. 1.69.
Markus Armbruster [Wed, 1 Aug 2007 05:30:37 +0000 (05:30 +0000)]
Fix include missing since misc.h rev. 1.69.

16 years ago(ef_open): Leaked file descriptor when fcntl() failed.
Markus Armbruster [Tue, 31 Jul 2007 05:03:25 +0000 (05:03 +0000)]
(ef_open): Leaked file descriptor when fcntl() failed.

16 years ago(new): Simplify. No functional change.
Markus Armbruster [Tue, 31 Jul 2007 05:01:46 +0000 (05:01 +0000)]
(new): Simplify.  No functional change.

16 years agoDoc fix.
Markus Armbruster [Tue, 31 Jul 2007 04:57:07 +0000 (04:57 +0000)]
Doc fix.

16 years ago(upda): Remove unused local variable fp.
Ron Koenderink [Sun, 29 Jul 2007 16:57:36 +0000 (16:57 +0000)]
(upda): Remove unused local variable fp.

16 years ago(fl_sct_init, write_sects, file_sct_init, main): Do not initialize
Markus Armbruster [Sun, 29 Jul 2007 13:40:47 +0000 (13:40 +0000)]
(fl_sct_init, write_sects, file_sct_init, main): Do not initialize
sector and realm timestamps to current time.  It's not useful, and it
facilitates attacks against the PRNG.  This backs out fairland.c
rev. 1.27 and files.c rev. 1.31 and partly backs out files.c
rev. 1.38.

16 years ago(subst.in): Polish substitution of @configure_input@.
Markus Armbruster [Sat, 28 Jul 2007 19:33:35 +0000 (19:33 +0000)]
(subst.in): Polish substitution of @configure_input@.

16 years ago(disablefil): Remove, belatedly (unused since optlist.h rev. 1.46).
Markus Armbruster [Sat, 28 Jul 2007 19:31:30 +0000 (19:31 +0000)]
(disablefil): Remove, belatedly (unused since optlist.h rev. 1.46).

16 years ago(datarootdir): New; Autoconf 2.60 wants it.
Markus Armbruster [Sat, 28 Jul 2007 19:18:41 +0000 (19:18 +0000)]
(datarootdir): New; Autoconf 2.60 wants it.

16 years agoRemove the ancient, crufty non-UCONTEXT system-dependent LWP code.
Markus Armbruster [Sat, 28 Jul 2007 13:58:58 +0000 (13:58 +0000)]
Remove the ancient, crufty non-UCONTEXT system-dependent LWP code.
Using it required manual hackery since 4.3.0, and it hasn't been
missed.

16 years agoUpdate from http://autoconf-archive.cryp.to/
Markus Armbruster [Sat, 28 Jul 2007 13:09:00 +0000 (13:09 +0000)]
Update from http://autoconf-archive.cryp.to/

16 years ago(bp_ref): Use XYOFFSET(). Old code used only every other slot.
Markus Armbruster [Sat, 28 Jul 2007 12:16:50 +0000 (12:16 +0000)]
(bp_ref): Use XYOFFSET().  Old code used only every other slot.
(bp_alloc): Use WORLD_SZ().  Allocates only half as much.

16 years ago(WORLD_SZ): New.
Markus Armbruster [Sat, 28 Jul 2007 12:12:17 +0000 (12:12 +0000)]
(WORLD_SZ): New.
(isok, ef_init, bmaps_intersect, bp_init, player_accept)
(finish_sects, main): Use it.

(bp_neighbors, bp_lbcost, pathcost): Use XYOFFSET().  No
functional change.

16 years ago(nav_map): Remove unused bitmap and its initialization.
Markus Armbruster [Sat, 28 Jul 2007 07:23:59 +0000 (07:23 +0000)]
(nav_map): Remove unused bitmap and its initialization.

16 years ago(sctoff): Oops on bad arguments. Recovery by returning -1 seems
Markus Armbruster [Sat, 28 Jul 2007 07:08:45 +0000 (07:08 +0000)]
(sctoff): Oops on bad arguments.  Recovery by returning -1 seems
dangerous.  Not touching that now.

(sctoff): Use XYOFFSET().  No functional change.

16 years ago(XYOFFSET): Returned twice the value it should.
Markus Armbruster [Sat, 28 Jul 2007 07:06:55 +0000 (07:06 +0000)]
(XYOFFSET): Returned twice the value it should.
(finish_sects): Allocated twice as much space as needed, to make it
work with the broken XYOFFSET().

16 years ago(empth_wait_for_signal) [EMPTH_W32]: Fix to return SIGTERM.
Markus Armbruster [Fri, 27 Jul 2007 20:30:11 +0000 (20:30 +0000)]
(empth_wait_for_signal) [EMPTH_W32]: Fix to return SIGTERM.

16 years ago(add): Plug file descriptor leak.
Markus Armbruster [Fri, 27 Jul 2007 20:23:47 +0000 (20:23 +0000)]
(add): Plug file descriptor leak.

16 years agoUpdate known contributors comment.
Markus Armbruster [Fri, 27 Jul 2007 20:16:19 +0000 (20:16 +0000)]
Update known contributors comment.

16 years agoSpelling fix.
Markus Armbruster [Fri, 27 Jul 2007 19:13:13 +0000 (19:13 +0000)]
Spelling fix.

16 years agoUpdate AUTHORS.
Markus Armbruster [Fri, 27 Jul 2007 19:12:32 +0000 (19:12 +0000)]
Update AUTHORS.

16 years agoComment.
Markus Armbruster [Fri, 27 Jul 2007 19:10:39 +0000 (19:10 +0000)]
Comment.

16 years ago(main): Initialize game_turn to one instead of zero.
Markus Armbruster [Fri, 27 Jul 2007 18:23:03 +0000 (18:23 +0000)]
(main): Initialize game_turn to one instead of zero.

16 years ago(VIS, SANCT, NORM, GOD, CAP, MONEY): Move from nat.h to player.h.
Markus Armbruster [Fri, 27 Jul 2007 17:50:09 +0000 (17:50 +0000)]
(VIS, SANCT, NORM, GOD, CAP, MONEY): Move from nat.h to player.h.

(PS_LOGIN): Unused, remove.

16 years agoFix the previous revision.
Markus Armbruster [Fri, 27 Jul 2007 17:43:13 +0000 (17:43 +0000)]
Fix the previous revision.

16 years agoupdates_disabled() moved to game.h, include it.
Markus Armbruster [Fri, 27 Jul 2007 17:29:55 +0000 (17:29 +0000)]
updates_disabled() moved to game.h, include it.

16 years agoStore update disable flag in the game table to make it visible in
Markus Armbruster [Fri, 27 Jul 2007 05:58:40 +0000 (05:58 +0000)]
Store update disable flag in the game table to make it visible in
xdump:
(gamestr): New member game_upd_disable.
(game_ca): Update accordingly.
(game_ctrl_update): New.
(disa, enab): Use it.
(updates_disabled): Rewrite and move to game.c
(disablefil): Remove.

16 years ago(parse_time): Fix for arguments describing a time when DST is in
Markus Armbruster [Fri, 27 Jul 2007 04:26:20 +0000 (04:26 +0000)]
(parse_time): Fix for arguments describing a time when DST is in
effect.

16 years agoFix the previous revision.
Ron Koenderink [Thu, 26 Jul 2007 02:00:49 +0000 (02:00 +0000)]
Fix the previous revision.

16 years ago(fmttime2822): Changed return type for strftime() to size_t.
Ron Koenderink [Thu, 26 Jul 2007 01:59:32 +0000 (01:59 +0000)]
(fmttime2822): Changed return type for strftime() to size_t.

(fmttime2822) [_WIN32]: %T is not support option for strftime in WIN32
replaced with %H:%M:%S.  Replaced %z in with +/-???? format for WIN32
as the default for WIN32 is the text description for timezone.

16 years agoFix the previous revision.
Markus Armbruster [Wed, 25 Jul 2007 19:35:09 +0000 (19:35 +0000)]
Fix the previous revision.

16 years ago(player_kill_idle): Don't kill hung player threads. That code was
Markus Armbruster [Wed, 25 Jul 2007 06:10:10 +0000 (06:10 +0000)]
(player_kill_idle): Don't kill hung player threads.  That code was
flawed.  Firstly, when player_kill_idle() ran before the player thread
could react to being aborted by update or shutdown, player_kill_idle()
incorrectly diagnosed it as hung.  Secondly, terminating hung threads
leaks resources and can leave a stale play_lock behind.  It could
perhaps even corrupt game state.  It might salvage some scenarios, but
makes others worse.  Not worth it.

16 years agoRemove the concept of thread priorities from empthread.h. Only LWP
Markus Armbruster [Tue, 24 Jul 2007 05:13:31 +0000 (05:13 +0000)]
Remove the concept of thread priorities from empthread.h.  Only LWP
supports priorities.  Update synchronization used to rely on them,
which naturally worked only with LWP (#1504036).  With that fixed, no
uses of priorities remained, but a minor bug did: players could starve
out threads with priorities below PP_PLAYER, i.e. delete_lostitems()
and player_kill_idle().  Closes #1458175:
(empth_create): Remove parameter prio.  Callers changed.  Also gets
rid of misleading comments in pthread.c and ntthread.c.
(PP_MAIN, PP_UPDATE, PP_SHUTDOWN, PP_SCHED, PP_TIMESTAMP, PP_PLAYER)
(PP_ACCEPT, PP_KILLIDLE): Remove.
(empth_init, empth_create) [EMPTH_LWP]: Pass priority 1.

16 years agoComment.
Markus Armbruster [Tue, 24 Jul 2007 04:10:44 +0000 (04:10 +0000)]
Comment.

16 years ago(dispatch): Set player->command before acquiring play_lock, to make
Markus Armbruster [Sun, 22 Jul 2007 17:23:34 +0000 (17:23 +0000)]
(dispatch): Set player->command before acquiring play_lock, to make
sure the command is reliably aborted on update and shutdown.  Before,
redirection output could block while player->command was still null,
letting players delay the update or shutdown indefinitely.

16 years ago(dispatch): Rwlocks can hand out read locks while a write lock is
Markus Armbruster [Sun, 22 Jul 2007 17:06:00 +0000 (17:06 +0000)]
(dispatch): Rwlocks can hand out read locks while a write lock is
wanted.  Unfair to writers, but possible.  This lets commands run with
!player->aborted, which can then block on input and thus let players
delay the update or shutdown indefinitely.  Avoid by spinning until
the update is done.

16 years ago(set_paths) [_WIN32]: Add a comment to explain the use of _fullpath().
Ron Koenderink [Sat, 21 Jul 2007 00:50:32 +0000 (00:50 +0000)]
(set_paths) [_WIN32]: Add a comment to explain the use of _fullpath().

16 years ago(shutdwn): Failed to set play_wrlock_wanted. This let player threads
Markus Armbruster [Fri, 20 Jul 2007 19:49:42 +0000 (19:49 +0000)]
(shutdwn): Failed to set play_wrlock_wanted.  This let player threads
block on output, which could delay shutdown indefinitely.

16 years ago(update_lock, play_lock, update_pending, play_wrlock_wanted): Move to
Markus Armbruster [Fri, 20 Jul 2007 19:09:34 +0000 (19:09 +0000)]
(update_lock, play_lock, update_pending, play_wrlock_wanted): Move to
main.c and rename to better reflect their purpose.  Fix misleading
comments.

16 years agoLWP failed to wake up threads sleeping in empth_sleep() while other
Markus Armbruster [Fri, 20 Jul 2007 18:12:03 +0000 (18:12 +0000)]
LWP failed to wake up threads sleeping in empth_sleep() while other
threads were runnable.  This let players with a sufficiently fast
connection starve out system threads, including the update.  Fix:
[EMPTH_LWP] (lwpWakeupSleep): External linkage.
[EMPTH_LWP] (lwpReschedule): Call it.

16 years ago(UPDATE_TIME_LEN): New.
Ron Koenderink [Thu, 19 Jul 2007 21:58:05 +0000 (21:58 +0000)]
(UPDATE_TIME_LEN): New.
(update_time): Define with size to make MSVC happy.

16 years ago(main): Fix rev. 1.52.
Markus Armbruster [Thu, 19 Jul 2007 16:39:51 +0000 (16:39 +0000)]
(main): Fix rev. 1.52.

16 years ago(force): Remove unused local variable.
Ron Koenderink [Thu, 19 Jul 2007 01:15:15 +0000 (01:15 +0000)]
(force): Remove unused local variable.

16 years agoNew xdump updates:
Markus Armbruster [Wed, 18 Jul 2007 06:16:33 +0000 (06:16 +0000)]
New xdump updates:
(EF_UPDATES, update_ca): New.
(empfile): Add it.
(update_time): Move to src/lib/global/updtime.c.

16 years ago(update_running): New.
Markus Armbruster [Tue, 17 Jul 2007 06:13:14 +0000 (06:13 +0000)]
(update_running): New.
(update_run): Set it.

Replace incorrect uses of update_pending by update_running, fixing
buggy behavior while the update was trying to gain control:
(sct_do_upd_mob, shp_do_upd_mob, lnd_do_upd_mob, pln_do_upd_mob):
MOB_ACCESS mobility update was skipped.
(telegram_is_new): Fix recognition of new telegrams by timestamp.
(wu): Bulletins got misfiled as production reports.
(shp_nav): Sail path got ignored.
(setrel): Declaration of war failed silently with SLOW_WAR enabled.
Messages got suppressed.
(PR, mpr): Messages got misdirected to bulletins.

16 years ago(util): Add empsched, belatedly.
Markus Armbruster [Mon, 16 Jul 2007 19:39:23 +0000 (19:39 +0000)]
(util): Add empsched, belatedly.

16 years agoFix fallout from misc.h rev. 1.69.
Markus Armbruster [Mon, 16 Jul 2007 19:38:04 +0000 (19:38 +0000)]
Fix fallout from misc.h rev. 1.69.

16 years ago(status): Simplify conditional for the "lost your capital" message.
Markus Armbruster [Sun, 15 Jul 2007 16:15:03 +0000 (16:15 +0000)]
(status): Simplify conditional for the "lost your capital" message.

(player): No uses of member visitor left, remove.

16 years agoNew command show updates:
Markus Armbruster [Sun, 15 Jul 2007 13:34:22 +0000 (13:34 +0000)]
New command show updates:
(show): New sub-command.
(player_coms): Update its c_form.
(show_updates, fmttime2822): New.

(vers): Show game_days and game_hours.

(upda): Mark obsolete and point to show updates.
(vers): Point to show rather than update.

Rewrite much of info zdone.

16 years ago(show): Print tech level later, when we're done prompting for
Markus Armbruster [Sun, 15 Jul 2007 13:22:37 +0000 (13:22 +0000)]
(show): Print tech level later, when we're done prompting for
arguments.  This also prints it only for units, when it's relevant.

16 years agoFix .SA.
Markus Armbruster [Sun, 15 Jul 2007 12:36:35 +0000 (12:36 +0000)]
Fix .SA.

16 years agoUpdate example to current output.
Markus Armbruster [Sun, 15 Jul 2007 12:32:48 +0000 (12:32 +0000)]
Update example to current output.

16 years agoDescribe the effect on the Empire clock.
Markus Armbruster [Sun, 15 Jul 2007 12:05:43 +0000 (12:05 +0000)]
Describe the effect on the Empire clock.

Warn against manual disable/enable and point to the schedule file.