]> git.pond.sub.org Git - empserver/log
empserver
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.

19 years agoglobal.h does nothing but include prototypes.h, remove.
Markus Armbruster [Thu, 24 Feb 2005 17:54:14 +0000 (17:54 +0000)]
global.h does nothing but include prototypes.h, remove.

19 years agoDoc fix.
Markus Armbruster [Thu, 24 Feb 2005 17:52:10 +0000 (17:52 +0000)]
Doc fix.

19 years agoFirst step towards generalizing NSC_TYPEID to arbitrary dictionaries.
Markus Armbruster [Thu, 24 Feb 2005 16:14:53 +0000 (16:14 +0000)]
First step towards generalizing NSC_TYPEID to arbitrary dictionaries.
(nsc_cat) New category NSC_ID.
(nstr_comp): Resolve identifiers instead of relying on nstr_comp_val()
and nstr_coerce_val().
(valstr, nstr_coerce_val): Remove valstr member val_as_type.
(nstr_parse_val, nstr_match_ca, nstr_match_val, nstr_resolve_id)
(nstr_resolve_sel, nstr_mkselval): New.
(nstr_comp_val): Rewrite using the above.

19 years ago(gamedown,show_motd): Change to stdio for reading motd and
Ron Koenderink [Thu, 24 Feb 2005 02:00:14 +0000 (02:00 +0000)]
(gamedown,show_motd): Change to stdio for reading motd and
down message.

(gamedown): Change buf's size to be MAXTELSIZE instead
of abitrary number.  Make consistent with show_motd().

19 years ago(gamedown,show_motd): Change the %d to %ld for printing
Ron Koenderink [Thu, 24 Feb 2005 01:28:44 +0000 (01:28 +0000)]
(gamedown,show_motd): Change the %d to %ld for printing
tgm.tel_length as it is long.

19 years ago(gamedown, show_motd): Move length check to before 'buf' is written to
Ron Koenderink [Wed, 23 Feb 2005 19:00:56 +0000 (19:00 +0000)]
(gamedown, show_motd): Move length check to before 'buf' is written to
to prevent stack overflow on 'buf' variable.

19 years agoTell indent about i_packing and i_type, belatedly.
Markus Armbruster [Wed, 23 Feb 2005 15:55:58 +0000 (15:55 +0000)]
Tell indent about i_packing and i_type, belatedly.

19 years agoFix bad line break / whitespace. No functional changes.
Markus Armbruster [Wed, 23 Feb 2005 15:41:22 +0000 (15:41 +0000)]
Fix bad line break / whitespace.  No functional changes.

19 years ago(conditions): Fix spelling mistake.
Markus Armbruster [Wed, 23 Feb 2005 15:28:24 +0000 (15:28 +0000)]
(conditions): Fix spelling mistake.

19 years ago(retr): Use RET_GROUP instead of literal 1. No functional changes.
Markus Armbruster [Wed, 23 Feb 2005 15:27:19 +0000 (15:27 +0000)]
(retr): Use RET_GROUP instead of literal 1.  No functional changes.

19 years agoFix bad line break. No functional changes.
Markus Armbruster [Wed, 23 Feb 2005 15:26:36 +0000 (15:26 +0000)]
Fix bad line break.  No functional changes.

19 years ago(reco): Fix check for empty flight path. Aborting the command at the
Markus Armbruster [Wed, 23 Feb 2005 15:17:27 +0000 (15:17 +0000)]
(reco): Fix check for empty flight path.  Aborting the command at the
flight path prompt now works.

(reco): Pass P_ESC to pln_arm() for consistency with call of pln_sel()
and similar code elsewhere.  Believed not to make a difference.

19 years ago(powe): Do not round totals for deity countries.
Ron Koenderink [Tue, 22 Feb 2005 01:28:43 +0000 (01:28 +0000)]
(powe): Do not round totals for deity countries.

