empserver
15 years ago(datarootdir): New; Autoconf 2.60 wants it. v4.3.10
Markus Armbruster [Thu, 6 Sep 2007 18:16:45 +0000 (18:16 +0000)]
(datarootdir): New; Autoconf 2.60 wants it.

15 years agoFinal polish for 4.3.10.
Markus Armbruster [Thu, 6 Sep 2007 18:02:57 +0000 (18:02 +0000)]
Final polish for 4.3.10.

15 years agoDoc fix.
Markus Armbruster [Thu, 6 Sep 2007 17:47:42 +0000 (17:47 +0000)]
Doc fix.

15 years agoClarify .NA.
Markus Armbruster [Thu, 6 Sep 2007 17:47:32 +0000 (17:47 +0000)]
Clarify .NA.

15 years ago4.3.10 late changes.
Markus Armbruster [Sun, 2 Sep 2007 18:05:09 +0000 (18:05 +0000)]
4.3.10 late changes.

15 years agoComments.
Markus Armbruster [Sun, 2 Sep 2007 18:01:15 +0000 (18:01 +0000)]
Comments.

15 years agoWhite-space fix.
Markus Armbruster [Sun, 2 Sep 2007 17:59:28 +0000 (17:59 +0000)]
White-space fix.

15 years agoRequire POSIX.1-2001 instead of SUSv2.
Markus Armbruster [Sun, 2 Sep 2007 17:58:25 +0000 (17:58 +0000)]
Require POSIX.1-2001 instead of SUSv2.

15 years ago(update_sched): The indefinite sleep when there's no scheduled update
Ron Koenderink [Sun, 2 Sep 2007 15:04:23 +0000 (15:04 +0000)]
(update_sched): The indefinite sleep when there's no scheduled update
went into a tight loop instead, freezing the server.

15 years agoRewrite for clarity and correctness.
Markus Armbruster [Sun, 2 Sep 2007 12:06:22 +0000 (12:06 +0000)]
Rewrite for clarity and correctness.

15 years agoFix the previous revision.
Markus Armbruster [Sun, 2 Sep 2007 11:48:36 +0000 (11:48 +0000)]
Fix the previous revision.

15 years ago(delete_old_announcements): Delete temporary file when it's not used.
Markus Armbruster [Sun, 2 Sep 2007 11:32:31 +0000 (11:32 +0000)]
(delete_old_announcements): Delete temporary file when it's not used.

15 years agoFix rev. 1.15.
Markus Armbruster [Fri, 31 Aug 2007 05:28:25 +0000 (05:28 +0000)]
Fix rev. 1.15.

15 years ago(sys/socket.h) [_WIN32]: Improve the comment to explain the include order
Ron Koenderink [Thu, 30 Aug 2007 01:20:59 +0000 (01:20 +0000)]
(sys/socket.h) [_WIN32]: Improve the comment to explain the include order
dependencies.

15 years ago(sys/socket.h) [_WIN32]: Add comment to explain the include order
Ron Koenderink [Wed, 29 Aug 2007 23:07:33 +0000 (23:07 +0000)]
(sys/socket.h) [_WIN32]: Add comment to explain the include order
dependencies.

15 years ago(in.h, inet.h) [_WIN32]: Switch <sys/socket.h> to "sys/socket.h" so all
Ron Koenderink [Wed, 29 Aug 2007 23:00:55 +0000 (23:00 +0000)]
(in.h, inet.h) [_WIN32]: Switch <sys/socket.h> to "sys/socket.h" so all
files in w32 library use a local file access for include files in or under w32.

