Commit graph

4484 commits

Author SHA1 Message Date
d1163463b6 (nstr_comp): Interpret identifiers as strings only when the
other operand is a string-value selector.
(nstr_comp_val): Don't interpret identifiers as strings.
(nstr_resolve_id): New parameter string_ok.
2005-05-14 18:07:48 +00:00
Ron Koenderink
dcd0794104 (build_bridge,build_tower,retreat_ship1): Mark "X" on sector
where mines were found when retreating.  Remove "X" when the
bridge span or tower is built.  Closes #1149809.
The bmap is now updated when the bridge span or tower is built.
A bulletin was added for when mines were swept when
retreating.
2005-05-08 18:39:09 +00:00
250fc7d354 (ship_ca): Selector mobquota clashes with mobil, rename to mquota.
(land_ca): There are two selectors rad: radioactive materials and
reaction range limit.  Rename the latter to rmax.
2005-05-08 15:25:11 +00:00
647783f652 (servercmd): Parsed BTUs into nmin and minutes into nbtu. Fix. No
functional change.
2005-05-07 08:47:32 +00:00
Ron Koenderink
921fba6532 (main,install_service) [_WIN32]: Move the construction of full path names
for program file and econfig file for installing a service to main()
instead of install_service(). This is because current directory
information is lost because of the use of chdir() to move the current
directory to the datadir.  This change also fixed the setting of a
relative directory for the econfig file.  The service starts in an
arbitrary directory so a relative path can not used by the service.
2005-05-03 00:06:10 +00:00
Ron Koenderink
9f27f5b02a (ship_grow_scale, plane_grow_scale, land_grow_scale): Change from int
to float.  This allows more control of the max. efficiency gain, and
makes it similiar to ship_mob_scale etc.  Closes #1025600.
2005-04-05 03:00:35 +00:00
44d59b5d17 (prod): All sectors produce when efficiency >=60%, not only enlistment
centers.
2005-04-04 18:54:14 +00:00
Ron Koenderink
953e5f6dc7 (xdprval): Only use of prnf() that is not for telegram text.
Replace by pr() in preparation of output conversion of telegram text
for the UTF-8 option.
2005-03-26 17:21:23 +00:00
Marc Olzheim
e15b045713 (wu,typed_wu): close() a sent telegram before waking up other threads.
Remove s_char and register on the way.
2005-03-26 00:23:25 +00:00
Marc Olzheim
73a94a3591 (turn): Check whether fclose() succeeds. 2005-03-25 23:59:48 +00:00
Ron Koenderink
92ac36ec56 (rea): Set parameters for read to [yes|no|<CNUM/CNAME>].
Add parameters for read in the command list and the info pages.
Closes #1010010.
2005-03-25 21:04:39 +00:00
60ef3f4c23 (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.
2005-03-22 20:49:54 +00:00
19a80f13c4 (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.
2005-03-21 21:05:08 +00:00
1c3eead016 Fix the previous rev. 2005-03-21 19:31:46 +00:00
Ron Koenderink
f826221a58 [_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.
2005-03-20 11:07:45 +00:00
4bb4376a57 (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.
2005-03-19 17:16:29 +00:00
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
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
6b68f73ca8 Doc fix. 2005-03-12 18:06:31 +00:00
63d8684cd0 Fix the previous rev. 2005-03-12 17:34:11 +00:00
7d71984932 (pre_update_hook): New configuration key.
(update_wait): Implement it.
(run_hook): New.
2005-03-12 17:24:57 +00:00