empserver
16 years agoStill more 4.3.2 changes. v4.3.2
Markus Armbruster [Thu, 27 Apr 2006 18:02:18 +0000 (18:02 +0000)]
Still more 4.3.2 changes.

16 years ago(info.nr/all, info.html/all.html, sources.mk): Pass LC_ALL=C in the
Markus Armbruster [Wed, 26 Apr 2006 19:08:17 +0000 (19:08 +0000)]
(info.nr/all, info.html/all.html, sources.mk): Pass LC_ALL=C in the
environment to make output independent of user's locale.

16 years agoOnly L_SUPPLY units can't attack as of 4.0.0, fix info Attacking,
Markus Armbruster [Wed, 26 Apr 2006 18:49:33 +0000 (18:49 +0000)]
Only L_SUPPLY units can't attack as of 4.0.0, fix info Attacking,
remove dead code.

16 years agoUpdate known contributors comment.
Markus Armbruster [Wed, 26 Apr 2006 18:14:54 +0000 (18:14 +0000)]
Update known contributors comment.

16 years agoRemove redundant declaration.
Markus Armbruster [Wed, 26 Apr 2006 18:14:16 +0000 (18:14 +0000)]
Remove redundant declaration.

16 years ago(sources.mk): Sort file names to make output deterministic.
Markus Armbruster [Wed, 26 Apr 2006 18:13:25 +0000 (18:13 +0000)]
(sources.mk): Sort file names to make output deterministic.

16 years ago(guerrilla): Remove unused variable.
Markus Armbruster [Wed, 26 Apr 2006 17:51:38 +0000 (17:51 +0000)]
(guerrilla): Remove unused variable.

16 years ago(guerrilla): Round security unit raid value below one to zero instead
Markus Armbruster [Wed, 26 Apr 2006 16:54:29 +0000 (16:54 +0000)]
(guerrilla): Round security unit raid value below one to zero instead
of one.  Before, an empty, inefficient unit could be used to kill one
rebel per update.

16 years ago(guerrilla): Security units' raid was broken in 4.0.0: the number of
Markus Armbruster [Wed, 26 Apr 2006 16:43:25 +0000 (16:43 +0000)]
(guerrilla): Security units' raid was broken in 4.0.0: the number of
che killed was 100 times too small, thus zero for all practical cases.
4.2.7 attempted to fix it, but left it broken for efficiency < 100.
It also increased deadliness of 100% units by a factor of 2.5.
Restore pre-4.0.0 behavior.

16 years agoMore 4.3.2 changes.
Markus Armbruster [Mon, 24 Apr 2006 18:50:22 +0000 (18:50 +0000)]
More 4.3.2 changes.

16 years ago(player_addrlen): Change type to size_t. Fixes type error in
Markus Armbruster [Mon, 24 Apr 2006 18:34:25 +0000 (18:34 +0000)]
(player_addrlen): Change type to size_t.  Fixes type error in
player_init(), which was most likely fatal on 64 bit hosts.  Broken in
rev. 1.34.

16 years ago(snxtitem): s_char purge.
Markus Armbruster [Mon, 24 Apr 2006 18:27:31 +0000 (18:27 +0000)]
(snxtitem): s_char purge.

16 years agoFix char / s_char inconsistencies. Build was broken on some systems
Markus Armbruster [Mon, 24 Apr 2006 18:24:23 +0000 (18:24 +0000)]
Fix char / s_char inconsistencies.  Build was broken on some systems
since the first one crept in with src/lib/subs/retreat.c rev. 1.34.

16 years agoUpdate for 4.3.2.
Markus Armbruster [Sun, 23 Apr 2006 13:08:47 +0000 (13:08 +0000)]
Update for 4.3.2.

16 years ago(xdvisible): Add case EF_REALM. Should have been added along with
Markus Armbruster [Sun, 23 Apr 2006 12:33:33 +0000 (12:33 +0000)]
(xdvisible): Add case EF_REALM.  Should have been added along with
EF_REALM (file.h rev. 1.52).  This made xdump leak everybody's realms.