19 years ago(powe): Fix the deity check to use player->god instead of
Ron Koenderink [Mon, 21 Feb 2005 20:35:37 +0000 (20:35 +0000)]
(powe): Fix the deity check to use player->god instead of
player->cnum == 0.  Partial Fix for #863419.

19 years ago(nullify_objects): Simply use all of bigcity_dchr. Using only parts
Markus Armbruster [Mon, 21 Feb 2005 19:52:25 +0000 (19:52 +0000)]
(nullify_objects): Simply use all of bigcity_dchr.  Using only parts
is confusing.
(bigcity_dchr): Fix initializer for d_maxpop.

(dchr): The previous revision accidentally changed maximum population
of sanctuaries, plains, sea and wasteland.  Revert the former two.
The latter are not used, but the new max population of zero makes more
sense, so keep it.

19 years ago(main): Move loginit() to after the getopt(), so the -D option will
Ron Koenderink [Mon, 21 Feb 2005 18:17:11 +0000 (18:17 +0000)]
(main): Move loginit() to after the getopt(), so the -D option will
take affect for the log file.  Otherwise the server.log will be in
default data directory compiled into the server.

19 years agoUpdate patch for include/prototypes.h:1.66
Marc Olzheim [Mon, 21 Feb 2005 17:17:16 +0000 (17:17 +0000)]
Update patch for include/prototypes.h:1.66
 src/lib/commands/mfir.c:1.21 src/lib/commands/sabo.c:1.10
 src/lib/update/human.c:1.15  No functional changes.

19 years ago(total_work): Remove redundant conversion to int.
Markus Armbruster [Sun, 20 Feb 2005 19:36:41 +0000 (19:36 +0000)]
(total_work): Remove redundant conversion to int.
(total_work): New parameter maxpop.  Callers changed.
(newe, prod): Use total_work().  Old code failed to limit military
workers, thus didn't match the update.
(do_feed): Simplify.

19 years ago(prod): Widen column will make so that product p_sname is not
Markus Armbruster [Sun, 20 Feb 2005 18:51:55 +0000 (18:51 +0000)]
(prod): Widen column will make so that product p_sname is not
truncated.

19 years ago(prod): Several columns were too narrow, and didn't align properly for
Markus Armbruster [Sun, 20 Feb 2005 18:39:59 +0000 (18:39 +0000)]
(prod): Several columns were too narrow, and didn't align properly for
large values.  Remove column wkfc to make space, widen other columns.
Columns use2, use3 and max2, max3 lack separating space on the left
for large values, which don't occur in normal game configurations.

19 years ago(upd_ship): Fix the previous rev.
Markus Armbruster [Sun, 20 Feb 2005 01:46:17 +0000 (01:46 +0000)]
(upd_ship): Fix the previous rev.

19 years ago(prod, produce, upd_ship): struct pchrstr p_nrndx refers to u_char,
Markus Armbruster [Sat, 19 Feb 2005 17:28:30 +0000 (17:28 +0000)]
(prod, produce, upd_ship): struct pchrstr p_nrndx refers to u_char,
not s_char.  Fix types.

(upd_ship): Catch resource underflow (should not happen).

19 years ago(max_population): Fix for opt_RES_POP and d_maxpop != 999.
Markus Armbruster [Thu, 17 Feb 2005 21:40:24 +0000 (21:40 +0000)]
(max_population): Fix for opt_RES_POP and d_maxpop != 999.

19 years ago(max_population): New, factored out of max_pop().
Markus Armbruster [Thu, 17 Feb 2005 21:04:08 +0000 (21:04 +0000)]
(max_population): New, factored out of max_pop().
(max_pop): Use it.  Don't support null argument anymore.
(nati, gen_power): Use max_population() instead of max_pop() with null
argument.
(show_sect_stats): Use max_population() to simplify the code.
(prod, upd_buildeff): Use max_population() to get correct new maximum
population for limiting work when tearing down a big city.
Previously, this was broken in upd_buildeff().  In prod(), it was
broken when the new designation had odd maximum population, which
should not occur.

