empserver
17 years agoUpdate for 4.2.19. v4.2.19
Markus Armbruster [Thu, 23 Dec 2004 20:42:39 +0000 (20:42 +0000)]
Update for 4.2.19.

17 years agoIndentation fix.
Markus Armbruster [Tue, 21 Dec 2004 20:09:14 +0000 (20:09 +0000)]
Indentation fix.

17 years agoUpdated from man/emp_client.6 rev. 1.7.
Markus Armbruster [Tue, 21 Dec 2004 13:40:47 +0000 (13:40 +0000)]
Updated from man/emp_client.6 rev. 1.7.

17 years agoFix spelling of daemon, for crying out loud!
Markus Armbruster [Tue, 21 Dec 2004 13:27:36 +0000 (13:27 +0000)]
Fix spelling of daemon, for crying out loud!

Remove irrelevant information on player thread.

Clarify that -d makes the server abort on internal errors.

17 years agoUpdate patch for src/server/main.c:1.29,include/prototypes.h:1.61 and
Marc Olzheim [Tue, 21 Dec 2004 13:19:29 +0000 (13:19 +0000)]
Update patch for src/server/main.c:1.29,include/prototypes.h:1.61 and
src/lib/commands/laun.c:1.9.  No functional changes.

17 years agoFix typesetting of option arguments.
Markus Armbruster [Tue, 21 Dec 2004 13:16:46 +0000 (13:16 +0000)]
Fix typesetting of option arguments.

Fix English in section authors.

17 years agoReally fix typesetting of option arguments.
Markus Armbruster [Tue, 21 Dec 2004 13:06:32 +0000 (13:06 +0000)]
Really fix typesetting of option arguments.

17 years agoMove arguments behind options in the synopsis.
Markus Armbruster [Tue, 21 Dec 2004 12:48:46 +0000 (12:48 +0000)]
Move arguments behind options in the synopsis.

Fix typesetting of option arguments.

Document environment variables more clearly, and without assuming csh
syntax.

17 years ago(main, start_sever): Previous revision broke POSIX threads under
Markus Armbruster [Tue, 21 Dec 2004 12:29:51 +0000 (12:29 +0000)]
(main, start_sever): Previous revision broke POSIX threads under
Linux.  Undo the problematic bit of the change.

17 years agoRealign comment with its object; got separated in the previous rev.
Markus Armbruster [Tue, 21 Dec 2004 12:26:30 +0000 (12:26 +0000)]
Realign comment with its object; got separated in the previous rev.
No functional changes.

17 years agoFix rev. 1.5's placement of braces. No functional changes.
Markus Armbruster [Tue, 21 Dec 2004 12:23:01 +0000 (12:23 +0000)]
Fix rev. 1.5's placement of braces.  No functional changes.

17 years agoExplain that -s and -p imply -d.
Ron Koenderink [Tue, 21 Dec 2004 03:22:10 +0000 (03:22 +0000)]
Explain that -s and -p imply -d.

17 years agoswitched comment from // format to /* */ format.
Ron Koenderink [Tue, 21 Dec 2004 03:16:18 +0000 (03:16 +0000)]
switched comment from // format to /* */ format.

17 years ago(main,close_files,loc_NT_Term,empth_exit):
Ron Koenderink [Tue, 21 Dec 2004 03:10:30 +0000 (03:10 +0000)]
(main,close_files,loc_NT_Term,empth_exit):
Add Windows Service to the server.
This includes adding install service and remove service option.
Move the start code from main to separate function.
Make close_files() and loc_NT_Term() global.
Move disassoc() to be earlier in the startup sequence.

17 years agoswitch comments from // format to /* */ format.
Ron Koenderink [Tue, 21 Dec 2004 02:20:26 +0000 (02:20 +0000)]
switch comments from // format to /* */ format.

17 years ago[_WIN32] (panic): Unused under Windows, remove from build.
Ron Koenderink [Tue, 21 Dec 2004 01:56:57 +0000 (01:56 +0000)]
[_WIN32] (panic): Unused under Windows, remove from build.

17 years agoChange -2outfile to -2 outfile for both empire.6 and emp_client.6.
Ron Koenderink [Mon, 20 Dec 2004 23:29:46 +0000 (23:29 +0000)]
Change -2outfile to -2 outfile for both empire.6 and emp_client.6.

