empserver
17 years agoFinal batch of 4.2.21 changes. v4.2.21
Markus Armbruster [Sat, 16 Jul 2005 18:00:05 +0000 (18:00 +0000)]
Final batch of 4.2.21 changes.

17 years agoOnly of historical interest.
Markus Armbruster [Wed, 13 Jul 2005 18:02:46 +0000 (18:02 +0000)]
Only of historical interest.

17 years agoDocument new files.
Markus Armbruster [Wed, 13 Jul 2005 18:01:02 +0000 (18:01 +0000)]
Document new files.

17 years ago(melt_item_denom): i_type shift (include/item.h 1.12) broke
Markus Armbruster [Wed, 13 Jul 2005 17:33:39 +0000 (17:33 +0000)]
(melt_item_denom): i_type shift (include/item.h 1.12) broke
initializer, screwing up fallout damage.

17 years agoStill more 4.2.21 changes.
Markus Armbruster [Sat, 9 Jul 2005 14:06:13 +0000 (14:06 +0000)]
Still more 4.2.21 changes.

17 years ago(pln_equip): Fix the previous rev.
Markus Armbruster [Sat, 9 Jul 2005 13:59:01 +0000 (13:59 +0000)]
(pln_equip): Fix the previous rev.

17 years ago(mission_pln_equip, pln_equip): Fix the previous rev.
Markus Armbruster [Sat, 9 Jul 2005 13:32:54 +0000 (13:32 +0000)]
(mission_pln_equip, pln_equip): Fix the previous rev.

17 years agoDoc fix.
Markus Armbruster [Sat, 9 Jul 2005 11:09:34 +0000 (11:09 +0000)]
Doc fix.

17 years ago(show_sect_capab, mission_pln_equip, pln_equip): Change i_type
Ron Koenderink [Thu, 7 Jul 2005 21:57:15 +0000 (21:57 +0000)]
(show_sect_capab, mission_pln_equip, pln_equip): Change i_type
references to use I_NONE instead of zero.  Zero has been invalid since
item.h rev. 1.12, and was questionable style before.

17 years agoUpdate for src/lib/subs/pr.c:1.25
Marc Olzheim [Wed, 6 Jul 2005 09:14:20 +0000 (09:14 +0000)]
Update for src/lib/subs/pr.c:1.25

17 years agoStill more 4.2.21 changes.
Markus Armbruster [Tue, 5 Jul 2005 16:14:09 +0000 (16:14 +0000)]
Still more 4.2.21 changes.

17 years ago(pr_player, upr_player): Blocking I/O on another player's struct iop *
Ron Koenderink [Mon, 4 Jul 2005 14:07:31 +0000 (14:07 +0000)]
(pr_player, upr_player): Blocking I/O on another player's struct iop *
is unsafe!  By the time the blocked thread wakes up, that player may
be gone, along with its struct iop *, and io_write() follows a
dangling pointer.  Moreover, at most one thread may use empth_select()
on the same file descriptor.  Violations of that restriction cause
threads to hang under Windows since ntthread.c rev. 1.15.  Make all
output to another player non-blocking for now.  Historically, player
threads sent output only to their socket, though their own iop.  This
was broken by flash and asynchronous telegram notification a long time
ago.

17 years ago(empth_init) [_WIN32]: Change flags to global_flags to prevent
Ron Koenderink [Sat, 2 Jul 2005 14:06:10 +0000 (14:06 +0000)]
(empth_init) [_WIN32]: Change flags to global_flags to prevent
scope conflict with the parameter flags.

17 years agoDocument Windows lossage and work-around.
Markus Armbruster [Fri, 1 Jul 2005 19:52:43 +0000 (19:52 +0000)]
Document Windows lossage and work-around.

17 years agoDoc fix.
Markus Armbruster [Fri, 1 Jul 2005 19:51:48 +0000 (19:51 +0000)]
Doc fix.

17 years agoDocument blocking constraints.
Markus Armbruster [Fri, 1 Jul 2005 19:51:00 +0000 (19:51 +0000)]
Document blocking constraints.

