]> git.pond.sub.org Git - empserver/log
empserver
18 years agoRemove superflous include.
Markus Armbruster [Sun, 11 Dec 2005 10:09:09 +0000 (10:09 +0000)]
Remove superflous include.

18 years ago(lwpNewContext) [MAKECONTEXT_SP_HIGH]: Work around makecontext()
Markus Armbruster [Sun, 11 Dec 2005 08:18:15 +0000 (08:18 +0000)]
(lwpNewContext) [MAKECONTEXT_SP_HIGH]: Work around makecontext()
lossage.
(IRIX5CFLAGS, SOLCFLAGS): Define MAKECONTEXT_SP_HIGH.  This is wrong
for Solaris 10.

18 years ago(lwpCreate): Check for lwpNewContext() success.
Markus Armbruster [Sat, 10 Dec 2005 20:42:42 +0000 (20:42 +0000)]
(lwpCreate): Check for lwpNewContext() success.

18 years ago(lwpNewContext) [UCONTEXT]: Fix the previous revision.
Markus Armbruster [Sat, 10 Dec 2005 20:41:44 +0000 (20:41 +0000)]
(lwpNewContext) [UCONTEXT]: Fix the previous revision.

18 years agoRedesign interface to machine-dependent code to cleanse lwp.c of
Markus Armbruster [Sat, 10 Dec 2005 19:28:24 +0000 (19:28 +0000)]
Redesign interface to machine-dependent code to cleanse lwp.c of
machine-dependencies:
(lwpNewContext): New, factored out of lwpCreate().
(lwpSwitchContext): New, factored out of lwpReschedule().
(LWP_EXTRASTACK, STKALIGN, lwpInitContext, lwpSave, lwpRestore): Move
to arch.c.  Remove for UCONTEXT, else static linkage unless macro or
AIX32.

(lwpReschedule): Skip lwpStatus() when not actually switching.

(LwpStackGrowsDown): New.
(lwpInitSystem): Initialize it.
(lwpStackCheck, lwpStackCheckUsed): Use it.

18 years ago(lwpProc): Members lowmark and himark are confusing, replace by
Markus Armbruster [Sat, 10 Dec 2005 17:26:22 +0000 (17:26 +0000)]
(lwpProc): Members lowmark and himark are confusing, replace by
ustack, usize.
(lwpCreate): Initialize them.
(lwpStackCheckInit, lwpStackCheck, lwpStackCheckUsed): Rewrite using
them.  lwpStackCheckUsed() was off by LWP_REDZONE when stack grows
down.

(lwpDestroy): Don't bother to clear memory to be freed.

18 years agoClean up the move of lwpProc (lwpint.h rev. 1.11, lwp.h rev. 1.8).
Markus Armbruster [Sat, 10 Dec 2005 16:55:38 +0000 (16:55 +0000)]
Clean up the move of lwpProc (lwpint.h rev. 1.11, lwp.h rev. 1.8).

18 years ago(lwpInitContext) [UCONTEXT]: Failed to initialized uc_stack.ss_flags.
Markus Armbruster [Sat, 10 Dec 2005 15:03:11 +0000 (15:03 +0000)]
(lwpInitContext) [UCONTEXT]: Failed to initialized uc_stack.ss_flags.

18 years agoClean up the move of lwpProc (lwpint.h rev. 1.11, lwp.h rev. 1.8).
Markus Armbruster [Sat, 10 Dec 2005 15:00:35 +0000 (15:00 +0000)]
Clean up the move of lwpProc (lwpint.h rev. 1.11, lwp.h rev. 1.8).

18 years ago(empth_start, empth_init, empth_alarm) [_EMPTH_POSIX]: We do raise
Markus Armbruster [Fri, 9 Dec 2005 20:52:30 +0000 (20:52 +0000)]
(empth_start, empth_init, empth_alarm) [_EMPTH_POSIX]: We do raise
SIGALRM!  Revert rev. 1.21.

(empth_alarm): Internal linkage.