16 years ago(login_coms): Remove erroneous declaration. Move definition before
Ron Koenderink [Sat, 22 Apr 2006 14:13:05 +0000 (14:13 +0000)]
(login_coms): Remove erroneous declaration.  Move definition before
uses.  Add required function declarations.

16 years ago(map, sct, rout): Remove unused local variables.
Ron Koenderink [Fri, 21 Apr 2006 13:19:16 +0000 (13:19 +0000)]
(map, sct, rout): Remove unused local variables.

16 years ago(snxtsct): Iteration order for `*' disclosed the real origin. Fix.
Markus Armbruster [Thu, 20 Apr 2006 19:06:50 +0000 (19:06 +0000)]
(snxtsct): Iteration order for `*' disclosed the real origin.  Fix.
Mapping commands used to work around this bug, until map.c rev. 1.18,
rout.c 1.18, sct.c 1.17, surv.c 1.18 removed the work-around and thus
exposed the bug.

16 years ago(login_coms): Make declaration consistent with definition.
Markus Armbruster [Thu, 20 Apr 2006 18:40:59 +0000 (18:40 +0000)]
(login_coms): Make declaration consistent with definition.

16 years agoFix missing include. Closes #1464069.
Markus Armbruster [Thu, 20 Apr 2006 18:39:57 +0000 (18:39 +0000)]
Fix missing include.  Closes #1464069.

16 years ago(att_prompt): Do the right thing when player aborts. Simplify.
Markus Armbruster [Mon, 17 Apr 2006 17:53:16 +0000 (17:53 +0000)]
(att_prompt): Do the right thing when player aborts.  Simplify.

16 years ago(CANT_REACH): New. Use it instead of CANT_HAPPEN() where possible.
Markus Armbruster [Mon, 17 Apr 2006 17:36:07 +0000 (17:36 +0000)]
(CANT_REACH): New.  Use it instead of CANT_HAPPEN() where possible.
(oops): Cope with NULL argument passed by CANT_REACH().

16 years agoFix long lines. No functional changes.
Markus Armbruster [Mon, 17 Apr 2006 16:38:43 +0000 (16:38 +0000)]
Fix long lines.  No functional changes.

16 years ago(XYOFFSET): Parenthesize macro parameters in expansion.
Markus Armbruster [Mon, 17 Apr 2006 12:51:23 +0000 (12:51 +0000)]
(XYOFFSET): Parenthesize macro parameters in expansion.

16 years agoTrim superflous casts and parenthesis.
Markus Armbruster [Mon, 17 Apr 2006 08:24:12 +0000 (08:24 +0000)]
Trim superflous casts and parenthesis.

16 years ago(noise): Drop second parameter, it is always true.
Markus Armbruster [Mon, 17 Apr 2006 08:16:48 +0000 (08:16 +0000)]
(noise): Drop second parameter, it is always true.

16 years ago(getin): Confusing. Redesign.
Markus Armbruster [Mon, 17 Apr 2006 08:13:20 +0000 (08:13 +0000)]
(getin): Confusing.  Redesign.
(edit): Simplify.

(doland): Spelling fix.

16 years ago(doplane): Don't arbitrarily truncate value for key 'a' and 'd'.
Markus Armbruster [Mon, 17 Apr 2006 08:09:14 +0000 (08:09 +0000)]
(doplane): Don't arbitrarily truncate value for key 'a' and 'd'.

s_char purge.

16 years agoBump version to 4.3.2.
Markus Armbruster [Mon, 17 Apr 2006 07:43:39 +0000 (07:43 +0000)]
Bump version to 4.3.2.

16 years agoDon't explicitly dereference function pointers in calls. No
Markus Armbruster [Sun, 16 Apr 2006 17:42:19 +0000 (17:42 +0000)]
Don't explicitly dereference function pointers in calls.  No
functional changes.

16 years agoFix long lines. No functional changes.
Markus Armbruster [Sun, 16 Apr 2006 17:20:33 +0000 (17:20 +0000)]
Fix long lines.  No functional changes.

16 years agoFinal polish for 4.3.1. v4.3.1
Markus Armbruster [Sat, 15 Apr 2006 11:43:27 +0000 (11:43 +0000)]
Final polish for 4.3.1.