17 years ago(loc_GVAR): Putting file local variables into a struct serves no
Markus Armbruster [Thu, 30 Jun 2005 19:53:03 +0000 (19:53 +0000)]
(loc_GVAR): Putting file local variables into a struct serves no
useful purpose whatsoever.  Peel off the struct.

17 years ago(main) [_WIN32]: Windows putchar() screws up when printing multibyte
Ron Koenderink [Thu, 30 Jun 2005 16:10:42 +0000 (16:10 +0000)]
(main) [_WIN32]: Windows putchar() screws up when printing multibyte
strings bytewise unless the stream is buffered.  Switch stdout to
line-buffered mode.
(login): Explicitly flush stdout, because Windows doesn't implement
line-buffering faithfully.

17 years ago(loc_Thread, loc_Sem_t): Remove typedef, use the typedef name defined
Markus Armbruster [Thu, 30 Jun 2005 14:25:30 +0000 (14:25 +0000)]
(loc_Thread, loc_Sem_t): Remove typedef, use the typedef name defined
in the header instead.

Remove some superflous casts.

17 years ago(loc_Sem_t, empth_sem_t) [_WIN32]: empthread.h defines empth_sem_t as
Ron Koenderink [Sun, 26 Jun 2005 18:31:14 +0000 (18:31 +0000)]
(loc_Sem_t, empth_sem_t) [_WIN32]: empthread.h defines empth_sem_t as
incomplete type struct loc_Sem_t.  Instead of completing it here, the
code defined an unrelated type loc_Sem_t as (complete) type struct
empth_sem_t.  The resulting type errors were swept under the carpet
with casts.  Obvious fix.

17 years ago(deliver): Do not deliver friendly civilians into occupied sectors.
Markus Armbruster [Sun, 26 Jun 2005 13:32:15 +0000 (13:32 +0000)]
(deliver): Do not deliver friendly civilians into occupied sectors.

17 years agoMinor clarifications.
Markus Armbruster [Sat, 25 Jun 2005 17:25:50 +0000 (17:25 +0000)]
Minor clarifications.

17 years ago(io_write): Use IO_NOWAIT rather than 0. No functional change.
Markus Armbruster [Sat, 25 Jun 2005 17:24:13 +0000 (17:24 +0000)]
(io_write): Use IO_NOWAIT rather than 0.  No functional change.

17 years agoNew doc & doc fixes. Remove s_char on the way.
Markus Armbruster [Sat, 25 Jun 2005 17:22:45 +0000 (17:22 +0000)]
New doc & doc fixes.  Remove s_char on the way.

(C_MOD): Turn into enumeration constant.

17 years ago(empth_sleep) [_WIN32]: If the sleep returns early, go back to sleep.
Ron Koenderink [Sat, 25 Jun 2005 16:49:20 +0000 (16:49 +0000)]
(empth_sleep) [_WIN32]: If the sleep returns early, go back to sleep.
Short sleeps can cause double-updates and other trouble.

[_WIN32] (loc_SleepThisThread): Not used, removed.

17 years ago(create_pidfile): Silence compiler warning on printing pid_t with %d.
Markus Armbruster [Sat, 25 Jun 2005 16:41:34 +0000 (16:41 +0000)]
(create_pidfile): Silence compiler warning on printing pid_t with %d.

17 years agoDocument Empire's thread abstraction. Minor cleanups:
Markus Armbruster [Sat, 25 Jun 2005 16:37:59 +0000 (16:37 +0000)]
Document Empire's thread abstraction.  Minor cleanups:
(empth_init): Change first parameter to void **.
(empth_sleep): Change parameter to time_t.

17 years agoMore 4.2.21 changes.
Markus Armbruster [Thu, 23 Jun 2005 19:59:42 +0000 (19:59 +0000)]
More 4.2.21 changes.

17 years agoBased on a page Doug Wescott created for his Petting Zoo. I restored
Markus Armbruster [Thu, 23 Jun 2005 19:35:44 +0000 (19:35 +0000)]
Based on a page Doug Wescott created for his Petting Zoo.  I restored
the ASCII art to the original, gave credit to its creator, quoted from
WordNet (free) instead of American Heritage Dictionary, omitted parts
that might be illegal to distribute in certain countries, and improved
see also.

