]> git.pond.sub.org Git - empserver/log
empserver
19 years agoDocument Windows usage. Since this is useless and confusing on other v4.2.20
Markus Armbruster [Fri, 25 Mar 2005 08:45:41 +0000 (08:45 +0000)]
Document Windows usage.  Since this is useless and confusing on other
platforms, it is only included in if number register w is non-zero.

19 years agoRewrite.
Markus Armbruster [Fri, 25 Mar 2005 08:34:51 +0000 (08:34 +0000)]
Rewrite.

19 years agoMore 4.2.20 changes.
Markus Armbruster [Tue, 22 Mar 2005 21:10:44 +0000 (21:10 +0000)]
More 4.2.20 changes.

19 years agoRemove .UC; we're not be part of BSD.
Markus Armbruster [Tue, 22 Mar 2005 20:56:41 +0000 (20:56 +0000)]
Remove .UC; we're not be part of BSD.

19 years ago(lnd_mar_one_sector): When units in different sectors march, only
Markus Armbruster [Tue, 22 Mar 2005 20:49:54 +0000 (20:49 +0000)]
(lnd_mar_one_sector): When units in different sectors march, only
units in the sector with the highest-numbered unit were interdicted.
A marching non-spy made all marching spies visible to interdiction
regardless of location.  Interdict sector by sector, similar to
shp_nav_one_sector().  Interdict spies only if they are together with
non-spies in the same sector.

19 years ago(shp_nav_one_sector): When shp_interdict() removed the second ship in
Markus Armbruster [Mon, 21 Mar 2005 21:05:08 +0000 (21:05 +0000)]
(shp_nav_one_sector): When shp_interdict() removed the second ship in
a sector, interdiction loop followed dangling pointer and crashed.
Simplify & fix.
(mlist): Member done no longer used, remove.

19 years agoFix the previous rev.
Markus Armbruster [Mon, 21 Mar 2005 19:31:46 +0000 (19:31 +0000)]
Fix the previous rev.

19 years ago[_WIN32]: Add #define WIN32 whereever winsock2.h is used. There is bug
Ron Koenderink [Sun, 20 Mar 2005 11:07:45 +0000 (11:07 +0000)]
[_WIN32]: Add #define WIN32 whereever winsock2.h is used. There is bug
in the VC7 version of winsock2.h.  In version VC7, the #pragma
pack(push) and pack(pop) have an #ifdef !WIN32 add to them.  However,
if WIN32 is not defined at the beginning, the push is done but by the
time the pop is reach something else has set WIN32 define so the pop
is not done, and it changes the default pack from /Zp2 to /Zp4, which
makes the data structures incompatible between objects with winsock2.h
and without winsock2.h.  By adding the WIN32 both the push and pop are
not done.

19 years ago(nstr_parse_val): strtod() recognizes a few strings as numbers that we
Markus Armbruster [Sat, 19 Mar 2005 17:16:29 +0000 (17:16 +0000)]
(nstr_parse_val): strtod() recognizes a few strings as numbers that we
want to recognize as identifiers, notably "inf".  Recognize
identifiers starting with letters before numbers.

19 years agoFix the previous rev.
Markus Armbruster [Sat, 19 Mar 2005 17:04:20 +0000 (17:04 +0000)]
Fix the previous rev.

