Commit graph

2305 commits

Author SHA1 Message Date
4bb23dd1a6 Make econfig keys data and info work for relative names
File names in econfig need to be interpreted relative to configdir.
This wasn't the case everywhere for keys data and info.

Fix this by changing variables gamedir and infodir to hold absolute
names.  Change builtindir likewise, for consistency.  Store the values
from econfig in gamedir_conf, infodir_conf and builtindir_conf.

Uses new fnameat() to derive absolute names from possibly relative
ones.
2008-02-07 08:01:54 +01:00
a38fad4229 Make utility programs abort on internal error
Until now, they tried to recover and continue (debug off).  That's
appropriate only for the server.  The server could be told to abort
instead (debug on, selected by option -d), but not the utility
programs.

Change debug to be on by default, and switch it off early in the
server's main().  No functional change for the server.
2008-02-07 08:01:53 +01:00
Ron Koenderink
70c03561bb Switch nightlybuilds to git
Create a local git repository on the SuSE nightly build machine.
Update local git repository from the Markus's public repository
at the beginnning of the nightlybuilds for SuSE and WIN32.
For the SuSE and WIN32 nightlybuilds drawn from the local
git repository on SuSE machine.
2008-02-04 20:26:46 -06:00
77e95bd788 Clean up library dependencies
Move stuff to untangle the ugly cyclic dependencies between the
archives built for selected subdirectories of src/lib/:

* Move common/io.c to empthread/ because it requires empthread stuff

* Move parts of subs/nstr.c to common/nstreval.c to satisfy
  common/ef_verify.o

* Move getstarg.c getstring.c onearg.c from gen/ to subs/ because they
  require stuff from there

* Move bridgefall.c check.c damage.c empobj.c journal.c maps.c
  sectdamage.c from common/ to subs/ because they require stuff from
  there

* Move cnumb.c from subs/ to common/ to satisfy common/type.o

* Move log.c fsize.c from common/ to gen/ because they really belong
  there

* Move emp_config.c mapdist.c from gen/ to common/ because they really
  belong there, and require stuff from libglobal.a

Also package as/ as libas.a to satisfy common/path.o.

Remaining dependencies:

    lib             needs
    --------------------------------------------
    libas.a         libglobal.a
    libcommon.a     libas.a libglobal.a libgen.a
    libgen.a
    libglobal.a
    liblwp.a        libgen.a
    libw32.a[*]     libgen.a

    [*] Except for service.o, which can only be linked into the server

Link order now: liblwp.a libcommon.a libas.a libgen.a libglobal.a
libw32.a.  The position of libw32.a is not quite right, but works
anyway.
2008-02-03 08:11:13 +01:00
1cbb37d4fb Get rid of src/lib/gen/copy.c
The function that gave its name to this file is long gone, the file's
description is bogus, and it contains just one definition.  Move that
to ../subs/border.c, and delete the file.
2008-02-03 07:44:20 +01:00
3d2518a724 Get rid of src/lib/common/land.c
There are several files with land unit subroutines.  This one is in an
awkward place: it depends on stuff from ../subs, which contributes to
libcommon.a's ugly dependencies.  Move its contents to logical places
(use internal linkage where possible), and remove it.
2008-02-03 07:37:16 +01:00
b58bc70d07 Remove telfil, use teldir instead. 2008-02-02 09:22:10 +01:00
f80af5c7da Belatedly update c_form of of show command
It lacked item and news since 4.3.0.
2008-02-02 07:56:49 +01:00
4fb5f76326 Remove unused non-terminal <VAR> from output of list command
It's been unused since commit 5dec30d6, and its explanation was bogus
before.
2008-02-02 07:50:26 +01:00
Ron Koenderink
eb473a6a24 Add missing expansion island
The number of islands was off by one.  The last island was
created, but not actually placed on the map.
2008-01-27 14:20:51 +01:00
db02dda32f Update copyright notice 2008-01-19 10:15:37 +01:00
bcdcbab19c Replace .cvsignore files by .gitignore files 2008-01-13 11:22:33 +01:00
35db407da0 Convert the build process from CVS to git
Detect .git instead of CVS.  Use git-ls-files with git, else
$(srcdir)/sources.mk.  info/findsubj.pl now gets the info files as
arguments rather than from sources.mk.

