Commit graph

4049 commits

Author SHA1 Message Date
632fbf8d12 (player_new): Proper error checking. Oops, now it may return NULL.
Proper error checking in callers required.
(update_wait, market_update): If player_new() returns null pointer,
skip update.
(player_accept): If player_new() returns null pointer, close
connection.
2004-01-23 13:44:19 +00:00
f841200923 (map, draw_map, MAP_HIGH): New map command flag `h' to highlight own
sectors; from Marc Olzheim.
2004-01-21 14:54:56 +00:00
727be2e126 (sabo): Damage report to player was in deity coordinates, fix. Closes
#856856.
2004-01-21 10:37:56 +00:00
d7a054c20a (ROLLOVER_AVAIL, opt_ROLLOVER_AVAIL, Options, do_feed, prod, newe):
New option ROLLOVER_AVAIL; from Drake Diedrich.
2004-01-20 16:51:43 +00:00
1261d1c825 [apollo]: Tables were gutted for unknown reasons. Don't. 2004-01-20 15:50:11 +00:00
ab95ad96d2 [_WIN32] Fix previous rev. 2004-01-20 15:43:44 +00:00
1504d1f13b (empth_exit): Fix shutdown on reading "quit" from stdin (crash bug,
reportedly).
2004-01-15 16:29:53 +00:00
422a8cea73 (io_select, io_init, io_open, io_close, io_output, io_flush, io_write,
io_puts, iom_create, iom_getmask, iom_set, iom_clear, iom_zero):
Portability bug: io_select() passed bit_fdmask to select().  This
breaks the fd_set abstraction, and works only with the traditional
Unix implementation of fd_set.  Use fd_set and its operations instead.
Remove unused source files.  Note: the offending code is currently
unsued.  But it's a time bomb, and fixing it also replaces a bunch of
code by standard library services.
2004-01-15 14:32:00 +00:00
5f4503a3a1 Unused, remove. 2004-01-15 14:07:15 +00:00
43af569ee5 Merge Makefile rev. 1.5. Update dependencies. 2004-01-15 13:49:40 +00:00
4ce5f988d0 Portability fixes: don't declare library functions, include
appropriate headers.  Also remove some unused declarations.
2004-01-15 13:43:50 +00:00
56dce5a8c4 (main): Portability bug: code passed bit_fdmask to select(). This
breaks the fd_set abstraction, and works only with the traditional
Unix implementation of fd_set.  Use fd_set and its operations instead.
Remove unused source files.
2004-01-15 09:39:51 +00:00
14fb66b032 Fix previous rev. 2004-01-15 09:37:06 +00:00
b19c346435 (player_coms, lstats, lsta): Rename command lstats' to lstat' to
match info as well as related commands `sstat' and `pstat'.  Rename
lstats() to lsta() to uphold the convention that functions
implementing commands are named like the command or its four character
prefix.  Closes #804587.
2004-01-13 18:46:48 +00:00
92fcbc22a7 (player_coms, best): bestdistpath' and bestpath' violate the rule
that commands must be unique within the first four letters.  best()
implements both.  It calls BestDistPath() for the former, and
BestLandPath() for the latter.  However, BestDistPath() is just a
wrapper around BestLandPath(); it does exactly the same.  Drop
`bestdistpath'.
2004-01-13 18:23:26 +00:00
c16179eeae (mineq): Rewrite. mineq("dumpcrap", "dump ") now yields ME_MISMATCH
instead of ME_PARTIAL.  Closes #804611.
2004-01-13 17:23:02 +00:00
e50e1b4b35 (ask_olist): Fix reporting of mobility required for attack. Closes
#798045.
2004-01-12 20:13:28 +00:00
64fa28aa34 (do_desi): Move check for redesignated capital behind the actual
redesignation.  Closes #803768.
2004-01-12 17:28:22 +00:00
64afd7747b (index, rindex): Obsolete BSDisms; remove. Use standard strchr() and
strrchr() instead.
(setbuffer): Obsolete BSDism, unused; remove.
2004-01-08 18:15:13 +00:00
4ae9c417b3 (bzero, bcopy): Obsolete BSDisms; remove. Remove some calls without
effect.  Replace calls by struct assignment where possible.  Replace
clear buffer, copy string to buffer by strncpy().  Use assignment to
clear when that's clearer.  Replace overlapping copy through bounce
buffer by memmove().  Replace rest by standard memset() and memcpy().
Also use sizeof() instead of literal array sizes for robustness, and
instead of symbolic array sizes for clarity.
2004-01-08 17:54:28 +00:00
2910da23ea Fix missing include <string.h>. 2004-01-08 17:26:18 +00:00
d0feb8570a (copy, atopi, same): Remove, use strcpy(), atoi(), strcmp(). Callers
changed.  Remove empty source files.
2004-01-08 10:20:44 +00:00
9c90022634 Remove superflous include. 2004-01-08 10:11:38 +00:00
a86521b7a0 (ffs): Unused, remove. 2004-01-08 10:10:19 +00:00
f5d8f30606 (login): Fix reading of country name and, if we lack getpass(),
password.  Used to strip \r from country name (superflous), and not to
strip \n from password (required).
2004-01-08 05:57:38 +00:00
08480d5625 (wrauth): Emit example `nowhereman@nowhere.land.edu' commented out.
nowhere.land.edu doesn't exist right now, but it might pop up any
time.
2004-01-06 20:18:46 +00:00
1333a40bb8 (info): Use ANSI strerror() instead of non-portable sys_errlist[]. 2004-01-06 20:08:53 +00:00
8266bd7246 (logerror): Remove unused cruft. 2004-01-06 20:07:03 +00:00
2fe312adac (at_minimum, blocksig, emp_bitinit, filelogerror, iceil, ifloor,
mapdsq, mask, signame, strscan, sys_siglist, typed_wire, unblocksig):
Unused, remove.

