empserver
17 years agoMore 4.2.23 changes. v4.2.23
Markus Armbruster [Sun, 23 Oct 2005 09:36:26 +0000 (09:36 +0000)]
More 4.2.23 changes.

17 years agoUpdate example to current output.
Markus Armbruster [Sun, 23 Oct 2005 09:28:15 +0000 (09:28 +0000)]
Update example to current output.

17 years agoRemove option SNEAK_ATTACK leftovers.
Markus Armbruster [Sun, 23 Oct 2005 09:26:15 +0000 (09:26 +0000)]
Remove option SNEAK_ATTACK leftovers.

17 years ago(draw_map): Parameter bmap abused EF_MAP and EF_BMAP, and required the
Markus Armbruster [Sun, 23 Oct 2005 08:58:23 +0000 (08:58 +0000)]
(draw_map): Parameter bmap abused EF_MAP and EF_BMAP, and required the
silly EF_NMAP.  Use characters instead: 'b' for bmap (was EF_BMAP),
't' for true bmap (was EF_MAP), 'r' for revert (was EF_MAP+EF_BMAP,
more sillness), and 'n' for nmap (was EF_NMAP).  Callers changed.
(EF_NMAP): Remove.

17 years ago[NOSTRDUP]: Drop support for systems without strdup(). First commit
Markus Armbruster [Sun, 23 Oct 2005 08:37:38 +0000 (08:37 +0000)]
[NOSTRDUP]: Drop support for systems without strdup().  First commit
was incomplete.

17 years ago(map, draw_map): Remove undocumented feature that lets deities run map
Markus Armbruster [Sun, 23 Oct 2005 08:32:49 +0000 (08:32 +0000)]
(map, draw_map): Remove undocumented feature that lets deities run map
as another country.  It appeared around Chainsaw 3.0 and never fully
worked.  See also #1335316.

17 years ago(map): Fix rev. 1.4: it treated nmap as a bmap command.
Markus Armbruster [Sun, 23 Oct 2005 07:41:24 +0000 (07:41 +0000)]
(map): Fix rev. 1.4: it treated nmap as a bmap command.

17 years ago(ef_close): Reset member fd.
Markus Armbruster [Sun, 23 Oct 2005 06:24:08 +0000 (06:24 +0000)]
(ef_close): Reset member fd.
(ef_open): Catch attempt to open open file.

17 years ago(EFF_OPEN): New.
Markus Armbruster [Sun, 23 Oct 2005 06:17:14 +0000 (06:17 +0000)]
(EFF_OPEN): New.
(ef_open): Restrict HOW to EFF_OPEN.

17 years ago(ship_ca,land_ca,plane_ca): Add missing EF_BAD for radius row in
Ron Koenderink [Sat, 22 Oct 2005 23:53:46 +0000 (23:53 +0000)]
(ship_ca,land_ca,plane_ca): Add missing EF_BAD for radius row in
NSC_GENITEM.

17 years ago(ef_open): Remove code killed by the previous revision.
Markus Armbruster [Sat, 22 Oct 2005 19:59:56 +0000 (19:59 +0000)]
(ef_open): Remove code killed by the previous revision.

17 years ago[aix]: Remove special case include, I doubt it's necessary.
Markus Armbruster [Sat, 22 Oct 2005 19:31:44 +0000 (19:31 +0000)]
[aix]: Remove special case include, I doubt it's necessary.

17 years ago[_NTSDK]: Remove _NTSDK not needed.
Ron Koenderink [Sat, 22 Oct 2005 19:19:16 +0000 (19:19 +0000)]
[_NTSDK]: Remove _NTSDK not needed.

17 years ago(ef_open): Don't assume blksize() is the same for all files.
Markus Armbruster [Sat, 22 Oct 2005 19:12:27 +0000 (19:12 +0000)]
(ef_open): Don't assume blksize() is the same for all files.

(ef_open): Ensure the cache has at least one slot.