17 years agoDoc clarification.
Markus Armbruster [Thu, 23 Jun 2005 19:21:34 +0000 (19:21 +0000)]
Doc clarification.

17 years agoRemove some dead, disabled code.
Markus Armbruster [Thu, 23 Jun 2005 19:21:18 +0000 (19:21 +0000)]
Remove some dead, disabled code.

17 years agoA better than nothing joke.
Markus Armbruster [Thu, 23 Jun 2005 19:20:25 +0000 (19:20 +0000)]
A better than nothing joke.

17 years agoRewritten in an attempt to present all the initial revision's valuable
Markus Armbruster [Thu, 23 Jun 2005 19:08:19 +0000 (19:08 +0000)]
Rewritten in an attempt to present all the initial revision's valuable
information in a more accessible form, and then some.

17 years agoProtocol, session options and traditional dumps are complete, xdump is
Markus Armbruster [Thu, 23 Jun 2005 19:04:53 +0000 (19:04 +0000)]
Protocol, session options and traditional dumps are complete, xdump is
a stub, parsing human-readable output is missing.

17 years agoUpdate for 4.2.21.
Markus Armbruster [Sat, 18 Jun 2005 17:42:01 +0000 (17:42 +0000)]
Update for 4.2.21.

17 years ago(att_move_in_off): When boarding from a sector, mil entering the ship
Markus Armbruster [Sat, 18 Jun 2005 16:52:17 +0000 (16:52 +0000)]
(att_move_in_off): When boarding from a sector, mil entering the ship
less one were not removed from the sector.  The problem is putsect()
overwriting data from prior put_combat() with old data.  Broken in
rev. 1.17.  Change lunchbox code to match that of 1.16.  Closes
#1219918, reported by Doug Wescott.

17 years agoUpdate for src/util/fairland.c:1.25 and include/prototypes.h:1.84
Marc Olzheim [Wed, 15 Jun 2005 12:55:21 +0000 (12:55 +0000)]
Update for src/util/fairland.c:1.25 and include/prototypes.h:1.84

17 years agoUpdate patch for pr.c:1.22
Marc Olzheim [Wed, 15 Jun 2005 12:47:51 +0000 (12:47 +0000)]
Update patch for pr.c:1.22

17 years ago(copy_ascii_no_funny, copy_utf8_no_funny)
Markus Armbruster [Tue, 14 Jun 2005 05:01:26 +0000 (05:01 +0000)]
(copy_ascii_no_funny, copy_utf8_no_funny)
(copy_utf8_to_ascii_no_funny): Don't consider newline funny.  This
fixes output filtering broken in rev. 1.17.

17 years agoDocument use of UTF-8.
Markus Armbruster [Mon, 13 Jun 2005 19:07:00 +0000 (19:07 +0000)]
Document use of UTF-8.

17 years ago(player_login): Replace pr_player() by equivalent pr_id().
Markus Armbruster [Mon, 13 Jun 2005 19:05:37 +0000 (19:05 +0000)]
(player_login): Replace pr_player() by equivalent pr_id().
(pr_player, upr_player): Internal linkage.

(pr_hilite): Unused, remove.

17 years agoDocument, in particular use of UTF-8. Simplify code in a couple of
Markus Armbruster [Mon, 13 Jun 2005 19:02:49 +0000 (19:02 +0000)]
Document, in particular use of UTF-8.  Simplify code in a couple of
places, but no functional changes.

17 years ago(outid): Fix recovery from bad argument N. Simplify.
Markus Armbruster [Mon, 13 Jun 2005 18:48:54 +0000 (18:48 +0000)]
(outid): Fix recovery from bad argument N.  Simplify.

17 years ago(uprnf): A print function must not change its text argument!
Markus Armbruster [Mon, 13 Jun 2005 18:28:10 +0000 (18:28 +0000)]
(uprnf): A print function must not change its text argument!

17 years ago(copy_ascii_no_funny, copy_utf8_no_funny)
Markus Armbruster [Mon, 13 Jun 2005 18:16:44 +0000 (18:16 +0000)]
(copy_ascii_no_funny, copy_utf8_no_funny)
(copy_utf8_to_ascii_no_funny): New.
(flash, wall, prmptrd, uprmptrd, getcommand): Use them to filter
input.
(uprnf, pr_flash): Use them to filter output.
(prtoascii): No longer used, remove.