17 years ago(main, termio): Add the ability to set the username.
Ron Koenderink [Sun, 19 Dec 2004 18:17:56 +0000 (18:17 +0000)]
(main, termio): Add the ability to set the username.
Get it from environment variable LOGNAME if set,
else get the user name from the system.

(main) [_DWIN32]: Add stdin redirection ability to the Win32 port.
The client reads until stdin redirection empty and then terminates.

17 years ago(panic): Instead of exiting successfully, commit suicide by re-raising
Markus Armbruster [Sat, 18 Dec 2004 10:26:53 +0000 (10:26 +0000)]
(panic): Instead of exiting successfully, commit suicide by re-raising
the signal.

17 years ago(termio): Fix crash bug: when input line starts with '?', `s' was used
Markus Armbruster [Sat, 18 Dec 2004 08:53:23 +0000 (08:53 +0000)]
(termio): Fix crash bug: when input line starts with '?', `s' was used
uninitialized.

(buf, exec, termio): Make buf[] and exec[] local to termio().

17 years ago(NUKEFAILDETONATE, opt_NUKEFAILDETONATE, Options, msl_hit): Remove
Markus Armbruster [Fri, 17 Dec 2004 19:45:33 +0000 (19:45 +0000)]
(NUKEFAILDETONATE, opt_NUKEFAILDETONATE, Options, msl_hit): Remove
option NUKEFAILDETONATE.

17 years ago(ORBIT, opt_ORBIT, Options, launch_sat, pdump, plan, prod_plane):
Markus Armbruster [Fri, 17 Dec 2004 19:29:36 +0000 (19:29 +0000)]
(ORBIT, opt_ORBIT, Options, launch_sat, pdump, plan, prod_plane):
Remove nooption ORBIT.

17 years ago"(turn): Fix comparing the output of write() to an unsigned sizeof by
Marc Olzheim [Fri, 17 Dec 2004 15:44:57 +0000 (15:44 +0000)]
"(turn): Fix comparing the output of write() to an unsigned sizeof by
casting the sizeof to write's most used return-type (ssize_t). Introduce
a typedef for ssize_t for _WIN32 in include/misc.h."

17 years ago"(turn): Fix comparing the output of write() to an unsigned sizeof by
Marc Olzheim [Fri, 17 Dec 2004 15:39:28 +0000 (15:39 +0000)]
"(turn): Fix comparing the output of write() to an unsigned sizeof by
casting the sizeof to write's most used return-type (ssize_t). Introduce
a typedef for ssize_t for WIN32."

17 years ago(info): Polish output for ambigous topic argument.
Markus Armbruster [Fri, 17 Dec 2004 13:58:10 +0000 (13:58 +0000)]
(info): Polish output for ambigous topic argument.

17 years agoBelatedly remove ROLLOVER_AVAIL.
Markus Armbruster [Thu, 16 Dec 2004 23:13:06 +0000 (23:13 +0000)]
Belatedly remove ROLLOVER_AVAIL.

17 years ago(GUINEA_PIGS, opt_GUINEA_PIGS, Options): New option GUINEA_PIGS.
Markus Armbruster [Thu, 16 Dec 2004 23:11:59 +0000 (23:11 +0000)]
(GUINEA_PIGS, opt_GUINEA_PIGS, Options): New option GUINEA_PIGS.

17 years agoInitial version; needs work.
Markus Armbruster [Thu, 16 Dec 2004 22:17:02 +0000 (22:17 +0000)]
Initial version; needs work.

17 years agoCanonicalize line endings.
Markus Armbruster [Thu, 16 Dec 2004 22:10:53 +0000 (22:10 +0000)]
Canonicalize line endings.

17 years ago(player_coms): Implement c_form for xdump and enable the command.
Markus Armbruster [Thu, 16 Dec 2004 22:08:03 +0000 (22:08 +0000)]
(player_coms): Implement c_form for xdump and enable the command.

17 years ago(xdump): Fail unless GUINEA_PIGS is enabled.
Markus Armbruster [Thu, 16 Dec 2004 22:05:15 +0000 (22:05 +0000)]
(xdump): Fail unless GUINEA_PIGS is enabled.