17 years ago(empfile, empfile_ca): New struct empfile member ef_uid.
Ron Koenderink [Sat, 22 Oct 2005 19:10:22 +0000 (19:10 +0000)]
(empfile, empfile_ca): New struct empfile member ef_uid.

17 years ago(blksize) [aix, sgi]: Drop special case; I bet these systems support
Markus Armbruster [Sat, 22 Oct 2005 19:09:12 +0000 (19:09 +0000)]
(blksize) [aix, sgi]: Drop special case; I bet these systems support
st_blksize by now.

17 years ago(wripglob): No need to include misc.h since rev. 1.16.
Markus Armbruster [Sat, 22 Oct 2005 18:55:30 +0000 (18:55 +0000)]
(wripglob): No need to include misc.h since rev. 1.16.

17 years ago(ioq_destroy) [aix, NeXT]: Remove special case, which leaked memory,
Markus Armbruster [Sat, 22 Oct 2005 18:28:11 +0000 (18:28 +0000)]
(ioq_destroy) [aix, NeXT]: Remove special case, which leaked memory,
because freeing it didn't work at some time.  Well, it either works
now, or we'll find out what's wrong.

17 years agoUltrix is no longer supported, remove special case.
Markus Armbruster [Sat, 22 Oct 2005 18:24:01 +0000 (18:24 +0000)]
Ultrix is no longer supported, remove special case.

17 years ago[NOSTRDUP]: Drop support for systems without strdup().
Markus Armbruster [Sat, 22 Oct 2005 18:12:22 +0000 (18:12 +0000)]
[NOSTRDUP]: Drop support for systems without strdup().

17 years ago(castr,empfile,ship_chr,plane_chr,land_chr,nuke_chr):
Ron Koenderink [Sat, 22 Oct 2005 16:39:45 +0000 (16:39 +0000)]
(castr,empfile,ship_chr,plane_chr,land_chr,nuke_chr):
Add table index to castr to create a reference to the symbol table.
Add "ship chr flags" table to empfile.
Add "plane chr flags" table to empfile.
Add "land chr flags" table to empfile.
Add "nuke chr flags" table to empfile.
Add EF_SHIP_CHR_FLAGS reference to ship_chr.
Add EF_PLANE_CHR_FLAGS reference to plane_chr.
Add EF_LAND_CHR_FLAGS reference to land_chr.
Add EF_NUKE_CHR_FLAGS reference to nuke_chr.

(show_ship_capab,show_plane_capab,show_land_capab,
show_nuke_capab,ship_flags,land_flags,plane_flags,nuke_flags):
Move ship_flags nsc.c from show.c
Rename ship_flags to ship_chr_flags.
Move plane_flags nsc.c from show.c
Rename plane_flags to plane_chr_flags.
Move land_flags nsc.c from show.c
Rename land_flags to land_chr_flags.
Move nuke_flags nsc.c from show.c
Rename nuke_flags to nuke_chr_flags.
This is to accomodate future symbol table for EF_PLANE table.

17 years ago(ef_init): Remove cadef member from fileinit,
Ron Koenderink [Sat, 22 Oct 2005 13:55:04 +0000 (13:55 +0000)]
(ef_init): Remove cadef member from fileinit,
insert directly into the empfile structure.
Add ef_type member to fileinit to identify rows with data.
Remove unused rows of fileinit.

17 years ago(empfile[]) Add table of tables to empfile[].
Ron Koenderink [Sat, 22 Oct 2005 12:38:58 +0000 (12:38 +0000)]
(empfile[]) Add table of tables to empfile[].

17 years ago(player_init): Fix initialization of sin. Some systems have a member
Markus Armbruster [Sat, 22 Oct 2005 10:23:20 +0000 (10:23 +0000)]
(player_init): Fix initialization of sin.  Some systems have a member
sin_zero and choke when it's not zeroed.  INADDR_ANY wasn't converted
to network byte order, but since it's zero, the bug couldn't bite.