18 years ago(lwpCreate) [UCONTEXT]: ss_sp is the (base) address of the stack area,
Markus Armbruster [Wed, 7 Dec 2005 20:39:55 +0000 (20:39 +0000)]
(lwpCreate) [UCONTEXT]: ss_sp is the (base) address of the stack area,
not the initial stack pointer.  Fix.  ss_size was wrong as well.
Amazing that this ever worked.

18 years ago[UCONTEXT] (lwpInitContext): Failed to initialize context.uc_link as
Markus Armbruster [Wed, 7 Dec 2005 20:32:25 +0000 (20:32 +0000)]
[UCONTEXT] (lwpInitContext): Failed to initialize context.uc_link as
required by the API.

18 years ago(lwpCreate): Check STKALIGN is sane.
Markus Armbruster [Wed, 7 Dec 2005 20:28:12 +0000 (20:28 +0000)]
(lwpCreate): Check STKALIGN is sane.

(lwpCreate): Used to allocate one byte more than necessary.  The fix
won't save memory (malloc() will add the byte back), it's just clearer
this way.

(lwpCreate): Clean up computation of sp.  Rename parameter size to
stacksz.

(lwpCreate): Always compute newp->lowmark and newp->highmark from sp,
not from s.  Old code misaligned newp->himark for stacks growing
upward when stack size argument wasn't aligned.

18 years ago(stkalign_t, STKALIGN): Replace.
Markus Armbruster [Wed, 7 Dec 2005 19:47:26 +0000 (19:47 +0000)]
(stkalign_t, STKALIGN): Replace.

18 years ago(lwpProc, lwpSem): Declare as incomplete type in include/lwp.h. Move
Markus Armbruster [Wed, 7 Dec 2005 19:15:37 +0000 (19:15 +0000)]
(lwpProc, lwpSem): Declare as incomplete type in include/lwp.h.  Move
complete declaration to src/lib/lwp/lwpint.h.
(lwpQueue): Move to src/lib/lwp/lwpint.h.
(empth_main, empth_flags): New.
(empth_init): Initialize them.
(empth_create, empth_exit): Use them instead of lwpProc members.

18 years ago(lwpReschedule): Fix the previous revision.
Markus Armbruster [Tue, 6 Dec 2005 00:12:34 +0000 (00:12 +0000)]
(lwpReschedule): Fix the previous revision.

18 years ago[BOUNDS_CHECK]: Defunct, remove.
Markus Armbruster [Mon, 5 Dec 2005 22:58:23 +0000 (22:58 +0000)]
[BOUNDS_CHECK]: Defunct, remove.
(lwpReschedule): Fix potential crash bug that crept in with
BOUNDS_CHECK years ago.

18 years ago(lwpSleepFd): More information in debug output.
Markus Armbruster [Mon, 5 Dec 2005 22:38:58 +0000 (22:38 +0000)]
(lwpSleepFd): More information in debug output.

(lwpSelect): Fix use of uninitialized variable in debug output.

18 years agoFix the previous revision.
Markus Armbruster [Mon, 5 Dec 2005 22:34:22 +0000 (22:34 +0000)]
Fix the previous revision.

18 years agoClean up includes.
Markus Armbruster [Mon, 5 Dec 2005 22:31:45 +0000 (22:31 +0000)]
Clean up includes.

18 years agoDoc fix.
Markus Armbruster [Mon, 5 Dec 2005 22:28:52 +0000 (22:28 +0000)]
Doc fix.

18 years ago(oops): Move declaration to misc.h, to make CANT_HAPPEN() usable
Markus Armbruster [Mon, 5 Dec 2005 22:13:35 +0000 (22:13 +0000)]
(oops): Move declaration to misc.h, to make CANT_HAPPEN() usable
with just misc.h included.

18 years ago(lwpSave, lwpReschedule) [hpc]: Move machine-dependent code to arch.c,
Markus Armbruster [Mon, 5 Dec 2005 21:38:03 +0000 (21:38 +0000)]
(lwpSave, lwpReschedule) [hpc]: Move machine-dependent code to arch.c,
where it belongs.  Code looks fishy.  Untested.
(initcontext, startpoint): Internal linkage.