17 years ago(GUINEA_PIGS, opt_GUINEA_PIGS, Options): New option GUINEA_PIGS.
Markus Armbruster [Thu, 16 Dec 2004 22:01:30 +0000 (22:01 +0000)]
(GUINEA_PIGS, opt_GUINEA_PIGS, Options): New option GUINEA_PIGS.

17 years ago(print_config): Undo rev. 1.17's incorrect simplification of
Markus Armbruster [Thu, 16 Dec 2004 21:56:17 +0000 (21:56 +0000)]
(print_config): Undo rev. 1.17's incorrect simplification of
km_comment printing.

17 years agoBelatedly remove ROLLOVER_AVAIL and PLANENAMES.
Markus Armbruster [Thu, 16 Dec 2004 20:47:49 +0000 (20:47 +0000)]
Belatedly remove ROLLOVER_AVAIL and PLANENAMES.

17 years ago(ac_calc_flak,ac_fireflak,pinflak_planedamage): New ac_calc_flak().
Ron Koenderink [Thu, 16 Dec 2004 19:40:06 +0000 (19:40 +0000)]
(ac_calc_flak,ac_fireflak,pinflak_planedamage): New ac_calc_flak().
Move common flak damage code from ac_fireflak() and
pinflak_planedamage() to ac_calc_flak().

17 years ago(ac_calc_flak,ac_fireflak,pinflak_planedamage): New ac_calc_flak().
Ron Koenderink [Thu, 16 Dec 2004 19:28:17 +0000 (19:28 +0000)]
(ac_calc_flak,ac_fireflak,pinflak_planedamage): New ac_calc_flak().
Move common flak damage code from ac_fireflak() and
pinflak_planedamage() to ac_calc_flak().

Remove carriage return from comment.

17 years ago(comtch): Fix the previous rev.
Markus Armbruster [Thu, 16 Dec 2004 18:12:21 +0000 (18:12 +0000)]
(comtch): Fix the previous rev.

17 years ago(turn): Change the command to allow for both an MOTD and a no-login
Marc Olzheim [Thu, 16 Dec 2004 14:17:08 +0000 (14:17 +0000)]
(turn): Change the command to allow for both an MOTD and a no-login
message.  Clean 'register' and 's_char' remnants on the way.
Circumvents bug #813167.

17 years ago(ship_bomb): Prevent bombing of subs that where not found by the ASW plane.
Ron Koenderink [Thu, 16 Dec 2004 12:42:53 +0000 (12:42 +0000)]
(ship_bomb): Prevent bombing of subs that where not found by the ASW plane.

17 years ago(ef_extend): free allocated tmpobj before early returns as well.
Marc Olzheim [Thu, 16 Dec 2004 12:29:41 +0000 (12:29 +0000)]
(ef_extend): free allocated tmpobj before early returns as well.

17 years ago(EFF_COM,ef_items): No longer in use after removal of 'variables'. Removed.
Marc Olzheim [Thu, 16 Dec 2004 12:25:56 +0000 (12:25 +0000)]
(EFF_COM,ef_items): No longer in use after removal of 'variables'. Removed.
Clean 'register' and s_char on the way. Remove dead code.
Rename some variables to better reflect their meaning.
Add function comments.

17 years ago(EFF_COM,ef_items): No longer in use after removal of 'variables'. Removed.
Marc Olzheim [Thu, 16 Dec 2004 12:22:58 +0000 (12:22 +0000)]
(EFF_COM,ef_items): No longer in use after removal of 'variables'. Removed.
Clean s_char on the way.

17 years ago(EFF_COM): No longer in use after removal of 'variables'
Marc Olzheim [Thu, 16 Dec 2004 12:21:08 +0000 (12:21 +0000)]
(EFF_COM): No longer in use after removal of 'variables'

17 years ago(have_looked,have_found,set_have_looked,set_have_found,print_found):
Ron Koenderink [Thu, 16 Dec 2004 11:12:28 +0000 (11:12 +0000)]
(have_looked,have_found,set_have_looked,set_have_found,print_found):
collapse to shiplist function set (add,free,print,on). Fix bug where ship
uid was a unsigned char instead of short.  Switch to head pointer instead
of head record with a linked list. Add a free().