Remaking info subjects doesn't quite work, but it was broken similarly
before.
2008-01-13 11:17:26 +01:00
e424baab8b (player_coms): Clean up c_form of announce, break, bye and list. 2008-01-01 19:09:38 +00:00
Ron Koenderink
dabee52bc9 Remove quit as it sometimes confuses the client.
Known problem with 4.3.11, depend on the EOF.
2007-12-25 17:26:50 +00:00
Ron Koenderink
d4227f9ff8 Remove the symbolic link to empire and use the empire executable
directly.  Symbolic link fails for WIN32 empire because empire has
exe extension.
2007-12-23 22:16:37 +00:00
Ron Koenderink
84399281fe Scheduled task script file for win32 nightly build 2007-12-23 16:08:34 +00:00
Ron Koenderink
6872002d66 Configuration file for win32 nightly build 2007-12-23 16:06:59 +00:00
ff4ada21b9 (sect_ca): New selector elev. It's set by fairland, but has no effect
on the game.  It can be useful for deities to customize a world
created by fairland.
2007-12-22 08:11:21 +00:00
Ron Koenderink
9988c79cb6 Add sysdep_w32.o to the list of objects for the client.
Used for WIN32 clients.
2007-12-18 02:42:15 +00:00
Ron Koenderink
402e6a1cf7 (w32_socket) [_WIN32]: Correct the return type to SOCKET
for the select() call.
2007-12-17 13:18:19 +00:00
Ron Koenderink
c55abd60bd (w32_socket) [_WIN32]: Change result to be unsigned to
match the WIN32 return value from socket().
2007-12-16 21:31:51 +00:00
Ron Koenderink
81d87bae17 Move the patch level to above the empserver level. 2007-12-16 20:14:31 +00:00
Ron Koenderink
d1e3e9ddfc Add mingw specific patch for nightly build for win32.i386. 2007-12-16 15:45:09 +00:00
Ron Koenderink
97de159045 (sysdep_stdin_init) [_WIN32]: Add missing void for the parameter list. 2007-12-16 04:02:16 +00:00
Ron Koenderink
e2f795044f (w32_openfd) [_WIN32]: Correct extern reference. 2007-12-16 04:00:19 +00:00
c87f824253 (parseid): Switch id encoding from base 16 to base 36. This gives us
another 20 single digit ids before we have to risk breaking clients by
going to multiple digits.
2007-12-15 06:52:50 +00:00
265e71efa8 Remove superfluous parenthesis. 2007-12-14 07:49:58 +00:00
45b9d65129 (retreat_ship1, retreat_land1): Simplify slightly. 2007-12-14 07:48:50 +00:00
cd41560fbc (play): Failed to initialized sa.sa_mask. 2007-12-14 07:45:46 +00:00
2b312fd943 (expect): Simplify, no functional change. 2007-12-14 07:44:46 +00:00
225f0f5132 (parseid): New, factored out of recvline() and recv_output().
(recvline, recv_output): Use it.
2007-12-14 07:44:12 +00:00
c9c9305c2f (recvline): Cope with multiple-digit ids. Server doesn't send such
ids at this time.
2007-12-14 07:36:27 +00:00
8cdf2532d4 (recvline): Rewrite the loop to receive a line from a socket. The new
version silently truncates long lines.  The old one split them up and
got quite confused.  It got also confused when the line didn't arrive
in one piece.  Icing on the cake: it wrote beyond the end of the
buffer.  The new version is less efficient, but that doesn't matter
here.
2007-12-14 07:26:30 +00:00
3807cffe52 (recvline): Remove the timeout feature. There are many other places
where the client could wait indefinitely for the server.  The user can
always interrupt.

