Commit graph

1423 commits

Author SHA1 Message Date
db0773145d Fix the previous rev. 2005-03-19 17:04:20 +00:00
17f8ffee1b (produce): When player->simulation, level production executed item
production code for item I_NONE.  This tries to put products into
vec[I_NONE].  Until item.h rev. 1.12, vec[I_NONE] was unused and zero,
so it worked.  Since then, it's a subscript out of bounds, clobbering
two bytes of stack.  The (unpredictable) stack contents could make the
code believe that there's not enough space for the `products', which
then reduced predicted production, typically to zero.
2005-03-19 16:50:22 +00:00
ab509c22ef (guerrilla): Fix saturation of civilians (new in rev. 1.9). It
created anti-uw, which made the next checksect() oops.
2005-03-19 15:57:41 +00:00
96e380e909 (_c_copyright_header, _ipglob_copyright_header, copyright_header):
_c_copyright_header and _ipglob_copyright_header are almost identical.
Replace by copyright_header, interpolate variable parts with printf.

(wrmakesrc, wrauth, wrgamesdef): Make generated file comments match
our usual style a bit more closely.

(wrgamesdef): Fix generated comment on overwrite.
2005-03-18 20:51:39 +00:00
a6f1944384 Update to match current prod.c. 2005-03-18 20:09:53 +00:00
df476395fb Update for 4.2.20. 2005-03-17 21:49:59 +00:00
b1f973faed Indentation fix. 2005-03-17 21:47:42 +00:00
56c4551f8b Get version from version.h. 2005-03-17 19:33:50 +00:00
Marc Olzheim
e60594ac89 Update patch to contain proper headers of file versions. 2005-03-17 10:11:11 +00:00
b0e0c1b321 (prod): New column avail'. Narrow column will make' (amount and
short product name) to `make' (amount and, if product is an item,
product mnemonic).
2005-03-16 22:12:31 +00:00
345ad3dfe0 Update copyright notice. 2005-03-16 22:03:16 +00:00
90e1ac57df Fix the previous rev. 2005-03-16 20:57:21 +00:00
147cf97224 (main): Rev. 1.43 broke option -D. Its meaning in presence of -e is
unclear.  Other programs only support -e.  Remove -D.
(install_service): Remove argument datadir_set.

(main): New option -v.

(main): Exit successfully after -h.

(main): Don't print usage on unknown options, just point to -h.

(print_usage): Rewrite.  Deprecate use of non-option arguments.
2005-03-16 20:53:27 +00:00
3939741d65 (main): Fix -p to imply -d as documented, not just !daemonize.
(main): -s no longer implies -p.
(main) [_WIN32]: Recognize -s.  ntthread.c ignores it.
2005-03-16 18:41:44 +00:00
a6b5b1d567 (lwpStatus): Fix potential buffer overflow. 2005-03-16 18:08:39 +00:00
75deff7811 (lwpInitSystem): Stack checking doesn't work and is not necessary for
main thread; clear LWP_STACKCHECK.
(lwpStackCheck): Log stack overflow/underflow and abort.
2005-03-16 18:06:03 +00:00
Marc Olzheim
06c326fc5f Remove useless cast. No funtional changes. 2005-03-16 09:13:48 +00:00
9e08f17fd3 Fix comment line breaks. 2005-03-16 07:19:07 +00:00
750884dbc7 Fix the previous rev. 2005-03-16 06:27:15 +00:00
Ron Koenderink
c38a64d3a9 (loc_Ctrl_C_Handler,loc_Exit_Handler) [_WIN32]: Process other
exit methods in the same way as ctrl-c.  Change loc_Ctrl_C_Handler()
to loc_Exit_Handler() to reflect changed functionality.
2005-03-16 02:39:51 +00:00
Ron Koenderink
1af2a6fc8b (main) [_WIN32]: Remove second break from -i option. 2005-03-16 02:01:34 +00:00
Ron Koenderink
706e124e82 (main) [_WIN32]: Add check to command line checks to ensure
-p is not used with install or remove sevice options.

(main) [_WIN32]: Improve error messages for errors found
duing the command line checks.
2005-03-16 01:51:22 +00:00
Marc Olzheim
6a99690e4e Get rid of "s_char", "register" and 0 used instead of NULL in the
client source.  No functional changes.
2005-03-15 21:47:41 +00:00
Marc Olzheim
3e7d57a8c9 Get rid of "s_char" in the client source. No functional changes. 2005-03-15 21:43:39 +00:00
c95fcc7dfb (shutdwn): Rev. 1.51 broke the Linux pthread hack. It is unclear what
this hack is trying to achieve.  It never worked without -d, because
mainpid got assigned the wrong pid.  It doesn't make sense with recent
versions of Linux pthreads, which use the same PID for all threads, as
required by POSIX.  Remove.  Closes #1161397.
2005-03-15 20:58:00 +00:00
Marc Olzheim
b0671aa5f9 Get rid of "s_char". No functional changes. 2005-03-15 20:24:50 +00:00
Marc Olzheim
061e269d37 Add a pre_update_hook default in src/lib/global/constants.c, so that
we won't have to patch the econfig file later on.
2005-03-15 19:58:41 +00:00
Marc Olzheim
3ce3380829 Note that patches could influence each other. 2005-03-15 19:49:07 +00:00
Marc Olzheim
a0fca37ce1 Get rid of "s_char". No functional changes. 2005-03-15 18:59:24 +00:00
Ron Koenderink
6245ed4b73 (run_hook): Add fflush(NULL) to flush the stdio files before
starting the backup.
2005-03-15 18:23:21 +00:00
Ron Koenderink
9227a314c5 (service_stoppped,stop_service,loc_Ctrl_C_Handler,
empth_request_shutdown,loc_BlockMainThread,empth_init,
service_ctrl_handler) [_WIN32]: Remove the Windows Build UI and
replace with Ctrl-c signal trap.  The shutdown event that was used for
STOPPING the service is now used for both foreground and background
(service) modes of operation. Also move the shutdown event from service
code to empth_t library.
2005-03-15 18:19:07 +00:00
Marc Olzheim
d8938a1605 Don't try running 'cvs co' more than 5 times, since it might be a local
problem as well.  Document NIGHTLY_SKIP_STEP=PATCH.  Update to the currently
running script.
2005-03-15 18:05:16 +00:00
Marc Olzheim
c890dd759c Update for markus's prng patches. 2005-03-15 17:58:33 +00:00
Ron Koenderink
1bbd7e5342 (main,print_usage) [_WIN32]: Add the ability to enable
empire thread debugging for Windows build.

(empth_select) [_WIN32]: Fix empth_select() so can be aborted.
The bug was that a command would not be aborted during an update.
The problem was select() was not interrupt by the setting of the
signalling wakeup event.  Fix by replacing the select() with
WSAEventSelect().

(empth_exit) [_WIN32]:
Fix the shutdown sequence for Windows build to be running in
empth_t context.  Add a loc_RunThisThread() in empth_exit()
before starting the shutdown() sequence.
2005-03-13 21:53:23 +00:00
Ron Koenderink
1f9b34dfdd (log_error) [_WIN32]: Remove ; from the #define for vsnprintf.
This part of the for changes to logerror().
2005-03-12 19:33:18 +00:00
6b68f73ca8 Doc fix. 2005-03-12 18:06:31 +00:00
2c21e731f1 Remove files that no longer exist, add missing files, fix filenames. 2005-03-12 18:03:02 +00:00
c47cc38215 Don't suggest to run make in the background. 2005-03-12 18:01:05 +00:00
60baf257fb Remove advice on stuff that vanished from the distribution years ago. 2005-03-12 17:59:57 +00:00
Ron Koenderink
157395fcb2 (log_error) [_WIN32]: Add #define for vsnprintf to pick up
_vsnprintf from the WIN32 library for changes to logerror().

(main) [_WIN32]: Add typedef for pid_t to match WIN32 definition
for getpid().  This is required for the create_pidfile() changes.
2005-03-12 17:52:29 +00:00
63d8684cd0 Fix the previous rev. 2005-03-12 17:34:11 +00:00
8169a0a031 A backup script for pre_update_hook. 2005-03-12 17:31:55 +00:00
7d71984932 (pre_update_hook): New configuration key.
(update_wait): Implement it.
(run_hook): New.
2005-03-12 17:24:57 +00:00
f12649c3da Write pid file, like a good daemon. Thanks to Daniel O'Connor for the
initial patch.
(create_pidfile, pidfname): New.
(start_server): Create pid file.
(finish_server): Remove pid file.

(main) [__linux__ && _EMPTH_POSIX]: Don't hack pid into argv[0].
Recent versions of Linux pthreads no longer show multiple PIDs, and
deities can get the PID fro the pid file anyway.
2005-03-12 16:45:43 +00:00
3f472fc729 (finish_server): New, factored out of termination code. Fixes two
places in service_main() that lacked close_files().
(close_files, loc_NTTerm): Static linkage.
2005-03-12 16:28:28 +00:00
Ron Koenderink
b915edd13c (start_server) [_WIN32]: Put #ifndef _WIN32 around act.
This was missed with the [!POSIXSIGNALS]: changes.
2005-03-12 16:10:49 +00:00
0595ff4d4e Indentation fixes. 2005-03-12 15:05:23 +00:00
d8daa5f67d (init_server, start_server): Move start log message to start_server(),
where it belongs.
2005-03-12 15:04:37 +00:00
7eb2fe571e (logerror): Log to stderr as well. Fix potential buffer overflows.
(oops): Let logerror() supply the newline.
2005-03-12 15:03:31 +00:00
8f40f5ad6d [DO_EFF_MEM_CHECKING]: Dead for some ten years. Bury. 2005-03-12 13:40:24 +00:00