17 years ago(getopt.h) move to src/lib/gen directory to prevent conflicts with
Ron Koenderink [Wed, 15 Dec 2004 14:02:07 +0000 (14:02 +0000)]
(getopt.h) move to src/lib/gen directory to prevent conflicts with
/usr/include/getopt.h.

17 years agoFix bug #883113. Differentiate between sct_work and sct_loyal.
Marc Olzheim [Wed, 15 Dec 2004 12:23:56 +0000 (12:23 +0000)]
Fix bug #883113. Differentiate between sct_work and sct_loyal.

17 years ago(scuttle_tradeship): Remove carriage return.
Ron Koenderink [Wed, 15 Dec 2004 03:00:08 +0000 (03:00 +0000)]
(scuttle_tradeship): Remove carriage return.

17 years ago(getopt): Remove carriage return.
Ron Koenderink [Wed, 15 Dec 2004 02:52:57 +0000 (02:52 +0000)]
(getopt): Remove carriage return.

17 years ago(show_sect_build): Remove carriage return.
Ron Koenderink [Wed, 15 Dec 2004 02:51:08 +0000 (02:51 +0000)]
(show_sect_build): Remove carriage return.

17 years ago(upd_ship): Remove carriage return.
Ron Koenderink [Wed, 15 Dec 2004 02:48:47 +0000 (02:48 +0000)]
(upd_ship): Remove carriage return.

17 years ago(prod): Fix bug #1083175. Use max_pop() not just when opt_RES_POP is
Marc Olzheim [Tue, 14 Dec 2004 19:45:47 +0000 (19:45 +0000)]
(prod): Fix bug #1083175. Use max_pop() not just when opt_RES_POP is
enabled to determine the new working population of a sector.

17 years ago(orde,eta_calc): Remove unaccessed leftover variables nships,mcp.
Marc Olzheim [Tue, 14 Dec 2004 17:47:03 +0000 (17:47 +0000)]
(orde,eta_calc): Remove unaccessed leftover variables nships,mcp.
No functional changes.

17 years ago(ship_bomb,land_bomb): Remove unaccessed leftover variables lcp,onsea.
Marc Olzheim [Tue, 14 Dec 2004 17:43:54 +0000 (17:43 +0000)]
(ship_bomb,land_bomb): Remove unaccessed leftover variables lcp,onsea.
No functional changes.

17 years ago(resupply_commod,has_supply,use_supply): Remove unaccessed leftover
Marc Olzheim [Tue, 14 Dec 2004 17:40:59 +0000 (17:40 +0000)]
(resupply_commod,has_supply,use_supply): Remove unaccessed leftover
variables lcp.  No functional changes.

17 years ago(ac_airtoair): No need to pass def_own, as the owner of the intercepting
Marc Olzheim [Tue, 14 Dec 2004 17:21:05 +0000 (17:21 +0000)]
(ac_airtoair): No need to pass def_own, as the owner of the intercepting
planes is used anyway.  Clean up other unaccessed variables in the process.
No functional changes.

17 years ago(scut): Remove unaccessed remnants from before 1.1. No functional changes.
Marc Olzheim [Mon, 13 Dec 2004 17:36:43 +0000 (17:36 +0000)]
(scut): Remove unaccessed remnants from before 1.1.  No functional changes.

17 years agoUpdate patches for #include cleanup, changing offsets. No functional changes.
Marc Olzheim [Mon, 13 Dec 2004 17:01:07 +0000 (17:01 +0000)]
Update patches for #include cleanup, changing offsets.  No functional changes.

17 years agoCleanup #includes of (mostly a long time) unused header files.
Marc Olzheim [Mon, 13 Dec 2004 16:47:13 +0000 (16:47 +0000)]
Cleanup #includes of (mostly a long time) unused header files.
No functional changes.

17 years agoOnly prototypes.h is needed, not all of gen.h. No functional changes.
Marc Olzheim [Mon, 13 Dec 2004 16:20:33 +0000 (16:20 +0000)]
Only prototypes.h is needed, not all of gen.h.  No functional changes.