19 years ago(prod, nati): Use max_pop() instead of hardcoded values. Before,
Markus Armbruster [Sun, 13 Feb 2005 18:25:30 +0000 (18:25 +0000)]
(prod, nati): Use max_pop() instead of hardcoded values.  Before,
struct dchrstr member d_maxpop had no effect in some cases.

19 years ago(newe): Fix for max_pop() > 999.
Markus Armbruster [Sun, 13 Feb 2005 18:25:14 +0000 (18:25 +0000)]
(newe): Fix for max_pop() > 999.

19 years agoBreak an inclusion cycle missed by yesterday's change.
Markus Armbruster [Sun, 13 Feb 2005 10:37:46 +0000 (10:37 +0000)]
Break an inclusion cycle missed by yesterday's change.

19 years ago`make depend' attempts to make dependencies for *.c. This is plain
Markus Armbruster [Sat, 12 Feb 2005 19:45:59 +0000 (19:45 +0000)]
`make depend' attempts to make dependencies for *.c.  This is plain
evil, and ought to be fixed.  In particular, it chokes on this file,
because it includes Windows specific headers.  Which is fine, as the
file is compiled only under Windows.

Quick band-aid: wrap the file contents in #ifdef _WIN32.

19 years agoBreak inclusion cycles. To simplify the change, move a few
Markus Armbruster [Sat, 12 Feb 2005 19:26:59 +0000 (19:26 +0000)]
Break inclusion cycles.  To simplify the change, move a few
declarations to other, no less sensible places.

19 years ago(dchr_ca): New selector maxpop.
Markus Armbruster [Sat, 12 Feb 2005 17:06:21 +0000 (17:06 +0000)]
(dchr_ca): New selector maxpop.

19 years ago(multifire): If firing at a submarine with something that can't drop
Markus Armbruster [Sat, 12 Feb 2005 16:43:08 +0000 (16:43 +0000)]
(multifire): If firing at a submarine with something that can't drop
depth charges, don't disclose the target is a submarine.  Old code
allowed players to find all submarine uids.

19 years agoProducts table used tlev and tech synonymously. Confusing. Just use
Markus Armbruster [Sat, 12 Feb 2005 16:31:16 +0000 (16:31 +0000)]
Products table used tlev and tech synonymously.  Confusing.  Just use
tech.

19 years agoFrom Ray Hyatt:
Markus Armbruster [Sat, 12 Feb 2005 16:17:57 +0000 (16:17 +0000)]
From Ray Hyatt:
(dchrstr): New member d_maxpop.
(dchr): Initialize it.
(max_pop): Use it.  Use dchr[SCT_MINE].d_maxpop when called with null
argument.  RES_POP now affects mountains and plains as well.

19 years ago[service_main]: Code cleanup, remove commented out debugging,
Ron Koenderink [Sat, 22 Jan 2005 19:45:17 +0000 (19:45 +0000)]
[service_main]: Code cleanup, remove commented out debugging,
remove unnecessary include files.

19 years agoUpdate patch for src/lib/commands/news.c:1.8 No functional changes.
Marc Olzheim [Fri, 7 Jan 2005 10:25:11 +0000 (10:25 +0000)]
Update patch for src/lib/commands/news.c:1.8  No functional changes.

19 years ago(news, fina): Report bad conditionals as syntax error. Closes #775475.
Ron Koenderink [Thu, 6 Jan 2005 02:09:30 +0000 (02:09 +0000)]
(news, fina): Report bad conditionals as syntax error.  Closes #775475.

19 years agoClean up register keywords. No functional changes.
Marc Olzheim [Mon, 3 Jan 2005 21:03:53 +0000 (21:03 +0000)]
Clean up register keywords.  No functional changes.