18 years agoRemove LWP code for targets we no longer support: VAX/MIPS Ultrix
Markus Armbruster [Mon, 5 Dec 2005 21:07:24 +0000 (21:07 +0000)]
Remove LWP code for targets we no longer support: VAX/MIPS Ultrix
(dropped in Make.sysdefs rev. 1.12), 386 USL/Unixware (unclear, long
ago), 386BSD (never been?)

18 years agoClean up the incomprehensible #ifdef jungle a bit. Didn't compile if
Markus Armbruster [Mon, 5 Dec 2005 20:30:29 +0000 (20:30 +0000)]
Clean up the incomprehensible #ifdef jungle a bit.  Didn't compile if
both UCONTEXT and one of the other recognized preprocessor symbols was
defined; fix to prefer UCONTEXT.

18 years ago(lwpCreate): Clean up the incomprehensible #ifdef jungle. No
Markus Armbruster [Mon, 5 Dec 2005 19:16:59 +0000 (19:16 +0000)]
(lwpCreate): Clean up the incomprehensible #ifdef jungle.  No
functional changes.

18 years agoRemove silly superflous parenthesis.
Markus Armbruster [Sat, 3 Dec 2005 21:14:26 +0000 (21:14 +0000)]
Remove silly superflous parenthesis.

18 years ago(peek): Old owner is not hidden, remove column.
Markus Armbruster [Sat, 3 Dec 2005 21:04:00 +0000 (21:04 +0000)]
(peek): Old owner is not hidden, remove column.

18 years ago(peek, empmod): Remove obsolete command hidden.
Markus Armbruster [Sat, 3 Dec 2005 21:02:31 +0000 (21:02 +0000)]
(peek, empmod): Remove obsolete command hidden.

18 years agoDoc fix.
Markus Armbruster [Sat, 3 Dec 2005 20:59:07 +0000 (20:59 +0000)]
Doc fix.

18 years ago(xundump): Fix rev. 1.19.
Markus Armbruster [Sat, 3 Dec 2005 16:15:16 +0000 (16:15 +0000)]
(xundump): Fix rev. 1.19.

18 years ago(xuflds, xunsymbol, xuloadrow): Symbol sets.
Markus Armbruster [Sat, 3 Dec 2005 14:14:44 +0000 (14:14 +0000)]
(xuflds, xunsymbol, xuloadrow): Symbol sets.
(VAL_SYMBOL_SET, getid, xunsymbol1): New.

(xunsymbol): New argument n for more useful diagnostics.

(xuloadrow): Remove redundant semantic check.

18 years ago(xunsymbol): Fix design flaw: negative symbol values were interpreted
Markus Armbruster [Sat, 3 Dec 2005 13:38:52 +0000 (13:38 +0000)]
(xunsymbol): Fix design flaw: negative symbol values were interpreted
as failure.

18 years ago(xuflds): Allow unescaped space and tab in strings. Also fix the
Markus Armbruster [Sat, 3 Dec 2005 11:36:55 +0000 (11:36 +0000)]
(xuflds): Allow unescaped space and tab in strings.  Also fix the
previous revision, which broke '#' in strings.

18 years ago(xuloadrow): Fix crash.
Markus Armbruster [Sat, 3 Dec 2005 11:19:20 +0000 (11:19 +0000)]
(xuloadrow): Fix crash.

18 years agoLess rigid field separators, support comments:
Markus Armbruster [Sat, 3 Dec 2005 11:04:44 +0000 (11:04 +0000)]
Less rigid field separators, support comments:
(skipfs): New.
(xuflds, xundump): Use it.  Update field scanf stop-sets accordingly.
(xuflds): Update test for good field separator.

(xundump): Fail silently if nothing can be read and no specific table
is expected.

18 years ago(xuloadrow): Obey NSC_EXTRA.
Markus Armbruster [Sat, 3 Dec 2005 10:15:57 +0000 (10:15 +0000)]
(xuloadrow): Obey NSC_EXTRA.