18 years agoUpdate patch for src/server/main.c:1.23. No functional changes.
Marc Olzheim [Mon, 13 Dec 2004 10:33:16 +0000 (10:33 +0000)]
Update patch for src/server/main.c:1.23.  No functional changes.

18 years ago(main): Remove the extern for optarg, get from include file.
Ron Koenderink [Sun, 12 Dec 2004 22:48:22 +0000 (22:48 +0000)]
(main): Remove the extern for optarg, get from include file.

18 years ago(do_plague): Remove the carriage return.
Ron Koenderink [Sun, 12 Dec 2004 19:46:28 +0000 (19:46 +0000)]
(do_plague): Remove the carriage return.

18 years ago(sct_pstage, sct_ptime, shp_pstage, shp_ptime, lnd_pstage, lnd_ptime):
Ron Koenderink [Sun, 12 Dec 2004 19:39:35 +0000 (19:39 +0000)]
(sct_pstage, sct_ptime, shp_pstage, shp_ptime, lnd_pstage, lnd_ptime):
Use `short' instead of `unsigned short'.  With variables, plague stage
and time were stored unsigned and used signed, which worked.  Removal
of variables dropped the conversion to signed, which broke
plague_people() (plague.c rev. 1.6): stage didn't progress correctly
due to catastrophic underflow of time.

18 years ago(main): Remove the extern for optarg, get from include file.
Ron Koenderink [Sat, 11 Dec 2004 11:15:36 +0000 (11:15 +0000)]
(main): Remove the extern for optarg, get from include file.

(main): Cast getpid() to an int for printing.

18 years ago(main) [_WIN32]: Remove unneccessary #ifdef for srand,
Ron Koenderink [Fri, 10 Dec 2004 11:21:52 +0000 (11:21 +0000)]
(main) [_WIN32]: Remove unneccessary #ifdef for srand,
use #define in misc.h.

(main): Remove unneccessary 'now' variable used for srand().

18 years ago(getopt) [_WIN32]: New for parsing command line arguments.
Ron Koenderink [Fri, 10 Dec 2004 02:19:30 +0000 (02:19 +0000)]
(getopt) [_WIN32]: New for parsing command line arguments.

18 years agoUpdate offset for src/server/main.c:1.21
Marc Olzheim [Wed, 8 Dec 2004 18:00:51 +0000 (18:00 +0000)]
Update offset for src/server/main.c:1.21

18 years ago(main) [_WIN32]: Switch to Unix style function for access and mkdir.
Ron Koenderink [Wed, 8 Dec 2004 13:13:06 +0000 (13:13 +0000)]
(main) [_WIN32]:  Switch to Unix style function for access and mkdir.

18 years ago(main) [_WIN32]: Switch to Unix style function for access and mkdir.
Ron Koenderink [Wed, 8 Dec 2004 13:10:15 +0000 (13:10 +0000)]
(main) [_WIN32]:  Switch to Unix style function for access and mkdir.

(info) [_WIN32]: Switch to standard function for strncasecmp.

18 years ago(print_usage): New.
Ron Koenderink [Wed, 8 Dec 2004 13:02:10 +0000 (13:02 +0000)]
(print_usage): New.
(main): Use it.

(main) [_WIN32]: Parse command line arguments.

(main) [_WIN32]:  Switch to Unix style function for access and mkdir.

18 years ago(getopt) [_WIN32]: New for parsing command line arguments.
Ron Koenderink [Wed, 8 Dec 2004 12:59:28 +0000 (12:59 +0000)]
(getopt) [_WIN32]: New for parsing command line arguments.

18 years ago(print_usage): New.
Ron Koenderink [Wed, 8 Dec 2004 12:42:53 +0000 (12:42 +0000)]
(print_usage): New.
(main): Use it.

(main) [_WIN32]: Parse command line arguments.

18 years ago(emp_server.exe): Link with advapi32.lib for getpid().
Ron Koenderink [Tue, 7 Dec 2004 19:00:12 +0000 (19:00 +0000)]
(emp_server.exe): Link with advapi32.lib for getpid().

