Commit graph

5394 commits

Author SHA1 Message Date
ef0ddff4c2 (safe_getcwd): New. When getcwd() is known to be able to allocate its
buffer, just call that.  Else wrap suitable allocation around it.
(main): Use it.
2004-03-01 07:07:27 +00:00
5ce301e2fb (ntinstall): Fix mkdir data. 2004-03-01 06:58:03 +00:00
b572ec19ad Fix missing include. 2004-02-29 11:41:26 +00:00
d500806bc8 inet_ntoa() is available on all machines that matter, and defining it
ourselves without adequate auto-configuration creates more problems
than it solves.  In particular since we defined it with the wrong
type.
2004-02-29 11:41:08 +00:00
f6d7ebb480 (rea): Don't use L_SET, it's ancient BSD history, just use SEEK_SET. 2004-02-29 11:35:38 +00:00
37ebd826c4 Fix the previous rev. 2004-02-28 19:11:24 +00:00
e67dca9d29 Indentation fixes; suspect indent-emp is to blame. 2004-02-28 18:06:11 +00:00
aa4e268d89 Markup changes: separate items more clearly. Don't use numeric fonts. 2004-02-28 17:50:55 +00:00
966d3e7820 \" comments weren't recognized in column 0. 2004-02-28 17:32:30 +00:00
b0bd4e90ac (commodity_ca): "xloc", "yloc", "xsell", "ysel" and "price" weren't
NSC_DEITY.  Wrong, but commodity_ca[] is currently unused.  Also
rename "xloc", "yloc" to "xsell", "ysell".
2004-02-28 16:23:56 +00:00
43f7f153a7 (trade_ca): "xloc" and "yloc" weren't NSC_DEITY. Wrong, but
trade_ca[] is currently unused.
2004-02-28 15:31:21 +00:00
97e221baae Remove some unused stuff, mostly Empire 3 leftovers. 2004-02-28 09:45:10 +00:00
3d0178b994 (NSC_OPMASK, NSC_ISNUM1, NSC_ISNUM2, nscstr, nstr_comp, nstr_exec):
Simplify encoding of struct ncstr member oper.
2004-02-28 08:49:39 +00:00
bd54488715 (NSC_ROUND): No effect, remove. 2004-02-28 08:40:53 +00:00
dd01fcd4c6 (sect_ca, genitem_ca, ship_ca, plane_ca, land_ca, nuke_ca, treaty_ca,
loan_ca, news_ca, lost_ca, commodity_ca, trade_ca, nat_ca, map_ca):
NSC_OFF was lost during Empire3, rendering the codes confusing and
harder to use.  Tack it back on.
(encode, code_char): No need to fool around with NSC_OFF anymore.
2004-02-28 08:29:21 +00:00
d31f4f99cf Delete dead code. No functional changes. Should have been committed
yesterday's along with nsc.h rev. 1.7.
2004-02-28 07:19:31 +00:00
dd35a9637d These files were split a long time ago, for technical reasons which
since vanished (linking into different programs).  Undo the split,
because the stuff really belongs together.
2004-02-28 06:40:48 +00:00
e8b7ed630b (setsector): Fix misleading prompt. 2004-02-27 21:55:50 +00:00
d2e0c8224b Delete dead code, fix indentation, spelling, obvious warning
avoidance, doc fixes.  No functional changes.
2004-02-27 20:13:28 +00:00
f5e49a830c (sct_typematch): New. Use it instead of typematch() where
appropriate.
(typematch): Prefer exact match to partial match.  Use plain char
instead of s_char.
2004-02-27 19:53:02 +00:00
844b654d44 (stmtch, mineq): Document. Move declaration from prototypes.h to
match.h.  Use plain char instead of s_char.  The code has several
thousand type errors due to s_char vs plain char; s_char must go.
(stmtch): Rewrite for clarity.
2004-02-27 19:38:38 +00:00
520baaf867 (html): Expand tabs in all.html; they can confuse browsers. 2004-02-26 09:26:29 +00:00
f508dfdcea Document yesterday's changes that closed #803753.
Don't re-explain the map in bmap commands.
2004-02-26 09:25:08 +00:00
064f0ef1f2 Close #803753:
(map_char): New.
(draw_map): Use it.  Wilderness and plains owned by other players are
now displayed as '?'.
(radmap2): Display wilderness and plains as '?'.
(satmap): Call satdisp() for all sectors owned by other players.
2004-02-25 20:18:18 +00:00
57080e76f2 Spelling fix. Closes #901174. 2004-02-24 20:54:58 +00:00
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