(player_commands, player_commands_index): Internal linkage.

17 years ago(upr_player): A print function must not change its text argument!
Markus Armbruster [Mon, 13 Jun 2005 17:27:38 +0000 (17:27 +0000)]
(upr_player): A print function must not change its text argument!

17 years ago(lrange, shoo, execute): Buffer passed to getstarg() was too small.
Markus Armbruster [Mon, 13 Jun 2005 11:32:07 +0000 (11:32 +0000)]
(lrange, shoo, execute): Buffer passed to getstarg() was too small.
Player could overrun it!

17 years ago(player_login, player_main): Move the C_INIT that terminates the login
Markus Armbruster [Mon, 13 Jun 2005 09:45:32 +0000 (09:45 +0000)]
(player_login, player_main): Move the C_INIT that terminates the login
phase to player_login().  No functional change.
(showvers): Trivial, used just once.  Inline, remove.

17 years ago(parse): Support 127 arguments instead of 100, to match
Markus Armbruster [Mon, 13 Jun 2005 09:33:54 +0000 (09:33 +0000)]
(parse): Support 127 arguments instead of 100, to match
player->argp[].  Assign complete argument vector.  This should make
buffer overruns blatantly obvious.

(parse): Don't bother checking SPACE argument, just crash.  It is
extremely unlikely that such a programming error wouldn't be
discovered by even them most superficial testing.

17 years ago(emp_config): Buffers passed to parse() were too small. econfig file
Markus Armbruster [Mon, 13 Jun 2005 09:18:14 +0000 (09:18 +0000)]
(emp_config): Buffers passed to parse() were too small.  econfig file
could overrun them.  Closes #899546.

17 years ago(dispatch): Argument buf is user text and must be printed as such. In
Markus Armbruster [Mon, 13 Jun 2005 08:57:39 +0000 (08:57 +0000)]
(dispatch): Argument buf is user text and must be printed as such.  In
error messages, print just the command name instead.

17 years ago(play_list): player->combuf[] is user text and must be printed as
Markus Armbruster [Mon, 13 Jun 2005 08:42:27 +0000 (08:42 +0000)]
(play_list): player->combuf[] is user text and must be printed as
such.
(ufindbreak, ufindpfx): Rename, move to pr.c, external linkage.

17 years ago(shut): Buffer passed to getstarg() was much too small. Deity could
Markus Armbruster [Sun, 12 Jun 2005 15:33:53 +0000 (15:33 +0000)]
(shut): Buffer passed to getstarg() was much too small.  Deity could
overrun it.

(shut): Fix retrieval of second argument.

(shut): Simplify formatting of broadcast messages.

17 years ago(rea, turn): Use a different buffer for message text. Just for
Markus Armbruster [Sun, 12 Jun 2005 10:11:04 +0000 (10:11 +0000)]
(rea, turn): Use a different buffer for message text.  Just for
clarity.

17 years ago(typed_wu): Treat overlong message as internal error instead of just
Markus Armbruster [Sun, 12 Jun 2005 10:07:30 +0000 (10:07 +0000)]
(typed_wu): Treat overlong message as internal error instead of just
truncating it silently.  Simplify.

17 years ago(getele): Abort telegram when uprmptrd() fails. Previously, failures
Markus Armbruster [Sun, 12 Jun 2005 09:58:38 +0000 (09:58 +0000)]
(getele): Abort telegram when uprmptrd() fails.  Previously, failures
that didn't set player->aborted sent the telegram, e.g. EOF.

(getele): Fix misleading size of left[].

(getele, tilde_escape): Simplify.  tilde_escape() now returns the
escape code instead of comparing it to second argument.

17 years ago(turn): Buffer passed to getele() was one too small. Deity could
Markus Armbruster [Sun, 12 Jun 2005 09:38:30 +0000 (09:38 +0000)]
(turn): Buffer passed to getele() was one too small.  Deity could
overrun it by entering a message of maximum size.