18 years ago(main) [_WIN32]: remove WIN32 flags for the getpid functions and
Ron Koenderink [Tue, 7 Dec 2004 18:48:27 +0000 (18:48 +0000)]
(main) [_WIN32]: remove WIN32 flags for the getpid functions and
standardize the code.

(nullify_objects): Remove unneccesary carriage returns.

18 years ago(scuttle_tradeships): calculate ally percentage before ally bonus is applied.
Ron Koenderink [Sun, 5 Dec 2004 14:14:19 +0000 (14:14 +0000)]
(scuttle_tradeships): calculate ally percentage before ally bonus is applied.
Change to match the description in the info page.

18 years agoDon't run the test script on the 64bit Solaris build, since it hangs the emp_server.
Marc Olzheim [Tue, 30 Nov 2004 18:21:57 +0000 (18:21 +0000)]
Don't run the test script on the 64bit Solaris build, since it hangs the emp_server.

18 years agoAdd some more elaborate tests for player 1
Marc Olzheim [Mon, 29 Nov 2004 21:28:51 +0000 (21:28 +0000)]
Add some more elaborate tests for player 1

18 years agoFix spelling mistake.
Ron Koenderink [Fri, 26 Nov 2004 13:27:02 +0000 (13:27 +0000)]
Fix spelling mistake.

18 years agoUpdate patch offsets. No functional changes.
Marc Olzheim [Fri, 26 Nov 2004 09:52:25 +0000 (09:52 +0000)]
Update patch offsets.  No functional changes.

18 years ago(news_ca): Revert bad change made in rev. 1.22.
Markus Armbruster [Mon, 15 Nov 2004 21:57:58 +0000 (21:57 +0000)]
(news_ca): Revert bad change made in rev. 1.22.

18 years ago(prod): Fix rounding of value in column `max'.
Markus Armbruster [Sun, 14 Nov 2004 14:13:07 +0000 (14:13 +0000)]
(prod): Fix rounding of value in column `max'.

18 years ago(info): Print the info topics found when the abbreviation is not unique. Closes ...
Ron Koenderink [Thu, 11 Nov 2004 01:58:35 +0000 (01:58 +0000)]
(info): Print the info topics found when the abbreviation is not unique. Closes #1018302.

18 years ago(info): Fix when with last character is special.
Ron Koenderink [Wed, 10 Nov 2004 00:02:29 +0000 (00:02 +0000)]
(info): Fix when with last character is special.
Also reorganized to check for special characters then blank.

(info): Add length boundary check to filename variable.
Change WIN32 to use the same code.

(info) [_WIN32]: Fix check for invalid file attributes.

(apro): Ensure the user does not see the directory information on error.
See #1028552 for reference.

(apro): Ensure the directories, operating system files, and
hidden files are skipped.

18 years agoi_type shift (include/item.h 1.12) broke the production of tech/res/edu/hap.
Ron Koenderink [Sun, 31 Oct 2004 15:01:19 +0000 (15:01 +0000)]
i_type shift (include/item.h 1.12) broke the production of tech/res/edu/hap.
Switch p_type to use I_NONE for products that to not produce items.

18 years ago(dchr): Negative d_cost now means that only deity can designate.
Ron Koenderink [Fri, 29 Oct 2004 01:38:06 +0000 (01:38 +0000)]
(dchr): Negative d_cost now means that only deity can designate.
(nullify_objects, do_desi): Simpify designate restrictions of options
NO_LCMS, NO_HCMS, NO_OIL.

(show_sect_build): Suppress printing of sectors only deity can
designate.  This was broken in rev. 1.15.

18 years agoCorrect the instructions for the Win32 build.
Ron Koenderink [Tue, 19 Oct 2004 12:52:59 +0000 (12:52 +0000)]
Correct the instructions for the Win32 build.

18 years ago(main,termio): Add the ability to set the username.
Ron Koenderink [Tue, 19 Oct 2004 01:48:24 +0000 (01:48 +0000)]
(main,termio): Add the ability to set the username.
Get it from environment variable LOGNAME if set,
else get the user name from the system.

18 years ago(main, termio): Add the ability to set the username.
Ron Koenderink [Tue, 19 Oct 2004 01:11:31 +0000 (01:11 +0000)]
(main, termio): Add the ability to set the username.
Get it from environment variable LOGNAME if set,
else get the user name from the system.