17 years ago(io_open, io_noblocking): FNDELAY is long obsolete, use O_NONBLOCK.
Markus Armbruster [Sat, 22 Oct 2005 10:18:07 +0000 (10:18 +0000)]
(io_open, io_noblocking): FNDELAY is long obsolete, use O_NONBLOCK.

17 years ago(new): Fix initialization of realms for players_at_00.
Markus Armbruster [Sat, 22 Oct 2005 10:12:18 +0000 (10:12 +0000)]
(new): Fix initialization of realms for players_at_00.

17 years ago(empfile, chr_camap): Merge chr_camap[] into empfile[]. No existing
Markus Armbruster [Fri, 21 Oct 2005 19:38:37 +0000 (19:38 +0000)]
(empfile, chr_camap): Merge chr_camap[] into empfile[].  No existing
user sees the new elements of empfile[].
(EF_SECTOR_CHR, EF_SHIP_CHR, EF_PLANE_CHR, EF_LAND_CHR, EF_NUKE_CHR)
(EF_TREATY_CHR, EF_ITEM, EF_INFRASTRUCTURE, EF_PRODUCT): New.  Not yet
used.
(my_ef_byname): Replacement for ef_byname() that sees the new
elements.
(xdchr): Work with empfile[] instead of chr_camap[].
(xdump): Use my_ef_byname() instead of ef_byname() and
chridx_by_name().
(camap, chr_camap, chridx_by_name): Remove.

17 years agoFix the previous revision.
Markus Armbruster [Fri, 21 Oct 2005 18:21:46 +0000 (18:21 +0000)]
Fix the previous revision.

17 years agoAnother 4.2.23 change.
Markus Armbruster [Fri, 21 Oct 2005 18:20:20 +0000 (18:20 +0000)]
Another 4.2.23 change.

17 years ago(show_opts): Pretend option SHIPNAMES still exists for the benefit of
Markus Armbruster [Fri, 21 Oct 2005 18:16:50 +0000 (18:16 +0000)]
(show_opts): Pretend option SHIPNAMES still exists for the benefit of
clients that still depend on it.

17 years agoDon't use conditional compilation to time out obsolete stuff. Do it
Markus Armbruster [Fri, 21 Oct 2005 17:55:34 +0000 (17:55 +0000)]
Don't use conditional compilation to time out obsolete stuff.  Do it
by hand.

17 years agoUpdate for 4.2.23.
Markus Armbruster [Fri, 21 Oct 2005 05:58:30 +0000 (05:58 +0000)]
Update for 4.2.23.

17 years ago(do_conv) Remove CR.
Ron Koenderink [Thu, 20 Oct 2005 14:52:18 +0000 (14:52 +0000)]
(do_conv) Remove CR.

17 years ago(INTERIXCFLAGS, LINUXCFLAGS, LINUXPTHCFLAGS): Don't define
Markus Armbruster [Wed, 19 Oct 2005 18:18:17 +0000 (18:18 +0000)]
(INTERIXCFLAGS, LINUXCFLAGS, LINUXPTHCFLAGS): Don't define
LISTENMAXCONN; it's unused since src/lib/player/accept.c rev. 1.26.
That revision's change log is quite confused.

17 years ago(do_conv) Move the initialization of the natp to be inside sector loop, this
Ron Koenderink [Tue, 18 Oct 2005 16:11:19 +0000 (16:11 +0000)]
(do_conv) Move the initialization of the natp to be inside sector loop, this
allows the deity to use the research level of the sector owner.  This also
fixes the use of an uninitialized sector data structure.