15 years ago(posix_accept, posix_bind, posix_listen, posix_setsockopt,
Ron Koenderink [Tue, 28 Aug 2007 21:06:22 +0000 (21:06 +0000)]
(posix_accept, posix_bind, posix_listen, posix_setsockopt,
posix_shutdown, posix_socket, socklen_t) [_WIN32]: Move socket
related externs to sys/socket.h.

(inet_ntop) [_WIN32]: Move extern to inet.h.

(tcp_listen): Remove the !WIN32 includes and use the revised
sys/socket.h, netinet/in.h, arpa/inet.h and netdb.h.

15 years ago(posix_mkdir) [_WIN32]: Change CR/LF to LF.
Ron Koenderink [Mon, 27 Aug 2007 00:21:39 +0000 (00:21 +0000)]
(posix_mkdir) [_WIN32]: Change CR/LF to LF.

15 years ago(posix_mkdir) [_WIN32]: Add function comment.
Ron Koenderink [Sun, 26 Aug 2007 23:11:17 +0000 (23:11 +0000)]
(posix_mkdir) [_WIN32]: Add function comment.

15 years ago(posix_close, posix_read, posix_write) [_WIN32]:
Ron Koenderink [Sun, 26 Aug 2007 23:04:14 +0000 (23:04 +0000)]
(posix_close, posix_read, posix_write) [_WIN32]:
Move CANT_REACH() and return -1 into a default case.
Removes warnings for MinGW of potential missing cases.

(posix_accept, posix_socket) [_WIN32]: Switch handle to SOCKET
to match Windows call.  Cast to an int for translation map.

15 years ago[_WIN32]: Add io.h for isatty(). Required for MinGW.
Ron Koenderink [Sun, 26 Aug 2007 22:54:59 +0000 (22:54 +0000)]
[_WIN32]: Add io.h for isatty().  Required for MinGW.

15 years ago(abday,day,admon,mon,am_pm) [_WIN32]: Add const to declarations.
Ron Koenderink [Sun, 26 Aug 2007 22:53:40 +0000 (22:53 +0000)]
(abday,day,admon,mon,am_pm) [_WIN32]: Add const to declarations.
Removes warning in MinGW.

15 years ago(inet_ntop) [_WIN32]: Improve the error checking for getnameinfo().
Ron Koenderink [Fri, 24 Aug 2007 21:46:32 +0000 (21:46 +0000)]
(inet_ntop) [_WIN32]: Improve the error checking for getnameinfo().

15 years ago(posix_fileno) [_WIN32]: Rename posix_fileno() to fileno().
Ron Koenderink [Fri, 24 Aug 2007 21:05:59 +0000 (21:05 +0000)]
(posix_fileno) [_WIN32]: Rename posix_fileno() to fileno().
Remove the extern posix_fileno().

(fileno) [_WIN32]: Replace system fileno() with a function that supports posix
file descriptors.  Move #undef fileno to w32misc.h as the system define
is in stdio.h.

(rea) [_WIN32]: Add stdio.h for fileno() extern declaration and add misc.h
to ensure the WIN32 fixes to stdio.h are included.

15 years ago(ssize) [_WIN32]: Switch __W64 to _w64, incorrectly case.
Ron Koenderink [Fri, 24 Aug 2007 20:51:00 +0000 (20:51 +0000)]
(ssize) [_WIN32]: Switch __W64 to _w64, incorrectly case.
ssize_t declaration  conflicts with MinGW
long declaration for ssize_t so add a #ifdef _MSC_VER
around the ssize_t declaration.

15 years ago(snprintf) [_WIN32]: snprintf() should have <stdio.h>.
Ron Koenderink [Fri, 24 Aug 2007 20:19:53 +0000 (20:19 +0000)]
(snprintf) [_WIN32]: snprintf() should have <stdio.h>.

15 years agoUpdate for 4.3.10.
Markus Armbruster [Fri, 24 Aug 2007 17:28:47 +0000 (17:28 +0000)]
Update for 4.3.10.

15 years agoDoc fix.
Markus Armbruster [Fri, 24 Aug 2007 17:24:07 +0000 (17:24 +0000)]
Doc fix.

15 years ago(verify_fail): Print index as it looks in input.
Markus Armbruster [Fri, 24 Aug 2007 17:23:26 +0000 (17:23 +0000)]
(verify_fail): Print index as it looks in input.

15 years ago(gen_power) [!_WIN32]: Previous revision inserted fsync(), where
Markus Armbruster [Fri, 24 Aug 2007 17:22:12 +0000 (17:22 +0000)]
(gen_power) [!_WIN32]: Previous revision inserted fsync(), where
previously something equivalent was done only for _WIN32.  Revert
that.

15 years ago(ssize_t): Match system's size_t more closely.
Markus Armbruster [Fri, 24 Aug 2007 17:07:48 +0000 (17:07 +0000)]
(ssize_t): Match system's size_t more closely.

15 years ago(output): Remove unused parameter eol. Caller changed.
Markus Armbruster [Fri, 24 Aug 2007 17:05:18 +0000 (17:05 +0000)]
(output): Remove unused parameter eol.  Caller changed.

15 years agoFix grammar for human-readable header.
Markus Armbruster [Fri, 24 Aug 2007 17:03:44 +0000 (17:03 +0000)]
Fix grammar for human-readable header.

Clarify state of symbolic indexes.

15 years ago(readv): Cope with malloc(0) returning null pointer.
Markus Armbruster [Fri, 24 Aug 2007 16:59:17 +0000 (16:59 +0000)]
(readv): Cope with malloc(0) returning null pointer.

(writev): call write() even when total size is zero.

15 years ago(buil_bc): Reduce bridge span cost to $1000.
Markus Armbruster [Thu, 23 Aug 2007 18:26:04 +0000 (18:26 +0000)]
(buil_bc): Reduce bridge span cost to $1000.
(buil_tower_bc): Reduce bridge tower cost to $3000.

15 years ago(inet_ntop) [_WIN32]: Add HAVE_GETADDRINFO around inet_ntop.
Ron Koenderink [Thu, 23 Aug 2007 03:02:19 +0000 (03:02 +0000)]
(inet_ntop) [_WIN32]: Add HAVE_GETADDRINFO around inet_ntop.
MinGW does not support getnameinfo() for Windows 2000 or earlier.

15 years ago(mode_t) [_WIN32]: Switch to unsigned short to match the declaration
Ron Koenderink [Wed, 22 Aug 2007 02:17:07 +0000 (02:17 +0000)]
(mode_t) [_WIN32]: Switch to unsigned short to match the declaration
in the MinGW for mode_t.

15 years ago(inet_ntop) [_WIN32]: New. Windows equivalent for inet_ntop().
Ron Koenderink [Tue, 21 Aug 2007 13:46:21 +0000 (13:46 +0000)]
(inet_ntop) [_WIN32]: New.  Windows equivalent for inet_ntop().

[_WIN32]: New in.h, inet.h, netdb.h.  Windows equivalent for POSIX
includes.

(tcp_connect): Use new include files and inet_ntop().
Allows tcp_connect() to compile when HAVE_GETADDRINFO is enabled.

15 years agoStandardize include file order.
Ron Koenderink [Mon, 20 Aug 2007 20:20:16 +0000 (20:20 +0000)]
Standardize include file order.

15 years agoReplace winsock2.h and undef NS_ALL with sys/socket.h to prevent
Ron Koenderink [Mon, 20 Aug 2007 20:18:33 +0000 (20:18 +0000)]
Replace winsock2.h and undef NS_ALL with sys/socket.h to prevent
multiple occurences undef NS_ALL from nesting include files.

15 years agoReplace the incorrectly commented out file prototypes.h with
Ron Koenderink [Mon, 20 Aug 2007 20:13:56 +0000 (20:13 +0000)]
Replace the incorrectly commented out file prototypes.h with
misc.h.

15 years ago(tcp_connect) [_WIN32]: Add ws2tcpip.h to allow tcp_connect() to
Ron Koenderink [Mon, 20 Aug 2007 20:01:47 +0000 (20:01 +0000)]
(tcp_connect) [_WIN32]: Add ws2tcpip.h to allow tcp_connect() to
compile when HAVE_GETADDRINFO is enabled.

15 years ago(tcp_connect, hostconnect) [_WIN32]: Replace close() with
Ron Koenderink [Mon, 20 Aug 2007 19:59:12 +0000 (19:59 +0000)]
(tcp_connect, hostconnect) [_WIN32]: Replace close() with
closesocket() as Windows close() does not support closing
socket connections.

15 years ago[_WIN32]: Remove empio.h, not required anymore.
Ron Koenderink [Sun, 19 Aug 2007 21:44:11 +0000 (21:44 +0000)]
[_WIN32]: Remove empio.h, not required anymore.

15 years ago[_WIN32]: Remove unnecessary Windows include files.
Ron Koenderink [Sun, 19 Aug 2007 15:21:42 +0000 (15:21 +0000)]
[_WIN32]: Remove unnecessary Windows include files.

15 years ago(flock): Fix member types to conform to POSIX.
Markus Armbruster [Sun, 19 Aug 2007 14:19:52 +0000 (14:19 +0000)]
(flock): Fix member types to conform to POSIX.

15 years ago(mode_t, off_t): New.
Markus Armbruster [Sun, 19 Aug 2007 09:11:38 +0000 (09:11 +0000)]
(mode_t, off_t): New.
(posix_mkdir, posix_bind, posix_setsockopt, posix_lseek, posix_read)
(posix_write): Fix prototypes to conform to POSIX.

15 years agoDon't include direct.h, as our fake unistd.h now does the job.
Markus Armbruster [Sun, 19 Aug 2007 06:41:59 +0000 (06:41 +0000)]
Don't include direct.h, as our fake unistd.h now does the job.

15 years ago(getopt) [_WIN32]: Only getopt.c for MSC. MinGW has getopt()
Ron Koenderink [Sun, 19 Aug 2007 01:51:34 +0000 (01:51 +0000)]
(getopt) [_WIN32]: Only getopt.c for MSC. MinGW has getopt()
in the library.

15 years ago(strptime) [_WIN32]: Postpone the declaration of the struct tm for strptime().
Ron Koenderink [Sun, 19 Aug 2007 01:47:43 +0000 (01:47 +0000)]
(strptime) [_WIN32]: Postpone the declaration of the struct tm for strptime().
Pick up the declaration for struct tm when time.h is included in the source file.

15 years ago(getcwd) [_WIN32]: getcwd() is included in unistd.h in POSIX so
Ron Koenderink [Sun, 19 Aug 2007 01:40:14 +0000 (01:40 +0000)]
(getcwd) [_WIN32]: getcwd() is included in unistd.h in POSIX so
add <direct.h> into the windows equivalent for unistd.h.

15 years ago(getopt) [_WIN32]: In order to prevent namespace conflict between MSC and
Ron Koenderink [Sun, 19 Aug 2007 01:37:25 +0000 (01:37 +0000)]
(getopt) [_WIN32]: In order to prevent namespace conflict between MSC and
MinGW created an extern getopt() in unistd.h.  MinGW has getopt() in the library.
MSC does not have getopt() function.

15 years ago(fileno) [_WIN32]: Remove unnecessary #ifdef fileno/#endif.
Ron Koenderink [Sun, 19 Aug 2007 01:20:00 +0000 (01:20 +0000)]
(fileno) [_WIN32]: Remove unnecessary #ifdef fileno/#endif.

15 years ago(va_start) [_WIN32]: For va_start() requires stdarg.h and stdio.h.
Ron Koenderink [Sun, 19 Aug 2007 00:55:14 +0000 (00:55 +0000)]
(va_start) [_WIN32]: For va_start() requires stdarg.h and stdio.h.

15 years ago(va_start) [_WIN32]: For va_start() requires stdarg.h.
Ron Koenderink [Sun, 19 Aug 2007 00:54:29 +0000 (00:54 +0000)]
(va_start) [_WIN32]: For va_start() requires stdarg.h.

15 years ago(mkdir) [_WIN32]: Remove direct.h from posixio.c, not need.
Ron Koenderink [Sun, 19 Aug 2007 00:41:44 +0000 (00:41 +0000)]
(mkdir) [_WIN32]: Remove direct.h from posixio.c, not need.

15 years agoTrim system includes.
Markus Armbruster [Sat, 18 Aug 2007 17:03:14 +0000 (17:03 +0000)]
Trim system includes.

15 years agoInclude config.h.
Markus Armbruster [Sat, 18 Aug 2007 16:54:37 +0000 (16:54 +0000)]
Include config.h.

15 years agoPortability fix: include all headers traditionally required for
Markus Armbruster [Sat, 18 Aug 2007 16:28:56 +0000 (16:28 +0000)]
Portability fix: include all headers traditionally required for
select().

15 years ago(fltelemstr, fltheadstr): Move from ship.h to sail.c.
Markus Armbruster [Sat, 18 Aug 2007 13:48:15 +0000 (13:48 +0000)]
(fltelemstr, fltheadstr): Move from ship.h to sail.c.

15 years ago(exec_fd): Useless junk inherited all the way from BSD Empire 1.1.
Markus Armbruster [Sat, 18 Aug 2007 09:24:05 +0000 (09:24 +0000)]
(exec_fd): Useless junk inherited all the way from BSD Empire 1.1.
Remove.

15 years ago(setsockopt): Fix type of argument optval to conform to spec.
Markus Armbruster [Sat, 18 Aug 2007 07:00:16 +0000 (07:00 +0000)]
(setsockopt): Fix type of argument optval to conform to spec.

15 years agoAdd additional includes for compiling in MinGW.
Ron Koenderink [Fri, 17 Aug 2007 20:45:55 +0000 (20:45 +0000)]
Add additional includes for compiling in MinGW.

15 years agoSwitch the !__GNUC__ with _MSC_VER to be more reflective of the
Ron Koenderink [Fri, 17 Aug 2007 20:43:32 +0000 (20:43 +0000)]
Switch the !__GNUC__ with _MSC_VER to be more reflective of the
purpose.

(strptime) [_WIN32]: Add time.h for extern prototypes.

15 years ago(tcp_listen, posix_setsockopt) [_WIN32]: Move the special
Ron Koenderink [Fri, 17 Aug 2007 03:11:45 +0000 (03:11 +0000)]
(tcp_listen, posix_setsockopt) [_WIN32]: Move the special
SO_REUSEADDR code for _WIN32 from tcp_listen() to
posix_setsockopt().

[_WIN32] (posix_open): Switch to _sopen() for _sopen_s() as MinGW
does not support _sopen_s() yet.

[_WIN32] (posix_fd2socket): Fix typo.

15 years agoInclude sys/uio.h unconditionally.
Ron Koenderink [Fri, 17 Aug 2007 03:06:35 +0000 (03:06 +0000)]
Include sys/uio.h unconditionally.

15 years ago[_WIN32] (readv, writev, iovec): New. POSIX equivalents.
Ron Koenderink [Thu, 16 Aug 2007 21:43:20 +0000 (21:43 +0000)]
[_WIN32] (readv, writev, iovec): New.  POSIX equivalents.
(ioq_makeiov, ioqtoiov): Compile unconditionally.
(io_output): Use POSIX code unconditionally.
[_WIN32] (ioq_makebuf): Remove.

15 years agoBack out the previous revision and remove the include of sys/types.h
Markus Armbruster [Thu, 16 Aug 2007 10:41:30 +0000 (10:41 +0000)]
Back out the previous revision and remove the include of sys/types.h
instead.

15 years agoFor w32misc.h add the POSIX equivalent include file for each
Ron Koenderink [Thu, 16 Aug 2007 03:15:33 +0000 (03:15 +0000)]
For w32misc.h add the POSIX equivalent include file for each
declaration.

15 years ago(ssize_t, pid_t) [_WIN32]: Back out the previous revision of unistd.h
Ron Koenderink [Thu, 16 Aug 2007 03:03:22 +0000 (03:03 +0000)]
(ssize_t, pid_t) [_WIN32]: Back out the previous revision of unistd.h
and move to w32misc.h instead.  Belong into sys/types.h but we can't
fix system headers.

15 years agoInclude sys/uio.h unconditionally.
Ron Koenderink [Wed, 15 Aug 2007 02:46:08 +0000 (02:46 +0000)]
Include sys/uio.h unconditionally.

15 years ago[_WIN32] Provide POSIX-style sys/socket.h. Use it rather than
Ron Koenderink [Wed, 15 Aug 2007 02:40:53 +0000 (02:40 +0000)]
[_WIN32] Provide POSIX-style sys/socket.h.  Use it rather than
winsock2.h.

15 years ago[_WIN32]: Remove unnecessary <io.h> for WIN32.
Ron Koenderink [Wed, 15 Aug 2007 02:18:25 +0000 (02:18 +0000)]
[_WIN32]: Remove unnecessary <io.h> for WIN32.

15 years agoMove WIN32 equivalent function defines to w32/w32misc.h from misc.h.
Ron Koenderink [Wed, 15 Aug 2007 02:15:17 +0000 (02:15 +0000)]
Move WIN32 equivalent function defines to w32/w32misc.h from misc.h.
Move Microsoft C compiler warning to w32/w32misc.h from misc.h.

15 years ago(ssize_t, pid_t) [_WIN32]: Move from misc.h to POSIX's location
Ron Koenderink [Wed, 15 Aug 2007 01:48:40 +0000 (01:48 +0000)]
(ssize_t, pid_t) [_WIN32]: Move from misc.h to POSIX's location
in unistd.h.

15 years ago(serverio, sendoef) [_WIN32]: For WIN32 use closesocket() instead of
Ron Koenderink [Wed, 15 Aug 2007 01:18:48 +0000 (01:18 +0000)]
(serverio, sendoef) [_WIN32]: For WIN32 use closesocket() instead of
close() as close() is not valid for WIN32 sockets.

15 years agoCreate w32misc.h to contain information that does not fit in Windows
Ron Koenderink [Wed, 15 Aug 2007 01:16:26 +0000 (01:16 +0000)]
Create w32misc.h to contain information that does not fit in Windows
equivalent include file.
(strptime) [_WIN32]: Add extern for WIN32 equivalent for strptime().

15 years ago[_WIN32] (S_IRUSR, S_IWUSR, S_IXUSR, S_IRWXU, S_IRGRP, S_IWGRP)
Ron Koenderink [Tue, 14 Aug 2007 03:38:18 +0000 (03:38 +0000)]
[_WIN32] (S_IRUSR, S_IWUSR, S_IXUSR, S_IRWXU, S_IRGRP, S_IWGRP)
(S_IXGRP, S_IRWXG, S_IROTH, S_IWOTH, S_IXOTH, S_IRWXO): Move from
include/misc.h to new src/lib/w32/unistd.h.

15 years agoSimple POSIX I/O emulation layer to work around Windows's defective
Ron Koenderink [Tue, 14 Aug 2007 03:33:28 +0000 (03:33 +0000)]
Simple POSIX I/O emulation layer to work around Windows's defective
Unix I/O:
[_WIN32] (socklen_t, accept, posix_accept, bind. posix_bind, listen)
(posix_listen, setsockopt, posix_setsockopt, shutdown, posix_shutdown)
(socket, posix_socket, close, posix_close, creat, fstat, posix_fstat)
(lseek, posix_lseek, open, posix_open, read, posix_read, write)
(posix_write, fileno, posix_fileno, fcntl, O_NONBLOCK, F_RDLCK)
(F_WRLCK, F_GETFL, F_SETFL, F_SETLK, EWOULDBLOCK, ENOTSOCK)
(flock, fsync, posix_fsync):
New.
(ef_open, io_close, io_input, io_output, io_shutdown, io_noblocking)
(player_accept): Use them to simplify.
[_WIN32] (posix_fd2socket): New.
(empth_select): Use it.
(gen_power): Use it.

15 years ago[_WIN32] (posix_mkdir): New.
Ron Koenderink [Tue, 14 Aug 2007 03:11:26 +0000 (03:11 +0000)]
[_WIN32] (posix_mkdir): New.
[_WIN32] (mkdir): Use it.  Last argument is no longer ignored, which
was a bug.  Move declaration to unistd.h, which isn't quite right, but
works for us.

15 years agoReal unistd.h declares getopt() & friends. Approximate that in
Ron Koenderink [Tue, 14 Aug 2007 00:15:21 +0000 (00:15 +0000)]
Real unistd.h declares getopt() & friends.  Approximate that in
src/lib/w32/unistd.h by including getopt.h.  Simplify users

15 years agoRemove bogus _WIN32 conditional.
Ron Koenderink [Sat, 11 Aug 2007 19:54:42 +0000 (19:54 +0000)]
Remove bogus _WIN32 conditional.

15 years agoNow compiled only for Windows, remove unnecessary #if.
Ron Koenderink [Sat, 11 Aug 2007 19:07:46 +0000 (19:07 +0000)]
Now compiled only for Windows, remove unnecessary #if.

15 years ago(strptime) [_WIN32]: Provide missing functionality from WIN32.
Ron Koenderink [Thu, 9 Aug 2007 03:44:52 +0000 (03:44 +0000)]
(strptime) [_WIN32]: Provide missing functionality from WIN32.
Source taken from FreeBSD.

15 years ago(info.html/all.html): Fix to use the full 80 columns for the table.
Markus Armbruster [Wed, 8 Aug 2007 06:15:33 +0000 (06:15 +0000)]
(info.html/all.html): Fix to use the full 80 columns for the table.

(info.nr/all): Fix race between ls and output redirection.

15 years agoMoving getopt.h to src/lib/w32/ broke the Windows build. Fix.
Markus Armbruster [Wed, 8 Aug 2007 05:27:49 +0000 (05:27 +0000)]
Moving getopt.h to src/lib/w32/ broke the Windows build.  Fix.

15 years ago(xufooter, xubody): Rename some variables. No functional change.
Markus Armbruster [Sun, 5 Aug 2007 18:58:36 +0000 (18:58 +0000)]
(xufooter, xubody): Rename some variables.  No functional change.

15 years ago(xundump): Use malloc() instead of calloc() for fldca and fldidx,
Markus Armbruster [Sun, 5 Aug 2007 18:52:16 +0000 (18:52 +0000)]
(xundump): Use malloc() instead of calloc() for fldca and fldidx,
because the used part of these arrays is explicitely initialized by
deffld().

15 years ago(xufld): Clarify.
Markus Armbruster [Sun, 5 Aug 2007 18:47:51 +0000 (18:47 +0000)]
(xufld): Clarify.

15 years ago(xufldname): Don't bother to catch ... in field 1, because the check
Markus Armbruster [Sun, 5 Aug 2007 18:46:04 +0000 (18:46 +0000)]
(xufldname): Don't bother to catch ... in field 1, because the check
for the required join field catches that.

15 years ago(defellipsis): Set ellipsis to 1 instead of field number, because all
Markus Armbruster [Sun, 5 Aug 2007 18:42:24 +0000 (18:42 +0000)]
(defellipsis): Set ellipsis to 1 instead of field number, because all
uses just compare to 0.  Parameter now unused, remove.  Caller
changed.

15 years agoFix fields checks for split tables:
Markus Armbruster [Sun, 5 Aug 2007 18:38:37 +0000 (18:38 +0000)]
Fix fields checks for split tables:
(caseen): Remove.
(xufldhdr, deffld): Record only fields in this part in caflds[].  This
fixes the check for duplicate fields in parts other than the first.
(cafldspp): New, to record fields in previous parts.
(xundump): Initialize and finalize it.
(xufooter): Update it.  Requires new parameter ca.  Caller changed.
(fldval_must_match): Use it to do the right thing for split arrays.
(chkflds): Adapt for changed caflds[].
(chkflds): The check for missing fields was skipped for all parts of a
split table instead of for all but the final part.

15 years ago(xufldhdr): ellipsis wasn't cleared for machine-readable input. This
Markus Armbruster [Sun, 5 Aug 2007 18:23:09 +0000 (18:23 +0000)]
(xufldhdr): ellipsis wasn't cleared for machine-readable input.  This
broke reading machine-readable input after reading a split table
failed before seeing the last part.  Luckily, callers never tried
that.

15 years ago(xutail): Remove parameter type. Use cur_type instead. Caller
Markus Armbruster [Sun, 5 Aug 2007 17:36:01 +0000 (17:36 +0000)]
(xutail): Remove parameter type.  Use cur_type instead.  Caller
changed.

15 years ago(getobj, setnum): Move override of cur_id from getobj() to setnum().
Markus Armbruster [Sun, 5 Aug 2007 17:34:24 +0000 (17:34 +0000)]
(getobj, setnum): Move override of cur_id from getobj() to setnum().
Remove the now unused parameters of getobj().  Callers changed.

15 years ago(xuheader1, xufldhdr, xutrailer, xufooter, xundump2, xutail)
Markus Armbruster [Sun, 5 Aug 2007 17:25:01 +0000 (17:25 +0000)]
(xuheader1, xufldhdr, xutrailer, xufooter, xundump2, xutail)
(xundump1, xubody): Rename.

15 years ago(xundump1, xundump2): Move call of xutrailer() from xundump1() to its
Markus Armbruster [Sun, 5 Aug 2007 17:19:52 +0000 (17:19 +0000)]
(xundump1, xundump2): Move call of xutrailer() from xundump1() to its
caller xundump2().  Make xundump1() return number of records read for
that.

15 years ago(xundump1): Remove parameter type. Use cur_type instead. Caller
Markus Armbruster [Sun, 5 Aug 2007 17:05:22 +0000 (17:05 +0000)]
(xundump1): Remove parameter type.  Use cur_type instead.  Caller
changed.

15 years ago(xuheader1, xutrailer, xundump1): Remove unused parameters. Callers
Markus Armbruster [Sun, 5 Aug 2007 17:03:07 +0000 (17:03 +0000)]
(xuheader1, xutrailer, xundump1): Remove unused parameters.  Callers
changed.

15 years ago(xundump): Count lines in a saner way: pass line number in and out.
Markus Armbruster [Sun, 5 Aug 2007 16:22:41 +0000 (16:22 +0000)]
(xundump): Count lines in a saner way: pass line number in and out.
Callers changed.