17 years ago(gamedown, show_motd): Fix message buffer size. Messages of maximum
Markus Armbruster [Sun, 12 Jun 2005 09:25:22 +0000 (09:25 +0000)]
(gamedown, show_motd): Fix message buffer size.  Messages of maximum
length were considered overlong and ignored.

17 years agoRemove some redundant casts.
Markus Armbruster [Sun, 12 Jun 2005 08:17:13 +0000 (08:17 +0000)]
Remove some redundant casts.

17 years agoRemove a bunch of redundant casts.
Markus Armbruster [Sun, 12 Jun 2005 06:31:48 +0000 (06:31 +0000)]
Remove a bunch of redundant casts.

17 years ago(rea): Portability fix.
Markus Armbruster [Sun, 12 Jun 2005 05:25:28 +0000 (05:25 +0000)]
(rea): Portability fix.

17 years ago[_WIN32] (loc_StripDels): Remove. Different behavior depending on the
Markus Armbruster [Sat, 11 Jun 2005 16:44:01 +0000 (16:44 +0000)]
[_WIN32] (loc_StripDels): Remove.  Different behavior depending on the
platform is evil, and line editing is none of the server's business
anyway.  If your client can't deal with the delete key, well, here's a
nickel, kid, get yourself a better computer.

17 years ago(ioq_gets): Support telnet line termination "\r\n". Previously,
Markus Armbruster [Sat, 11 Jun 2005 16:38:58 +0000 (16:38 +0000)]
(ioq_gets): Support telnet line termination "\r\n".  Previously,
string input other than through parse() or getele() failed to strip
'\r', which could end up in ship names and such.
(getele): Code dealing with '\r' is now redundant, remove.  It ceased
to work in rev. 1.6 because input filtering replaces '\r' by '?'.

17 years agoFix markup.
Markus Armbruster [Sat, 11 Jun 2005 13:41:11 +0000 (13:41 +0000)]
Fix markup.

17 years agoSpelling fixes.
Markus Armbruster [Sat, 11 Jun 2005 13:38:47 +0000 (13:38 +0000)]
Spelling fixes.

17 years agoFix the previous revision.
Markus Armbruster [Sat, 11 Jun 2005 13:38:42 +0000 (13:38 +0000)]
Fix the previous revision.

17 years ago(sendmessage): Skip players not in state PS_PLAYING. Flashes to them
Markus Armbruster [Thu, 9 Jun 2005 22:28:54 +0000 (22:28 +0000)]
(sendmessage): Skip players not in state PS_PLAYING.  Flashes to them
get ignored, hence telling the player that the flash was sent is
wrong.  Skipping fixes that.

17 years ago(mobupdate): Don't print '\r' after '\n'.
Markus Armbruster [Thu, 9 Jun 2005 22:22:53 +0000 (22:22 +0000)]
(mobupdate): Don't print '\r' after '\n'.

17 years ago(play): Simplify counting of players.
Markus Armbruster [Thu, 9 Jun 2005 22:21:54 +0000 (22:21 +0000)]
(play): Simplify counting of players.

17 years ago(options_cmd): List options only if none are set.
Markus Armbruster [Thu, 9 Jun 2005 22:18:32 +0000 (22:18 +0000)]
(options_cmd): List options only if none are set.

(list_cmd, login_coms): Login command list is obscure and redundant;
remove.

(login-coms): Improve doc strings.