19 years agoUse _l_rand48(). in src/util/fairland.c
Marc Olzheim [Mon, 3 Jan 2005 19:59:31 +0000 (19:59 +0000)]
Use _l_rand48(). in src/util/fairland.c

19 years agoFix the previous patch by using emp_{s,}random() instead if {s,}rand48()
Marc Olzheim [Mon, 3 Jan 2005 18:31:31 +0000 (18:31 +0000)]
Fix the previous patch by using emp_{s,}random() instead if {s,}rand48()
in src/lib/commands/{new,mfir}.c

19 years agoUpdate patch for src/util/fairland.c:1.16 src/lib/commands/new.c:1.19
Marc Olzheim [Mon, 3 Jan 2005 17:31:54 +0000 (17:31 +0000)]
Update patch for src/util/fairland.c:1.16 src/lib/commands/new.c:1.19
src/lib/commands/mfir.c:1.20 src/server/main.c:1.35.
No functional changes.

19 years ago[_WIN32]: Upgrade to Windows Sockets 2.
Ron Koenderink [Fri, 31 Dec 2004 20:40:39 +0000 (20:40 +0000)]
[_WIN32]: Upgrade to Windows Sockets 2.

19 years ago(tend_nxtitem,nxtitem,sarg_type,snxtitem,snxtitem_all,snxtsct,nxtitemp):
Ron Koenderink [Fri, 31 Dec 2004 20:14:10 +0000 (20:14 +0000)]
(tend_nxtitem,nxtitem,sarg_type,snxtitem,snxtitem_all,snxtsct,nxtitemp):
change NS_ALL to NS_EVERYTHING in ns_seltype because of a
conflict with winsock2.h which is used in the WIN32 build.

19 years ago(rea): Add brackets to prevent 'else' ambiguity.
Ron Koenderink [Fri, 31 Dec 2004 14:12:34 +0000 (14:12 +0000)]
(rea): Add brackets to prevent 'else' ambiguity.

19 years ago(wrauth,wrgamesdef,wrmakesrc): update copyright notices to 2004.
Ron Koenderink [Thu, 30 Dec 2004 14:19:21 +0000 (14:19 +0000)]
(wrauth,wrgamesdef,wrmakesrc): update copyright notices to 2004.

19 years ago(main,wr_auth) [_WIN32]: switch the default file mode to
Ron Koenderink [Thu, 30 Dec 2004 14:14:04 +0000 (14:14 +0000)]
(main,wr_auth) [_WIN32]: switch the default file mode to
binary to match POSIX.  Add text mode for auth file.

19 years ago(new) [_WIN32]: Rely on misc.h to provide BSD random functions.
Ron Koenderink [Thu, 30 Dec 2004 13:57:04 +0000 (13:57 +0000)]
(new) [_WIN32]: Rely on misc.h to provide BSD random functions.

19 years ago(multifire) [_WIN32]: Rely on misc.h to provide BSD random functions.
Ron Koenderink [Thu, 30 Dec 2004 13:53:46 +0000 (13:53 +0000)]
(multifire) [_WIN32]: Rely on misc.h to provide BSD random functions.

(multifire): switch the random seeding with the current random
value to seeding with the current time.  Seeding with the
current random value does not actually improve the randomness.

19 years agoThe previous rev. was committed accidentally, revert.
Ron Koenderink [Thu, 30 Dec 2004 02:51:12 +0000 (02:51 +0000)]
The previous rev. was committed accidentally, revert.

19 years ago(main,install_service,remove_service,service_main) [_WIN32]:
Ron Koenderink [Thu, 30 Dec 2004 02:19:44 +0000 (02:19 +0000)]
(main,install_service,remove_service,service_main) [_WIN32]:
Add the ability to specify the service name, to install
multiple services and to set -D and -e options during install.

19 years ago(rea): Code cleanup.
Ron Koenderink [Thu, 30 Dec 2004 01:43:39 +0000 (01:43 +0000)]
(rea): Code cleanup.