86a59e4de4
(xuflds, xunsymbol, xuloadrow): Symbol sets.
...
(VAL_SYMBOL_SET, getid, xunsymbol1): New.
(xunsymbol): New argument n for more useful diagnostics.
(xuloadrow): Remove redundant semantic check.
2005-12-03 14:14:44 +00:00
739f346584
(xunsymbol): Fix design flaw: negative symbol values were interpreted
...
as failure.
2005-12-03 13:38:52 +00:00
b7eb39ebef
(xuflds): Allow unescaped space and tab in strings. Also fix the
...
previous revision, which broke '#' in strings.
2005-12-03 11:36:55 +00:00
1eb7d1795c
(xuloadrow): Fix crash.
2005-12-03 11:19:20 +00:00
0a7291eb37
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.
2005-12-03 11:04:44 +00:00
8ca219819c
(xuloadrow): Obey NSC_EXTRA.
...
(xuloadrow): Remove redundant `not supported' check.
2005-12-03 10:15:57 +00:00
29c83d1511
(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.
2005-12-03 10:09:53 +00:00
b8befab521
(xuloadrow): Fix rev. 1.11.
2005-12-03 09:17:30 +00:00
e1420d2a14
(xundump): Fix parsing of XDUMP header (really!) and footer.
2005-12-02 19:22:27 +00:00
b2e18c5125
(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.
2005-12-02 18:57:55 +00:00
1e4ecda185
(xundump): Fix parsing of XDUMP header.
2005-12-02 17:27:19 +00:00
aa63e64107
(xuflds): Test for no fields was off by one. Remove it; let caller
...
deal with missing fields.
2005-12-02 17:08:36 +00:00
f6bec2c3f7
(xuflds): Simplify test for space in values[].
2005-12-02 17:05:25 +00:00
8d0ec9db08
(xundump): Improve diagnostics. Remove superflous check for
...
unexpected EOF.
2005-12-02 16:06:24 +00:00
8e6baf0bcb
(xundump): Table names no longer contain whitespace. Simplify.
2005-12-01 20:00:15 +00:00
871ed677c2
(empfile): Space in Empire names requires players to quote the names
...
on the command line. Replace by dash.
2005-12-01 19:53:51 +00:00
95a2523b9f
(xuflds): Fix confusing diagnostics on unexpected EOF.
2005-12-01 19:28:31 +00:00
656b726a24
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.
2005-12-01 19:12:54 +00:00
33912952bb
Roll back to rev. 1.3 in preparation of a re-engineering of the
...
changes since then.
2005-12-01 18:56:41 +00:00
Ron Koenderink
65cda58286
(verify_row): Remove // comment.
...
Change %d to %ld when printing a long.
2005-12-01 00:39:05 +00:00
Ron Koenderink
40c821d28b
(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.
2005-11-30 19:17:58 +00:00
Ron Koenderink
0511565c11
(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.
2005-11-30 18:57:53 +00:00
Ron Koenderink
ea1e3b6090
(xuflds): Allow multiple spaces to separate fields or symbols in symbol set.
2005-11-30 17:16:02 +00:00
Ron Koenderink
e9ddf6a80b
(xunsymbol): Fix formating.
2005-11-30 00:36:35 +00:00
Ron Koenderink
d223865d2b
(xuloadrow): Add missing case for VAL_SYMBOL_SET for trailing
...
junk row check.
(xuskipcommentlines): Make the function static.
2005-11-30 00:33:37 +00:00
Ron Koenderink
bf94174f88
(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.
2005-11-29 23:55:17 +00:00
Ron Koenderink
125af4b338
(xuskipcommentlines): Include the lines skipped in the line count.
2005-11-29 23:38:32 +00:00
Ron Koenderink
03121d44aa
(xundump): Skip lines beginning with '#'.
...
These lines are considered comments.
(xuskipcommentlines): New.
2005-11-29 21:50:31 +00:00
2517931b12
(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.
2005-11-29 17:54:45 +00:00
f5c81fe39e
Fix bad line breaks.
2005-11-29 17:34:42 +00:00
Ron Koenderink
e89fb0bb17
(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.
2005-11-29 03:57:44 +00:00
803009d0ce
(fillcache, do_write): Revert the previous revision. The portability
...
issue applies only to sockets, and EWOULDBLOCK isn't defined on all
systems.
2005-11-26 18:36:48 +00:00
Ron Koenderink
9a296c4be3
(show): Return syntax error for invalid qualifier.
2005-11-23 23:51:28 +00:00
Ron Koenderink
e47465570a
(mchr[],m_flags,m_nland): Remove M_UNIT from m_flags in mchr[].
...
It is not used.
2005-11-22 23:19:59 +00:00
Ron Koenderink
d4f52f6ca2
(lookup): Rename lookup() to symbol_by_value(), make it public
...
and move it to nstr.c.
2005-11-22 22:57:06 +00:00
edaa05b8cb
(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.
2005-11-22 20:28:18 +00:00
Ron Koenderink
9113969208
(pln_equip): Do not abandon sector for paradrop, drop or fly.
...
Closes #982226
2005-11-22 20:10:15 +00:00
Ron Koenderink
1de48e53da
(tend): Send a bulletin to the ally when tending items to an ally.
...
Closes #929398 .
2005-11-22 19:28:48 +00:00
Ron Koenderink
71641cf712
(kill_cmd): Add authority check for deities before allowing a kill.
...
Closes #1215088 . Add banned host check before allowing a kill.
2005-11-21 18:35:08 +00:00
Ron Koenderink
779a41c71b
(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 .
2005-11-21 18:25:49 +00:00
Ron Koenderink
f17cedfccd
(ship_chr_flags): Add internal flags (M_XLIGHT, M_CHOPPER, M_UNIT)
...
to ship_chr_flags[].
2005-11-20 22:15:25 +00:00
Ron Koenderink
e8746e9af0
(tend_land): Allow spy units to be tended to and from sub
...
with no land unit carrying capability. Closes #1313537 .
2005-11-20 18:17:05 +00:00
fdec6a8aae
(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.
2005-11-19 17:37:43 +00:00
661b650c1a
(ef_write): Don't memcpy() onto itself; behavior's undefined.
2005-11-19 15:41:37 +00:00
fe1a3e57c6
(multifire): When an argument is bad, do not loop prompting, just
...
fail. That's what the vast majority of commands do.
2005-11-19 15:38:53 +00:00
1c703efa96
(player_coms): Document second argument of launch.
2005-11-19 15:31:16 +00:00
ad10ee5649
(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.
2005-11-19 15:29:12 +00:00
011fa326d7
(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.
2005-11-19 15:15:49 +00:00
Ron Koenderink
3fd64ccb48
(getcontact,putcontact): Generalize the interface back to an int.
...
Add range checks to prevent unexpected results.
2005-11-19 14:55:03 +00:00
Ron Koenderink
4e317e3999
(buil): Remove N_NEUT check. It should have been
...
removed when the opt_NEUTRON was removed.
2005-11-19 12:17:30 +00:00