(xuloadrow): Remove redundant `not supported' check.

18 years ago(ef_init_srv): Call ef_init() before ef_load().
Markus Armbruster [Sat, 3 Dec 2005 10:09:53 +0000 (10:09 +0000)]
(ef_init_srv): Call ef_init() before ef_load().
(xundump): Set empfile member cids in addition to fids.

(xundump): Clarify shortcomings: requires EFF_MEM, appends sentinel
always, can't grow dynamic cache.

(xundump): Return table type on success.

18 years ago(xuloadrow): Fix rev. 1.11.
Markus Armbruster [Sat, 3 Dec 2005 09:17:30 +0000 (09:17 +0000)]
(xuloadrow): Fix rev. 1.11.

18 years ago(xundump): Fix parsing of XDUMP header (really!) and footer.
Markus Armbruster [Fri, 2 Dec 2005 19:22:27 +0000 (19:22 +0000)]
(xundump): Fix parsing of XDUMP header (really!) and footer.

18 years ago(xuflds): The way field separators were parsed lead to confusing
Markus Armbruster [Fri, 2 Dec 2005 18:57:55 +0000 (18:57 +0000)]
(xuflds): The way field separators were parsed lead to confusing
diagnostics on EOF.  Fix.  Also simplify treatment of newline.

(xuflds): Require identifiers to start with a letter.

18 years ago(xundump): Fix parsing of XDUMP header.
Markus Armbruster [Fri, 2 Dec 2005 17:27:19 +0000 (17:27 +0000)]
(xundump): Fix parsing of XDUMP header.

18 years ago(xuflds): Test for no fields was off by one. Remove it; let caller
Markus Armbruster [Fri, 2 Dec 2005 17:08:36 +0000 (17:08 +0000)]
(xuflds): Test for no fields was off by one.  Remove it; let caller
deal with missing fields.

18 years ago(xuflds): Simplify test for space in values[].
Markus Armbruster [Fri, 2 Dec 2005 17:05:25 +0000 (17:05 +0000)]
(xuflds): Simplify test for space in values[].

18 years ago(xundump): Improve diagnostics. Remove superflous check for
Markus Armbruster [Fri, 2 Dec 2005 16:06:24 +0000 (16:06 +0000)]
(xundump): Improve diagnostics.  Remove superflous check for
unexpected EOF.

18 years ago(xundump): Table names no longer contain whitespace. Simplify.
Markus Armbruster [Thu, 1 Dec 2005 20:00:15 +0000 (20:00 +0000)]
(xundump): Table names no longer contain whitespace.  Simplify.

18 years ago(empfile): Space in Empire names requires players to quote the names
Markus Armbruster [Thu, 1 Dec 2005 19:53:51 +0000 (19:53 +0000)]
(empfile): Space in Empire names requires players to quote the names
on the command line.  Replace by dash.

18 years ago(xuflds): Fix confusing diagnostics on unexpected EOF.
Markus Armbruster [Thu, 1 Dec 2005 19:28:31 +0000 (19:28 +0000)]
(xuflds): Fix confusing diagnostics on unexpected EOF.

18 years agoPlug memory leaks:
Markus Armbruster [Thu, 1 Dec 2005 19:12:54 +0000 (19:12 +0000)]
Plug memory leaks:
(freeflds): New.
(xundump): Call it.
(xuloadrow): Leave freeing storage to freeflds().
(xuflds): Ensure values[] is terminated with a VAL_NOTUSED element
even on error.

18 years agoRoll back to rev. 1.3 in preparation of a re-engineering of the
Markus Armbruster [Thu, 1 Dec 2005 18:56:41 +0000 (18:56 +0000)]
Roll back to rev. 1.3 in preparation of a re-engineering of the
changes since then.

18 years ago(verify_row): Remove // comment.
Ron Koenderink [Thu, 1 Dec 2005 00:39:05 +0000 (00:39 +0000)]
(verify_row): Remove // comment.
Change %d to %ld when printing a long.

18 years ago(ef_init_srv): Add a call ef_verify() to verify game data and game
Ron Koenderink [Wed, 30 Nov 2005 19:17:58 +0000 (19:17 +0000)]
(ef_init_srv): Add a call ef_verify() to verify game data and game
configuration consistency.

(ef_verify): New.  Verifies game data and game
configuration consistency.

18 years ago(ship_chr_flags[]): Remove internal flags (M_XLIGHT, M_NCHOPPERS)
Ron Koenderink [Wed, 30 Nov 2005 18:57:53 +0000 (18:57 +0000)]
(ship_chr_flags[]): Remove internal flags (M_XLIGHT, M_NCHOPPERS)
from ship_chr_flags[] so they do not appear in the show output.

(missions[]): Add MI_NONE to missions[] table.

18 years ago(xuflds): Allow multiple spaces to separate fields or symbols in symbol set.
Ron Koenderink [Wed, 30 Nov 2005 17:16:02 +0000 (17:16 +0000)]
(xuflds): Allow multiple spaces to separate fields or symbols in symbol set.

18 years ago(xunsymbol): Fix formating.
Ron Koenderink [Wed, 30 Nov 2005 00:36:35 +0000 (00:36 +0000)]
(xunsymbol): Fix formating.

18 years ago(xuloadrow): Add missing case for VAL_SYMBOL_SET for trailing
Ron Koenderink [Wed, 30 Nov 2005 00:33:37 +0000 (00:33 +0000)]
(xuloadrow): Add missing case for VAL_SYMBOL_SET for trailing
junk row check.

(xuskipcommentlines): Make the function static.

18 years ago(xuflds, xunsymbol, xuloadrow): Split VAL_SYMBOL into
Ron Koenderink [Tue, 29 Nov 2005 23:55:17 +0000 (23:55 +0000)]
(xuflds, xunsymbol, xuloadrow): Split VAL_SYMBOL into
VAL_SYMBOL and VAL_SYMBOL_SET.  Identify SYMBOL_SET
by the '(' and ')'.  Switch SYMBOL_SET separator from '|' to a space.

18 years ago(xuskipcommentlines): Include the lines skipped in the line count.
Ron Koenderink [Tue, 29 Nov 2005 23:38:32 +0000 (23:38 +0000)]
(xuskipcommentlines): Include the lines skipped in the line count.

18 years ago(xundump): Skip lines beginning with '#'.
Ron Koenderink [Tue, 29 Nov 2005 21:50:31 +0000 (21:50 +0000)]
(xundump): Skip lines beginning with '#'.
These lines are considered comments.

(xuskipcommentlines): New.

18 years ago(plane_bomb, land_bomb): Apply collateral damage to target sector
Markus Armbruster [Tue, 29 Nov 2005 17:54:45 +0000 (17:54 +0000)]
(plane_bomb, land_bomb): Apply collateral damage to target sector
instead of where the targeted plane/land unit is after the attack.
Different if the target retreats.  Can't happen for planes.  Reported
by Greg German.

18 years agoFix bad line breaks.
Markus Armbruster [Tue, 29 Nov 2005 17:34:42 +0000 (17:34 +0000)]
Fix bad line breaks.

18 years ago(close_files, finish_server, panic):
Ron Koenderink [Tue, 29 Nov 2005 03:57:44 +0000 (03:57 +0000)]
(close_files, finish_server, panic):
Rename close_files() to ef_close_srv() and move to fileinit.c.
Replace calls to close_files() with ef_fin_srv().
Call ef_close_srv() from ef_fin_srv().

(ef_close_srv, ef_fin_srv): New.

(init_files, init_server, ef_init_srv):
Rename init_files() to ef_open_srv() and move to fileinit.c.
Remove call to init_files() from init_server() and replace
with a call to ef_open_srv() from ef_init_srv().

(ef_open_srv): New.

(ef_load, init_server, ef_init_srv):
Move the call to ef_load() from init_server() to ef_init_srv().

(global_init, init_server, ef_init_srv):
Move the call to global_init() from init_server() to ef_init_srv().

(nullify_objects, global_init, init_server):
Split nullify_objects() into init_lchr() and init_dchr().
Locate init_lchr() and init_dchr() in init.c.
Add calls to init_lchr() and to init_dchr() from global_init().

(init_lchr(), init_dchr()): New.

18 years ago(fillcache, do_write): Revert the previous revision. The portability
Markus Armbruster [Sat, 26 Nov 2005 18:36:48 +0000 (18:36 +0000)]
(fillcache, do_write): Revert the previous revision.  The portability
issue applies only to sockets, and EWOULDBLOCK isn't defined on all
systems.

18 years ago(show): Return syntax error for invalid qualifier.
Ron Koenderink [Wed, 23 Nov 2005 23:51:28 +0000 (23:51 +0000)]
(show): Return syntax error for invalid qualifier.

18 years ago(mchr[],m_flags,m_nland): Remove M_UNIT from m_flags in mchr[].
Ron Koenderink [Tue, 22 Nov 2005 23:19:59 +0000 (23:19 +0000)]
(mchr[],m_flags,m_nland): Remove M_UNIT from m_flags in mchr[].
It is not used.

18 years ago(lookup): Rename lookup() to symbol_by_value(), make it public
Ron Koenderink [Tue, 22 Nov 2005 22:57:06 +0000 (22:57 +0000)]
(lookup): Rename lookup() to symbol_by_value(), make it public
and move it to nstr.c.

18 years ago(fillcache, do_write, io_input, io_output): Portability fix: always
Markus Armbruster [Tue, 22 Nov 2005 20:28:18 +0000 (20:28 +0000)]
(fillcache, do_write, io_input, io_output): Portability fix: always
check both EAGAIN and EWOULDBLOCK.  These are distinct on some
systems, e.g. HP-UX.
(io_output) [hpux]: Used to treat all errors as EWOULDBLOCK.  This
looks like a inept attempt to `fix' the above.  Remove.