17 years ago(nstr_string_ok): New.
Markus Armbruster [Thu, 9 Jun 2005 22:12:32 +0000 (22:12 +0000)]
(nstr_string_ok): New.
(nstr_comp): Use it to fix oops on `des='.  Reported by Doug Wescott.

17 years ago(getsose): Port from obsolete termcap to terminfo. The old code
Markus Armbruster [Sat, 4 Jun 2005 13:03:16 +0000 (13:03 +0000)]
(getsose): Port from obsolete termcap to terminfo.  The old code
manually stripped off padding, which is evil.  The new code does
nothing when the stdout is not connected to a terminal.
(SO, smso, SE, rmso): Rename, static linkage.
(putso, putse): New.
(screen): Use it.

17 years ago(hidd,peek): Rename hidden command to peek.
Ron Koenderink [Wed, 1 Jun 2005 12:26:22 +0000 (12:26 +0000)]
(hidd,peek): Rename hidden command to peek.
This prevents a conflict in the info files with
HIDDEN option.

17 years agoUpdate for src/util/fairland.c:1.23 and src/server/main.c:1.62
Marc Olzheim [Tue, 31 May 2005 09:02:33 +0000 (09:02 +0000)]
Update for src/util/fairland.c:1.23 and src/server/main.c:1.62

17 years agoSpelling fixes.
Ron Koenderink [Tue, 31 May 2005 03:31:58 +0000 (03:31 +0000)]
Spelling fixes.

17 years ago(program_name, help): New.
Markus Armbruster [Mon, 30 May 2005 15:15:33 +0000 (15:15 +0000)]
(program_name, help): New.
(main): New option -h.  Terminate unsuccessfully on invalid option.
(usage, parse_args): Factored usage() out of parse_args().
(parse_args): More useful diagnostics.

17 years ago(prod_plane): Remove redundant initialization.
Markus Armbruster [Mon, 30 May 2005 15:07:34 +0000 (15:07 +0000)]
(prod_plane): Remove redundant initialization.

17 years ago(sarg_type): Simplify, no functional change.
Markus Armbruster [Mon, 30 May 2005 15:06:31 +0000 (15:06 +0000)]
(sarg_type): Simplify, no functional change.

17 years agoDoc & formatting fixes.
Markus Armbruster [Mon, 30 May 2005 15:03:24 +0000 (15:03 +0000)]
Doc & formatting fixes.

17 years ago(flee, army, wing): Print how many new members were added.
Markus Armbruster [Mon, 30 May 2005 14:56:02 +0000 (14:56 +0000)]
(flee, army, wing): Print how many new members were added.
Previously, it printed how many were selected, which can include old
members of the group.

(flee, army): The rather obscure feature to assign the fleet's /
army's retreat orders to members was broken.  It ignored ownership,
and thus could copy some other player's retreat orders.  Abusable.
Copying the first member's retreat orders is less than useful, in
particular for group ~.  The code now chooses the first one in the
same sector with RET_GROUP set.  RET_GROUP is never set for group ~.

17 years agoFix .SA.
Markus Armbruster [Mon, 30 May 2005 07:35:15 +0000 (07:35 +0000)]
Fix .SA.

17 years agoCosmetic change of markup.
Markus Armbruster [Mon, 30 May 2005 06:15:21 +0000 (06:15 +0000)]
Cosmetic change of markup.

17 years agoFix the previous revision.
Markus Armbruster [Mon, 30 May 2005 06:14:22 +0000 (06:14 +0000)]
Fix the previous revision.

17 years agoUpdated from man/emp_client.6 rev. 1.9.
Markus Armbruster [Mon, 30 May 2005 05:18:33 +0000 (05:18 +0000)]
Updated from man/emp_client.6 rev. 1.9.

17 years agoAdd notes for Client Implementors.
Ron Koenderink [Sun, 29 May 2005 22:21:34 +0000 (22:21 +0000)]
Add notes for Client Implementors.

17 years ago(output,screen): In ASCII mode, remove standout bit if the client
Ron Koenderink [Sun, 29 May 2005 16:22:14 +0000 (16:22 +0000)]
(output,screen): In ASCII mode, remove standout bit if the client
does not support standout mode.
In UTF8 mode, remove SO/SI characters if the client does not support
standout mode.

17 years agoAdd the See Also "Moving" to the commands described
Ron Koenderink [Sun, 29 May 2005 15:46:13 +0000 (15:46 +0000)]
Add the See Also "Moving" to the commands described
in the info file.

17 years agoCorrect the number of commands in the described in the text.
Ron Koenderink [Sun, 29 May 2005 15:40:34 +0000 (15:40 +0000)]
Correct the number of commands in the described in the text.

17 years agoChanged the name of Attack and Move concept files and
Ron Koenderink [Sun, 29 May 2005 14:17:07 +0000 (14:17 +0000)]
Changed the name of Attack and Move concept files and
a number of Subjects files to prevent name
conflicts where the only the case is difference.
Attack -> Attacking
Moving -> Transportation
Move -> Moving
Market -> Commerce
Nation -> Nations
Production -> Producing
Update -> Updating

17 years ago(EFF_OWNER): The assertion that EFF_OWNER implies ef_read() sets
Markus Armbruster [Sun, 29 May 2005 14:14:33 +0000 (14:14 +0000)]
(EFF_OWNER): The assertion that EFF_OWNER implies ef_read() sets
player->owner is no longer used.  Use it to indicate that owner can be
accessed through struct genitem, similar to EFF_XY and EFF_GROUP.
(xdump): Fix ownership checking.  Old version worked only when
nxtitem() set player->owner.

(empfile): Set EFF_OWNER for EF_LOST.  This fixes `xdump lost'
disclosing other countries' losses.
(loststr): Document implications of EFF_OWNER.