19 years ago(produce): When player->simulation, level production executed item
Markus Armbruster [Sat, 19 Mar 2005 16:50:22 +0000 (16:50 +0000)]
(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.

19 years ago(guerrilla): Fix saturation of civilians (new in rev. 1.9). It
Markus Armbruster [Sat, 19 Mar 2005 15:57:41 +0000 (15:57 +0000)]
(guerrilla): Fix saturation of civilians (new in rev. 1.9).  It
created anti-uw, which made the next checksect() oops.

19 years ago(_c_copyright_header, _ipglob_copyright_header, copyright_header):
Markus Armbruster [Fri, 18 Mar 2005 20:51:39 +0000 (20:51 +0000)]
(_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.

19 years agoUpdate to match current prod.c.
Markus Armbruster [Fri, 18 Mar 2005 20:09:53 +0000 (20:09 +0000)]
Update to match current prod.c.

19 years agoUpdate for 4.2.20.
Markus Armbruster [Thu, 17 Mar 2005 21:49:59 +0000 (21:49 +0000)]
Update for 4.2.20.

19 years agoIndentation fix.
Markus Armbruster [Thu, 17 Mar 2005 21:47:42 +0000 (21:47 +0000)]
Indentation fix.

19 years agoGet version from version.h.
Markus Armbruster [Thu, 17 Mar 2005 19:33:50 +0000 (19:33 +0000)]
Get version from version.h.

19 years agoUpdate patch to contain proper headers of file versions.
Marc Olzheim [Thu, 17 Mar 2005 10:11:11 +0000 (10:11 +0000)]
Update patch to contain proper headers of file versions.

19 years ago(prod): New column `avail'. Narrow column `will make' (amount and
Markus Armbruster [Wed, 16 Mar 2005 22:12:31 +0000 (22:12 +0000)]
(prod): New column `avail'.  Narrow column `will make' (amount and
short product name) to `make' (amount and, if product is an item,
product mnemonic).

19 years agoUpdate copyright notice.
Markus Armbruster [Wed, 16 Mar 2005 22:03:16 +0000 (22:03 +0000)]
Update copyright notice.

19 years agoFix the previous rev.
Markus Armbruster [Wed, 16 Mar 2005 20:57:21 +0000 (20:57 +0000)]
Fix the previous rev.

19 years ago(main): Rev. 1.43 broke option -D. Its meaning in presence of -e is
Markus Armbruster [Wed, 16 Mar 2005 20:53:27 +0000 (20:53 +0000)]
(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.

19 years ago(main): Fix -p to imply -d as documented, not just !daemonize.
Markus Armbruster [Wed, 16 Mar 2005 18:41:44 +0000 (18:41 +0000)]
(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.

19 years ago(lwpStatus): Fix potential buffer overflow.
Markus Armbruster [Wed, 16 Mar 2005 18:08:39 +0000 (18:08 +0000)]
(lwpStatus): Fix potential buffer overflow.

19 years ago(lwpInitSystem): Stack checking doesn't work and is not necessary for
Markus Armbruster [Wed, 16 Mar 2005 18:06:03 +0000 (18:06 +0000)]
(lwpInitSystem): Stack checking doesn't work and is not necessary for
main thread; clear LWP_STACKCHECK.
(lwpStackCheck): Log stack overflow/underflow and abort.

19 years agoRemove useless cast. No funtional changes.
Marc Olzheim [Wed, 16 Mar 2005 09:13:48 +0000 (09:13 +0000)]
Remove useless cast.  No funtional changes.

19 years agoFix comment line breaks.
Markus Armbruster [Wed, 16 Mar 2005 07:19:07 +0000 (07:19 +0000)]
Fix comment line breaks.

19 years agoFix the previous rev.
Markus Armbruster [Wed, 16 Mar 2005 06:27:15 +0000 (06:27 +0000)]
Fix the previous rev.

19 years ago(loc_Ctrl_C_Handler,loc_Exit_Handler) [_WIN32]: Process other
Ron Koenderink [Wed, 16 Mar 2005 02:39:51 +0000 (02:39 +0000)]
(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.

19 years ago(main) [_WIN32]: Remove second break from -i option.
Ron Koenderink [Wed, 16 Mar 2005 02:01:34 +0000 (02:01 +0000)]
(main) [_WIN32]: Remove second break from -i option.

19 years ago(main) [_WIN32]: Add check to command line checks to ensure
Ron Koenderink [Wed, 16 Mar 2005 01:51:22 +0000 (01:51 +0000)]
(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.

19 years agoGet rid of "s_char", "register" and 0 used instead of NULL in the
Marc Olzheim [Tue, 15 Mar 2005 21:47:41 +0000 (21:47 +0000)]
Get rid of "s_char", "register" and 0 used instead of NULL in the
client source.  No functional changes.

19 years agoGet rid of "s_char" in the client source. No functional changes.
Marc Olzheim [Tue, 15 Mar 2005 21:43:39 +0000 (21:43 +0000)]
Get rid of "s_char" in the client source.  No functional changes.

19 years ago(shutdwn): Rev. 1.51 broke the Linux pthread hack. It is unclear what
Markus Armbruster [Tue, 15 Mar 2005 20:58:00 +0000 (20:58 +0000)]
(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.

19 years agoGet rid of "s_char". No functional changes.
Marc Olzheim [Tue, 15 Mar 2005 20:24:50 +0000 (20:24 +0000)]
Get rid of "s_char".  No functional changes.

19 years agoAdd a pre_update_hook default in src/lib/global/constants.c, so that
Marc Olzheim [Tue, 15 Mar 2005 19:58:41 +0000 (19:58 +0000)]
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.

19 years agoNote that patches could influence each other.
Marc Olzheim [Tue, 15 Mar 2005 19:49:07 +0000 (19:49 +0000)]
Note that patches could influence each other.

19 years agoGet rid of "s_char". No functional changes.
Marc Olzheim [Tue, 15 Mar 2005 18:59:24 +0000 (18:59 +0000)]
Get rid of "s_char".  No functional changes.

19 years ago(run_hook): Add fflush(NULL) to flush the stdio files before
Ron Koenderink [Tue, 15 Mar 2005 18:23:21 +0000 (18:23 +0000)]
(run_hook): Add fflush(NULL) to flush the stdio files before
starting the backup.

19 years ago(service_stoppped,stop_service,loc_Ctrl_C_Handler,
Ron Koenderink [Tue, 15 Mar 2005 18:19:07 +0000 (18:19 +0000)]
(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.

19 years agoDon't try running 'cvs co' more than 5 times, since it might be a local
Marc Olzheim [Tue, 15 Mar 2005 18:05:16 +0000 (18:05 +0000)]
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.

19 years agoUpdate for markus's prng patches.
Marc Olzheim [Tue, 15 Mar 2005 17:58:33 +0000 (17:58 +0000)]
Update for markus's prng patches.

19 years ago(main,print_usage) [_WIN32]: Add the ability to enable
Ron Koenderink [Sun, 13 Mar 2005 21:53:23 +0000 (21:53 +0000)]
(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.

19 years ago(log_error) [_WIN32]: Remove ; from the #define for vsnprintf.
Ron Koenderink [Sat, 12 Mar 2005 19:33:18 +0000 (19:33 +0000)]
(log_error) [_WIN32]: Remove ; from the #define for vsnprintf.
This part of the for changes to logerror().

19 years agoDoc fix.
Markus Armbruster [Sat, 12 Mar 2005 18:06:31 +0000 (18:06 +0000)]
Doc fix.

19 years agoRemove files that no longer exist, add missing files, fix filenames.
Markus Armbruster [Sat, 12 Mar 2005 18:03:02 +0000 (18:03 +0000)]
Remove files that no longer exist, add missing files, fix filenames.

19 years agoDon't suggest to run make in the background.
Markus Armbruster [Sat, 12 Mar 2005 18:01:05 +0000 (18:01 +0000)]
Don't suggest to run make in the background.

19 years agoRemove advice on stuff that vanished from the distribution years ago.
Markus Armbruster [Sat, 12 Mar 2005 17:59:57 +0000 (17:59 +0000)]
Remove advice on stuff that vanished from the distribution years ago.

19 years ago(log_error) [_WIN32]: Add #define for vsnprintf to pick up
Ron Koenderink [Sat, 12 Mar 2005 17:52:29 +0000 (17:52 +0000)]
(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.

19 years agoFix the previous rev.
Markus Armbruster [Sat, 12 Mar 2005 17:34:11 +0000 (17:34 +0000)]
Fix the previous rev.

19 years agoA backup script for pre_update_hook.
Markus Armbruster [Sat, 12 Mar 2005 17:31:55 +0000 (17:31 +0000)]
A backup script for pre_update_hook.

19 years ago(pre_update_hook): New configuration key.
Markus Armbruster [Sat, 12 Mar 2005 17:24:57 +0000 (17:24 +0000)]
(pre_update_hook): New configuration key.
(update_wait): Implement it.
(run_hook): New.

19 years agoWrite pid file, like a good daemon. Thanks to Daniel O'Connor for the
Markus Armbruster [Sat, 12 Mar 2005 16:45:43 +0000 (16:45 +0000)]
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.

19 years ago(finish_server): New, factored out of termination code. Fixes two
Markus Armbruster [Sat, 12 Mar 2005 16:28:28 +0000 (16:28 +0000)]
(finish_server): New, factored out of termination code.  Fixes two
places in service_main() that lacked close_files().
(close_files, loc_NTTerm): Static linkage.

19 years ago(start_server) [_WIN32]: Put #ifndef _WIN32 around act.
Ron Koenderink [Sat, 12 Mar 2005 16:10:49 +0000 (16:10 +0000)]
(start_server) [_WIN32]: Put #ifndef _WIN32 around act.
This was missed with the [!POSIXSIGNALS]: changes.

19 years agoIndentation fixes.
Markus Armbruster [Sat, 12 Mar 2005 15:05:23 +0000 (15:05 +0000)]
Indentation fixes.

19 years ago(init_server, start_server): Move start log message to start_server(),
Markus Armbruster [Sat, 12 Mar 2005 15:04:37 +0000 (15:04 +0000)]
(init_server, start_server): Move start log message to start_server(),
where it belongs.

19 years ago(logerror): Log to stderr as well. Fix potential buffer overflows.
Markus Armbruster [Sat, 12 Mar 2005 15:03:31 +0000 (15:03 +0000)]
(logerror): Log to stderr as well.  Fix potential buffer overflows.

(oops): Let logerror() supply the newline.

19 years ago[DO_EFF_MEM_CHECKING]: Dead for some ten years. Bury.
Markus Armbruster [Sat, 12 Mar 2005 13:40:24 +0000 (13:40 +0000)]
[DO_EFF_MEM_CHECKING]: Dead for some ten years.  Bury.

19 years ago[GODZILLA]: Incomplete, unused, remove.
Markus Armbruster [Sat, 12 Mar 2005 13:27:13 +0000 (13:27 +0000)]
[GODZILLA]: Incomplete, unused, remove.

19 years ago(main, empth_start): Don't bother to catch SIGUSR1. Use SIGINT or
Markus Armbruster [Sat, 12 Mar 2005 12:30:58 +0000 (12:30 +0000)]
(main, empth_start): Don't bother to catch SIGUSR1.  Use SIGINT or
SIGTERM to shutdown the server.

19 years ago[!POSIXSIGNALS]: Thoroughly obsolete, remove. This also gets rid of
Markus Armbruster [Sat, 12 Mar 2005 12:20:50 +0000 (12:20 +0000)]
[!POSIXSIGNALS]: Thoroughly obsolete, remove.  This also gets rid of
an odd case where signals were not catched when debugging.

(main, empth_start): Using sa_handler with SA_SIGINFO is wrong.
Simply don't set SA_SIGINFO; the additional signal information is not
used anyway.

19 years ago(service_main,main,shutdown) [_WIN32]: Add missing loc_NTTerm().
Ron Koenderink [Sat, 12 Mar 2005 04:35:09 +0000 (04:35 +0000)]
(service_main,main,shutdown) [_WIN32]: Add missing loc_NTTerm().

(service_main,main,shutdown,empth_exit,service_stopped) [_WIN32]:
Add shutdown Event to allow the service to shutdown.
When SERVICE_STOPPED is passed to SetServiceStatus() all
threads are kills this prevents shutdown() from executing.
The shutdown Event is used to block the service_main thread until
the stopping of the service is started.  After the shutdown() is
complete then the SetServiceStatus() is called.

19 years ago[hpux] (srandom, random): HP-UX has had these for ages. Remove.
Markus Armbruster [Fri, 11 Mar 2005 17:05:19 +0000 (17:05 +0000)]
[hpux] (srandom, random): HP-UX has had these for ages.  Remove.

19 years ago(main): Fix seeding of PRNG broken in rev. 1.22.
Markus Armbruster [Fri, 11 Mar 2005 17:03:07 +0000 (17:03 +0000)]
(main): Fix seeding of PRNG broken in rev. 1.22.

19 years ago(multifire, new): Reseeding the PRNG with the current time is not a
Markus Armbruster [Fri, 11 Mar 2005 17:01:38 +0000 (17:01 +0000)]
(multifire, new): Reseeding the PRNG with the current time is not a
good idea.  Letting players trigger it is an extraordinarily bad idea.
Remove.

19 years agoRemove qsort_func_t, belatedly.
Markus Armbruster [Fri, 11 Mar 2005 07:36:13 +0000 (07:36 +0000)]
Remove qsort_func_t, belatedly.

19 years ago(newe): Remove wforce, not used anymore.
Ron Koenderink [Thu, 10 Mar 2005 22:25:58 +0000 (22:25 +0000)]
(newe): Remove wforce, not used anymore.

19 years ago(loginit): Working directory is the data directory; simplify.
Markus Armbruster [Thu, 10 Mar 2005 19:33:12 +0000 (19:33 +0000)]
(loginit): Working directory is the data directory; simplify.

(loginit, logerror): Use plain char * instead of s_char *.

19 years ago(emp_config): The previous rev. broke the documented feature that
Markus Armbruster [Thu, 10 Mar 2005 19:19:46 +0000 (19:19 +0000)]
(emp_config): The previous rev. broke the documented feature that
missing default econfig means default configuration.  Fix.

19 years agoFix ugly line breaks.
Markus Armbruster [Thu, 10 Mar 2005 19:17:15 +0000 (19:17 +0000)]
Fix ugly line breaks.

19 years agoUpdate for recent pconfig changes.
Markus Armbruster [Thu, 10 Mar 2005 19:12:51 +0000 (19:12 +0000)]
Update for recent pconfig changes.

19 years agoMerge pre-4-2-20-invasive. Summary of changes:
Markus Armbruster [Thu, 10 Mar 2005 18:35:27 +0000 (18:35 +0000)]
Merge pre-4-2-20-invasive.  Summary of changes:
* Acquire resources before daemonizing, fail in foreground
* Initialize threads and signals after daemonizing
* Make most file names relative to data directory
* emp_server and files make it their working directory
* emp_config() no longer screws up some file names
* Missing or incorrect econfig is now fatal
* Don't log to default log file when econfig changes it

19 years ago(main,service_main) [_WIN32]: Change startup errors to stderr from
Ron Koenderink [Thu, 10 Mar 2005 18:00:40 +0000 (18:00 +0000)]
(main,service_main) [_WIN32]: Change startup errors to stderr from
logerror() as log file is not open yet.

19 years ago(service_main) [_WIN32]: Remove init_server() as it has already been done.
Ron Koenderink [Thu, 10 Mar 2005 16:15:30 +0000 (16:15 +0000)]
(service_main) [_WIN32]: Remove init_server() as it has already been done.

19 years ago(main) [_WIN32]: Add extern file for chdir().
Ron Koenderink [Thu, 10 Mar 2005 16:13:51 +0000 (16:13 +0000)]
(main) [_WIN32]: Add extern file for chdir().

(main) [_WIN32]: Add #ifdef for tbuf as it is only used in LINUX and
EMPTH_POSIX.

19 years ago(init_server, start_server): Move signal and thread initialization
Markus Armbruster [Wed, 9 Mar 2005 19:37:48 +0000 (19:37 +0000)]
(init_server, start_server): Move signal and thread initialization
from init_server() to start_server(), and service startup next to its
Unix equivalent disassoc().  This way, threading is always initialized
after daemonizing, which is simpler and more portable.

19 years ago(disassoc): src/lib/player/accept.c rev. 1.18.2.1 broke the server
Markus Armbruster [Wed, 9 Mar 2005 19:25:20 +0000 (19:25 +0000)]
(disassoc): src/lib/player/accept.c rev. 1.18.2.1 broke the server
when it runs as daemon, because it relies on player_socket remaining
open across disassoc().  Change disassoc() to only close file
descriptors 0..2 instead of 0..9.  By the way, it should really
redirect 0..2 to /dev/null instead.

19 years ago(main): Non-zero flags imply !daemonize. Make explicit.
Markus Armbruster [Wed, 9 Mar 2005 18:57:53 +0000 (18:57 +0000)]
(main): Non-zero flags imply !daemonize.  Make explicit.

19 years ago(empfile, teldir, motdfil, downfil, disablefil, telfil, annfil)
Markus Armbruster [Wed, 9 Mar 2005 18:44:50 +0000 (18:44 +0000)]
(empfile, teldir, motdfil, downfil, disablefil, telfil, annfil)
(banfil, authfil, timestampfil): Make file names relative to DATADIR.
(main): emp_server and files change to the data directory.  fairland
has to write newcap_script to the initial current directory, so it
keeps it and makes file names relative to DATADIR absolute.
(fixup_files): Nothing to do, remove.  This fixes the following bug:
fixup_files() formed file names by appending ep->name instead of the
base name of ep->file to datadir.  Thus, fixup_files() changed file
names even when datadir had the compiled-in value.  When emp_config()
couldn't open econfig, it failed to call fixup_files(), and different
file names got used.  Note that with this revision the file names
revert to the names used before fixup_files() was introduced.  Closes
#1146080.
(print_config): Printing file names as comments is not really useful,
remove.
(otherfiles, ofiles): Unused, remove.
(emp_config, main): Previously, pconfig had to call emp_config() even
when it didn't want to read econfig, just to run fixup_files().  This
is no longer necessary.  Simplify.

19 years ago(dflt_econfig): New.
Markus Armbruster [Wed, 9 Mar 2005 17:11:58 +0000 (17:11 +0000)]
(dflt_econfig): New.
(emp_config): Use it when argument is NULL.  This simplifies callers
except pconfig's main(), which now has to suppress reading the default
file.  Also fix callers to check the return value.  Previously, a typo
could easily start a grossly misconfigured program, with potentially
disastrous results.

19 years agoFix missing include.
Markus Armbruster [Wed, 9 Mar 2005 16:56:39 +0000 (16:56 +0000)]
Fix missing include.

19 years agoFix typos, update paths that changed since this was written.
Markus Armbruster [Wed, 9 Mar 2005 16:46:45 +0000 (16:46 +0000)]
Fix typos, update paths that changed since this was written.

19 years ago(daemon, daemonize): Rename to avoid name clash with BSD's daemon().
Markus Armbruster [Wed, 9 Mar 2005 14:45:41 +0000 (14:45 +0000)]
(daemon, daemonize): Rename to avoid name clash with BSD's daemon().

(daemonize): Supply missing declaration.

19 years ago(player_init, player_accept): Move socket bind and listen from
Markus Armbruster [Tue, 8 Mar 2005 16:51:19 +0000 (16:51 +0000)]
(player_init, player_accept): Move socket bind and listen from
player_accept() to player_init().  Acquiring resources during
initialization allows to exit unsuccessfully on errors.  Previously,
the daemon detached itself (exiting successfully), then failed in the
background.
(player_socket): New.

19 years ago(NS_ALL) [_WIN32]: Change NS_EVERYTHING back to NS_ALL, #undef NS_ALL to prevent...
Ron Koenderink [Tue, 8 Mar 2005 00:04:43 +0000 (00:04 +0000)]
(NS_ALL) [_WIN32]: Change NS_EVERYTHING back to NS_ALL, #undef NS_ALL to prevent conflict with winsock2.h

19 years ago(service_main) [_WIN32]: Remove the command line processing.
Ron Koenderink [Sun, 6 Mar 2005 20:58:48 +0000 (20:58 +0000)]
(service_main) [_WIN32]: Remove the command line processing.
The secondary command line processing was adding significant
complexity for minimial gain.  Now all the command line arguments
can be prequalified during the installation of the service.

(service_main) [_WIN32]: Move the initialization (init_server())
so logerror() will go to the file instead of stderr.

19 years ago(main) [_WIN32]: Move install_service() so the config_file
Ron Koenderink [Sun, 6 Mar 2005 20:54:30 +0000 (20:54 +0000)]
(main) [_WIN32]: Move install_service() so the config_file
can be verified before installing.

19 years ago(main,service_main) [_WIN32]: Remove printf for errors
Ron Koenderink [Sun, 6 Mar 2005 20:08:52 +0000 (20:08 +0000)]
(main,service_main) [_WIN32]: Remove printf for errors
during startup, as logerror will print to stderr or to log file.
Remove logerror for successful installation and removal.

19 years ago(main,service_main) [_WIN32]: Fix config_file for WIN32.
Ron Koenderink [Sun, 6 Mar 2005 19:53:14 +0000 (19:53 +0000)]
(main,service_main) [_WIN32]: Fix config_file for WIN32.

(main,service_main,empth_exit) [_WIN32]: Add daemon flag.
Separate the debug_flag into two separate flags, one for
debugging (debug) and controlling the daemon processing
(daemon).

19 years ago(start_server, main, service_main): Call emp_config() earlier.
Markus Armbruster [Sat, 5 Mar 2005 20:38:01 +0000 (20:38 +0000)]
(start_server, main, service_main): Call emp_config() earlier.
(main): Call loginit() later, after emp_config().  Previously, the
program logged to the default datadir until emp_config().
(init_server, start_sever): Split start_server() into initialization
and actual startup.  Move initialization before disassoc().
(main, init_server): Log server startup only after initialization is
complete.

19 years ago(init_files): Exit unsuccessfully when a file can't be opened.
Markus Armbruster [Thu, 3 Mar 2005 19:54:25 +0000 (19:54 +0000)]
(init_files): Exit unsuccessfully when a file can't be opened.

19 years ago(delete_old_news,init_nreport): Add void for extern prototypes.
Ron Koenderink [Thu, 3 Mar 2005 00:23:49 +0000 (00:23 +0000)]
(delete_old_news,init_nreport): Add void for extern prototypes.

19 years ago(nreport, filereport, ncache, addfree, findfree, delete_old_news)
Ron Koenderink [Wed, 2 Mar 2005 23:53:10 +0000 (23:53 +0000)]
(nreport, filereport, ncache, addfree, findfree, delete_old_news)
(init_nreport, update_main, start_server): Switch news to be sorted
list with all new news items added at the end of the list.  The
removal of expired news items is done at update time.  Closes #766755.

19 years ago(wrmakesrc,wripglob,wrgamesdef,info,apro,mobupdate,rea,turn
Ron Koenderink [Wed, 2 Mar 2005 12:47:15 +0000 (12:47 +0000)]
(wrmakesrc,wripglob,wrgamesdef,info,apro,mobupdate,rea,turn
upda,ef_open,logerror,emp_config,match_user,show_motd,gamedown,
typed_wu,delete_old_announcements,mobility_check,mobility_init,
allocate_memory,write_newcap_script,main,files,fairland,doconfig,)
[_WIN32]: Switchback to default mode of text.
"t" (text) is not included the ISO/ANSI C standard but "b" (binary)
is included.

19 years agoFix the previous rev.
Markus Armbruster [Tue, 1 Mar 2005 18:49:12 +0000 (18:49 +0000)]
Fix the previous rev.

19 years ago(write_file,allocate_memory): Convert to stdio.
Ron Koenderink [Tue, 1 Mar 2005 13:50:56 +0000 (13:50 +0000)]
(write_file,allocate_memory): Convert to stdio.

19 years ago(turn): Change to stdio.
Ron Koenderink [Mon, 28 Feb 2005 23:21:05 +0000 (23:21 +0000)]
(turn): Change to stdio.

(turn): Always close the file after attempting to write.
Fixes bug where the file is not close when there is writing
error.

19 years ago(as_extend, as_costcomp, gen_power, powcmp): Fix non-portable function
Markus Armbruster [Thu, 24 Feb 2005 18:47:26 +0000 (18:47 +0000)]
(as_extend, as_costcomp, gen_power, powcmp): Fix non-portable function
cast.
(qsort_func_t): Unused, remove.

19 years ago(ship_bomb): Clarify. Also gets rid of compiler warning.
Markus Armbruster [Thu, 24 Feb 2005 17:55:28 +0000 (17:55 +0000)]
(ship_bomb): Clarify.  Also gets rid of compiler warning.