18 years ago(pln_equip): Do not abandon sector for paradrop, drop or fly.
Ron Koenderink [Tue, 22 Nov 2005 20:10:15 +0000 (20:10 +0000)]
(pln_equip): Do not abandon sector for paradrop, drop or fly.
Closes #982226

18 years ago(tend): Send a bulletin to the ally when tending items to an ally.
Ron Koenderink [Tue, 22 Nov 2005 19:28:48 +0000 (19:28 +0000)]
(tend): Send a bulletin to the ally when tending items to an ally.
Closes #929398.

18 years ago(kill_cmd): Add authority check for deities before allowing a kill.
Ron Koenderink [Mon, 21 Nov 2005 18:35:08 +0000 (18:35 +0000)]
(kill_cmd): Add authority check for deities before allowing a kill.
Closes #1215088.  Add banned host check before allowing a kill.

18 years ago(natbyname): Do not look up a non-active country.
Ron Koenderink [Mon, 21 Nov 2005 18:25:49 +0000 (18:25 +0000)]
(natbyname): Do not look up a non-active country.
Previously a blank country name or deleted country name would
return a pointer to non-active countries.
This creates a security problem where some one can successfully
login into the server without country or password.  Closes #1219569.

18 years ago(ship_chr_flags): Add internal flags (M_XLIGHT, M_CHOPPER, M_UNIT)
Ron Koenderink [Sun, 20 Nov 2005 22:15:25 +0000 (22:15 +0000)]
(ship_chr_flags):  Add internal flags (M_XLIGHT, M_CHOPPER, M_UNIT)
to ship_chr_flags[].