(empfile): Set EFF_OWNER for EF_NATION.
(natstr): Rearrange members for EFF_OWNER, document.
(nat_ca): Unused so far.  Clean it up, add most missing selectors.
(fileinit): Use it.  This implements `xdump nation'.

(fileinit): Simplify setting map file size.

17 years ago(nxtitem): Skipped unowned sectors (could not occur), ships, planes,
Markus Armbruster [Sun, 29 May 2005 13:15:56 +0000 (13:15 +0000)]
(nxtitem): Skipped unowned sectors (could not occur), ships, planes,
land units and nukes for selection type NS_LIST.  Thus, unowned items
explicitly selected by item number are skipped, while the same items
selected implicitely by group, area or whatever are not.  This makes
no sense.  Some callers break the nstr_item abstraction to prevent the
skipping, so they get all items regardless of how they were selected.
All other callers filter out unowned items.  This skipping misfeature
dates back to the very oldest known versions of Empire.  Remove it.
Also remove skipping prevention hacks from callers.

(tend_nxtitem): Now identical to nxtitem(), except it lacks some extra
normalization of item coordinates, which should have no effect.
Replace by nxtitem().

17 years ago(findlost): Static linkage.
Markus Armbruster [Sat, 28 May 2005 16:04:08 +0000 (16:04 +0000)]
(findlost): Static linkage.

17 years ago(LIBS, NTLIBS): Remove libsubs.a.
Markus Armbruster [Sat, 28 May 2005 16:02:46 +0000 (16:02 +0000)]
(LIBS, NTLIBS): Remove libsubs.a.

17 years ago(main): Fix checking of ef_open()'s value. Fixes program exit status
Markus Armbruster [Sat, 28 May 2005 15:57:17 +0000 (15:57 +0000)]
(main): Fix checking of ef_open()'s value.  Fixes program exit status
when files can't be opened.

(logerror): The version from libcommon.a does the right thing since
log.c rev. 1.17.  Use it, remove local version.

(log_last_commands): No longer referenced by library code, remove.

17 years ago(ef_write): Don't call log_last_commands() directly, use oops(). If
Markus Armbruster [Sat, 28 May 2005 15:52:29 +0000 (15:52 +0000)]
(ef_write): Don't call log_last_commands() directly, use oops().  If
it's worth logging commands, then it's worth dumping core.

17 years ago(debug): Move to log.c, so other programs don't have to define debug
Markus Armbruster [Sat, 28 May 2005 15:34:21 +0000 (15:34 +0000)]
(debug): Move to log.c, so other programs don't have to define debug
themselves just to use logerror().

17 years agoClean up the previous revision; no functional changes.
Markus Armbruster [Sat, 28 May 2005 08:46:33 +0000 (08:46 +0000)]
Clean up the previous revision; no functional changes.

17 years agoUpdate patch for some minor offset changes.
Marc Olzheim [Sat, 28 May 2005 08:44:57 +0000 (08:44 +0000)]
Update patch for some minor offset changes.

17 years agoUpdate patch for pr.c:1.12
Marc Olzheim [Sat, 28 May 2005 08:44:09 +0000 (08:44 +0000)]
Update patch for pr.c:1.12

17 years agoRemove some redundant casts.
Markus Armbruster [Sat, 28 May 2005 08:37:52 +0000 (08:37 +0000)]
Remove some redundant casts.