Commit graph

5369 commits

Author SHA1 Message Date
34ed6f20af (GCCWARNFLAGS): New.
(OSXCFLAGS, FREEBSDCFLAGS, LINUXCFLAGS, LINUXPTHCFLAGS): Use it.
2004-02-24 20:35:19 +00:00
2e58c2867a (login_coms): Fix forward declaration (was a definition). 2004-02-24 18:35:26 +00:00
4dc46b1810 (fnlist): Move from misc.h to fnlist.h, where it belongs and has
complete type.
2004-02-24 18:34:25 +00:00
aafc693026 Remove junk at end of #endif. 2004-02-24 18:26:34 +00:00
c53438e7a0 (ef_ensure_space): New.
(edit): Use it to to fix copying to virgin unit slot.  Closes #896475.
From Ron Koenderink.
2004-02-24 18:19:57 +00:00
5233f7029f (main, intr, handleintr, termio): Do the right thing for Windows so ^C
aborts to the current command, as it should.  From Ron Koenderink.
2004-02-22 07:27:08 +00:00
fdd7679fea (parse): Trailing whitespace was interpreted as an another (empty)
argument.  Ignore it.
2004-02-21 10:18:18 +00:00
f221adc42c Fix the previous rev. so it compiles with strict compilers. 2004-02-21 06:58:25 +00:00
c1be5d8657 Don't declare things in more than one place. Move some declarations
between headers.  Code is now fully prototyped and compiles cleanly
with gcc -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
-Wredundant-decls.  Closes #723788.
2004-02-20 20:45:18 +00:00
46da1aec7a deity.h is redundant, remove it. 2004-02-20 20:34:43 +00:00
b4a7d9f022 The (unused) parameter of thread entry points is named `argv', but the
argument is actually the value of global variable `player'.  Rename to
`unused'.
2004-02-20 20:14:53 +00:00
14e0060a61 Update for 4.2.14. 2004-02-20 20:14:53 +00:00
b6c67c884f Fix the previous rev. 2004-02-20 19:24:43 +00:00
8538b0b605 Portability fix: don't declare library function, include appropriate
header.
2004-02-20 11:17:32 +00:00
4a3f0b8146 Add some missing declarations to headers. Remove some redundant
declarations elsewhere.  Change linkage of some functions to static.
2004-02-20 10:51:03 +00:00
e7811102a3 Declare tags.c variables in tags.h. Declare stuff with external
linkage that is not in any other header in misc.h.  Remove some
redundant declarations elsewhere.
(prompt, doredir, dopipe, doexecute, output, screen, parsedelay):
Static linkage.
2004-02-20 08:22:28 +00:00
8d438a4601 (loginit, main): Pass log file basename as parameter.
(logerror): Require prior call of loginit().
(empth_exit) [_EMPTH_WIN32]: Don't print the log file name here, it's
not modular.
(program, getlogfile): Unused, remove.
2004-02-19 21:15:16 +00:00
379e0a61c3 Fix the previous rev. 2004-02-19 21:10:25 +00:00
c54149ef39 (cons_choose): Clean up somewhat dirty use of union pointers that's
not quite blessed by the standard and prone to trigger compiler
warnings.
2004-02-19 21:03:57 +00:00
6482ed03d1 (player_coms): Declaration in com.h was misspelled. Remove redundant
declarations elsewhere.
2004-02-19 20:38:02 +00:00
f2b2c2f5e3 Remove some superflous declarations. 2004-02-19 20:30:22 +00:00
c28f377fe9 (bitinit2): Move from common/maps.c to getbit.c, external linkage.
(bitmap0, bitmap1, bitmap2, bitmap3, bitmap4, bitmaps): Static
linkage.
2004-02-19 19:59:45 +00:00
c8bb4d9b87 (effadv_list, effadv, rejects, rejectname, telnames, rea, numnames,
tennames, numstr): Replace by static local variables in their only
user.
(relates): Move from global/misc.c to common/nat.c.
(att_mode): Move from global/misc.c to subs/attsub.c.
2004-02-19 19:14:29 +00:00
22a356b1e1 New server.h for server startup, control and shutdown, i.e. stuff in
src/server.  Use it.
2004-02-19 19:02:30 +00:00
8115388a58 (check_all_markets, update_wait): Static linkage. 2004-02-19 18:16:34 +00:00
9491e2e7fc Remove useless user.h. 2004-02-19 18:10:27 +00:00
2c5a4b4563 Declare update related variables in budg.h. Remove some redundant
declarations elsewhere.
2004-02-19 17:28:03 +00:00
966eb40899 Declare all configuration parameters in optlist.h. Remove some
redundant declarations elsewhere.
2004-02-19 16:46:18 +00:00
6b67276f4f (updating_mob, timestamp_fixing): Inappropriate for global/, move to
update/mobility.c.
(timestamp_fixing, do_upd_checking): Static linkage.
2004-02-19 16:39:31 +00:00
bfcfaf08c2 Properly declare stuff in headers; remove redundant declarations. 2004-02-19 16:25:14 +00:00
cda6f0e7cc (logerror): The version from libcommon.a logs to a file, which is
inappropriate for this program.  Log to stderr instead.
(program): Unused, remove.
2004-02-19 15:19:20 +00:00
d59bc20516 Properly declare functions in headers; remove redundant declarations. 2004-02-19 12:39:17 +00:00
731fcaf98f (iovec, ioq_peekiov, ioqtoiov): Unused, minor portability
complication, remove.
2004-02-19 12:34:50 +00:00
e9eb6b8e2a (_noecho, _echo): Broken, portability headache, remove.
(output): Ignore C_NOECHO.  Server doesn't send it anyway.
2004-02-19 12:00:11 +00:00
bf6bfcd5f5 Remove some redundant declarations. 2004-02-19 10:53:58 +00:00
b5401d9dd4 <string.h> is ISO C, no need to #if it. 2004-02-19 10:05:53 +00:00
696b5b4b64 POSIX has all we need in <time.h>. No need to fool around with
<sys/time.h>.
2004-02-19 09:57:25 +00:00
836e6f755a Don't declare library functions, include appropriate headers. 2004-02-19 09:20:28 +00:00
c5915737b6 (deli): Partial rewrite for clarity, motivated by a `might be used
unitialized' warning.  Funcional change: you can now change direction
without threshold (matches documentation, clarify it anyway).  Change
prompt for the third argument to reflect that.  Also provide context
when prompting for the fourth argument; this is sorely needed we
didn't prompt for the third argument.
2004-02-18 21:00:13 +00:00
cb23a7e5b0 (player_accept): Back out rev. 1.9, it doesn't compile under Windows.
Needs fixing.
2004-02-18 19:43:09 +00:00
dc2d3ff447 (player_coms): Fix c_form for fire. 2004-02-18 19:37:52 +00:00
21f4dc4f0f Declare command functions in commands.h. Delete their declarations in
empmod.c
2004-02-18 19:35:49 +00:00
d2244b6c24 Make users of struct cmdstr agree on prototype of member c_addr.
(player_login): Use player->argp[] to store arguments.
(client_cmd, user_cmd, sanc_cmd, coun_cmd, pass_cmd, play_cmd,
kill_cmd, list_cmd, quit_cmd): Remove parameters, fetch arguments from
player->argp[].
(cmdstr): Prototype member c_addr.