18 years ago(tend_land): Allow spy units to be tended to and from sub
Ron Koenderink [Sun, 20 Nov 2005 18:17:05 +0000 (18:17 +0000)]
(tend_land): Allow spy units to be tended to and from sub
with no land unit carrying capability.  Closes #1313537.

18 years ago(dchrstr, pchrstr, rptstr): New member d_uid, p_uid, r_uid.
Markus Armbruster [Sat, 19 Nov 2005 17:37:43 +0000 (17:37 +0000)]
(dchrstr, pchrstr, rptstr): New member d_uid, p_uid, r_uid.
(dchr, bigcity_dchr, pchr, rpt): Initialize it.
(dchr_ca, pchr_ca, rpt_ca): New selector uid for it.

18 years ago(ef_write): Don't memcpy() onto itself; behavior's undefined.
Markus Armbruster [Sat, 19 Nov 2005 15:41:37 +0000 (15:41 +0000)]
(ef_write): Don't memcpy() onto itself; behavior's undefined.

18 years ago(multifire): When an argument is bad, do not loop prompting, just
Markus Armbruster [Sat, 19 Nov 2005 15:38:53 +0000 (15:38 +0000)]
(multifire): When an argument is bad, do not loop prompting, just
fail.  That's what the vast majority of commands do.