(add_airport, add_to_fired_queue, air_damage, anti_torp, best_path,
bitinit2, blankrow, bmnxtsct, bp_init, build_mission_list,
build_mission_list_type, buildeff, candchrg, canshoot, cantorp,
cede_sect, cede_ship, checksect, client_cmd, coun_cmd,
deity_build_land, divide, do_conv, do_defdam, do_demo, do_desi,
do_mob_land, do_mob_plane, do_mob_sect, do_mob_ship, do_prod,
docountry, doland, doplane, doship, dosupport, dotsprintf, dounit,
empth_start, enlist, errcheck, filereport, find_airport, find_escorts,
findcondition, fire_dchrg, fire_torp, fltp_to_list, get_minimum,
getin, goodsect, grab_sect, grab_ship, grow_people, growfood, in_addr,
infect_people, init_mchr, init_pchr, init_plchr, is_engineer,
itemname, kill_cmd, landrepair, limit_level, list_cmd, lupgr,
materials_charge, materials_cost, meltitems, mission_pln_arm,
mission_pln_sel, move_map, nat_cap, num_units, outid, pass_cmd,
perform_mission, pinflak_planedamage, play_cmd, pln_equip, prexpense,
print_res, prplanes, prunits, pupgr, quiet_bigdef, quit_cmd, radmap2,
retreat_land1, retreat_ship1, s_commod, sanc_cmd, sarg_getrange,
scuttle_it, scuttle_land, set_target, share_incr, shiprepair,
shp_check_mines, shp_check_nav, shp_check_one_mines, shp_hit_mine,
shp_interdict, shp_mess, sort_lookup_list, starvation, supgr, swap,
take_casualties, trunc_people, upd_buildeff, upd_land, upd_ship,
use_ammo, user_cmd): Change linkage to static.
2003-12-17 23:13:50 +00:00
d8cb7c48f0 Cosmetics. 2003-12-17 21:26:26 +00:00
3bf2b1b47f errno may not be a variable; users must include errno.h instead of
declaring it like `extern int errno'.
2003-12-17 21:18:12 +00:00
5f3b32fd36 (setfdtablesize): Remove. This may drop support for Sequent.
(getfdtablesize) [hpux]: Client and server had different versions.
Standardize on server's.
2003-12-17 21:14:00 +00:00
800027023a (show, show_item): New `show item'. From Ron Koenderink; changes to
info files heavily hacked by me.
2003-12-17 19:50:20 +00:00
7c6067466c (edit, prsect, doland): Fix `editing' sector coordinates (copies
sector).  New: edit distribution sector, designation and new
designation.  From Ron Koenderink.
2003-12-17 17:24:30 +00:00
ef383c068a Fix some damage done by indent-emp. Code is still hard to read. 2003-12-17 16:46:25 +00:00
be168eba05 (edit): Rewrite of undocumented and broken feature: if there are extra
arguments, they are interpreted as key-value pairs, and edit does not
prompt for more.  From Ron Koenderink.
(player_coms): Document extended syntax.
2003-11-25 19:16:18 +00:00
e07fb30663 (sorde): Output format fixes from Ron Koenderink. 2003-11-09 13:33:17 +00:00
c2c16e1a04 (LND_SPY_DETECT_CHANCE): New.
(look_land, sabo, prunits, unitsatxy, lnd_mar_one_sector,
count_sect_units, takeover): Use it.  Closes bug#786369.
2003-11-09 12:52:16 +00:00
fc9ec1323a (decl): Remove broken and redundant check of declarer's country
number.  Check is redundant, because invalid values can come only from
natarg(), and those are checked above.  Check is broken because
natarg() returns negative value on error, not 255.
2003-11-09 10:53:06 +00:00
c8d23a8f15 Undo some ugly line line-breaks introduced by indent. 2003-11-09 10:47:36 +00:00
32c38f795c Spelling fix. 2003-11-09 10:46:32 +00:00
6f0c5c6315 Remove some comments that are no longer valid. 2003-11-09 10:45:26 +00:00
291e538045 (perform_mission): Fix destruction of missiles. Closes bug#789415. 2003-11-09 10:42:29 +00:00
f922b09074 (chan): Don't require 254 BTUs even when not charging any (BLITZ). 2003-10-04 18:29:29 +00:00
1feab53eca List generated files and directories that CVS doesn't ignore by
default.
2003-10-04 14:54:09 +00:00
89c4f834ff Makefiles worked only if certain directories and generated files were
already present.  Source distributions had them, but we didn't commit
them to CVS.  Fix Makefiles.
2003-10-04 14:22:52 +00:00
9b7adfbecc Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
5f263a7753 New. 2003-09-02 20:45:34 +00:00
d8b7fdfae1 Import of Empire 4.2.12 2003-08-23 12:23:04 +00:00