17 years ago(ichr_ca,pchr_ca,dchr_ca,mchr_ca,plchr_ca,lchr_ca,nchr_ca,
Ron Koenderink [Tue, 18 Oct 2005 12:14:10 +0000 (12:14 +0000)]
(ichr_ca,pchr_ca,dchr_ca,mchr_ca,plchr_ca,lchr_ca,nchr_ca,
tchr_ca,rpt_ca,intrchr_ca ) Move from src/lib/commands/xdump.c
to src/lib/global/nsc.c; external linkage.  They were created in
xdump.c to minimize initial impact on the source, but they
really belong to nsc.c, where other code can use them as well.

17 years ago(pin_bomb) Remove unused variable qp.
Ron Koenderink [Tue, 18 Oct 2005 12:12:15 +0000 (12:12 +0000)]
(pin_bomb) Remove unused variable qp.

17 years agoMore 4.2.22 changes. v4.2.22
Markus Armbruster [Tue, 11 Oct 2005 20:59:00 +0000 (20:59 +0000)]
More 4.2.22 changes.

17 years agoReplace incorrect claim on morale_base by reference to info morale.
Markus Armbruster [Tue, 11 Oct 2005 20:48:30 +0000 (20:48 +0000)]
Replace incorrect claim on morale_base by reference to info morale.
Reported by Doug Wescott.

17 years ago(play_cmd): Log begin and end of playing session. Closes #911285.
Markus Armbruster [Tue, 11 Oct 2005 20:25:40 +0000 (20:25 +0000)]
(play_cmd): Log begin and end of playing session.  Closes #911285.

(kill_cmd): Log killing.

17 years agoDoc clarification.
Markus Armbruster [Tue, 11 Oct 2005 20:12:32 +0000 (20:12 +0000)]
Doc clarification.

17 years ago(babies): Err, the maxpop case wasn't an optimization... Without
Markus Armbruster [Tue, 11 Oct 2005 20:10:15 +0000 (20:10 +0000)]
(babies): Err, the maxpop case wasn't an optimization...  Without
that, we get negative babies, which leads to negative avail and baby
food (cannibalism?) in grow_people().  Restore it.

17 years ago(nreport): Simplify.
Markus Armbruster [Tue, 11 Oct 2005 19:31:33 +0000 (19:31 +0000)]
(nreport): Simplify.

17 years agoDoc fix.
Markus Armbruster [Tue, 11 Oct 2005 19:29:50 +0000 (19:29 +0000)]
Doc fix.

17 years ago(set): Fix initialization of trd_y. The initial value is believed not
Markus Armbruster [Tue, 11 Oct 2005 19:27:05 +0000 (19:27 +0000)]
(set): Fix initialization of trd_y.  The initial value is believed not
to be used.

17 years agoSpelling fix.
Markus Armbruster [Tue, 11 Oct 2005 19:23:11 +0000 (19:23 +0000)]
Spelling fix.

17 years agoRemove some commented out code that is obviously useless.
Markus Armbruster [Tue, 11 Oct 2005 19:22:59 +0000 (19:22 +0000)]
Remove some commented out code that is obviously useless.

17 years agoFix bad line breaks.
Markus Armbruster [Tue, 11 Oct 2005 19:21:57 +0000 (19:21 +0000)]
Fix bad line breaks.

17 years agoUpdate for include/prototypes.h:1.90 src/lib/subs/attsub.c:1.28 src/lib/subs/shpsub...
Marc Olzheim [Tue, 4 Oct 2005 15:02:16 +0000 (15:02 +0000)]
Update for include/prototypes.h:1.90 src/lib/subs/attsub.c:1.28 src/lib/subs/shpsub.c:1.22 src/lib/update/human.c:1.16

17 years agoUpdate for 4.2.22.
Markus Armbruster [Tue, 4 Oct 2005 07:27:56 +0000 (07:27 +0000)]
Update for 4.2.22.

17 years ago(get_assembly_point): Close loophole that allowed players to find all
Markus Armbruster [Tue, 4 Oct 2005 07:20:37 +0000 (07:20 +0000)]
(get_assembly_point): Close loophole that allowed players to find all
unowned sectors.  The assembly point must now be owned or allied, or
have an owned or allied ship.

Info pages didn't match the old rule.  Fix them to match the new rule.

17 years ago(pin_bomb): Remove code to compute bestacc. It is not only wrong,
Markus Armbruster [Mon, 3 Oct 2005 20:03:45 +0000 (20:03 +0000)]
(pin_bomb): Remove code to compute bestacc.  It is not only wrong,
bestacc is not used.  Been that way since Chainsaw.

17 years ago(ac_landflak): Don't let embarked land units fire flak.
Markus Armbruster [Mon, 3 Oct 2005 15:46:42 +0000 (15:46 +0000)]
(ac_landflak): Don't let embarked land units fire flak.

17 years agoCheck against source and update accordingly.
Markus Armbruster [Mon, 3 Oct 2005 15:42:44 +0000 (15:42 +0000)]
Check against source and update accordingly.

17 years ago(spy): Catching a spy makes contact.
Markus Armbruster [Mon, 3 Oct 2005 15:36:39 +0000 (15:36 +0000)]
(spy): Catching a spy makes contact.

17 years ago(ac_encounter): Non-recon missions no longer make contact to owner of
Markus Armbruster [Mon, 3 Oct 2005 15:05:33 +0000 (15:05 +0000)]
(ac_encounter): Non-recon missions no longer make contact to owner of
sectors overflown, because only recon missions identify the owner.
This matches info Hidden.

17 years ago(notify_coastguard): Failed to make contact when NF_COASTWATCH was
Markus Armbruster [Mon, 3 Oct 2005 14:47:59 +0000 (14:47 +0000)]
(notify_coastguard): Failed to make contact when NF_COASTWATCH was
off.

17 years agoDocument.
Markus Armbruster [Mon, 3 Oct 2005 14:40:05 +0000 (14:40 +0000)]
Document.

17 years ago(satmap): Make contact iff displaying sectors. Shouldn't make a
Markus Armbruster [Mon, 3 Oct 2005 14:37:26 +0000 (14:37 +0000)]
(satmap): Make contact iff displaying sectors.  Shouldn't make a
difference, but is clearer.

(satmap): Spotting land units makes contact.

17 years ago(ac_dog): Make contact both ways. This is more for completeness, as
Markus Armbruster [Mon, 3 Oct 2005 14:34:26 +0000 (14:34 +0000)]
(ac_dog): Make contact both ways.  This is more for completeness, as
contact should have been made before planes rise to fight.

17 years ago(notify_coastguard): Use FOUND_COAST, not FOUND_LOOK.
Markus Armbruster [Mon, 3 Oct 2005 14:32:02 +0000 (14:32 +0000)]
(notify_coastguard): Use FOUND_COAST, not FOUND_LOOK.

17 years ago(add): Initialize nat_last_login and nat_last_logout to zero rather
Markus Armbruster [Mon, 3 Oct 2005 13:25:54 +0000 (13:25 +0000)]
(add): Initialize nat_last_login and nat_last_logout to zero rather
than current time.  Nation addition time is irrelevant.
(natstr): Document zero nat_last_login, nat_last_login mean never
logged in/out.
(player_main): Test nat_last_login zero instead of nat_hostaddr empty.

(player_main): Assign nat_userid, nat_hostname, nat_hostaddr straight
from player.  The last connection's host is now shown as dotted quads
instead of nowhere when the name isn't known.
(natstr): Document that nat_userid, nat_hostname may be empty.

(player_main): Simplify printing last connection address: nat_hostaddr
can't be empty here; don't bother to substitute "nobody" for empty
user.

17 years ago(match_user, main): Use full buffer for fgets(); was off by one.
Markus Armbruster [Mon, 3 Oct 2005 10:45:00 +0000 (10:45 +0000)]
(match_user, main): Use full buffer for fgets(); was off by one.

17 years ago(main): Delete some code that had no effect.
Markus Armbruster [Mon, 3 Oct 2005 10:42:10 +0000 (10:42 +0000)]
(main): Delete some code that had no effect.

17 years ago(retreat_ship1, retreat_land1): Delete some code that had no effect.
Markus Armbruster [Mon, 3 Oct 2005 10:41:13 +0000 (10:41 +0000)]
(retreat_ship1, retreat_land1): Delete some code that had no effect.

17 years ago(chan): Do not arbitrarily truncate representative to 8 characters,
Markus Armbruster [Mon, 3 Oct 2005 10:40:11 +0000 (10:40 +0000)]
(chan): Do not arbitrarily truncate representative to 8 characters,
use the full size of struct natstr member nat_pnam.

17 years ago(add): Use size of struct natstr members nat_cnam and nat_pnam instead
Markus Armbruster [Mon, 3 Oct 2005 10:38:55 +0000 (10:38 +0000)]
(add): Use size of struct natstr members nat_cnam and nat_pnam instead
of literals.

17 years ago(lndstr, natstr, shpstr): Fix string types from s_char[] to char[].
Markus Armbruster [Mon, 3 Oct 2005 10:35:44 +0000 (10:35 +0000)]
(lndstr, natstr, shpstr): Fix string types from s_char[] to char[].
They were declared NSC_STRINGY in their selector descriptors, and
NSC_STRINGY is specified to represent char[].
(player): Get rid of s_char.

17 years ago(babies): Factored out of grow_people(). Identical, except it doesn't
Markus Armbruster [Sun, 2 Oct 2005 19:10:16 +0000 (19:10 +0000)]
(babies): Factored out of grow_people().  Identical, except it doesn't
bother to `optimize' the maxpop case, and it drops the weird food
limit computation for opt_NOFOOD, which didn't limited for any
reasonable game parameters.

17 years ago(ac_encounter): Make contact on spotting planes. Closes #857594.
Markus Armbruster [Sun, 2 Oct 2005 18:41:29 +0000 (18:41 +0000)]
(ac_encounter): Make contact on spotting planes.  Closes #857594.

17 years ago(look_ship, look_land): Failed to make contact on sighting ships,
Markus Armbruster [Sun, 2 Oct 2005 18:09:42 +0000 (18:09 +0000)]
(look_ship, look_land): Failed to make contact on sighting ships,
planes and land units.  Partial fix for #857594.

17 years ago(natstr): Member nat_connected is inappropriate, because it is
Markus Armbruster [Sun, 2 Oct 2005 17:01:15 +0000 (17:01 +0000)]
(natstr): Member nat_connected is inappropriate, because it is
transient server state, not persistent game state.  Remove.
(player_main, edit): Remove uses.
(coun): Use getplayer() instead of nat_connected.  Delete the message
on command being out of order.

17 years ago(player_find_other): Replace by getplayer. player_find_other()
Markus Armbruster [Sun, 2 Oct 2005 16:30:43 +0000 (16:30 +0000)]
(player_find_other): Replace by getplayer.  player_find_other()
searches for a player other than US for country CNUM, which is in
state PS_PLAYING.  Since there can be at most one player in state
PS_PLAYING, and no caller pass that player as US, they can simply use
getplayer() instead.

17 years ago(getplayer): There may be multiple players for the same country in the
Markus Armbruster [Sun, 2 Oct 2005 16:21:41 +0000 (16:21 +0000)]
(getplayer): There may be multiple players for the same country in the
list of players, but at most one in state PS_PLAYING.  getplayer()
used to get the one first in the list.  However, its callers need the
one in state PS_PLAYING.  In particular, typed_wu() notifies the
player obtained from getplayer().  If the player in state PS_PLAYING
isn't first, say because another one is trying to log in, the
notification gets lost.  Fix by making getplayer() return the player
in state PS_PLAYING.

17 years ago(SNEAK_ATTACK, opt_SNEAK_ATTACK, Options, do_sneak, att_abort)
Markus Armbruster [Sun, 2 Oct 2005 14:35:18 +0000 (14:35 +0000)]
(SNEAK_ATTACK, opt_SNEAK_ATTACK, Options, do_sneak, att_abort)
(att_fight): Remove option SNEAK_ATTACK.

17 years ago(setrel): Relation change establishes contact like a telegram.
Markus Armbruster [Sun, 2 Oct 2005 11:04:31 +0000 (11:04 +0000)]
(setrel): Relation change establishes contact like a telegram.
Partial fix for #857594.

17 years agoRemove some redundant parenthesis; no functional change.
Markus Armbruster [Sun, 2 Oct 2005 10:16:19 +0000 (10:16 +0000)]
Remove some redundant parenthesis; no functional change.

17 years ago(prod_land, prod_ship): Simplify.
Markus Armbruster [Sun, 2 Oct 2005 10:15:59 +0000 (10:15 +0000)]
(prod_land, prod_ship): Simplify.

17 years ago(do_feed): Simplify.
Markus Armbruster [Sat, 1 Oct 2005 18:44:25 +0000 (18:44 +0000)]
(do_feed): Simplify.
(starvation): Pointless.  Inline into do_feed() and remove.

(growfood): Doc clarification.

17 years ago(att_get_combat): Fix test whether land unit exists. Closes #1034283.
Markus Armbruster [Sat, 1 Oct 2005 16:39:41 +0000 (16:39 +0000)]
(att_get_combat): Fix test whether land unit exists.  Closes #1034283.

(att_fight): Fix bad line break.

17 years ago(get_assembly_point): New.
Markus Armbruster [Sat, 1 Oct 2005 14:07:35 +0000 (14:07 +0000)]
(get_assembly_point): New.
(bomb, drop, fly, para, reco): Use it.

17 years agoDon't point to ftp.wolfpackempire.com, it does not work.
Markus Armbruster [Sat, 1 Oct 2005 12:52:00 +0000 (12:52 +0000)]
Don't point to ftp.wolfpackempire.com, it does not work.

17 years ago(plist): Member state is used write-only, remove.
Markus Armbruster [Fri, 30 Sep 2005 20:44:43 +0000 (20:44 +0000)]
(plist): Member state is used write-only, remove.
(P_OK, P_FIRED, P_DEL): Unused, remove.

17 years ago(N_FLAK, N_DISS_GOV, N_DECL_NEUT, N_RIOT, N_ASSAULT_LOSE): Unused,
Markus Armbruster [Fri, 30 Sep 2005 20:38:22 +0000 (20:38 +0000)]
(N_FLAK, N_DISS_GOV, N_DECL_NEUT, N_RIOT, N_ASSAULT_LOSE): Unused,
remove.
(no_news): new.
(rpt): Use it for r_newsstory of unused slots.

17 years ago(empfile): Member itemoffs is unused since file.c rev. 1.15; remove.
Markus Armbruster [Fri, 30 Sep 2005 20:02:57 +0000 (20:02 +0000)]
(empfile): Member itemoffs is unused since file.c rev. 1.15; remove.

17 years ago(IO_CONN, io_conn, IOQ_BUFSIZE, MAXIOV, LND_NOTANY, plur)
Markus Armbruster [Fri, 30 Sep 2005 19:51:32 +0000 (19:51 +0000)]
(IO_CONN, io_conn, IOQ_BUFSIZE, MAXIOV, LND_NOTANY, plur)
(techfactfire, reltech, P_DISTING, PLN_MAXDEF, filetruncate, sct_init)
(nxtsctp, AN_SAILDIR, UDTIMES_MAX, BLITZTIME): Unused, remove.

17 years agoUnused.
Markus Armbruster [Fri, 30 Sep 2005 19:50:57 +0000 (19:50 +0000)]
Unused.

17 years agoRemove leftover declarations that should have been removed along with
Markus Armbruster [Fri, 30 Sep 2005 19:40:41 +0000 (19:40 +0000)]
Remove leftover declarations that should have been removed along with
the definitions.

17 years ago(PP_MAIN): New.
Markus Armbruster [Fri, 30 Sep 2005 17:37:04 +0000 (17:37 +0000)]
(PP_MAIN): New.
(empth_init): Use it rather than literal.

17 years ago(getpath): Fix buffer overflow. Remote hole in commands bomb, drop,
Markus Armbruster [Sun, 25 Sep 2005 18:55:55 +0000 (18:55 +0000)]
(getpath): Fix buffer overflow.  Remote hole in commands bomb, drop,
fly, para, reco, sail, sweep.  Old code also screwed up when
getstring() failed, unless player->aborted.  Fixed code is still ugly
and cries for a rewrite.

17 years ago(getpath): Fix message when no path to destination sector can be
Markus Armbruster [Sun, 25 Sep 2005 17:03:53 +0000 (17:03 +0000)]
(getpath): Fix message when no path to destination sector can be
found.

17 years ago(getpath): Parameter showxy makes no sense and is not used. Remove.
Markus Armbruster [Sun, 25 Sep 2005 17:00:50 +0000 (17:00 +0000)]
(getpath): Parameter showxy makes no sense and is not used.  Remove.
Get rid of s_char.  Callers changed.

17 years ago(fly): Check for player aborting the command at the `transport what?'
Markus Armbruster [Sun, 25 Sep 2005 16:39:44 +0000 (16:39 +0000)]
(fly): Check for player aborting the command at the `transport what?'
prompt.  Closes #771801.

17 years ago(pathcost): Fix the previous rev.
Markus Armbruster [Sun, 25 Sep 2005 16:03:22 +0000 (16:03 +0000)]
(pathcost): Fix the previous rev.

17 years ago(deli): Diagnose invalid direction.
Markus Armbruster [Sun, 25 Sep 2005 10:05:39 +0000 (10:05 +0000)]
(deli): Diagnose invalid direction.

17 years ago(retreat_ship1, retreat_land1): Used to accept DIR_VIEW, which
Markus Armbruster [Sun, 25 Sep 2005 10:05:09 +0000 (10:05 +0000)]
(retreat_ship1, retreat_land1): Used to accept DIR_VIEW, which
happened do do nothing.  Ignoring it like other invalid directions is
clearer.

17 years ago(marc, navi, retreat_ship1, retreat_land1): Treat any negative value
Markus Armbruster [Sun, 25 Sep 2005 10:00:43 +0000 (10:00 +0000)]
(marc, navi, retreat_ship1, retreat_land1): Treat any negative value
of chkdir() as failure, not just -1.

17 years ago(diridx): New. Use instead of chkdir() where direction characters
Markus Armbruster [Sun, 25 Sep 2005 09:49:36 +0000 (09:49 +0000)]
(diridx): New.  Use instead of chkdir() where direction characters
must be valid.  Oopses on bad direction characters.
(pathtoxy, ac_encounter): Bad direction characters used to lead to bad
array subscript and potential disaster.
(pathrange, path): Stop on DIR_STOP as well as on bad direction
characters.  This is just for consistency with other code; DIR_STOP
should occur only last in a path here.
(sail_nav_fleet, nav_ship): No change except for the oops.

17 years ago(dirindex): Narrow member type to signed char to save cache.
Markus Armbruster [Sun, 25 Sep 2005 09:15:27 +0000 (09:15 +0000)]
(dirindex): Narrow member type to signed char to save cache.
(pathcost): Catch bad direction characters (should not happen).

17 years ago(SELL_NOT_DELIV, getdir, chkpath): Unused, remove.
Markus Armbruster [Sun, 25 Sep 2005 09:07:31 +0000 (09:07 +0000)]
(SELL_NOT_DELIV, getdir, chkpath): Unused, remove.