18 years ago(player_coms): Document second argument of launch.
Markus Armbruster [Sat, 19 Nov 2005 15:31:16 +0000 (15:31 +0000)]
(player_coms): Document second argument of launch.

18 years ago(laun, launch_as, launch_missile, launch_sat): When an argument is
Markus Armbruster [Sat, 19 Nov 2005 15:29:12 +0000 (15:29 +0000)]
(laun, launch_as, launch_missile, launch_sat): When an argument is
bad, do not loop prompting, just fail.  That's what the vast majority
of commands do.

(launch_as, launch_missile, launch_sat): Don't zap the target
argument.  If the target is given as argument, launch all missiles at
that target.  Previously, missiles after the first prompted for
another target.

18 years ago(buil): When an argument is bad, do not offer to list types, just
Markus Armbruster [Sat, 19 Nov 2005 15:15:49 +0000 (15:15 +0000)]
(buil): When an argument is bad, do not offer to list types, just
print how to list them.

(buil): When an argument is bad, do not loop prompting, just
fail.  That's what the vast majority of commands do.

18 years ago(getcontact,putcontact): Generalize the interface back to an int.
Ron Koenderink [Sat, 19 Nov 2005 14:55:03 +0000 (14:55 +0000)]
(getcontact,putcontact): Generalize the interface back to an int.
Add range checks to prevent unexpected results.

18 years ago(buil): Remove N_NEUT check. It should have been
Ron Koenderink [Sat, 19 Nov 2005 12:17:30 +0000 (12:17 +0000)]
(buil): Remove N_NEUT check.  It should have been
removed when the opt_NEUTRON was removed.

18 years ago(plurize): Fix the max. string length calculation for the 'y' case.
Ron Koenderink [Sat, 19 Nov 2005 12:11:09 +0000 (12:11 +0000)]
(plurize): Fix the max. string length calculation for the 'y' case.
It was off by one because 'y' is removed from the string.

18 years ago(nat_ca): Add nat_contact to nat_ca[].
Ron Koenderink [Sat, 19 Nov 2005 12:07:52 +0000 (12:07 +0000)]
(nat_ca): Add nat_contact to nat_ca[].

18 years ago(cons_choose): When an argument is bad, do not loop prompting, just
Markus Armbruster [Sat, 19 Nov 2005 11:27:03 +0000 (11:27 +0000)]
(cons_choose): When an argument is bad, do not loop prompting, just
fail.  That's what the vast majority of commands do.

18 years ago(ef_ptr, ef_read): Undo rev. 1.52 for these two, because there are
Markus Armbruster [Sat, 19 Nov 2005 11:20:13 +0000 (11:20 +0000)]
(ef_ptr, ef_read): Undo rev. 1.52 for these two, because there are
callers that rely on these functions to fail for bad ID.

18 years ago(add): When an argument is bad, do not loop prompting, just fail.
Markus Armbruster [Sat, 19 Nov 2005 10:54:05 +0000 (10:54 +0000)]
(add): When an argument is bad, do not loop prompting, just fail.
That's what the vast majority of commands do.

(add): Do not silently truncate country number argument.

(add): Diagnostics were confusing because they lacked context.

18 years agoThe previous revision accidentally deleted commented out code.
Markus Armbruster [Sat, 19 Nov 2005 09:53:22 +0000 (09:53 +0000)]
The previous revision accidentally deleted commented out code.
Restore.

18 years ago(getcontact, putcontact, nat_contact): Change nat_contact
Ron Koenderink [Fri, 18 Nov 2005 23:40:30 +0000 (23:40 +0000)]
(getcontact, putcontact, nat_contact): Change nat_contact
to unsigned char to reduce the space required for natstr.

18 years ago(prod_nat): Remove non-functional aging code for nat_contact.
Ron Koenderink [Fri, 18 Nov 2005 23:23:04 +0000 (23:23 +0000)]
(prod_nat): Remove non-functional aging code for nat_contact.
Remove nat_contact debugging from server log.

(update_main, prod_nat): Move aging code for nat_contact
from update_main to prod_nat.