16 years ago(sail): There is no qsail command, remove test for it. Test the
Markus Armbruster [Sat, 15 Apr 2006 10:55:19 +0000 (10:55 +0000)]
(sail): There is no qsail command, remove test for it.  Test the
second argument only when the command is sail.  Before, `unsail 42 q'
showed the sailing path instead of clearing it.

16 years agoUpdate for 4.3.1.
Markus Armbruster [Wed, 5 Apr 2006 18:54:18 +0000 (18:54 +0000)]
Update for 4.3.1.

16 years ago(verify_row): uid check was too strict.
Markus Armbruster [Wed, 5 Apr 2006 18:47:02 +0000 (18:47 +0000)]
(verify_row): uid check was too strict.

16 years agoComment grammar fix.
Markus Armbruster [Wed, 5 Apr 2006 18:34:54 +0000 (18:34 +0000)]
Comment grammar fix.

16 years agoNew section on booleans. Elaborate thread safety.
Markus Armbruster [Wed, 5 Apr 2006 18:33:41 +0000 (18:33 +0000)]
New section on booleans.  Elaborate thread safety.

16 years agoFix the previous revision.
Markus Armbruster [Wed, 5 Apr 2006 18:15:07 +0000 (18:15 +0000)]
Fix the previous revision.

16 years ago(bestownedpath, owned_and_navigable): Terrain parameter isn't really
Markus Armbruster [Wed, 5 Apr 2006 09:50:45 +0000 (09:50 +0000)]
(bestownedpath, owned_and_navigable): Terrain parameter isn't really
used, remove it.  Use null bigmap argument to ignore terrain (flying),
non-null for navigation.  Callers changed.

16 years ago(bestownedpath): Return NULL on long path instead of "?". Terminate
Markus Armbruster [Wed, 5 Apr 2006 09:30:38 +0000 (09:30 +0000)]
(bestownedpath): Return NULL on long path instead of "?".  Terminate
returned path with 'h'.  This makes BestShipPath() and BestAirPath()
more similar to BestLandPath().  Simplify callers.

16 years ago(BestAirPath): Some callers assumed non-null return value must be the
Markus Armbruster [Wed, 5 Apr 2006 09:13:03 +0000 (09:13 +0000)]
(BestAirPath): Some callers assumed non-null return value must be the
first argument.  Fix them.  Simplify bestownedpath().

16 years ago(owned_and_navigable): Rework rev. 1.18: do check the real sector, but
Markus Armbruster [Wed, 5 Apr 2006 08:51:50 +0000 (08:51 +0000)]
(owned_and_navigable): Rework rev. 1.18: do check the real sector, but
only if it's owned or allied.  Check it before the bmap, and do it
just like shp_check_nav() does (should use common code).

16 years ago(getpath): Supply the missing code for P_SAILING. This makes the sail
Markus Armbruster [Wed, 5 Apr 2006 07:30:41 +0000 (07:30 +0000)]
(getpath): Supply the missing code for P_SAILING.  This makes the sail
command accept destination sectors as well as paths.  Clean up the
case discrimination.

16 years ago(P_NONE, P_WALKING, P_FLYING, P_SAILING, p_mode): Turn into new
Markus Armbruster [Wed, 5 Apr 2006 07:21:49 +0000 (07:21 +0000)]
(P_NONE, P_WALKING, P_FLYING, P_SAILING, p_mode): Turn into new
enumeration p_mode.  Users changed.  s_char and register purge.

16 years ago(tend): Fix rev. 1.20: used to send bulletin to last tendee's owner,
Markus Armbruster [Wed, 5 Apr 2006 07:06:58 +0000 (07:06 +0000)]
(tend): Fix rev. 1.20: used to send bulletin to last tendee's owner,
unless that's the player, regardless of success.  Send them for every
successful tend to a foreign ship.

16 years ago(build_mission_list_type): Simplify.
Markus Armbruster [Wed, 29 Mar 2006 19:46:39 +0000 (19:46 +0000)]
(build_mission_list_type): Simplify.

(show_mission): Plug memory leak.

16 years ago(mission): Silence compiler warning.
Markus Armbruster [Wed, 29 Mar 2006 19:40:42 +0000 (19:40 +0000)]
(mission): Silence compiler warning.

16 years ago(mission): Plug memory leak. s_char purge.
Markus Armbruster [Wed, 29 Mar 2006 19:40:22 +0000 (19:40 +0000)]
(mission): Plug memory leak.  s_char purge.

16 years ago(iop): Remove unused members assoc, notify.
Markus Armbruster [Wed, 29 Mar 2006 19:19:47 +0000 (19:19 +0000)]
(iop): Remove unused members assoc, notify.
(io_open): Remove unused parameters assoc, notify.  Caller changed.

16 years ago(main): Remove superflous calloc(). s_char purge.
Markus Armbruster [Wed, 29 Mar 2006 16:56:14 +0000 (16:56 +0000)]
(main): Remove superflous calloc().  s_char purge.

16 years ago(bestownedpath): Fix test of end sector for terrain string starting
Markus Armbruster [Wed, 29 Mar 2006 16:12:00 +0000 (16:12 +0000)]
(bestownedpath): Fix test of end sector for terrain string starting
with 'R'.  Broken in 4.2.2.  No such terrain strings occur.

16 years ago(owned_and_navigable): Do not check the real sector, only the bmap.
Markus Armbruster [Wed, 29 Mar 2006 16:06:30 +0000 (16:06 +0000)]
(owned_and_navigable): Do not check the real sector, only the bmap.
Checking the real sector leaks information, which can be abused to
test whether an arbitrary sector is unfriendly or an inefficient
harbor or bridge, at the cost of some ship mobility (I think).
Initially broken ca. 1993, went through several changes, but the leak
survived them all.

16 years ago(emp_config): Failed to call set_dirs() when default econfig file
Markus Armbruster [Wed, 29 Mar 2006 13:14:55 +0000 (13:14 +0000)]
(emp_config): Failed to call set_dirs() when default econfig file
doesn't exist.

16 years ago(genlist): Move from include/mission.h to src/lib/subs/mission.c.
Markus Armbruster [Wed, 29 Mar 2006 07:53:25 +0000 (07:53 +0000)]
(genlist): Move from include/mission.h to src/lib/subs/mission.c.

(genlist): Remove unused members x, y.

(genlist): Use void * for generic pointer members cp, thing.  Change
users not to cast.

(oprange): Oops on bad argument.

16 years ago(as_data): Use void * for userdata member and userdata parameter of
Markus Armbruster [Tue, 28 Mar 2006 21:00:00 +0000 (21:00 +0000)]
(as_data): Use void * for userdata member and userdata parameter of
callbacks.  Users changed.

16 years ago(bp_init): Use semantically correct return type instead of s_char *.
Markus Armbruster [Tue, 28 Mar 2006 20:42:57 +0000 (20:42 +0000)]
(bp_init): Use semantically correct return type instead of s_char *.
Caller changed.

16 years agoRemove superflous casts.
Markus Armbruster [Tue, 28 Mar 2006 19:51:48 +0000 (19:51 +0000)]
Remove superflous casts.

16 years ago(move_ground): Drop first parameter of map callback, it's not used.
Markus Armbruster [Tue, 28 Mar 2006 19:46:40 +0000 (19:46 +0000)]
(move_ground): Drop first parameter of map callback, it's not used.
Callers changed.  s_char purge.

16 years agoType of gift()'s generic pointer parameter was fixed in the previous
Markus Armbruster [Tue, 28 Mar 2006 19:20:08 +0000 (19:20 +0000)]
Type of gift()'s generic pointer parameter was fixed in the previous
revision of src/lib/commands/load.c, change callers.

16 years agoBump version to 4.3.1.
Markus Armbruster [Tue, 28 Mar 2006 18:35:08 +0000 (18:35 +0000)]
Bump version to 4.3.1.

16 years ago(multifire): Retreat when helpless used RET_INJURED instead of
Markus Armbruster [Tue, 28 Mar 2006 06:22:48 +0000 (06:22 +0000)]
(multifire): Retreat when helpless used RET_INJURED instead of
RET_HELPLESS.  Closes #1146364.

16 years ago(retreat_ship1): Fix test for seamines. Before, retreating ships
Markus Armbruster [Tue, 28 Mar 2006 05:51:49 +0000 (05:51 +0000)]
(retreat_ship1): Fix test for seamines.  Before, retreating ships
could sweep and hit landmines.  The bug fixed in rev. 1.35 is believed
to have masked this bug.  Charge mobility for sweeping.  Closes
#1346756.

16 years ago(retreat_ship1, retreat_land1): Simplify.
Markus Armbruster [Mon, 27 Mar 2006 22:02:38 +0000 (22:02 +0000)]
(retreat_ship1, retreat_land1): Simplify.

16 years ago(retreat_land1): Fix land mine hit chance (was too high).
Markus Armbruster [Mon, 27 Mar 2006 21:54:56 +0000 (21:54 +0000)]
(retreat_land1): Fix land mine hit chance (was too high).

16 years ago(MINE_LDAMAGE): Change to match damage suffered in lnd_hit_mine().
Markus Armbruster [Mon, 27 Mar 2006 21:47:50 +0000 (21:47 +0000)]
(MINE_LDAMAGE): Change to match damage suffered in lnd_hit_mine().
This increases damage suffered in retreat.  Fix info Damage.
(shp_hit_mine): Use MINE_DAMAGE().
(lnd_hit_mine): Use MINE_LDAMAGE().

16 years ago(shp_check_one_mines): Simplify slightly.
Markus Armbruster [Mon, 27 Mar 2006 21:43:21 +0000 (21:43 +0000)]
(shp_check_one_mines): Simplify slightly.

16 years ago(retreat_ship1): Fix sector ownership test. Before, retreating ships
Markus Armbruster [Mon, 27 Mar 2006 20:43:57 +0000 (20:43 +0000)]
(retreat_ship1): Fix sector ownership test.  Before, retreating ships
could enter sectors owned by whoever caused the retreat, but not own
sectors.  Reported by Ray Hyatt.  Closes #1346750.

16 years ago(command): Simplify mapping of condarg to lower case.
Markus Armbruster [Mon, 27 Mar 2006 20:13:50 +0000 (20:13 +0000)]
(command): Simplify mapping of condarg to lower case.

16 years ago(lost): Simplify code for argument default value.
Markus Armbruster [Mon, 27 Mar 2006 19:53:05 +0000 (19:53 +0000)]
(lost): Simplify code for argument default value.

16 years agoCosmetics.
Markus Armbruster [Mon, 27 Mar 2006 19:50:38 +0000 (19:50 +0000)]
Cosmetics.

16 years ago(map, rout, sct, surv): Remove special case for sects argument `*',
Markus Armbruster [Mon, 27 Mar 2006 19:45:08 +0000 (19:45 +0000)]
(map, rout, sct, surv): Remove special case for sects argument `*',
snxtsct() handles it just fine.

16 years ago(map): Simplify slightly.
Markus Armbruster [Mon, 27 Mar 2006 19:24:44 +0000 (19:24 +0000)]
(map): Simplify slightly.

16 years ago(player_coms): test needs C_MOD flag, because it calls draw_map()
Markus Armbruster [Mon, 27 Mar 2006 19:19:58 +0000 (19:19 +0000)]
(player_coms): test needs C_MOD flag, because it calls draw_map()
through map().

16 years ago(tran_map): Set player->argp[0]. Required since bmap() was merged
Markus Armbruster [Mon, 27 Mar 2006 19:10:40 +0000 (19:10 +0000)]
(tran_map): Set player->argp[0].  Required since bmap() was merged
into map() ca. 1995.  Fixes 'm' at test's move_ground() prompt.
Simplify clearing player->argp[2].  Don't clear beyond that.

16 years ago(tran_map): Set player->argp[0]. Required since bmap() was merged
Markus Armbruster [Mon, 27 Mar 2006 19:00:42 +0000 (19:00 +0000)]
(tran_map): Set player->argp[0].  Required since bmap() was merged
into map() ca. 1995.  Clear player->argp[2].  Required since map
acquired its second argument in the early 90s.  Fixes 'm' at
transport's move_ground() prompt.

16 years ago(unit_map): Don't use snxtsct(), it obeys conditionals. Use
Markus Armbruster [Mon, 27 Mar 2006 18:45:20 +0000 (18:45 +0000)]
(unit_map): Don't use snxtsct(), it obeys conditionals.  Use
snxtsct_area().  Callers march() and navi() clearly don't want it to
use conditionals.  navi() used to zap them (just removed).  march()
doesn't, which was a bug similar to #785447.  It's less clear for
caller map().  I'd argue that conditionals apply to map's argument,
the unit number, not to the map itself.  draw_map() zaps them anyway.

16 years ago(unit_map): Simplify.
Markus Armbruster [Mon, 27 Mar 2006 18:42:18 +0000 (18:42 +0000)]
(unit_map): Simplify.

16 years ago(explore_map, nav_map, move_map, fly_map): Don't use snxtsct(), it
Markus Armbruster [Mon, 27 Mar 2006 18:20:25 +0000 (18:20 +0000)]
(explore_map, nav_map, move_map, fly_map): Don't use snxtsct(), it
obeys conditionals.  Use snxtsct_dist().  Closes #785447.  Only march
and test were actually broken, the other uses zapped conditionals.
(move_map, fly_map, nav_map, navi): Don't zap conditionals.

16 years ago(bsanct): Use snxtitem_all() instead of snxtitem(). The latter uses
Markus Armbruster [Sun, 26 Mar 2006 19:21:13 +0000 (19:21 +0000)]
(bsanct): Use snxtitem_all() instead of snxtitem().  The latter uses
player->condarg, which lets players keep sanctuaries.  Broken in the
early 90s.

16 years ago(retreat_ship1, retreat_land1): Use snxtitem_group() instead of
Markus Armbruster [Sun, 26 Mar 2006 19:09:06 +0000 (19:09 +0000)]
(retreat_ship1, retreat_land1): Use snxtitem_group() instead of
snxtitem() for RET_GROUP.  The latter uses player->condarg, which lets
crafty attackers suppress retreat.

16 years ago(conditions): Give sentinel a legible desc[], just in case.
Markus Armbruster [Sun, 26 Mar 2006 19:02:28 +0000 (19:02 +0000)]
(conditions): Give sentinel a legible desc[], just in case.
(findcondition): Oops on hitting the sentinel.

(retreat_ship1, retreat_land1): Don't bother to map code to lower
case, it doesn't occur.

16 years agoThe previous revision is wrong, back it out.
Markus Armbruster [Sun, 26 Mar 2006 17:36:27 +0000 (17:36 +0000)]
The previous revision is wrong, back it out.

16 years agoThe revision before the previous one is partially wrong, back out the
Markus Armbruster [Sun, 26 Mar 2006 17:34:58 +0000 (17:34 +0000)]
The revision before the previous one is partially wrong, back out the
bad parts.

16 years agoThe revision before the previous one is wrong, back it out.
Markus Armbruster [Sun, 26 Mar 2006 17:33:46 +0000 (17:33 +0000)]
The revision before the previous one is wrong, back it out.

16 years ago(file_sct_init, fl_sct_init): Fix parameter type from s_char * to
Markus Armbruster [Sun, 26 Mar 2006 15:07:32 +0000 (15:07 +0000)]
(file_sct_init, fl_sct_init): Fix parameter type from s_char * to
struct sctstr *.  Callers changed not to cast.

16 years ago(retr, lretr, doship, dounit): Zero-terminate retreat paths. The last
Markus Armbruster [Sun, 26 Mar 2006 14:42:27 +0000 (14:42 +0000)]
(retr, lretr, doship, dounit): Zero-terminate retreat paths.  The last
character in the array must be zero already.  Closes #1225708.

16 years ago(sd): Supply missing parenthesis for a cast from double to int. The
Markus Armbruster [Sun, 26 Mar 2006 14:03:50 +0000 (14:03 +0000)]
(sd): Supply missing parenthesis for a cast from double to int.  The
cast is only there to express intent, it doesn't change the meaning of
the code.

16 years ago(shut): Fix misuse of logerror(): passed formatted string instead of
Markus Armbruster [Sun, 26 Mar 2006 13:59:47 +0000 (13:59 +0000)]
(shut): Fix misuse of logerror(): passed formatted string instead of
format string and arguments.  Correctness depends on formatted string
not containing '%', which is the case.

16 years ago(show_sail): Fix misuse of pr(): passed formatted string instead of
Markus Armbruster [Sun, 26 Mar 2006 13:57:34 +0000 (13:57 +0000)]
(show_sail): Fix misuse of pr(): passed formatted string instead of
format string and arguments.  Correctness depends on paths not
containing '%', which is correct, but not as robust as it could be.

16 years ago(unit_interdict, knockdown): Simplify. No functional change.
Markus Armbruster [Sun, 26 Mar 2006 13:55:29 +0000 (13:55 +0000)]
(unit_interdict, knockdown): Simplify.  No functional change.

16 years agoCode formatting. No functional changes.
Markus Armbruster [Sun, 26 Mar 2006 13:52:23 +0000 (13:52 +0000)]
Code formatting.  No functional changes.

16 years ago(show_nuke_capab, show_ship_capab, show_plane_capab, show_land_capab)
Markus Armbruster [Sun, 26 Mar 2006 13:41:46 +0000 (13:41 +0000)]
(show_nuke_capab, show_ship_capab, show_plane_capab, show_land_capab)
(prxy, border, ac_encounter, look, budg): Fix misuse of pr() and PR():
passed formatted string instead of format string and arguments.
Correctness depends on argument values and tables not containing '%',
which is correct, but fragile.

16 years ago(comm_bomb, ship_bomb, land_bomb, pinflak_planedamage): Fix dangerous
Markus Armbruster [Sun, 26 Mar 2006 13:34:35 +0000 (13:34 +0000)]
(comm_bomb, ship_bomb, land_bomb, pinflak_planedamage): Fix dangerous
misuse of pr(), PR() and mpr(): passed formatted string instead of
format string and arguments.  Crash bug if formatted string contains
'%'.  Players can put that in ship names...

16 years ago(prunits, prplanes): Simplify, compute relation string instead of
Markus Armbruster [Sun, 26 Mar 2006 12:54:52 +0000 (12:54 +0000)]
(prunits, prplanes): Simplify, compute relation string instead of
format.

(prplanes): Fix dangerous misuse of pr(): passed formatted string
instead of format string and arguments.  Crash bug if formatted string
contains '%'.  Players can put that in country names...

16 years ago(prod): Simplify printing of materials used. Don't assume amount fits
Markus Armbruster [Sun, 26 Mar 2006 12:37:22 +0000 (12:37 +0000)]
(prod): Simplify printing of materials used.  Don't assume amount fits
into eight characters and item mnemo can't be '%'.

16 years ago(head_describe): Print the headline instead of returning the format
Markus Armbruster [Sun, 26 Mar 2006 12:08:35 +0000 (12:08 +0000)]
(head_describe): Print the headline instead of returning the format
string.  This simplifies format string checking.

16 years ago(prthresh): Remove format string parameter. Callers don't really need
Markus Armbruster [Sun, 26 Mar 2006 10:21:57 +0000 (10:21 +0000)]
(prthresh): Remove format string parameter.  Callers don't really need
that flexibility, and it makes format checking harder.

16 years agoRemove useless multiplications with sizeof(char) and sizeof(s_char).
Markus Armbruster [Sun, 26 Mar 2006 10:16:08 +0000 (10:16 +0000)]
Remove useless multiplications with sizeof(char) and sizeof(s_char).
Replace by literal 1 in other contexts.

16 years ago(gift): Fix parameter types: natid instead of int, void * for generic
Markus Armbruster [Sun, 26 Mar 2006 08:18:34 +0000 (08:18 +0000)]
(gift): Fix parameter types: natid instead of int, void * for generic
pointer, char * for string.

16 years ago(gift, load_comm_ship, load_comm_land): Fix dangerous misuse of wu():
Markus Armbruster [Sun, 26 Mar 2006 08:15:27 +0000 (08:15 +0000)]
(gift, load_comm_ship, load_comm_land): Fix dangerous misuse of wu():
passed formatted string instead of format string and arguments.  Crash
bug if formatted string contains '%'.  Players can put that in ship
names...