(play_cmd): Used to silently ignore up to two arguments if there
wasn't a third one.  Don't.
2004-02-18 19:04:01 +00:00
7aafe31f70 (count_planes): Remove declaration. A prototype would need struct
shpstr, but not struct plnstr, which is a strong sign it doesn't
belong here.
2004-02-18 11:35:25 +00:00
aa9fed70c1 [_WIN32]: Include required headers. 2004-02-18 07:26:09 +00:00
97843dfdf6 [_EMPTH_WIN32]: Previous rev. didn't even compile, fix. 2004-02-18 07:12:51 +00:00
0c4fccb43e Clean up previous revision. 2004-02-17 23:01:58 +00:00
8cd0160176 Declare all configuration variables in optlist.h. Include that
instead of declaring them all over the place.  This uncovered type
errors:
(s_p_etu, adj_update): Defined long, sometimes declared int.  Kills
big endian machines where sizeof(long) != sizeof(int).  Change to
int.

(set_option, delete_option, optstrset, intset, floatset, doubleset,
longset, optionset, optiondel, worldxset): Change linkage to static.
2004-02-17 22:58:04 +00:00
80aae5b8e6 Remove some superflous declarations missed in the previous revision. 2004-02-17 22:29:59 +00:00
c1162bbcf4 Cosmetic. 2004-02-17 18:08:51 +00:00