[_WIN32] (alarm): Unused, remove.
2007-12-14 06:59:09 +00:00
43cceac785 (sendcmd): Cope gracefully with short writes and EINTR. Don't just
continue after real errors.
2007-12-14 06:42:57 +00:00
92a14cca4d (sendcmd): Don't overflow buf[]. The bug was fairly harmless, because
the overflowing data comes from the local user.
2007-12-14 06:01:13 +00:00
bac5345914 (redir_authorized, doexecute): Change diagnostics to talk about batch
files instead of script files, to match info execute.
2007-12-13 21:36:25 +00:00
e357e05115 Remove senseless casts. 2007-12-13 21:34:27 +00:00
cc791bcbe2 Remove superfluous parenthesis. 2007-12-13 21:32:34 +00:00
Ron Koenderink
799ca210ff Add -k option to the make so more than one error can be found. 2007-12-13 13:41:09 +00:00
Ron Koenderink
bcd7dac414 Update the CVSROOT to extract directly from sourceforge.net 2007-12-13 02:13:25 +00:00
Ron Koenderink
b0ba53dbd0 (play) [_WIN32]: Remove the argumennts for sysdef_stdin_init,
not needed..
2007-12-13 01:20:40 +00:00
Ron Koenderink
f082ef9fa6 (w32_getpw, w32_socket, w32_connect, w32_recv, w32_send,
w32_writev_socket, w32_close_socket, getpass, w32_openfd,
w32_openhandle, w32_readv_handle, w32_close_handle,
sysdep_init, sysdep_stdin_init, w32_select, w32_signal_handler,
sigaction, stdin_read_thread, w32_ring_from_file_to_bounce_buf)
[_WIN32]: New w32 equivalent functions for POSIX functions.
(recvline, sendcmd, tcp_connect, hostconnect, getpass,
main, intr, play, ring_to_file, ring_from_file, doexecute,
doredir) [_WIN32]: Use new WIN32 equivalent functions.
(main) [_WIN32]: Add sysdep_init() to support system dependent
initialization for equivalence functions.
(play) [_WIN32]: Add sysdef_stdin_init() to support system
dependent initialization for reading stdin.
(recv_input, play) [_WIN32]: Replace the calls to ring_to_file()
and select() with WIN32 specific enhanced versions.

Makefile.in: update dependencies with new files.
Make.mk: Add using of getopt.c and getopt.h
from src/lib/w32 directory.  Add getopt.c and getopt.h
to tar for client.
2007-12-11 22:00:25 +00:00
006c4bcce4 (check_market): Slight simplification. No functional change. 2007-12-09 17:44:25 +00:00
ddb2652b18 Doc fix. 2007-12-09 17:43:44 +00:00
adfab4344e Disable nested execute. The execute protocol is flawed and cannot be
implemented correctly by asynchronous clients --- unless a client
waits for a prompt after sending the execute command and its argument,
it is prone to send more input before the C_EXECUTE arrives.  That
input overtakes the contents of the script file.  This is almost
certain to happen when the execute is in a script file.  Disabling
that is probably more useful and certainly less painful than
documenting this mess.  The client rejects nested execute since
servcmd.c rev. 1.42.
(EXEC): new.
(player_coms): Require it for execute.
(player_set_nstat): Set it in nstat.
(execute): Clear it in nstat.
2007-12-09 17:24:30 +00:00
ed8e0cd552 (execute): Clients can't reliably detect where a redirection ends
because the server doesn't send C_PROMPT.  The client simply rejects
such redirections since servcmd.c rev. 1.42.  Before it didn't, but
incorrectly extended the redirection until the end of the script, and
screwed up when there was more than one redirection in the execute.
Make the server reject such redirections as well, because that's
probably more useful and certainly less painful than documenting this
mess.
2007-12-09 17:06:03 +00:00
158f5f4b2a Add empsched, belatedly. 2007-12-09 16:04:54 +00:00
Ron Koenderink
5d512312d9 Removed EMPTARGET and ARCH from nightlybuilds,
not used with new autoconf. Replace with INSTANCE
for logs, build directory for local patches.

Use the local patches directly from the source tree instead
of all local copy.
2007-12-08 23:48:06 +00:00