(main) [_DWIN32]: Add stdin redirection ability to the Win32 port.
The client reads until stdin redirection empty and then terminates.

18 years ago(var.h, plague.h): Since all that was left in var.h were some plague
Marc Olzheim [Tue, 12 Oct 2004 20:25:33 +0000 (20:25 +0000)]
(var.h, plague.h): Since all that was left in var.h were some plague
defines, import these defines into plague.h, drop var.h and include
plague.h where appropriate.
Remove some 'register' keywords at the same time.
No functional changes.

18 years agoDo not include var.h where no longer needed. Clean up register keywords in these...
Marc Olzheim [Tue, 12 Oct 2004 20:08:51 +0000 (20:08 +0000)]
Do not include var.h where no longer needed.  Clean up register keywords in these file at the same time.  No functional changes.

18 years ago(i_type, I_NONE): shift the enum down 1, so that I_NONE does not need to
Marc Olzheim [Tue, 12 Oct 2004 19:48:53 +0000 (19:48 +0000)]
(i_type, I_NONE): shift the enum down 1, so that I_NONE does not need to
be skipped or stored in arrays of size I_MAX. I_NONE's int equivalent
becomes -1 by this patch, so all array indices of type i_type have been
checked not to use I_NONE as index.  This change reduces the size of the
arrays stored in files.

18 years ago(i_type): one patch too many in the previous commit. No functional changes.
Marc Olzheim [Tue, 12 Oct 2004 15:55:10 +0000 (15:55 +0000)]
(i_type): one patch too many in the previous commit.  No functional changes.

18 years ago(ac_encounter): Ignore embarked land units when checking for planes
Markus Armbruster [Tue, 5 Oct 2004 18:49:59 +0000 (18:49 +0000)]
(ac_encounter): Ignore embarked land units when checking for planes
overflying land units.  Reported by Doug Wescott.

18 years ago(new): When first sanctuary is a wilderness, but second isn't, code
Markus Armbruster [Tue, 5 Oct 2004 18:45:49 +0000 (18:45 +0000)]
(new): When first sanctuary is a wilderness, but second isn't, code
complained about the first one.

18 years ago(mcost): Unused, remove.
Markus Armbruster [Tue, 5 Oct 2004 18:41:18 +0000 (18:41 +0000)]
(mcost): Unused, remove.

18 years ago(info): Don't leak potentially sensitive information to player in
Ron Koenderink [Tue, 5 Oct 2004 01:17:08 +0000 (01:17 +0000)]
(info): Don't leak potentially sensitive information to player in
error messages.  Properly log all system errors and return RET_SYS.
Closes #1028552.

(info): Fix use of uninitialized variable when fopen() succeeds but
fstat() or the st_mode check fails.

(info) [_WIN32]: Fix '//' to be '\\'.  Add file type check to prevent
opening hidden or operating system files.

18 years agoWork around for broken MSC C++ 6.0 (VC98) choking on empty macro arguments.
Ron Koenderink [Tue, 5 Oct 2004 01:08:21 +0000 (01:08 +0000)]
Work around for broken MSC C++ 6.0 (VC98) choking on empty macro arguments.
Fixed in MSC C++ 7.0.

18 years agoRemove the unused/not needed code.
Ron Koenderink [Sun, 3 Oct 2004 16:16:05 +0000 (16:16 +0000)]
Remove the unused/not needed code.

18 years ago(item_prewrite): New.
Markus Armbruster [Sun, 19 Sep 2004 07:56:57 +0000 (07:56 +0000)]
(item_prewrite): New.
(checksect, shp_prewrite, lnd_prewrite): Use it.

18 years ago(shoo): Code to enfore the mobility limit assumed double m were
Markus Armbruster [Sun, 19 Sep 2004 07:16:44 +0000 (07:16 +0000)]
(shoo): Code to enfore the mobility limit assumed double m were
integer.  When 5 * sect.sct_mobil - 4 < nshot < 5 * sect.sct_mobil,
nshot was rounded up to the next multiple of 5.  This could shoot more
people than present, resulting in negative population.  Before
rev. 1.3, putvar() swept this error under the rug.