18 years ago(agecontact): Remove the opt_LOSE_CONTACT, the calling
Ron Koenderink [Fri, 18 Nov 2005 23:02:51 +0000 (23:02 +0000)]
(agecontact): Remove the opt_LOSE_CONTACT, the calling
procedure update_main() already has opt_LOSE_CONTACT check.

18 years ago(getcontact, putcontact): Remove the bit shifting that was in the
Ron Koenderink [Fri, 18 Nov 2005 22:58:54 +0000 (22:58 +0000)]
(getcontact, putcontact): Remove the bit shifting that was in the
function to save space.  opt_LOSE_CONTACT changes negated
any space saving.

18 years ago(cens, desi, dump, do_desi, doland, file_sct_init, grow_continents)
Ron Koenderink [Thu, 17 Nov 2005 03:21:32 +0000 (03:21 +0000)]
(cens, desi, dump, do_desi, doland, file_sct_init, grow_continents)
(grow_islands, set_coastal, update_coastal_flag, coast_sea_to_land)
(coast_land_to_sea): Determine sct_coastal flag when the sector type
is set.  Old method only updated the sct_coastal flag when doing
cens() or a dump().  Other uses of sct_coastal could get stale values,
including selector coastal.  Rework set_coastal() into NEW functions
update_coastal_flag(), coast_sea_to_land(), coast_land_to_sea() and
set_coastal().  Fix a bug where the deity designation would not
properly set the coastal flag.  Fix a bug where the one sector lake
would not properly compute coastal flag.  Fix a bug that makes
fairland treat the last sector it adds to an island as non-coastal.

18 years ago(file_sct_init, main, fl_sct_init, write_sects): Assign sct_timestamp with the
Ron Koenderink [Thu, 17 Nov 2005 02:20:28 +0000 (02:20 +0000)]
(file_sct_init, main, fl_sct_init, write_sects): Assign sct_timestamp with the
time the sector was created in files and fairland programs.

18 years ago(add): Convert bridge spans or bridge towers into sea sectors instead the
Ron Koenderink [Wed, 16 Nov 2005 13:11:54 +0000 (13:11 +0000)]
(add): Convert bridge spans or bridge towers into sea sectors instead the
wilderness sectors when wiping sectors.

18 years ago(cens, cens_hdr): Print the actual old_owner instead of just a star
Ron Koenderink [Tue, 15 Nov 2005 23:44:38 +0000 (23:44 +0000)]
(cens, cens_hdr): Print the actual old_owner instead of just a star
when different.  This is change the format for the census output.

18 years ago(plurize): Change variable name max_len to size to improve readability.
Ron Koenderink [Mon, 14 Nov 2005 19:01:36 +0000 (19:01 +0000)]
(plurize): Change variable name max_len to size to improve readability.

18 years ago(plurize): Fix initial length check to check for zero length of buf
Ron Koenderink [Mon, 14 Nov 2005 18:11:46 +0000 (18:11 +0000)]
(plurize): Fix initial length check to check for zero length of buf
not non-zero lengths of buf.

(plurize): Change variable name size to len to improve readability.

18 years agoUpdate patch for src/lib/commands/mfir.c:1.26,src/server/main.c :1.79,include/prototy...
Marc Olzheim [Mon, 14 Nov 2005 16:35:33 +0000 (16:35 +0000)]
Update patch for src/lib/commands/mfir.c:1.26,src/server/main.c :1.79,include/prototypes.h:1.98

18 years ago(fuel, load, prod, max_population, shp_nav_one_sector,
Ron Koenderink [Mon, 14 Nov 2005 13:52:12 +0000 (13:52 +0000)]
(fuel, load, prod, max_population, shp_nav_one_sector,
nav_loadship, upd_buildeff): Identify BIG_CITY
(IS_BIG_CITY) by using packing type of UPKG instead of
opt_BIG_CITY and sector type of SCT_CAPITAL.

18 years ago(plurize): Fix the strncat() len parameter to prevent an overflow of buf.
Ron Koenderink [Sun, 13 Nov 2005 23:18:37 +0000 (23:18 +0000)]
(plurize): Fix the strncat() len parameter to prevent an overflow of buf.

(numstr, esplur, splur, iesplur, plurize): Move the prototype defintions from
misc.h to prototypes.h.  Remove unneccessary headers in plur.c.