[cvslog] (2004-10-17 05:14:18 UTC) Module eggdrop1.9: Change committed!

cvslog cvs at tsss.org
Sat Oct 16 23:14:18 CST 2004


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.9
Commit time: 2004-10-17 05:14:17 UTC
Commited by: stdarg <stdarg at techmonkeys.org>

Modified files:
     Makefile.am bootstrap configure.ac lib/eggdrop/Makefile.am
     lib/eggdrop/binds.c lib/eggdrop/common.h lib/eggdrop/config.c
     lib/eggdrop/dns.c lib/eggdrop/eggdrop.c lib/eggdrop/eggdrop.h
     lib/eggdrop/fileutil.c lib/eggdrop/garbage.c
     lib/eggdrop/hash_table.c lib/eggdrop/help.c lib/eggdrop/ident.c
     lib/eggdrop/ircmasks.c lib/eggdrop/ircparse.c
     lib/eggdrop/linemode.c lib/eggdrop/logging.c lib/eggdrop/match.c
     lib/eggdrop/md5.c lib/eggdrop/memutil.c lib/eggdrop/memutil.h
     lib/eggdrop/module.c lib/eggdrop/net.c lib/eggdrop/owner.c
     lib/eggdrop/partychan.c lib/eggdrop/partychan.h
     lib/eggdrop/partyline.c lib/eggdrop/partyline.h
     lib/eggdrop/partymember.c lib/eggdrop/partymember.h
     lib/eggdrop/script.c lib/eggdrop/sockbuf.c lib/eggdrop/socket.c
     lib/eggdrop/string.c lib/eggdrop/throttle.c lib/eggdrop/timer.c
     lib/eggdrop/timeutil.c lib/eggdrop/users.c lib/eggdrop/xml.c
     lib/eggdrop/xml.h lib/eggdrop/xmlread.c
     modules/dccparty/dccparty.c modules/ircparty/events.c
     modules/ircparty/ircparty.c modules/oldbotnet/events.c
     modules/oldbotnet/oldbotnet.c modules/proxy/http.c
     modules/proxy/proxy.c modules/proxy/socks5.c
     modules/script/scriptbind.c modules/script/scriptconfig.c
     modules/script/scriptmisc.c modules/script/scriptnet.c
     modules/script/scriptparty.c modules/script/scripttimer.c
     modules/script/scriptuser.c modules/server/server.h
     modules/server/help/en_US/commands.xml
     modules/telnetparty/telnetparty.c src/bg.c src/core_config.c
     src/core_party.c src/logfile.c src/main.c

Added files:
     tcl.license.terms lib/eggdrop/date.c lib/eggdrop/date.h

Removed files:
     lib/eggdrop/memory.c lib/eggdrop/memory.h

Log message:

* Added a few includs to common.h
* Removed duplicate includes from a bunch of files
* Added tcl date parsing a la "clock scan"
* Fixed some issues with configure (maybe)

---------------------- diff included ----------------------
Index: eggdrop1.9/Makefile.am
diff -u eggdrop1.9/Makefile.am:1.23 eggdrop1.9/Makefile.am:1.24
--- eggdrop1.9/Makefile.am:1.23	Sat Jun 19 08:18:48 2004
+++ eggdrop1.9/Makefile.am	Sun Oct 17 00:14:06 2004
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.23 2004/06/19 13:18:48 wingman Exp $
+# $Id: Makefile.am,v 1.24 2004/10/17 05:14:06 stdarg Exp $
 
 AUX_DIST		= $(ac_aux_dir)/install-sh \
 			$(ac_aux_dir)/ltmain.sh \
@@ -17,7 +17,7 @@
 
 EXTRA_DIST		= bootstrap config.xml
 
-SUBDIRS			= libltdl lib m4 modules src po
+SUBDIRS			= libltdl lib m4 modules src po intl
 DISTCLEANFILES		=
 MAINTAINERCLEANFILES	= Makefile.in aclocal.m4 configure config-h.in \
 			config.cache config.log config.status \
Index: eggdrop1.9/bootstrap
diff -u eggdrop1.9/bootstrap:1.19 eggdrop1.9/bootstrap:1.20
--- eggdrop1.9/bootstrap:1.19	Mon Jun 21 05:34:07 2004
+++ eggdrop1.9/bootstrap	Sun Oct 17 00:14:06 2004
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# $Id: bootstrap,v 1.19 2004/06/21 10:34:07 wingman Exp $
+# $Id: bootstrap,v 1.20 2004/10/17 05:14:06 stdarg Exp $
 #
 # Recommended development tools versions:
 #   autoconf 2.59
@@ -66,7 +66,7 @@
 acconfig/config.stubs --bootstrap $AUTOMAKE
 
 # Remove previous config.cache
-if test -f config.cache
-then
-  rm -f config.cache
-fi
+#if test -f config.cache
+#then
+#  rm -f config.cache
+#fi
Index: eggdrop1.9/configure.ac
diff -u eggdrop1.9/configure.ac:1.54 eggdrop1.9/configure.ac:1.55
--- eggdrop1.9/configure.ac:1.54	Mon Jun 21 05:34:07 2004
+++ eggdrop1.9/configure.ac	Sun Oct 17 00:14:06 2004
@@ -1,14 +1,14 @@
 dnl configure.ac: this file is processed by autoconf to produce ./configure.
 dnl
-dnl $Id: configure.ac,v 1.54 2004/06/21 10:34:07 wingman Exp $
+dnl $Id: configure.ac,v 1.55 2004/10/17 05:14:06 stdarg Exp $
 
 AC_PREREQ(2.57)
 AC_INIT([Eggdrop], [1.9.0], [bugs at eggheads.org])
 AC_COPYRIGHT([Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Eggheads Development Team])
-AC_REVISION($Revision: 1.54 $)
+AC_REVISION($Revision: 1.55 $)
 AC_CONFIG_AUX_DIR(acconfig)
 AM_CONFIG_HEADER(config.h)
-AC_CONFIG_FILES([Makefile lib/Makefile lib/compat/Makefile lib/eggdrop/Makefile m4/Makefile po/Makefile.in src/Makefile modules/Makefile acconfig/module.mk])
+AC_CONFIG_FILES([Makefile lib/Makefile lib/compat/Makefile lib/eggdrop/Makefile m4/Makefile po/Makefile.in src/Makefile modules/Makefile acconfig/module.mk intl/Makefile])
 
 
 # Print start message
@@ -40,7 +40,6 @@
 # Checks for compiler characteristics
 AC_C_BIGENDIAN
 AC_C_CONST
-AC_C_VOLATILE
 AC_C_INLINE
 AC_C_LONG_DOUBLE
 EGG_C_LONG_LONG
@@ -80,20 +79,13 @@
 
 
 # Checks for header files
-AC_HEADER_DIRENT
-AC_HEADER_STAT
 AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
 AC_HEADER_TIME
-AC_CHECK_HEADERS(string.h strings.h ctype.h stdlib.h limits.h unistd.h sys/rusage.h sys/select.h sys/poll.h stdarg.h std_args.h sys/time.h)
+AC_CHECK_HEADERS(ctype.h unistd.h sys/select.h sys/poll.h)
 
 
 # Checks for types and structures
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-EGG_TYPE_32BIT
 EGG_TYPE_SOCKLEN_T
-EGG_INADDR_LOOPBACK
 
 
 # Checks for library variables
@@ -101,7 +93,7 @@
 
 
 # Checks for library functions
-AC_CHECK_FUNCS(clock dprintf fsync getdtablesize getrusage isascii random srandom rename setpgid sigaction sigemptyset uname)
+AC_CHECK_FUNCS(fsync random srandom rename setpgid sigaction sigemptyset uname)
 
 
 # Check for these functions, and replace those not found
@@ -109,8 +101,7 @@
 
 
 # These all share a common file: snprintf.c
-AC_CHECK_FUNCS(vsnprintf snprintf asprintf vasprintf, [], [egg_replace_snprintf="yes"])
-EGG_FUNC_C99_VSNPRINTF
+AC_CHECK_FUNCS(vsnprintf snprintf, [], [egg_replace_snprintf="yes"])
 EGG_REPLACE_SNPRINTF
 
 
@@ -149,7 +140,7 @@
 
 
 # ldl support
-AC_CONFIG_SUBDIRS(libltdl intl)
+AC_CONFIG_SUBDIRS(libltdl)
 
 AC_OUTPUT
 EGG_MSG_CONFIGURE_END
Index: eggdrop1.9/lib/eggdrop/Makefile.am
diff -u eggdrop1.9/lib/eggdrop/Makefile.am:1.38 eggdrop1.9/lib/eggdrop/Makefile.am:1.39
--- eggdrop1.9/lib/eggdrop/Makefile.am:1.38	Wed Sep 29 10:38:39 2004
+++ eggdrop1.9/lib/eggdrop/Makefile.am	Sun Oct 17 00:14:06 2004
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.38 2004/09/29 15:38:39 stdarg Exp $
+# $Id: Makefile.am,v 1.39 2004/10/17 05:14:06 stdarg Exp $
 
 MAINTAINERCLEANFILES	= Makefile.in
 
@@ -20,6 +20,7 @@
 			common.h \
 			config.c config.h \
 			eggdrop.c eggdrop.h \
+			date.c date.h \
 			dns.c dns.h \
 			help.c help.h \
 			ident.c ident.h \
Index: eggdrop1.9/lib/eggdrop/binds.c
diff -u eggdrop1.9/lib/eggdrop/binds.c:1.20 eggdrop1.9/lib/eggdrop/binds.c:1.21
--- eggdrop1.9/lib/eggdrop/binds.c:1.20	Sun Sep 26 04:42:09 2004
+++ eggdrop1.9/lib/eggdrop/binds.c	Sun Oct 17 00:14:06 2004
@@ -18,11 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: binds.c,v 1.20 2004/09/26 09:42:09 stdarg Exp $";
+static const char rcsid[] = "$Id: binds.c,v 1.21 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <string.h>
-#include <stdlib.h>
 #include <eggdrop/eggdrop.h>
 
 /* The head of the bind table linked list. */
Index: eggdrop1.9/lib/eggdrop/common.h
diff -u eggdrop1.9/lib/eggdrop/common.h:1.9 eggdrop1.9/lib/eggdrop/common.h:1.10
--- eggdrop1.9/lib/eggdrop/common.h:1.9	Fri Jan  9 19:43:18 2004
+++ eggdrop1.9/lib/eggdrop/common.h	Sun Oct 17 00:14:06 2004
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: common.h,v 1.9 2004/01/10 01:43:18 stdarg Exp $
+ * $Id: common.h,v 1.10 2004/10/17 05:14:06 stdarg Exp $
  */
 
 #ifndef _EGG_COMMON_H_
@@ -30,6 +30,27 @@
 #  define END_C_DECLS
 #endif
 
+#if HAVE_CONFIG_H
+	#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef HAVE_SYS_TYPES_H
+	#include <sys/types.h>
+#endif
+
+#ifdef HAVE_STRING_H
+	#include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+	#include <strings.h>
+#endif
+#ifdef HAVE_CTYPE_H
+	#include <ctype.h>
+#endif
+
 #ifdef __STDC__
 #  ifdef HAVE_STDARG_H
 #    include <stdarg.h>
@@ -38,14 +59,8 @@
 #      include <std_args.h>
 #    endif
 #  endif
-#  define EGG_VARARGS(type, name)		(type name, ...)
-#  define EGG_VARARGS_DEF(type, name)		(type name, ...)
-#  define EGG_VARARGS_START(type, name, list)	(va_start(list, name), name)
 #else
 #  include <varargs.h>
-#  define EGG_VARARGS(type, name)		()
-#  define EGG_VARARGS_DEF(type, name)		(va_alist) va_dcl
-#  define EGG_VARARGS_START(type, name, list)	(va_start(list), va_arg(list,type))
 #endif
 
 #ifdef HAVE_INTTYPES_H
@@ -56,6 +71,17 @@
 	#endif
 #endif
 
+#ifdef TIME_WITH_SYS_TIME
+	#include <sys/time.h>
+	#include <time.h>
+#else
+	#ifdef HAVE_SYS_TIME_H
+		#include <sys/time.h>
+	#else
+		#include <time.h>
+	#endif
+#endif
+
 #include "lib/compat/compat.h"
 
 typedef int (*Function) ();
Index: eggdrop1.9/lib/eggdrop/config.c
diff -u eggdrop1.9/lib/eggdrop/config.c:1.9 eggdrop1.9/lib/eggdrop/config.c:1.10
--- eggdrop1.9/lib/eggdrop/config.c:1.9	Sun Sep 26 04:42:09 2004
+++ eggdrop1.9/lib/eggdrop/config.c	Sun Oct 17 00:14:06 2004
@@ -18,13 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: config.c,v 1.9 2004/09/26 09:42:09 stdarg Exp $";
+static const char rcsid[] = "$Id: config.c,v 1.10 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
 #include <eggdrop/eggdrop.h>
 
 /* Config bind tables. */
Index: eggdrop1.9/lib/eggdrop/date.c
diff -u /dev/null eggdrop1.9/lib/eggdrop/date.c:1.1
--- /dev/null	Sun Oct 17 00:14:17 2004
+++ eggdrop1.9/lib/eggdrop/date.c	Sun Oct 17 00:14:06 2004
@@ -0,0 +1,1875 @@
+/* 
+ * date.c -- tcl date parsing, as seen in "clock scan"
+ *
+ * Taken from Tcl 8.4.7, generic/tclDate.c with minor modifications.
+ *
+ *
+ *
+ * Copyright (c) 1992-1995 Karl Lehenbauer and Mark Diekhans.
+ * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ *
+ * Copyright (c) 2004 Eggdev
+ *
+ * See the file "tcl.license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+
+#include <eggdrop/eggdrop.h>
+
+#define EPOCH           1970
+#define START_OF_TIME   1902
+#define END_OF_TIME     2037
+
+/*
+ * The offset of tm_year of struct tm returned by localtime, gmtime, etc.
+ * I don't know how universal this is; K&R II, the NetBSD manpages, and
+ * ../compat/strftime.c all agree that tm_year is the year-1900.  However,
+ * some systems may have a different value.  This #define should be the
+ * same as in ../compat/strftime.c.
+ */
+#define TM_YEAR_BASE 1900
+
+#define HOUR(x)         ((int) (60 * x))
+#define SECSPERDAY      (24L * 60L * 60L)
+#define IsLeapYear(x)   ((x % 4 == 0) && (x % 100 != 0 || x % 400 == 0))
+
+/*
+ *  An entry in the lexical lookup table.
+ */
+typedef struct _TABLE {
+    char        *name;
+    int         type;
+    time_t      value;
+} TABLE;
+
+
+/*
+ *  Daylight-savings mode:  on, off, or not yet known.
+ */
+typedef enum _DSTMODE {
+    DSTon, DSToff, DSTmaybe
+} DSTMODE;
+
+/*
+ *  Meridian:  am, pm, or 24-hour style.
+ */
+typedef enum _MERIDIAN {
+    MERam, MERpm, MER24
+} MERIDIAN;
+
+
+/*
+ *  Global variables.  We could get rid of most of these by using a good
+ *  union as the yacc stack.  (This routine was originally written before
+ *  yacc had the %union construct.)  Maybe someday; right now we only use
+ *  the %union very rarely.
+ */
+static char     *date_DateInput;
+static DSTMODE  date_DateDSTmode;
+static time_t   date_DateDayOrdinal;
+static time_t   date_DateDayNumber;
+static time_t   date_DateMonthOrdinal;
+static int      date_DateHaveDate;
+static int      date_DateHaveDay;
+static int      date_DateHaveOrdinalMonth;
+static int      date_DateHaveRel;
+static int      date_DateHaveTime;
+static int      date_DateHaveZone;
+static time_t   date_DateTimezone;
+static time_t   date_DateDay;
+static time_t   date_DateHour;
+static time_t   date_DateMinutes;
+static time_t   date_DateMonth;
+static time_t   date_DateSeconds;
+static time_t   date_DateYear;
+static MERIDIAN date_DateMeridian;
+static time_t   date_DateRelMonth;
+static time_t   date_DateRelDay;
+static time_t   date_DateRelSeconds;
+static time_t  *date_DateRelPointer;
+
+/*
+ * Prototypes of internal functions.
+ */
+static void	date_Dateerror(char *s);
+static time_t	ToSeconds(time_t Hours, time_t Minutes,
+		    time_t Seconds, MERIDIAN Meridian);
+static int	Convert(time_t Month, time_t Day, time_t Year,
+		    time_t Hours, time_t Minutes, time_t Seconds,
+		    MERIDIAN Meridia, DSTMODE DSTmode, time_t *TimePtr);
+static time_t	DSTcorrect(time_t Start, time_t Future);
+static time_t	NamedDay(time_t Start, time_t DayOrdinal,
+		    time_t DayNumber);
+static time_t   NamedMonth(time_t Start, time_t MonthOrdinal,
+                    time_t MonthNumber);
+static int	RelativeMonth(time_t Start, time_t RelMonth,
+		    time_t *TimePtr);
+static int	RelativeDay(time_t Start, time_t RelDay,
+		    time_t *TimePtr);
+static int	LookupWord(char *buff);
+static int	date_Datelex(void);
+
+int
+date_Dateparse(void);
+typedef union
+#ifdef __cplusplus
+	YYSTYPE
+#endif
+ {
+    time_t              Number;
+    enum _MERIDIAN      Meridian;
+} YYSTYPE;
+# define tAGO 257
+# define tDAY 258
+# define tDAYZONE 259
+# define tID 260
+# define tMERIDIAN 261
+# define tMINUTE_UNIT 262
+# define tMONTH 263
+# define tMONTH_UNIT 264
+# define tSTARDATE 265
+# define tSEC_UNIT 266
+# define tSNUMBER 267
+# define tUNUMBER 268
+# define tZONE 269
+# define tEPOCH 270
+# define tDST 271
+# define tISOBASE 272
+# define tDAY_UNIT 273
+# define tNEXT 274
+
+
+
+
+#if defined(__cplusplus) || defined(__STDC__)
+
+#if defined(__cplusplus) && defined(__EXTERN_C__)
+extern "C" {
+#endif
+#ifndef date_Dateerror
+#if defined(__cplusplus)
+	void date_Dateerror(char *);
+#endif
+#endif
+#ifndef date_Datelex
+	int date_Datelex(void);
+#endif
+	int date_Dateparse(void);
+#if defined(__cplusplus) && defined(__EXTERN_C__)
+}
+#endif
+
+#endif
+
+#define date_Dateclearin date_Datechar = -1
+#define date_Dateerrok date_Dateerrflag = 0
+extern int date_Datechar;
+extern int date_Dateerrflag;
+YYSTYPE date_Datelval;
+YYSTYPE date_Dateval;
+typedef int date_Datetabelem;
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 150
+#endif
+#if YYMAXDEPTH > 0
+int date_Date_date_Dates[YYMAXDEPTH], *date_Dates = date_Date_date_Dates;
+YYSTYPE date_Date_date_Datev[YYMAXDEPTH], *date_Datev = date_Date_date_Datev;
+#else	/* user does initial allocation */
+int *date_Dates;
+YYSTYPE *date_Datev;
+#endif
+static int date_Datemaxdepth = YYMAXDEPTH;
+# define YYERRCODE 256
+
+
+/*
+ * Month and day table.
+ */
+static TABLE    MonthDayTable[] = {
+    { "january",        tMONTH,  1 },
+    { "february",       tMONTH,  2 },
+    { "march",          tMONTH,  3 },
+    { "april",          tMONTH,  4 },
+    { "may",            tMONTH,  5 },
+    { "june",           tMONTH,  6 },
+    { "july",           tMONTH,  7 },
+    { "august",         tMONTH,  8 },
+    { "september",      tMONTH,  9 },
+    { "sept",           tMONTH,  9 },
+    { "october",        tMONTH, 10 },
+    { "november",       tMONTH, 11 },
+    { "december",       tMONTH, 12 },
+    { "sunday",         tDAY, 0 },
+    { "monday",         tDAY, 1 },
+    { "tuesday",        tDAY, 2 },
+    { "tues",           tDAY, 2 },
+    { "wednesday",      tDAY, 3 },
+    { "wednes",         tDAY, 3 },
+    { "thursday",       tDAY, 4 },
+    { "thur",           tDAY, 4 },
+    { "thurs",          tDAY, 4 },
+    { "friday",         tDAY, 5 },
+    { "saturday",       tDAY, 6 },
+    { NULL }
+};
+
+/*
+ * Time units table.
+ */
+static TABLE    UnitsTable[] = {
+    { "year",           tMONTH_UNIT,    12 },
+    { "month",          tMONTH_UNIT,     1 },
+    { "fortnight",      tDAY_UNIT,      14 },
+    { "week",           tDAY_UNIT,       7 },
+    { "day",            tDAY_UNIT,       1 },
+    { "hour",           tSEC_UNIT, 60 * 60 },
+    { "minute",         tSEC_UNIT,      60 },
+    { "min",            tSEC_UNIT,      60 },
+    { "second",         tSEC_UNIT,       1 },
+    { "sec",            tSEC_UNIT,       1 },
+    { NULL }
+};
+
+/*
+ * Assorted relative-time words.
+ */
+static TABLE    OtherTable[] = {
+    { "tomorrow",       tDAY_UNIT,      1 },
+    { "yesterday",      tDAY_UNIT,     -1 },
+    { "today",          tDAY_UNIT,      0 },
+    { "now",            tSEC_UNIT,      0 },
+    { "last",           tUNUMBER,      -1 },
+    { "this",           tSEC_UNIT,      0 },
+    { "next",           tNEXT,          1 },
+#if 0
+    { "first",          tUNUMBER,       1 },
+    { "second",         tUNUMBER,       2 },
+    { "third",          tUNUMBER,       3 },
+    { "fourth",         tUNUMBER,       4 },
+    { "fifth",          tUNUMBER,       5 },
+    { "sixth",          tUNUMBER,       6 },
+    { "seventh",        tUNUMBER,       7 },
+    { "eighth",         tUNUMBER,       8 },
+    { "ninth",          tUNUMBER,       9 },
+    { "tenth",          tUNUMBER,       10 },
+    { "eleventh",       tUNUMBER,       11 },
+    { "twelfth",        tUNUMBER,       12 },
+#endif
+    { "ago",            tAGO,   1 },
+    { "epoch",          tEPOCH,   0 },
+    { "stardate",       tSTARDATE, 0},
+    { NULL }
+};
+
+/*
+ * The timezone table.  (Note: This table was modified to not use any floating
+ * point constants to work around an SGI compiler bug).
+ */
+static TABLE    TimezoneTable[] = {
+    { "gmt",    tZONE,     HOUR( 0) },      /* Greenwich Mean */
+    { "ut",     tZONE,     HOUR( 0) },      /* Universal (Coordinated) */
+    { "utc",    tZONE,     HOUR( 0) },
+    { "uct",    tZONE,     HOUR( 0) },      /* Universal Coordinated Time */
+    { "wet",    tZONE,     HOUR( 0) },      /* Western European */
+    { "bst",    tDAYZONE,  HOUR( 0) },      /* British Summer */
+    { "wat",    tZONE,     HOUR( 1) },      /* West Africa */
+    { "at",     tZONE,     HOUR( 2) },      /* Azores */
+#if     0
+    /* For completeness.  BST is also British Summer, and GST is
+     * also Guam Standard. */
+    { "bst",    tZONE,     HOUR( 3) },      /* Brazil Standard */
+    { "gst",    tZONE,     HOUR( 3) },      /* Greenland Standard */
+#endif
+    { "nft",    tZONE,     HOUR( 7/2) },    /* Newfoundland */
+    { "nst",    tZONE,     HOUR( 7/2) },    /* Newfoundland Standard */
+    { "ndt",    tDAYZONE,  HOUR( 7/2) },    /* Newfoundland Daylight */
+    { "ast",    tZONE,     HOUR( 4) },      /* Atlantic Standard */
+    { "adt",    tDAYZONE,  HOUR( 4) },      /* Atlantic Daylight */
+    { "est",    tZONE,     HOUR( 5) },      /* Eastern Standard */
+    { "edt",    tDAYZONE,  HOUR( 5) },      /* Eastern Daylight */
+    { "cst",    tZONE,     HOUR( 6) },      /* Central Standard */
+    { "cdt",    tDAYZONE,  HOUR( 6) },      /* Central Daylight */
+    { "mst",    tZONE,     HOUR( 7) },      /* Mountain Standard */
+    { "mdt",    tDAYZONE,  HOUR( 7) },      /* Mountain Daylight */
+    { "pst",    tZONE,     HOUR( 8) },      /* Pacific Standard */
+    { "pdt",    tDAYZONE,  HOUR( 8) },      /* Pacific Daylight */
+    { "yst",    tZONE,     HOUR( 9) },      /* Yukon Standard */
+    { "ydt",    tDAYZONE,  HOUR( 9) },      /* Yukon Daylight */
+    { "hst",    tZONE,     HOUR(10) },      /* Hawaii Standard */
+    { "hdt",    tDAYZONE,  HOUR(10) },      /* Hawaii Daylight */
+    { "cat",    tZONE,     HOUR(10) },      /* Central Alaska */
+    { "ahst",   tZONE,     HOUR(10) },      /* Alaska-Hawaii Standard */
+    { "nt",     tZONE,     HOUR(11) },      /* Nome */
+    { "idlw",   tZONE,     HOUR(12) },      /* International Date Line West */
+    { "cet",    tZONE,    -HOUR( 1) },      /* Central European */
+    { "cest",   tDAYZONE, -HOUR( 1) },      /* Central European Summer */
+    { "met",    tZONE,    -HOUR( 1) },      /* Middle European */
+    { "mewt",   tZONE,    -HOUR( 1) },      /* Middle European Winter */
+    { "mest",   tDAYZONE, -HOUR( 1) },      /* Middle European Summer */
+    { "swt",    tZONE,    -HOUR( 1) },      /* Swedish Winter */
+    { "sst",    tDAYZONE, -HOUR( 1) },      /* Swedish Summer */
+    { "fwt",    tZONE,    -HOUR( 1) },      /* French Winter */
+    { "fst",    tDAYZONE, -HOUR( 1) },      /* French Summer */
+    { "eet",    tZONE,    -HOUR( 2) },      /* Eastern Europe, USSR Zone 1 */
+    { "bt",     tZONE,    -HOUR( 3) },      /* Baghdad, USSR Zone 2 */
+    { "it",     tZONE,    -HOUR( 7/2) },    /* Iran */
+    { "zp4",    tZONE,    -HOUR( 4) },      /* USSR Zone 3 */
+    { "zp5",    tZONE,    -HOUR( 5) },      /* USSR Zone 4 */
+    { "ist",    tZONE,    -HOUR(11/2) },    /* Indian Standard */
+    { "zp6",    tZONE,    -HOUR( 6) },      /* USSR Zone 5 */
+#if     0
+    /* For completeness.  NST is also Newfoundland Stanard, nad SST is
+     * also Swedish Summer. */
+    { "nst",    tZONE,    -HOUR(13/2) },    /* North Sumatra */
+    { "sst",    tZONE,    -HOUR( 7) },      /* South Sumatra, USSR Zone 6 */
+#endif  /* 0 */
+    { "wast",   tZONE,    -HOUR( 7) },      /* West Australian Standard */
+    { "wadt",   tDAYZONE, -HOUR( 7) },      /* West Australian Daylight */
+    { "jt",     tZONE,    -HOUR(15/2) },    /* Java (3pm in Cronusland!) */
+    { "cct",    tZONE,    -HOUR( 8) },      /* China Coast, USSR Zone 7 */
+    { "jst",    tZONE,    -HOUR( 9) },      /* Japan Standard, USSR Zone 8 */
+    { "cast",   tZONE,    -HOUR(19/2) },    /* Central Australian Standard */
+    { "cadt",   tDAYZONE, -HOUR(19/2) },    /* Central Australian Daylight */
+    { "east",   tZONE,    -HOUR(10) },      /* Eastern Australian Standard */
+    { "eadt",   tDAYZONE, -HOUR(10) },      /* Eastern Australian Daylight */
+    { "gst",    tZONE,    -HOUR(10) },      /* Guam Standard, USSR Zone 9 */
+    { "nzt",    tZONE,    -HOUR(12) },      /* New Zealand */
+    { "nzst",   tZONE,    -HOUR(12) },      /* New Zealand Standard */
+    { "nzdt",   tDAYZONE, -HOUR(12) },      /* New Zealand Daylight */
+    { "idle",   tZONE,    -HOUR(12) },      /* International Date Line East */
+    /* ADDED BY Marco Nijdam */
+    { "dst",    tDST,     HOUR( 0) },       /* DST on (hour is ignored) */
+    /* End ADDED */
+    {  NULL  }
+};
+
+/*
+ * Military timezone table.
+ */
+static TABLE    MilitaryTable[] = {
+    { "a",      tZONE,  HOUR(  1) },
+    { "b",      tZONE,  HOUR(  2) },
+    { "c",      tZONE,  HOUR(  3) },
+    { "d",      tZONE,  HOUR(  4) },
+    { "e",      tZONE,  HOUR(  5) },
+    { "f",      tZONE,  HOUR(  6) },
+    { "g",      tZONE,  HOUR(  7) },
+    { "h",      tZONE,  HOUR(  8) },
+    { "i",      tZONE,  HOUR(  9) },
+    { "k",      tZONE,  HOUR( 10) },
+    { "l",      tZONE,  HOUR( 11) },
+    { "m",      tZONE,  HOUR( 12) },
+    { "n",      tZONE,  HOUR(- 1) },
+    { "o",      tZONE,  HOUR(- 2) },
+    { "p",      tZONE,  HOUR(- 3) },
+    { "q",      tZONE,  HOUR(- 4) },
+    { "r",      tZONE,  HOUR(- 5) },
+    { "s",      tZONE,  HOUR(- 6) },
+    { "t",      tZONE,  HOUR(- 7) },
+    { "u",      tZONE,  HOUR(- 8) },
+    { "v",      tZONE,  HOUR(- 9) },
+    { "w",      tZONE,  HOUR(-10) },
+    { "x",      tZONE,  HOUR(-11) },
+    { "y",      tZONE,  HOUR(-12) },
+    { "z",      tZONE,  HOUR(  0) },
+    { NULL }
+};
+
+
+/*
+ * Dump error messages in the bit bucket.
+ */
+static void
+date_Dateerror(s)
+    char  *s;
+{
+}
+
+int date_timezone(time_t time)
+{
+	struct tm *tm = localtime(&time);
+	int timezone = -(tm->tm_gmtoff/60);
+
+	/* Adjust for daylight savings. */
+	if (tm->tm_isdst) timezone += 60;
+
+	return(timezone);
+}
+
+static time_t
+ToSeconds(Hours, Minutes, Seconds, Meridian)
+    time_t      Hours;
+    time_t      Minutes;
+    time_t      Seconds;
+    MERIDIAN    Meridian;
+{
+    if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 59)
+        return -1;
+    switch (Meridian) {
+    case MER24:
+        if (Hours < 0 || Hours > 23)
+            return -1;
+        return (Hours * 60L + Minutes) * 60L + Seconds;
+    case MERam:
+        if (Hours < 1 || Hours > 12)
+            return -1;
+        return ((Hours % 12) * 60L + Minutes) * 60L + Seconds;
+    case MERpm:
+        if (Hours < 1 || Hours > 12)
+            return -1;
+        return (((Hours % 12) + 12) * 60L + Minutes) * 60L + Seconds;
+    }
+    return -1;  /* Should never be reached */
+}
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Convert --
+ *
+ *      Convert a {month, day, year, hours, minutes, seconds, meridian, dst}
+ *      tuple into a clock seconds value.
+ *
+ * Results:
+ *      0 or -1 indicating success or failure.
+ *
+ * Side effects:
+ *      Fills TimePtr with the computed value.
+ *
+ *-----------------------------------------------------------------------------
+ */
+static int
+Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode, TimePtr)
+    time_t      Month;
+    time_t      Day;
+    time_t      Year;
+    time_t      Hours;
+    time_t      Minutes;
+    time_t      Seconds;
+    MERIDIAN    Meridian;
+    DSTMODE     DSTmode;
+    time_t     *TimePtr;
+{
+    static int  DaysInMonth[12] = {
+        31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
+    };
+    time_t tod;
+    time_t Julian;
+    int i;
+
+    /* Figure out how many days are in February for the given year.
+     * Every year divisible by 4 is a leap year.
+     * But, every year divisible by 100 is not a leap year.
+     * But, every year divisible by 400 is a leap year after all.
+     */
+    DaysInMonth[1] = IsLeapYear(Year) ? 29 : 28;
+
+    /* Check the inputs for validity */
+    if (Month < 1 || Month > 12
+	    || Year < START_OF_TIME || Year > END_OF_TIME
+	    || Day < 1 || Day > DaysInMonth[(int)--Month])
+        return -1;
+
+    /* Start computing the value.  First determine the number of days
+     * represented by the date, then multiply by the number of seconds/day.
+     */
+    for (Julian = Day - 1, i = 0; i < Month; i++)
+        Julian += DaysInMonth[i];
+    if (Year >= EPOCH) {
+        for (i = EPOCH; i < Year; i++)
+            Julian += 365 + IsLeapYear(i);
+    } else {
+        for (i = Year; i < EPOCH; i++)
+            Julian -= 365 + IsLeapYear(i);
+    }
+    Julian *= SECSPERDAY;
+
+    /* Add the timezone offset ?? */
+    Julian += date_DateTimezone * 60L;
+
+    /* Add the number of seconds represented by the time component */
+    if ((tod = ToSeconds(Hours, Minutes, Seconds, Meridian)) < 0)
+        return -1;
+    Julian += tod;
+
+    /* Perform a preliminary DST compensation ?? */
+    if (DSTmode == DSTon
+     || (DSTmode == DSTmaybe && localtime(&Julian)->tm_isdst))
+        Julian -= 60 * 60;
+    *TimePtr = Julian;
+    return 0;
+}
+
+
+static time_t
+DSTcorrect(Start, Future)
+    time_t      Start;
+    time_t      Future;
+{
+    time_t      StartDay;
+    time_t      FutureDay;
+    StartDay = (localtime(&Start)->tm_hour + 1) % 24;
+    FutureDay = (localtime(&Future)->tm_hour + 1) % 24;
+    return (Future - Start) + (StartDay - FutureDay) * 60L * 60L;
+}
+
+
+static time_t
+NamedDay(Start, DayOrdinal, DayNumber)
+    time_t      Start;
+    time_t      DayOrdinal;
+    time_t      DayNumber;
+{
+    struct tm   *tm;
+    time_t      now;
+
+    now = Start;
+    tm = localtime(&now);
+    now += SECSPERDAY * ((DayNumber - tm->tm_wday + 7) % 7);
+    now += 7 * SECSPERDAY * (DayOrdinal <= 0 ? DayOrdinal : DayOrdinal - 1);
+    return DSTcorrect(Start, now);
+}
+
+static time_t
+NamedMonth(Start, MonthOrdinal, MonthNumber)
+    time_t Start;
+    time_t MonthOrdinal;
+    time_t MonthNumber;
+{
+    struct tm *tm;
+    time_t now;
+    int result;
+    
+    now = Start;
+    tm = localtime(&now);
+    /* To compute the next n'th month, we use this alg:
+     * add n to year value
+     * if currentMonth < requestedMonth decrement year value by 1 (so that
+     *  doing next february from january gives us february of the current year)
+     * set day to 1, time to 0
+     */
+    tm->tm_year += MonthOrdinal;
+    if (tm->tm_mon < MonthNumber - 1) {
+	tm->tm_year--;
+    }
+    result = Convert(MonthNumber, (time_t) 1, tm->tm_year + TM_YEAR_BASE,
+	    (time_t) 0, (time_t) 0, (time_t) 0, MER24, DSTmaybe, &now);
+    if (result < 0) {
+	return 0;
+    }
+    return DSTcorrect(Start, now);
+}
+
+static int
+RelativeMonth(Start, RelMonth, TimePtr)
+    time_t Start;
+    time_t RelMonth;
+    time_t *TimePtr;
+{
+    struct tm *tm;
+    time_t Month;
+    time_t Year;
+    time_t Julian;
+    int result;
+
+    if (RelMonth == 0) {
+        *TimePtr = 0;
+        return 0;
+    }
+    tm = localtime(&Start);
+    Month = 12 * (tm->tm_year + TM_YEAR_BASE) + tm->tm_mon + RelMonth;
+    Year = Month / 12;
+    Month = Month % 12 + 1;
+    result = Convert(Month, (time_t) tm->tm_mday, Year,
+	    (time_t) tm->tm_hour, (time_t) tm->tm_min, (time_t) tm->tm_sec,
+	    MER24, DSTmaybe, &Julian);
+
+    /*
+     * The Julian time returned above is behind by one day, if "month" 
+     * or "year" is used to specify relative time and the GMT flag is true.
+     * This problem occurs only when the current time is closer to
+     * midnight, the difference being not more than its time difference
+     * with GMT. For example, in US/Pacific time zone, the problem occurs
+     * whenever the current time is between midnight to 8:00am or 7:00amDST.
+     * See Bug# 413397 for more details and sample script.
+     * To resolve this bug, we simply add the number of seconds corresponding
+     * to timezone difference with GMT to Julian time, if GMT flag is true.
+     */
+
+    if (date_DateTimezone == 0) {
+        Julian += date_timezone((unsigned long) Start) * 60L;
+    }
+
+    /*
+     * The following iteration takes into account the case were we jump
+     * into a "short month".  Far example, "one month from Jan 31" will
+     * fail because there is no Feb 31.  The code below will reduce the
+     * day and try converting the date until we succed or the date equals
+     * 28 (which always works unless the date is bad in another way).
+     */
+
+    while ((result != 0) && (tm->tm_mday > 28)) {
+	tm->tm_mday--;
+	result = Convert(Month, (time_t) tm->tm_mday, Year,
+		(time_t) tm->tm_hour, (time_t) tm->tm_min, (time_t) tm->tm_sec,
+		MER24, DSTmaybe, &Julian);
+    }
+    if (result != 0) {
+	return -1;
+    }
+    *TimePtr = DSTcorrect(Start, Julian);
+    return 0;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * RelativeDay --
+ *
+ *      Given a starting time and a number of days before or after, compute the
+ *      DST corrected difference between those dates.
+ *
+ * Results:
+ *     1 or -1 indicating success or failure.
+ *
+ * Side effects:
+ *      Fills TimePtr with the computed value.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static int
+RelativeDay(Start, RelDay, TimePtr)
+    time_t Start;
+    time_t RelDay;
+    time_t *TimePtr;
+{
+    time_t new;
+
+    new = Start + (RelDay * 60 * 60 * 24);
+    *TimePtr = DSTcorrect(Start, new);
+    return 1;
+}
+
+static int
+LookupWord(buff)
+    char                *buff;
+{
+    register char *p;
+    register char *q;
+    register TABLE *tp;
+    int i;
+    int abbrev;
+
+    /*
+     * Make it lowercase.
+     */
+
+    str_tolower(buff);
+
+    if (strcmp(buff, "am") == 0 || strcmp(buff, "a.m.") == 0) {
+        date_Datelval.Meridian = MERam;
+        return tMERIDIAN;
+    }
+    if (strcmp(buff, "pm") == 0 || strcmp(buff, "p.m.") == 0) {
+        date_Datelval.Meridian = MERpm;
+        return tMERIDIAN;
+    }
+
+    /*
+     * See if we have an abbreviation for a month.
+     */
+    if (strlen(buff) == 3) {
+        abbrev = 1;
+    } else if (strlen(buff) == 4 && buff[3] == '.') {
+        abbrev = 1;
+        buff[3] = '\0';
+    } else {
+        abbrev = 0;
+    }
+
+    for (tp = MonthDayTable; tp->name; tp++) {
+        if (abbrev) {
+            if (strncmp(buff, tp->name, 3) == 0) {
+                date_Datelval.Number = tp->value;
+                return tp->type;
+            }
+        } else if (strcmp(buff, tp->name) == 0) {
+            date_Datelval.Number = tp->value;
+            return tp->type;
+        }
+    }
+
+    for (tp = TimezoneTable; tp->name; tp++) {
+        if (strcmp(buff, tp->name) == 0) {
+            date_Datelval.Number = tp->value;
+            return tp->type;
+        }
+    }
+
+    for (tp = UnitsTable; tp->name; tp++) {
+        if (strcmp(buff, tp->name) == 0) {
+            date_Datelval.Number = tp->value;
+            return tp->type;
+        }
+    }
+
+    /*
+     * Strip off any plural and try the units table again.
+     */
+    i = strlen(buff) - 1;
+    if (buff[i] == 's') {
+        buff[i] = '\0';
+        for (tp = UnitsTable; tp->name; tp++) {
+            if (strcmp(buff, tp->name) == 0) {
+                date_Datelval.Number = tp->value;
+                return tp->type;
+            }
+	}
+    }
+
+    for (tp = OtherTable; tp->name; tp++) {
+        if (strcmp(buff, tp->name) == 0) {
+            date_Datelval.Number = tp->value;
+            return tp->type;
+        }
+    }
+
+    /*
+     * Military timezones.
+     */
+    if (buff[1] == '\0' && !(*buff & 0x80)
+	    && isalpha(*buff)) {	/* INTL: ISO only */
+        for (tp = MilitaryTable; tp->name; tp++) {
+            if (strcmp(buff, tp->name) == 0) {
+                date_Datelval.Number = tp->value;
+                return tp->type;
+            }
+	}
+    }
+
+    /*
+     * Drop out any periods and try the timezone table again.
+     */
+    for (i = 0, p = q = buff; *q; q++)
+        if (*q != '.') {
+            *p++ = *q;
+        } else {
+            i++;
+	}
+    *p = '\0';
+    if (i) {
+        for (tp = TimezoneTable; tp->name; tp++) {
+            if (strcmp(buff, tp->name) == 0) {
+                date_Datelval.Number = tp->value;
+                return tp->type;
+            }
+	}
+    }
+    
+    return tID;
+}
+
+
+static int
+date_Datelex()
+{
+    register char       c;
+    register char       *p;
+    char                buff[20];
+    int                 Count;
+
+    for ( ; ; ) {
+        while (isspace(*date_DateInput)) {
+            date_DateInput++;
+	}
+
+        if (isdigit((c = *date_DateInput))) { /* INTL: digit */
+	    /* convert the string into a number; count the number of digits */
+	    Count = 0;
+            for (date_Datelval.Number = 0;
+		    isdigit((c = *date_DateInput++)); ) { /* INTL: digit */
+                date_Datelval.Number = 10 * date_Datelval.Number + c - '0';
+		Count++;
+	    }
+            date_DateInput--;
+	    /* A number with 6 or more digits is considered an ISO 8601 base */
+	    if (Count >= 6) {
+		return tISOBASE;
+	    } else {
+		return tUNUMBER;
+	    }
+        }
+        if (!(c & 0x80) && isalpha(c)) {	/* INTL: ISO only. */
+            for (p = buff; isalpha((c = *date_DateInput++)) /* INTL: ISO only. */
+		     || c == '.'; ) {
+                if (p < &buff[sizeof buff - 1]) {
+                    *p++ = c;
+		}
+	    }
+            *p = '\0';
+            date_DateInput--;
+            return LookupWord(buff);
+        }
+        if (c != '(') {
+            return *date_DateInput++;
+	}
+        Count = 0;
+        do {
+            c = *date_DateInput++;
+            if (c == '\0') {
+                return c;
+	    } else if (c == '(') {
+                Count++;
+	    } else if (c == ')') {
+                Count--;
+	    }
+        } while (Count > 0);
+    }
+}
+
+/*
+ * Specify zone is of -50000 to force GMT.  (This allows BST to work).
+ */
+
+int date_scan(char *timestr, time_t *now, int zone, time_t *timeptr)
+{
+    struct tm *tm;
+    time_t Start;
+    time_t Time;
+    time_t tod;
+    int thisyear;
+
+    /* Look up timezone if required. */
+    if (zone == EGG_TIMEZONE_LOOKUP) zone = date_timezone(0);
+
+    date_DateInput = timestr;
+    /* now has to be cast to a time_t for 64bit compliance */
+    Start = *now;
+    tm = localtime(&Start);
+    thisyear = tm->tm_year + TM_YEAR_BASE;
+    date_DateYear = thisyear;
+    date_DateMonth = tm->tm_mon + 1;
+    date_DateDay = tm->tm_mday;
+    date_DateTimezone = zone;
+    if (zone == -50000) {
+        date_DateDSTmode = DSToff;  /* assume GMT */
+        date_DateTimezone = 0;
+    } else {
+        date_DateDSTmode = DSTmaybe;
+    }
+    date_DateHour = 0;
+    date_DateMinutes = 0;
+    date_DateSeconds = 0;
+    date_DateMeridian = MER24;
+    date_DateRelSeconds = 0;
+    date_DateRelMonth = 0;
+    date_DateRelDay = 0;
+    date_DateRelPointer = NULL;
+
+    date_DateHaveDate = 0;
+    date_DateHaveDay = 0;
+    date_DateHaveOrdinalMonth = 0;
+    date_DateHaveRel = 0;
+    date_DateHaveTime = 0;
+    date_DateHaveZone = 0;
+
+    if (date_Dateparse() || date_DateHaveTime > 1 || date_DateHaveZone > 1 || date_DateHaveDate > 1 ||
+	    date_DateHaveDay > 1 || date_DateHaveOrdinalMonth > 1) {
+        return -1;
+    }
+    
+    if (date_DateHaveDate || date_DateHaveTime || date_DateHaveDay) {
+	if (date_DateYear < 0) {
+	    date_DateYear = -date_DateYear;
+	}
+	/*
+	 * The following line handles years that are specified using
+	 * only two digits.  The line of code below implements a policy
+	 * defined by the X/Open workgroup on the millinium rollover.
+	 * Note: some of those dates may not actually be valid on some
+	 * platforms.  The POSIX standard startes that the dates 70-99
+	 * shall refer to 1970-1999 and 00-38 shall refer to 2000-2038.
+	 * This later definition should work on all platforms.
+	 */
+
+	if (date_DateYear < 100) {
+	    if (date_DateYear >= 69) {
+		date_DateYear += 1900;
+	    } else {
+		date_DateYear += 2000;
+	    }
+	}
+	if (Convert(date_DateMonth, date_DateDay, date_DateYear, date_DateHour, date_DateMinutes, date_DateSeconds,
+		date_DateMeridian, date_DateDSTmode, &Start) < 0) {
+            return -1;
+	}
+    } else {
+        Start = *now;
+        if (!date_DateHaveRel) {
+            Start -= ((tm->tm_hour * 60L * 60L) +
+		    tm->tm_min * 60L) +	tm->tm_sec;
+	}
+    }
+
+    Start += date_DateRelSeconds;
+    if (RelativeMonth(Start, date_DateRelMonth, &Time) < 0) {
+        return -1;
+    }
+    Start += Time;
+
+    if (RelativeDay(Start, date_DateRelDay, &Time) < 0) {
+	return -1;
+    }
+    Start += Time;
+    
+    if (date_DateHaveDay && !date_DateHaveDate) {
+        tod = NamedDay(Start, date_DateDayOrdinal, date_DateDayNumber);
+        Start += tod;
+    }
+
+    if (date_DateHaveOrdinalMonth) {
+	tod = NamedMonth(Start, date_DateMonthOrdinal, date_DateMonth);
+	Start += tod;
+    }
+    
+    *timeptr = Start;
+    return 0;
+}
+static date_Datetabelem date_Dateexca[] ={
+-1, 1,
+	0, -1,
+	-2, 0,
+	};
+# define YYNPROD 56
+# define YYLAST 261
+static date_Datetabelem date_Dateact[]={
+
+    24,    40,    23,    36,    54,    81,    41,    28,    53,    26,
+    37,    42,    58,    38,    56,    28,    27,    26,    28,    33,
+    26,    32,    61,    50,    27,    80,    76,    27,    51,    75,
+    74,    73,    30,    72,    71,    70,    69,    52,    49,    48,
+    47,    45,    39,    62,    78,    46,    79,    68,    25,    65,
+    60,    67,    66,    55,    44,    21,    63,    11,    10,     9,
+     8,    35,     7,     6,     5,     4,     3,    43,     2,     1,
+    20,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,    57,     0,     0,    59,    77,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,    19,    14,     0,     0,     0,
+    16,    28,    22,    26,     0,    12,    13,    17,     0,    15,
+    27,    18,    31,     0,     0,    29,     0,    34,    28,     0,
+    26,     0,     0,     0,     0,     0,     0,    27,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,    64,
+    64 };
+static date_Datetabelem date_Datepact[]={
+
+-10000000,   -43,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
+-10000000,-10000000,   -26,  -268,-10000000,  -259,  -226,-10000000,  -257,    10,
+  -227,  -212,  -228,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
+  -229,-10000000,  -230,  -240,  -231,-10000000,-10000000,  -264,-10000000,     9,
+-10000000,-10000000,  -249,-10000000,-10000000,  -246,-10000000,     4,    -2,     2,
+     7,     6,-10000000,-10000000,   -11,  -232,-10000000,-10000000,-10000000,-10000000,
+  -233,-10000000,  -234,  -235,-10000000,  -237,  -238,  -239,  -242,-10000000,
+-10000000,-10000000,    -1,-10000000,-10000000,-10000000,   -12,-10000000,  -243,  -263,
+-10000000,-10000000 };
+static date_Datetabelem date_Datepgo[]={
+
+     0,    48,    70,    22,    69,    68,    66,    65,    64,    63,
+    62,    60,    59,    58,    57,    55 };
+static date_Datetabelem date_Dater1[]={
+
+     0,     4,     4,     5,     5,     5,     5,     5,     5,     5,
+     5,     5,     6,     6,     6,     6,     6,     7,     7,     7,
+    10,    10,    10,    10,    10,     8,     8,     8,     8,     8,
+     8,     8,     8,     8,     8,     9,     9,    12,    12,    12,
+    13,    11,    11,    15,    15,    15,    15,    15,     2,     2,
+     1,     1,     1,    14,     3,     3 };
+static date_Datetabelem date_Dater2[]={
+
+     0,     0,     4,     3,     3,     3,     3,     3,     3,     3,
+     3,     2,     5,     9,    11,    13,    15,     5,     3,     3,
+     3,     5,     5,     7,     5,     7,    11,     3,    11,    11,
+     5,     9,     5,     3,     7,     5,     7,     7,    15,     5,
+     9,     5,     2,     7,     5,     5,     7,     3,     3,     3,
+     3,     3,     3,     3,     1,     3 };
+static date_Datetabelem date_Datechk[]={
+
+-10000000,    -4,    -5,    -6,    -7,    -8,    -9,   -10,   -11,   -12,
+   -13,   -14,   268,   269,   259,   272,   263,   270,   274,   258,
+    -2,   -15,   265,    45,    43,    -1,   266,   273,   264,   261,
+    58,   258,    47,    45,   263,    -1,   271,   269,   272,   268,
+   258,   263,   268,    -1,    44,   268,   257,   268,   268,   268,
+   263,   268,   268,   272,   268,    44,   263,    -1,   258,    -1,
+    46,    -3,    45,    58,   261,    47,    45,    45,    58,   268,
+   268,   268,   268,   268,   268,   268,   268,    -3,    45,    58,
+   268,   268 };
+static date_Datetabelem date_Datedef[]={
+
+     1,    -2,     2,     3,     4,     5,     6,     7,     8,     9,
+    10,    11,    53,    18,    19,    27,     0,    33,     0,    20,
+     0,    42,     0,    48,    49,    47,    50,    51,    52,    12,
+     0,    22,     0,     0,    32,    44,    17,     0,    39,    30,
+    24,    35,     0,    45,    21,     0,    41,     0,    54,    25,
+     0,     0,    34,    37,     0,     0,    36,    46,    23,    43,
+     0,    13,     0,     0,    55,     0,     0,     0,     0,    31,
+    40,    14,    54,    26,    28,    29,     0,    15,     0,     0,
+    16,    38 };
+typedef struct
+#ifdef __cplusplus
+	date_Datetoktype
+#endif
+{ char *t_name; int t_val; } date_Datetoktype;
+#ifndef YYDEBUG
+#	define YYDEBUG	0	/* don't allow debugging */
+#endif
+
+#if YYDEBUG
+
+date_Datetoktype date_Datetoks[] =
+{
+	"tAGO",	257,
+	"tDAY",	258,
+	"tDAYZONE",	259,
+	"tID",	260,
+	"tMERIDIAN",	261,
+	"tMINUTE_UNIT",	262,
+	"tMONTH",	263,
+	"tMONTH_UNIT",	264,
+	"tSTARDATE",	265,
+	"tSEC_UNIT",	266,
+	"tSNUMBER",	267,
+	"tUNUMBER",	268,
+	"tZONE",	269,
+	"tEPOCH",	270,
+	"tDST",	271,
+	"tISOBASE",	272,
+	"tDAY_UNIT",	273,
+	"tNEXT",	274,
+	"-unknown-",	-1	/* ends search */
+};
+
+char * date_Datereds[] =
+{
+	"-no such reduction-",
+	"spec : /* empty */",
+	"spec : spec item",
+	"item : time",
+	"item : zone",
+	"item : date",
+	"item : ordMonth",
+	"item : day",
+	"item : relspec",
+	"item : iso",
+	"item : trek",
+	"item : number",
+	"time : tUNUMBER tMERIDIAN",
+	"time : tUNUMBER ':' tUNUMBER o_merid",
+	"time : tUNUMBER ':' tUNUMBER '-' tUNUMBER",
+	"time : tUNUMBER ':' tUNUMBER ':' tUNUMBER o_merid",
+	"time : tUNUMBER ':' tUNUMBER ':' tUNUMBER '-' tUNUMBER",
+	"zone : tZONE tDST",
+	"zone : tZONE",
+	"zone : tDAYZONE",
+	"day : tDAY",
+	"day : tDAY ','",
+	"day : tUNUMBER tDAY",
+	"day : sign tUNUMBER tDAY",
+	"day : tNEXT tDAY",
+	"date : tUNUMBER '/' tUNUMBER",
+	"date : tUNUMBER '/' tUNUMBER '/' tUNUMBER",
+	"date : tISOBASE",
+	"date : tUNUMBER '-' tMONTH '-' tUNUMBER",
+	"date : tUNUMBER '-' tUNUMBER '-' tUNUMBER",
+	"date : tMONTH tUNUMBER",
+	"date : tMONTH tUNUMBER ',' tUNUMBER",
+	"date : tUNUMBER tMONTH",
+	"date : tEPOCH",
+	"date : tUNUMBER tMONTH tUNUMBER",
+	"ordMonth : tNEXT tMONTH",
+	"ordMonth : tNEXT tUNUMBER tMONTH",
+	"iso : tISOBASE tZONE tISOBASE",
+	"iso : tISOBASE tZONE tUNUMBER ':' tUNUMBER ':' tUNUMBER",
+	"iso : tISOBASE tISOBASE",
+	"trek : tSTARDATE tUNUMBER '.' tUNUMBER",
+	"relspec : relunits tAGO",
+	"relspec : relunits",
+	"relunits : sign tUNUMBER unit",
+	"relunits : tUNUMBER unit",
+	"relunits : tNEXT unit",
+	"relunits : tNEXT tUNUMBER unit",
+	"relunits : unit",
+	"sign : '-'",
+	"sign : '+'",
+	"unit : tSEC_UNIT",
+	"unit : tDAY_UNIT",
+	"unit : tMONTH_UNIT",
+	"number : tUNUMBER",
+	"o_merid : /* empty */",
+	"o_merid : tMERIDIAN",
+};
+#endif /* YYDEBUG */
+/*
+ * Copyright (c) 1993 by Sun Microsystems, Inc.
+ */
+
+
+/*
+** Skeleton parser driver for yacc output
+*/
+
+/*
+** yacc user known macros and defines
+*/
+#define YYERROR		goto date_Dateerrlab
+#define YYACCEPT	return(0)
+#define YYABORT		return(1)
+#define YYBACKUP( newtoken, newvalue )\
+{\
+	if ( date_Datechar >= 0 || ( date_Dater2[ date_Datetmp ] >> 1 ) != 1 )\
+	{\
+		date_Dateerror( "syntax error - cannot backup" );\
+		goto date_Dateerrlab;\
+	}\
+	date_Datechar = newtoken;\
+	date_Datestate = *date_Dateps;\
+	date_Datelval = newvalue;\
+	goto date_Datenewstate;\
+}
+#define YYRECOVERING()	(!!date_Dateerrflag)
+#define YYNEW(type)	malloc(sizeof(type) * date_Datenewmax)
+#define YYCOPY(to, from, type) \
+	(type *) memcpy(to, (char *) from, date_Datemaxdepth * sizeof (type))
+#define YYENLARGE( from, type) \
+	(type *) realloc((char *) from, date_Datenewmax * sizeof(type))
+#ifndef YYDEBUG
+#	define YYDEBUG	1	/* make debugging available */
+#endif
+
+/*
+** user known globals
+*/
+int date_Datedebug;			/* set to 1 to get debugging */
+
+/*
+** driver internal defines
+*/
+#define YYFLAG		(-10000000)
+
+/*
+** global variables used by the parser
+*/
+YYSTYPE *date_Datepv;			/* top of value stack */
+int *date_Dateps;			/* top of state stack */
+
+int date_Datestate;			/* current state */
+int date_Datetmp;			/* extra var (lasts between blocks) */
+
+int date_Datenerrs;			/* number of errors */
+int date_Dateerrflag;			/* error recovery flag */
+int date_Datechar;			/* current input token number */
+
+
+
+#ifdef YYNMBCHARS
+#define YYLEX()		date_Datecvtok(date_Datelex())
+/*
+** date_Datecvtok - return a token if i is a wchar_t value that exceeds 255.
+**	If i<255, i itself is the token.  If i>255 but the neither 
+**	of the 30th or 31st bit is on, i is already a token.
+*/
+#if defined(__STDC__) || defined(__cplusplus)
+int date_Datecvtok(int i)
+#else
+int date_Datecvtok(i) int i;
+#endif
+{
+	int first = 0;
+	int last = YYNMBCHARS - 1;
+	int mid;
+	wchar_t j;
+
+	if(i&0x60000000){/*Must convert to a token. */
+		if( date_Datembchars[last].character < i ){
+			return i;/*Giving up*/
+		}
+		while ((last>=first)&&(first>=0)) {/*Binary search loop*/
+			mid = (first+last)/2;
+			j = date_Datembchars[mid].character;
+			if( j==i ){/*Found*/ 
+				return date_Datembchars[mid].tvalue;
+			}else if( j<i ){
+				first = mid + 1;
+			}else{
+				last = mid -1;
+			}
+		}
+		/*No entry in the table.*/
+		return i;/* Giving up.*/
+	}else{/* i is already a token. */
+		return i;
+	}
+}
+#else/*!YYNMBCHARS*/
+#define YYLEX()		date_Datelex()
+#endif/*!YYNMBCHARS*/
+
+/*
+** date_Dateparse - return 0 if worked, 1 if syntax error not recovered from
+*/
+#if defined(__STDC__) || defined(__cplusplus)
+int date_Dateparse(void)
+#else
+int date_Dateparse()
+#endif
+{
+	register YYSTYPE *date_Datepvt = 0;	/* top of value stack for $vars */
+
+#if defined(__cplusplus) || defined(lint)
+/*
+	hacks to please C++ and lint - goto's inside
+	switch should never be executed
+*/
+	static int __yaccpar_lint_hack__ = 0;
+	switch (__yaccpar_lint_hack__)
+	{
+		case 1: goto date_Dateerrlab;
+		case 2: goto date_Datenewstate;
+	}
+#endif
+
+	/*
+	** Initialize externals - date_Dateparse may be called more than once
+	*/
+	date_Datepv = &date_Datev[-1];
+	date_Dateps = &date_Dates[-1];
+	date_Datestate = 0;
+	date_Datetmp = 0;
+	date_Datenerrs = 0;
+	date_Dateerrflag = 0;
+	date_Datechar = -1;
+
+#if YYMAXDEPTH <= 0
+	if (date_Datemaxdepth <= 0)
+	{
+		if ((date_Datemaxdepth = YYEXPAND(0)) <= 0)
+		{
+			date_Dateerror("yacc initialization error");
+			YYABORT;
+		}
+	}
+#endif
+
+	{
+		register YYSTYPE *date_Date_pv;	/* top of value stack */
+		register int *date_Date_ps;		/* top of state stack */
+		register int date_Date_state;		/* current state */
+		register int  date_Date_n;		/* internal state number info */
+	goto date_Datestack;	/* moved from 6 lines above to here to please C++ */
+
+		/*
+		** get globals into registers.
+		** branch to here only if YYBACKUP was called.
+		*/
+		date_Date_pv = date_Datepv;
+		date_Date_ps = date_Dateps;
+		date_Date_state = date_Datestate;
+		goto date_Date_newstate;
+
+		/*
+		** get globals into registers.
+		** either we just started, or we just finished a reduction
+		*/
+	date_Datestack:
+		date_Date_pv = date_Datepv;
+		date_Date_ps = date_Dateps;
+		date_Date_state = date_Datestate;
+
+		/*
+		** top of for (;;) loop while no reductions done
+		*/
+	date_Date_stack:
+		/*
+		** put a state and value onto the stacks
+		*/
+#if YYDEBUG
+		/*
+		** if debugging, look up token value in list of value vs.
+		** name pairs.  0 and negative (-1) are special values.
+		** Note: linear search is used since time is not a real
+		** consideration while debugging.
+		*/
+		if ( date_Datedebug )
+		{
+			register int date_Date_i;
+
+			printf( "State %d, token ", date_Date_state );
+			if ( date_Datechar == 0 )
+				printf( "end-of-file\n" );
+			else if ( date_Datechar < 0 )
+				printf( "-none-\n" );
+			else
+			{
+				for ( date_Date_i = 0; date_Datetoks[date_Date_i].t_val >= 0;
+					date_Date_i++ )
+				{
+					if ( date_Datetoks[date_Date_i].t_val == date_Datechar )
+						break;
+				}
+				printf( "%s\n", date_Datetoks[date_Date_i].t_name );
+			}
+		}
+#endif /* YYDEBUG */
+		if ( ++date_Date_ps >= &date_Dates[ date_Datemaxdepth ] )	/* room on stack? */
+		{
+			/*
+			** reallocate and recover.  Note that pointers
+			** have to be reset, or bad things will happen
+			*/
+			long date_Dateps_index = (date_Date_ps - date_Dates);
+			long date_Datepv_index = (date_Date_pv - date_Datev);
+			long date_Datepvt_index = (date_Datepvt - date_Datev);
+			int date_Datenewmax;
+#ifdef YYEXPAND
+			date_Datenewmax = YYEXPAND(date_Datemaxdepth);
+#else
+			date_Datenewmax = 2 * date_Datemaxdepth;	/* double table size */
+			if (date_Datemaxdepth == YYMAXDEPTH)	/* first time growth */
+			{
+				char *newdate_Dates = (char *)YYNEW(int);
+				char *newdate_Datev = (char *)YYNEW(YYSTYPE);
+				if (newdate_Dates != 0 && newdate_Datev != 0)
+				{
+					date_Dates = YYCOPY(newdate_Dates, date_Dates, int);
+					date_Datev = YYCOPY(newdate_Datev, date_Datev, YYSTYPE);
+				}
+				else
+					date_Datenewmax = 0;	/* failed */
+			}
+			else				/* not first time */
+			{
+				date_Dates = YYENLARGE(date_Dates, int);
+				date_Datev = YYENLARGE(date_Datev, YYSTYPE);
+				if (date_Dates == 0 || date_Datev == 0)
+					date_Datenewmax = 0;	/* failed */
+			}
+#endif
+			if (date_Datenewmax <= date_Datemaxdepth)	/* tables not expanded */
+			{
+				date_Dateerror( "yacc stack overflow" );
+				YYABORT;
+			}
+			date_Datemaxdepth = date_Datenewmax;
+
+			date_Date_ps = date_Dates + date_Dateps_index;
+			date_Date_pv = date_Datev + date_Datepv_index;
+			date_Datepvt = date_Datev + date_Datepvt_index;
+		}
+		*date_Date_ps = date_Date_state;
+		*++date_Date_pv = date_Dateval;
+
+		/*
+		** we have a new state - find out what to do
+		*/
+	date_Date_newstate:
+		if ( ( date_Date_n = date_Datepact[ date_Date_state ] ) <= YYFLAG )
+			goto date_Datedefault;		/* simple state */
+#if YYDEBUG
+		/*
+		** if debugging, need to mark whether new token grabbed
+		*/
+		date_Datetmp = date_Datechar < 0;
+#endif
+		if ( ( date_Datechar < 0 ) && ( ( date_Datechar = YYLEX() ) < 0 ) )
+			date_Datechar = 0;		/* reached EOF */
+#if YYDEBUG
+		if ( date_Datedebug && date_Datetmp )
+		{
+			register int date_Date_i;
+
+			printf( "Received token " );
+			if ( date_Datechar == 0 )
+				printf( "end-of-file\n" );
+			else if ( date_Datechar < 0 )
+				printf( "-none-\n" );
+			else
+			{
+				for ( date_Date_i = 0; date_Datetoks[date_Date_i].t_val >= 0;
+					date_Date_i++ )
+				{
+					if ( date_Datetoks[date_Date_i].t_val == date_Datechar )
+						break;
+				}
+				printf( "%s\n", date_Datetoks[date_Date_i].t_name );
+			}
+		}
+#endif /* YYDEBUG */
+		if ( ( ( date_Date_n += date_Datechar ) < 0 ) || ( date_Date_n >= YYLAST ) )
+			goto date_Datedefault;
+		if ( date_Datechk[ date_Date_n = date_Dateact[ date_Date_n ] ] == date_Datechar )	/*valid shift*/
+		{
+			date_Datechar = -1;
+			date_Dateval = date_Datelval;
+			date_Date_state = date_Date_n;
+			if ( date_Dateerrflag > 0 )
+				date_Dateerrflag--;
+			goto date_Date_stack;
+		}
+
+	date_Datedefault:
+		if ( ( date_Date_n = date_Datedef[ date_Date_state ] ) == -2 )
+		{
+#if YYDEBUG
+			date_Datetmp = date_Datechar < 0;
+#endif
+			if ( ( date_Datechar < 0 ) && ( ( date_Datechar = YYLEX() ) < 0 ) )
+				date_Datechar = 0;		/* reached EOF */
+#if YYDEBUG
+			if ( date_Datedebug && date_Datetmp )
+			{
+				register int date_Date_i;
+
+				printf( "Received token " );
+				if ( date_Datechar == 0 )
+					printf( "end-of-file\n" );
+				else if ( date_Datechar < 0 )
+					printf( "-none-\n" );
+				else
+				{
+					for ( date_Date_i = 0;
+						date_Datetoks[date_Date_i].t_val >= 0;
+						date_Date_i++ )
+					{
+						if ( date_Datetoks[date_Date_i].t_val
+							== date_Datechar )
+						{
+							break;
+						}
+					}
+					printf( "%s\n", date_Datetoks[date_Date_i].t_name );
+				}
+			}
+#endif /* YYDEBUG */
+			/*
+			** look through exception table
+			*/
+			{
+				register int *date_Datexi = date_Dateexca;
+
+				while ( ( *date_Datexi != -1 ) ||
+					( date_Datexi[1] != date_Date_state ) )
+				{
+					date_Datexi += 2;
+				}
+				while ( ( *(date_Datexi += 2) >= 0 ) &&
+					( *date_Datexi != date_Datechar ) )
+					;
+				if ( ( date_Date_n = date_Datexi[1] ) < 0 )
+					YYACCEPT;
+			}
+		}
+
+		/*
+		** check for syntax error
+		*/
+		if ( date_Date_n == 0 )	/* have an error */
+		{
+			/* no worry about speed here! */
+			switch ( date_Dateerrflag )
+			{
+			case 0:		/* new error */
+				date_Dateerror( "syntax error" );
+				goto skip_init;
+				/*
+				** get globals into registers.
+				** we have a user generated syntax type error
+				*/
+				date_Date_pv = date_Datepv;
+				date_Date_ps = date_Dateps;
+				date_Date_state = date_Datestate;
+			skip_init:
+				date_Datenerrs++;
+				/* FALLTHRU */
+			case 1:
+			case 2:		/* incompletely recovered error */
+					/* try again... */
+				date_Dateerrflag = 3;
+				/*
+				** find state where "error" is a legal
+				** shift action
+				*/
+				while ( date_Date_ps >= date_Dates )
+				{
+					date_Date_n = date_Datepact[ *date_Date_ps ] + YYERRCODE;
+					if ( date_Date_n >= 0 && date_Date_n < YYLAST &&
+						date_Datechk[date_Dateact[date_Date_n]] == YYERRCODE)					{
+						/*
+						** simulate shift of "error"
+						*/
+						date_Date_state = date_Dateact[ date_Date_n ];
+						goto date_Date_stack;
+					}
+					/*
+					** current state has no shift on
+					** "error", pop stack
+					*/
+#if YYDEBUG
+#	define _POP_ "Error recovery pops state %d, uncovers state %d\n"
+					if ( date_Datedebug )
+						printf( _POP_, *date_Date_ps,
+							date_Date_ps[-1] );
+#	undef _POP_
+#endif
+					date_Date_ps--;
+					date_Date_pv--;
+				}
+				/*
+				** there is no state on stack with "error" as
+				** a valid shift.  give up.
+				*/
+				YYABORT;
+			case 3:		/* no shift yet; eat a token */
+#if YYDEBUG
+				/*
+				** if debugging, look up token in list of
+				** pairs.  0 and negative shouldn't occur,
+				** but since timing doesn't matter when
+				** debugging, it doesn't hurt to leave the
+				** tests here.
+				*/
+				if ( date_Datedebug )
+				{
+					register int date_Date_i;
+
+					printf( "Error recovery discards " );
+					if ( date_Datechar == 0 )
+						printf( "token end-of-file\n" );
+					else if ( date_Datechar < 0 )
+						printf( "token -none-\n" );
+					else
+					{
+						for ( date_Date_i = 0;
+							date_Datetoks[date_Date_i].t_val >= 0;
+							date_Date_i++ )
+						{
+							if ( date_Datetoks[date_Date_i].t_val
+								== date_Datechar )
+							{
+								break;
+							}
+						}
+						printf( "token %s\n",
+							date_Datetoks[date_Date_i].t_name );
+					}
+				}
+#endif /* YYDEBUG */
+				if ( date_Datechar == 0 )	/* reached EOF. quit */
+					YYABORT;
+				date_Datechar = -1;
+				goto date_Date_newstate;
+			}
+		}/* end if ( date_Date_n == 0 ) */
+		/*
+		** reduction by production date_Date_n
+		** put stack tops, etc. so things right after switch
+		*/
+#if YYDEBUG
+		/*
+		** if debugging, print the string that is the user's
+		** specification of the reduction which is just about
+		** to be done.
+		*/
+		if ( date_Datedebug )
+			printf( "Reduce by (%d) \"%s\"\n",
+				date_Date_n, date_Datereds[ date_Date_n ] );
+#endif
+		date_Datetmp = date_Date_n;			/* value to switch over */
+		date_Datepvt = date_Date_pv;			/* $vars top of value stack */
+		/*
+		** Look in goto table for next state
+		** Sorry about using date_Date_state here as temporary
+		** register variable, but why not, if it works...
+		** If date_Dater2[ date_Date_n ] doesn't have the low order bit
+		** set, then there is no action to be done for
+		** this reduction.  So, no saving & unsaving of
+		** registers done.  The only difference between the
+		** code just after the if and the body of the if is
+		** the goto date_Date_stack in the body.  This way the test
+		** can be made before the choice of what to do is needed.
+		*/
+		{
+			/* length of production doubled with extra bit */
+			register int date_Date_len = date_Dater2[ date_Date_n ];
+
+			if ( !( date_Date_len & 01 ) )
+			{
+				date_Date_len >>= 1;
+				date_Dateval = ( date_Date_pv -= date_Date_len )[1];	/* $$ = $1 */
+				date_Date_state = date_Datepgo[ date_Date_n = date_Dater1[ date_Date_n ] ] +
+					*( date_Date_ps -= date_Date_len ) + 1;
+				if ( date_Date_state >= YYLAST ||
+					date_Datechk[ date_Date_state =
+					date_Dateact[ date_Date_state ] ] != -date_Date_n )
+				{
+					date_Date_state = date_Dateact[ date_Datepgo[ date_Date_n ] ];
+				}
+				goto date_Date_stack;
+			}
+			date_Date_len >>= 1;
+			date_Dateval = ( date_Date_pv -= date_Date_len )[1];	/* $$ = $1 */
+			date_Date_state = date_Datepgo[ date_Date_n = date_Dater1[ date_Date_n ] ] +
+				*( date_Date_ps -= date_Date_len ) + 1;
+			if ( date_Date_state >= YYLAST ||
+				date_Datechk[ date_Date_state = date_Dateact[ date_Date_state ] ] != -date_Date_n )
+			{
+				date_Date_state = date_Dateact[ date_Datepgo[ date_Date_n ] ];
+			}
+		}
+					/* save until reenter driver code */
+		date_Datestate = date_Date_state;
+		date_Dateps = date_Date_ps;
+		date_Datepv = date_Date_pv;
+	}
+	/*
+	** code supplied by user is placed in this switch
+	*/
+	switch( date_Datetmp )
+	{
+		
+case 3:{
+            date_DateHaveTime++;
+        } break;
+case 4:{
+            date_DateHaveZone++;
+        } break;
+case 5:{
+            date_DateHaveDate++;
+        } break;
+case 6:{
+            date_DateHaveOrdinalMonth++;
+        } break;
+case 7:{
+            date_DateHaveDay++;
+        } break;
+case 8:{
+            date_DateHaveRel++;
+        } break;
+case 9:{
+	    date_DateHaveTime++;
+	    date_DateHaveDate++;
+	} break;
+case 10:{
+	    date_DateHaveTime++;
+	    date_DateHaveDate++;
+	    date_DateHaveRel++;
+        } break;
+case 12:{
+            date_DateHour = date_Datepvt[-1].Number;
+            date_DateMinutes = 0;
+            date_DateSeconds = 0;
+            date_DateMeridian = date_Datepvt[-0].Meridian;
+        } break;
+case 13:{
+            date_DateHour = date_Datepvt[-3].Number;
+            date_DateMinutes = date_Datepvt[-1].Number;
+            date_DateSeconds = 0;
+            date_DateMeridian = date_Datepvt[-0].Meridian;
+        } break;
+case 14:{
+            date_DateHour = date_Datepvt[-4].Number;
+            date_DateMinutes = date_Datepvt[-2].Number;
+            date_DateMeridian = MER24;
+            date_DateDSTmode = DSToff;
+            date_DateTimezone = (date_Datepvt[-0].Number % 100 + (date_Datepvt[-0].Number / 100) * 60);
+        } break;
+case 15:{
+            date_DateHour = date_Datepvt[-5].Number;
+            date_DateMinutes = date_Datepvt[-3].Number;
+            date_DateSeconds = date_Datepvt[-1].Number;
+            date_DateMeridian = date_Datepvt[-0].Meridian;
+        } break;
+case 16:{
+            date_DateHour = date_Datepvt[-6].Number;
+            date_DateMinutes = date_Datepvt[-4].Number;
+            date_DateSeconds = date_Datepvt[-2].Number;
+            date_DateMeridian = MER24;
+            date_DateDSTmode = DSToff;
+            date_DateTimezone = (date_Datepvt[-0].Number % 100 + (date_Datepvt[-0].Number / 100) * 60);
+        } break;
+case 17:{
+            date_DateTimezone = date_Datepvt[-1].Number;
+            date_DateDSTmode = DSTon;
+        } break;
+case 18:{
+            date_DateTimezone = date_Datepvt[-0].Number;
+            date_DateDSTmode = DSToff;
+        } break;
+case 19:{
+            date_DateTimezone = date_Datepvt[-0].Number;
+            date_DateDSTmode = DSTon;
+        } break;
+case 20:{
+            date_DateDayOrdinal = 1;
+            date_DateDayNumber = date_Datepvt[-0].Number;
+        } break;
+case 21:{
+            date_DateDayOrdinal = 1;
+            date_DateDayNumber = date_Datepvt[-1].Number;
+        } break;
+case 22:{
+            date_DateDayOrdinal = date_Datepvt[-1].Number;
+            date_DateDayNumber = date_Datepvt[-0].Number;
+        } break;
+case 23:{
+            date_DateDayOrdinal = date_Datepvt[-2].Number * date_Datepvt[-1].Number;
+            date_DateDayNumber = date_Datepvt[-0].Number;
+        } break;
+case 24:{
+            date_DateDayOrdinal = 2;
+            date_DateDayNumber = date_Datepvt[-0].Number;
+        } break;
+case 25:{
+            date_DateMonth = date_Datepvt[-2].Number;
+            date_DateDay = date_Datepvt[-0].Number;
+        } break;
+case 26:{
+            date_DateMonth = date_Datepvt[-4].Number;
+            date_DateDay = date_Datepvt[-2].Number;
+            date_DateYear = date_Datepvt[-0].Number;
+        } break;
+case 27:{
+	    date_DateYear = date_Datepvt[-0].Number / 10000;
+	    date_DateMonth = (date_Datepvt[-0].Number % 10000)/100;
+	    date_DateDay = date_Datepvt[-0].Number % 100;
+	} break;
+case 28:{
+	    date_DateDay = date_Datepvt[-4].Number;
+	    date_DateMonth = date_Datepvt[-2].Number;
+	    date_DateYear = date_Datepvt[-0].Number;
+	} break;
+case 29:{
+            date_DateMonth = date_Datepvt[-2].Number;
+            date_DateDay = date_Datepvt[-0].Number;
+            date_DateYear = date_Datepvt[-4].Number;
+        } break;
+case 30:{
+            date_DateMonth = date_Datepvt[-1].Number;
+            date_DateDay = date_Datepvt[-0].Number;
+        } break;
+case 31:{
+            date_DateMonth = date_Datepvt[-3].Number;
+            date_DateDay = date_Datepvt[-2].Number;
+            date_DateYear = date_Datepvt[-0].Number;
+        } break;
+case 32:{
+            date_DateMonth = date_Datepvt[-0].Number;
+            date_DateDay = date_Datepvt[-1].Number;
+        } break;
+case 33:{
+	    date_DateMonth = 1;
+	    date_DateDay = 1;
+	    date_DateYear = EPOCH;
+	} break;
+case 34:{
+            date_DateMonth = date_Datepvt[-1].Number;
+            date_DateDay = date_Datepvt[-2].Number;
+            date_DateYear = date_Datepvt[-0].Number;
+        } break;
+case 35:{
+	    date_DateMonthOrdinal = 1;
+	    date_DateMonth = date_Datepvt[-0].Number;
+	} break;
+case 36:{
+	    date_DateMonthOrdinal = date_Datepvt[-1].Number;
+	    date_DateMonth = date_Datepvt[-0].Number;
+	} break;
+case 37:{
+            if (date_Datepvt[-1].Number != HOUR(- 7)) YYABORT;
+	    date_DateYear = date_Datepvt[-2].Number / 10000;
+	    date_DateMonth = (date_Datepvt[-2].Number % 10000)/100;
+	    date_DateDay = date_Datepvt[-2].Number % 100;
+	    date_DateHour = date_Datepvt[-0].Number / 10000;
+	    date_DateMinutes = (date_Datepvt[-0].Number % 10000)/100;
+	    date_DateSeconds = date_Datepvt[-0].Number % 100;
+        } break;
+case 38:{
+            if (date_Datepvt[-5].Number != HOUR(- 7)) YYABORT;
+	    date_DateYear = date_Datepvt[-6].Number / 10000;
+	    date_DateMonth = (date_Datepvt[-6].Number % 10000)/100;
+	    date_DateDay = date_Datepvt[-6].Number % 100;
+	    date_DateHour = date_Datepvt[-4].Number;
+	    date_DateMinutes = date_Datepvt[-2].Number;
+	    date_DateSeconds = date_Datepvt[-0].Number;
+        } break;
+case 39:{
+	    date_DateYear = date_Datepvt[-1].Number / 10000;
+	    date_DateMonth = (date_Datepvt[-1].Number % 10000)/100;
+	    date_DateDay = date_Datepvt[-1].Number % 100;
+	    date_DateHour = date_Datepvt[-0].Number / 10000;
+	    date_DateMinutes = (date_Datepvt[-0].Number % 10000)/100;
+	    date_DateSeconds = date_Datepvt[-0].Number % 100;
+        } break;
+case 40:{
+            /*
+	     * Offset computed year by -377 so that the returned years will
+	     * be in a range accessible with a 32 bit clock seconds value
+	     */
+            date_DateYear = date_Datepvt[-2].Number/1000 + 2323 - 377;
+            date_DateDay  = 1;
+	    date_DateMonth = 1;
+	    date_DateRelDay += ((date_Datepvt[-2].Number%1000)*(365 + IsLeapYear(date_DateYear)))/1000;
+	    date_DateRelSeconds += date_Datepvt[-0].Number * 144 * 60;
+        } break;
+case 41:{
+	    date_DateRelSeconds *= -1;
+	    date_DateRelMonth *= -1;
+	    date_DateRelDay *= -1;
+	} break;
+case 43:{ *date_DateRelPointer += date_Datepvt[-2].Number * date_Datepvt[-1].Number * date_Datepvt[-0].Number; } break;
+case 44:{ *date_DateRelPointer += date_Datepvt[-1].Number * date_Datepvt[-0].Number; } break;
+case 45:{ *date_DateRelPointer += date_Datepvt[-0].Number; } break;
+case 46:{ *date_DateRelPointer += date_Datepvt[-1].Number * date_Datepvt[-0].Number; } break;
+case 47:{ *date_DateRelPointer += date_Datepvt[-0].Number; } break;
+case 48:{ date_Dateval.Number = -1; } break;
+case 49:{ date_Dateval.Number =  1; } break;
+case 50:{ date_Dateval.Number = date_Datepvt[-0].Number; date_DateRelPointer = &date_DateRelSeconds; } break;
+case 51:{ date_Dateval.Number = date_Datepvt[-0].Number; date_DateRelPointer = &date_DateRelDay; } break;
+case 52:{ date_Dateval.Number = date_Datepvt[-0].Number; date_DateRelPointer = &date_DateRelMonth; } break;
+case 53:{
+	if (date_DateHaveTime && date_DateHaveDate && !date_DateHaveRel) {
+	    date_DateYear = date_Datepvt[-0].Number;
+	} else {
+	    date_DateHaveTime++;
+	    if (date_Datepvt[-0].Number < 100) {
+		date_DateHour = date_Datepvt[-0].Number;
+		date_DateMinutes = 0;
+	    } else {
+		date_DateHour = date_Datepvt[-0].Number / 100;
+		date_DateMinutes = date_Datepvt[-0].Number % 100;
+	    }
+	    date_DateSeconds = 0;
+	    date_DateMeridian = MER24;
+	}
+    } break;
+case 54:{
+            date_Dateval.Meridian = MER24;
+        } break;
+case 55:{
+            date_Dateval.Meridian = date_Datepvt[-0].Meridian;
+        } break;
+	}
+	goto date_Datestack;		/* reset registers in driver code */
+}
+
Index: eggdrop1.9/lib/eggdrop/date.h
diff -u /dev/null eggdrop1.9/lib/eggdrop/date.h:1.1
--- /dev/null	Sun Oct 17 00:14:17 2004
+++ eggdrop1.9/lib/eggdrop/date.h	Sun Oct 17 00:14:06 2004
@@ -0,0 +1,9 @@
+#ifndef _EGG_DATE_H_
+#define _EGG_DATE_H_
+
+#define EGG_TIMEZONE_LOOKUP	-100000
+
+int date_timezone(time_t time);
+int date_scan(char *timestr, time_t *now, int zone, time_t *timeptr);
+
+#endif
Index: eggdrop1.9/lib/eggdrop/dns.c
diff -u eggdrop1.9/lib/eggdrop/dns.c:1.5 eggdrop1.9/lib/eggdrop/dns.c:1.6
--- eggdrop1.9/lib/eggdrop/dns.c:1.5	Fri Jun 25 12:44:03 2004
+++ eggdrop1.9/lib/eggdrop/dns.c	Sun Oct 17 00:14:06 2004
@@ -18,22 +18,13 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: dns.c,v 1.5 2004/06/25 17:44:03 darko Exp $";
+static const char rcsid[] = "$Id: dns.c,v 1.6 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <sys/types.h>
+#include <eggdrop/eggdrop.h>
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <arpa/inet.h>
-#include <eggdrop/eggdrop.h>
 
 typedef struct {
 	char **list;
Index: eggdrop1.9/lib/eggdrop/eggdrop.c
diff -u eggdrop1.9/lib/eggdrop/eggdrop.c:1.23 eggdrop1.9/lib/eggdrop/eggdrop.c:1.24
--- eggdrop1.9/lib/eggdrop/eggdrop.c:1.23	Wed Sep 29 10:38:39 2004
+++ eggdrop1.9/lib/eggdrop/eggdrop.c	Sun Oct 17 00:14:06 2004
@@ -18,12 +18,10 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: eggdrop.c,v 1.23 2004/09/29 15:38:39 stdarg Exp $";
+static const char rcsid[] = "$Id: eggdrop.c,v 1.24 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdlib.h>
-#include <string.h>
-#include "eggdrop.h"
+#include <eggdrop/eggdrop.h>
 
 /* Event bind table. */
 static bind_table_t *BT_event = NULL;
Index: eggdrop1.9/lib/eggdrop/eggdrop.h
diff -u eggdrop1.9/lib/eggdrop/eggdrop.h:1.45 eggdrop1.9/lib/eggdrop/eggdrop.h:1.46
--- eggdrop1.9/lib/eggdrop/eggdrop.h:1.45	Fri Oct  1 10:31:18 2004
+++ eggdrop1.9/lib/eggdrop/eggdrop.h	Sun Oct 17 00:14:06 2004
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: eggdrop.h,v 1.45 2004/10/01 15:31:18 stdarg Exp $
+ * $Id: eggdrop.h,v 1.46 2004/10/17 05:14:06 stdarg Exp $
  */
 
 #ifndef _EGG_EGGDROP_H_
@@ -28,6 +28,7 @@
 
 #include <eggdrop/common.h>
 #include <eggdrop/xml.h>
+#include <eggdrop/date.h>
 #include <eggdrop/flags.h>
 #include <eggdrop/ircmasks.h>
 #include <eggdrop/hash_table.h>
@@ -53,6 +54,8 @@
 #include <eggdrop/memutil.h>
 #include <eggdrop/socket.h>
 #include <eggdrop/partyline.h>
+#include <eggdrop/partychan.h>
+#include <eggdrop/partymember.h>
 #include <eggdrop/help.h>
 #include <eggdrop/sockbuf.h>
 #include <eggdrop/script.h>
Index: eggdrop1.9/lib/eggdrop/fileutil.c
diff -u eggdrop1.9/lib/eggdrop/fileutil.c:1.7 eggdrop1.9/lib/eggdrop/fileutil.c:1.8
--- eggdrop1.9/lib/eggdrop/fileutil.c:1.7	Wed Dec 17 01:39:14 2003
+++ eggdrop1.9/lib/eggdrop/fileutil.c	Sun Oct 17 00:14:06 2004
@@ -18,20 +18,14 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: fileutil.c,v 1.7 2003/12/17 07:39:14 wcc Exp $";
+static const char rcsid[] = "$Id: fileutil.c,v 1.8 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <eggdrop/common.h>
-#include <stdio.h>
+#include <eggdrop/eggdrop.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include "stat.h"
-#include "fileutil.h"
 
 /* Copy a file from one place to another (possibly erasing old copy).
  * 0 - OK
Index: eggdrop1.9/lib/eggdrop/garbage.c
diff -u eggdrop1.9/lib/eggdrop/garbage.c:1.4 eggdrop1.9/lib/eggdrop/garbage.c:1.5
--- eggdrop1.9/lib/eggdrop/garbage.c:1.4	Sun Sep 26 04:42:09 2004
+++ eggdrop1.9/lib/eggdrop/garbage.c	Sun Oct 17 00:14:06 2004
@@ -18,11 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: garbage.c,v 1.4 2004/09/26 09:42:09 stdarg Exp $";
+static const char rcsid[] = "$Id: garbage.c,v 1.5 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdlib.h>
-
 #include <eggdrop/eggdrop.h>
 
 typedef struct garbage_list {
Index: eggdrop1.9/lib/eggdrop/hash_table.c
diff -u eggdrop1.9/lib/eggdrop/hash_table.c:1.14 eggdrop1.9/lib/eggdrop/hash_table.c:1.15
--- eggdrop1.9/lib/eggdrop/hash_table.c:1.14	Mon Oct  4 10:48:29 2004
+++ eggdrop1.9/lib/eggdrop/hash_table.c	Sun Oct 17 00:14:06 2004
@@ -18,13 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: hash_table.c,v 1.14 2004/10/04 15:48:29 stdarg Exp $";
+static const char rcsid[] = "$Id: hash_table.c,v 1.15 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
 #include <eggdrop/eggdrop.h>
 
 static unsigned int my_string_hash(const void *key);
Index: eggdrop1.9/lib/eggdrop/help.c
diff -u eggdrop1.9/lib/eggdrop/help.c:1.19 eggdrop1.9/lib/eggdrop/help.c:1.20
--- eggdrop1.9/lib/eggdrop/help.c:1.19	Mon Oct  4 10:48:29 2004
+++ eggdrop1.9/lib/eggdrop/help.c	Sun Oct 17 00:14:06 2004
@@ -18,12 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: help.c,v 1.19 2004/10/04 15:48:29 stdarg Exp $";
+static const char rcsid[] = "$Id: help.c,v 1.20 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <eggdrop/eggdrop.h>
 
 static help_file_t **help_files = NULL;
Index: eggdrop1.9/lib/eggdrop/ident.c
diff -u eggdrop1.9/lib/eggdrop/ident.c:1.2 eggdrop1.9/lib/eggdrop/ident.c:1.3
--- eggdrop1.9/lib/eggdrop/ident.c:1.2	Tue Jun 29 16:28:16 2004
+++ eggdrop1.9/lib/eggdrop/ident.c	Sun Oct 17 00:14:06 2004
@@ -18,11 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: ident.c,v 1.2 2004/06/29 21:28:16 stdarg Exp $";
-#endif
-
-#if HAVE_CONFIG_H
-#  include <config.h>
+static const char rcsid[] = "$Id: ident.c,v 1.3 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
 #include <stdio.h>
Index: eggdrop1.9/lib/eggdrop/ircmasks.c
diff -u eggdrop1.9/lib/eggdrop/ircmasks.c:1.8 eggdrop1.9/lib/eggdrop/ircmasks.c:1.9
--- eggdrop1.9/lib/eggdrop/ircmasks.c:1.8	Tue Jun 22 17:00:26 2004
+++ eggdrop1.9/lib/eggdrop/ircmasks.c	Sun Oct 17 00:14:06 2004
@@ -18,15 +18,10 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: ircmasks.c,v 1.8 2004/06/22 22:00:26 wingman Exp $";
+static const char rcsid[] = "$Id: ircmasks.c,v 1.9 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <string.h>				/* strlen		*/
-#include <stdlib.h>				/* free			*/
-
-#include <eggdrop/logging.h>			/* putlog		*/
-#include <eggdrop/match.h>			/* wild_match		*/
-#include <eggdrop/ircmasks.h>			/* ircmask_t		*/
+#include <eggdrop/eggdrop.h>
 
 int ircmask_list_clear(ircmask_list_t *list)
 {
Index: eggdrop1.9/lib/eggdrop/ircparse.c
diff -u eggdrop1.9/lib/eggdrop/ircparse.c:1.3 eggdrop1.9/lib/eggdrop/ircparse.c:1.4
--- eggdrop1.9/lib/eggdrop/ircparse.c:1.3	Fri Jun 25 12:44:03 2004
+++ eggdrop1.9/lib/eggdrop/ircparse.c	Sun Oct 17 00:14:06 2004
@@ -18,12 +18,10 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: ircparse.c,v 1.3 2004/06/25 17:44:03 darko Exp $";
+static const char rcsid[] = "$Id: ircparse.c,v 1.4 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdlib.h>
-#include <string.h>
-#include "ircparse.h"
+#include <eggdrop/eggdrop.h>
 
 /* Take care of array manipulation in adding an argument. */
 static void add_arg(irc_msg_t *msg, char *text)
Index: eggdrop1.9/lib/eggdrop/linemode.c
diff -u eggdrop1.9/lib/eggdrop/linemode.c:1.6 eggdrop1.9/lib/eggdrop/linemode.c:1.7
--- eggdrop1.9/lib/eggdrop/linemode.c:1.6	Fri Jun 25 12:44:03 2004
+++ eggdrop1.9/lib/eggdrop/linemode.c	Sun Oct 17 00:14:06 2004
@@ -18,14 +18,11 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: linemode.c,v 1.6 2004/06/25 17:44:03 darko Exp $";
+static const char rcsid[] = "$Id: linemode.c,v 1.7 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 #include <eggdrop/eggdrop.h>
+#include <unistd.h>
 
 #define LINEMODE_LEVEL SOCKBUF_LEVEL_TEXT_BUFFER
 
Index: eggdrop1.9/lib/eggdrop/logging.c
diff -u eggdrop1.9/lib/eggdrop/logging.c:1.2 eggdrop1.9/lib/eggdrop/logging.c:1.3
--- eggdrop1.9/lib/eggdrop/logging.c:1.2	Tue Jun 22 18:20:23 2004
+++ eggdrop1.9/lib/eggdrop/logging.c	Sun Oct 17 00:14:06 2004
@@ -18,11 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: logging.c,v 1.2 2004/06/22 23:20:23 wingman Exp $";
+static const char rcsid[] = "$Id: logging.c,v 1.3 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdlib.h>
-#include <stdarg.h>
 #include <eggdrop/eggdrop.h>
 
 static bind_table_t *BT_log = NULL;
Index: eggdrop1.9/lib/eggdrop/match.c
diff -u eggdrop1.9/lib/eggdrop/match.c:1.5 eggdrop1.9/lib/eggdrop/match.c:1.6
--- eggdrop1.9/lib/eggdrop/match.c:1.5	Tue Jun 22 15:12:37 2004
+++ eggdrop1.9/lib/eggdrop/match.c	Sun Oct 17 00:14:06 2004
@@ -18,11 +18,10 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: match.c,v 1.5 2004/06/22 20:12:37 wingman Exp $";
+static const char rcsid[] = "$Id: match.c,v 1.6 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <ctype.h>
-#include "match.h"
+#include <eggdrop/eggdrop.h>
 
 #define irctoupper toupper
 
Index: eggdrop1.9/lib/eggdrop/md5.c
diff -u eggdrop1.9/lib/eggdrop/md5.c:1.6 eggdrop1.9/lib/eggdrop/md5.c:1.7
--- eggdrop1.9/lib/eggdrop/md5.c:1.6	Fri Jun 25 12:44:03 2004
+++ eggdrop1.9/lib/eggdrop/md5.c	Sun Oct 17 00:14:06 2004
@@ -16,12 +16,10 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: md5.c,v 1.6 2004/06/25 17:44:03 darko Exp $";
+static const char rcsid[] = "$Id: md5.c,v 1.7 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <string.h>
-#include <stdio.h>
-#include "md5.h"
+#include <eggdrop/eggdrop.h>
 
 /*
  * The basic MD5 functions.
Index: eggdrop1.9/lib/eggdrop/memory.c
diff -u eggdrop1.9/lib/eggdrop/memory.c:1.8 eggdrop1.9/lib/eggdrop/memory.c:removed
--- eggdrop1.9/lib/eggdrop/memory.c:1.8	Sun Jul 11 08:54:46 2004
+++ eggdrop1.9/lib/eggdrop/memory.c	Sun Oct 17 00:14:17 2004
@@ -1,320 +0,0 @@
-/* memory.c: memory tracking functions 
- *
- * Copyright (C) 2002, 2003, 2004 Eggheads Development Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-#ifndef lint
-static const char rcsid[] = "$Id: memory.c,v 1.8 2004/07/11 13:54:46 darko Exp $";
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <string.h>
-
-#define _EGG_MEMORY_H /* don't include memory.h */
-#include <eggdrop/eggdrop.h>
-
-#define MEM_DEBUG_NONE               (1 << 0)
-#define MEM_DEBUG_PRINT_EACH_CALL    (1 << 1)
-#define MEM_DEBUG_PRINT_ERRORS       (1 << 2)
-
-typedef struct {
-	void *ptr;
-	size_t size;
-	const char *file;
-	const char *func;
-	int line;
-} mem_block_t;
-
-struct {
-	int length;
-	size_t size;
-	mem_block_t *blocks;
-} mem = { 0, 0, NULL };
-
-static int options = MEM_DEBUG_NONE;
-
-static int mem_dbg_trace_alloc(void *ptr, size_t size, const char *file, int line, const char *func);
-static int mem_dbg_trace_realloc(void *newptr, void *oldptr, size_t size, const char *file, int line, const char *func);
-static int mem_dbg_trace_free(void *ptr, const char *file, int line, const char *func);
-
-void mem_dbg_set_options(int opts)
-{
-	options = opts;
-}
-
-void *mem_dbg_calloc(size_t nmemb, size_t size, const char *file, int line, const char *func)
-{
-	void *ptr;
-
-	/* invalid size */
-	if (size <= 0 || nmemb <= 0) {
-		if (options & MEM_DEBUG_PRINT_ERRORS)
-			fprintf(stderr, "*** Failed calloc call at %s in line %i (%s): negative (%i) size or no (%i) requested.\n",
-					file, line, func, size, nmemb);
-		return NULL;
-	}
-
-	ptr = calloc(nmemb, size);
-
-	if (!mem_dbg_trace_alloc(ptr, (size * nmemb), file, line, func))
-		/*return NULL*/;
-
-	/* failed to allocate bytes */
-	if (ptr == NULL) {
-		if (options & MEM_DEBUG_PRINT_ERRORS)
-			fprintf(stderr, "*** Failed calloc call at %s in line %i (%s): NULL returned.\n",
-					file, line, func);
-		return NULL;
-	} 
-
-	return ptr;
-}
-
-void *mem_dbg_alloc(size_t size, const char *file, int line, const char *func)
-{
-	void *ptr;
-
-	/* invalid size */
-	if (size <= 0) {
-		if (options & MEM_DEBUG_PRINT_ERRORS)
-			fprintf(stderr, "*** Failed malloc call at %s in line %i (%s): negative (%i) size requested.\n",
-					file, line, func, size);
-		return NULL;
-	}
-
-	ptr = malloc(size);
-
-	if (!mem_dbg_trace_alloc(ptr, size, file, line, func))
-		/*return NULL*/;
-		
-	/* failed to allocate bytes */
-	if (ptr == NULL) {
-		if (options & MEM_DEBUG_PRINT_ERRORS)
-			fprintf(stderr, "*** Failed malloc call at %s in line %i (%s): NULL returned.\n",
-					file, line, func);
-		return NULL;
-	}	
-
-	return ptr;
-}
-
-char *mem_dbg_strdup(const char *str, const char *file, int line, const char *func)
-{
-	size_t size;
-	void *ptr;
-
-	if (file == NULL)
-		return NULL;
-
-	size = strlen(str) + 1;
-
-	ptr = mem_dbg_alloc(size, file, line, func);
-	if (ptr == NULL)
-		return NULL;
-	memcpy(ptr, str, size);
-	return ptr;
-}
-
-void mem_dbg_free(void *ptr, const char *file, int line, const char *func)
-{
-	/* There are rumors that free(NULL) is invalid on some OS, but we
-	 * allow it */
-	if (ptr == NULL)
-		return;
-
-	if (!mem_dbg_trace_free(ptr, file, line, func))
-		/*return*/;
-
-	free(ptr);
-}
-
-void *mem_dbg_realloc(void *ptr, size_t size, const char *file, int line, const char *func)
-{
-	void *newptr;
-	
-	/* if ptr is NULL realloc is equivalent to malloc */
-	if (ptr == NULL)
-		return mem_dbg_alloc(size, file, line, func);
-									
-	/* if size is 0 realloc is equivalent to free */
-	if (size == 0) {
-		mem_dbg_free(ptr, file, line, func);
-		return NULL;
-	}
-
-	/* invalid size */
-	if (size < 0) {
-		if (options & MEM_DEBUG_PRINT_ERRORS)
-			fprintf(stderr, "*** Failed realloc call at %s in line %i (%s): negative (%i) size requested.\n",
-					file, line, func, size);
-		return NULL;
-	}
-
-	newptr = realloc(ptr, size);
-
-	if (!mem_dbg_trace_realloc(newptr, ptr, size, file, line, func))
-		/*return NULL*/;
-
-	/* failed to allocate bytes */
-	if (newptr == NULL) {
-		if (options & MEM_DEBUG_PRINT_ERRORS)
-			fprintf(stderr, "*** Failed realloc call at %s in line %i (%s): NULL returned.\n",
-					file, line, func);
-		return NULL;
-	}
-
-	return newptr;
-}
-
-static int mem_dbg_trace_alloc(void *ptr, size_t size, const char *file, int line, const char *func)
-{
-	mem_block_t *block;
-	
-	/* resize it if necessary */
-	if ((mem.length + 1) >= mem.size) {		
-		mem.blocks = realloc(mem.blocks, sizeof(mem_block_t) * (mem.length + 25));
-		if (mem.blocks == NULL)		
-			return 0;
-		mem.size += 25;			
-	}
-	
-	block = &mem.blocks[mem.length++];
-	
-	if (options & MEM_DEBUG_PRINT_EACH_CALL)
-		fprintf(stderr, "*** N %s:%i@%s: %i %p\n", file, line, func, size, ptr);
-
-	block->ptr = ptr;
-	block->size = size;
-	block->file = file;
-	block->line = line;
-	block->func = func;
-	
-	return 1;
-}
-
-static int mem_dbg_trace_realloc(void *newptr, void *oldptr, size_t size, const char *file, int line, const char *func)
-{
-	int i;
-	mem_block_t *block = NULL;
-	
-	for (i = 0; i < mem.length; i++) {
-		block = &mem.blocks[i];
-		if (block->ptr == oldptr)
-			break;
-		block = NULL;		
-	}
-	
-	if (block == NULL) {
-		if (options & MEM_DEBUG_PRINT_ERRORS)
-			fprintf(stderr, "*** Invalid realloc call at %s in line %i (%s): Unknown pointer passed (%p).\n",
-				file, line, func, oldptr);
-		return 0;
-	}
-	
-	if (options & MEM_DEBUG_PRINT_EACH_CALL)
-		fprintf(stderr, "*** U %s:%i@%s: %i %p %p\n", file, line, func, size, newptr, oldptr);
-
-	/* update block */
-	block->ptr = newptr;
-	block->size = size;
-	block->file = file;
-	block->line = line;
-	block->func = func;
-	
-	return 1;
-}
-
-static int mem_dbg_trace_free(void *ptr, const char *file, int line, const char *func)
-{
-	int i;
-	mem_block_t *block = NULL;
-	
-	for (i = 0; i < mem.length; i++) {
-		block = &mem.blocks[i];
-		if (block->ptr == ptr)
-			break;
-		block = NULL;		
-	}
-	
-	if (block == NULL) {
-		if (options & MEM_DEBUG_PRINT_ERRORS)
-			fprintf(stderr, "Invalid free call at %s in line %i (%s): Unknown pointer passed (%p).\n",
-					file, line, func, ptr);
-		return 0;
-	}
-	
-	if (options & MEM_DEBUG_PRINT_EACH_CALL)
-		fprintf(stderr, "*** F %s:%i@%s: %i %p\n", file, line, func, block->size, ptr);
-
-	/* overwrite with last entry, we don't care about ordered array */
-	mem.blocks[i] = mem.blocks[--mem.length];
-	
-	/* shrink if necessary */
-	if ((mem.size - mem.length) > 25) {		
-		mem.blocks = realloc(mem.blocks, sizeof(mem_block_t) * mem.length);
-		if (mem.blocks == NULL)		
-			return 0;
-		mem.size = mem.length;
-	}
-		
-	return 1;
-}
-
-void mem_dbg_stats()
-{
-	int i;
-	size_t size;
-	char *data;
-	mem_block_t *block;
-	FILE *fd;
-	size = 0;
-
-	fd = fopen("memory.log", "w");
-	if (fd == NULL)
-		fd = stderr;
-
-	fprintf(fd, "%-16s %-4s %-25s %-5s %-9s %s\n", "FILE", "LINE", "FUNC", "SIZE", "ADDR", "DATA");
-	for (i = 0; i < mem.length; i++) {
-		block = &mem.blocks[i];
-		
-		data = NULL;
-		if (0 == strcmp(block->func, "read_name")
-			|| 0 == strcmp(block->func, "read_text")
-			|| 0 == strcmp(block->func, "xml_node_set_str")
-			|| 0 == strcmp(block->func, "xml_node_set_int")
-			|| 0 == strcmp(block->func, "str_redup")) {
-			data = block->ptr;
-		} else if (0 == strcmp(block->func, "bind_table_add") && block->line == 82) {
-			data = ((bind_table_t *)block->ptr)->name;
-		} else if (0 == strcmp(block->func, "xml_node_new")) {
-			data = ((xml_node_t *)block->ptr)->name;
-		}
-
-		fprintf(fd, "%-16s %4i %-25s %5i %p %s\n", block->file, block->line, block->func, block->size, block->ptr, data);
-
-		size += block->size;
-	}
-
-	fprintf(fd, "---\n");
-	fprintf(fd, "%i blocks allocated.\n", mem.length);
-	fprintf(fd, "%i bytes allocated.\n", size);
-
-	if (fd != stderr)
-		fclose(fd);
-}
Index: eggdrop1.9/lib/eggdrop/memory.h
diff -u eggdrop1.9/lib/eggdrop/memory.h:1.3 eggdrop1.9/lib/eggdrop/memory.h:removed
--- eggdrop1.9/lib/eggdrop/memory.h:1.3	Sun Sep 26 04:42:09 2004
+++ eggdrop1.9/lib/eggdrop/memory.h	Sun Oct 17 00:14:17 2004
@@ -1,74 +0,0 @@
-/* memory.h: header for memory.c
- *
- * Copyright (C) 2002, 2003, 2004 Eggheads Development Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- * $Id: memory.h,v 1.3 2004/09/26 09:42:09 stdarg Exp $
- */
-#ifndef _EGG_MEMORY_H
-#define _EGG_MEMORY_H
-
-#include <stdlib.h>			/* size_t	*/
-
-#define MEM_DEBUG_NONE			(1 << 0)
-#define MEM_DEBUG_PRINT_EACH_CALL	(1 << 1)
-#define MEM_DEBUG_PRINT_ERRORS		(1 << 2)
-
-#if 0
-
-/* calloc */
-#	ifdef calloc
-#		undef calloc
-#	endif
-#	define calloc(nmemb, size) mem_dbg_calloc(nmemb, size, __FILE__, __LINE__, __FUNCTION__)
-
-/* malloc */
-#	ifdef malloc
-#		undef malloc
-#	endif
-#	define malloc(size) mem_dbg_alloc(size, __FILE__, __LINE__, __FUNCTION__)
-
-/* realloc */
-#	ifdef realloc
-#		undef realloc
-#	endif
-#	define realloc(ptr, size) mem_dbg_realloc(ptr, size, __FILE__, __LINE__, __FUNCTION__)
-
-/* free */
-#	ifdef free
-#		undef free
-#	endif
-#	define free(ptr) mem_dbg_free(ptr, __FILE__, __LINE__, __FUNCTION__)
-
-/* strdup */
-#	ifdef strdup
-#		undef strdup
-#	endif
-#	define strdup(ptr) mem_dbg_strdup(ptr, __FILE__, __LINE__, __FUNCTION__)
-
-#endif
-
-char *mem_dbg_strdup(const char *str, const char *file, int line, const char *func);
-void *mem_dbg_calloc(size_t nmemb, size_t size,  const char *file, int line, const char *func);
-void *mem_dbg_alloc(size_t size, const char *file, int line, const char *func);
-void *mem_dbg_realloc(void *ptr, size_t size, const char *file, int line, const char *func);
-void mem_dbg_free(void *ptr, const char *file, int line, const char *func);
-
-void mem_dbg_set_options(int options);
-void mem_dbg_stats();
-
-#endif /* _EGG_MEMORY_H */
-
Index: eggdrop1.9/lib/eggdrop/memutil.c
diff -u eggdrop1.9/lib/eggdrop/memutil.c:1.19 eggdrop1.9/lib/eggdrop/memutil.c:1.20
--- eggdrop1.9/lib/eggdrop/memutil.c:1.19	Sun Sep 26 04:42:09 2004
+++ eggdrop1.9/lib/eggdrop/memutil.c	Sun Oct 17 00:14:06 2004
@@ -19,15 +19,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: memutil.c,v 1.19 2004/09/26 09:42:09 stdarg Exp $";
+static const char rcsid[] = "$Id: memutil.c,v 1.20 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-
 #include <eggdrop/eggdrop.h>
 
 void str_redup(char **str, const char *newstr)
Index: eggdrop1.9/lib/eggdrop/memutil.h
diff -u eggdrop1.9/lib/eggdrop/memutil.h:1.17 eggdrop1.9/lib/eggdrop/memutil.h:1.18
--- eggdrop1.9/lib/eggdrop/memutil.h:1.17	Mon Jun 28 12:36:34 2004
+++ eggdrop1.9/lib/eggdrop/memutil.h	Sun Oct 17 00:14:06 2004
@@ -16,32 +16,12 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: memutil.h,v 1.17 2004/06/28 17:36:34 wingman Exp $
+ * $Id: memutil.h,v 1.18 2004/10/17 05:14:06 stdarg Exp $
  */
 
 #ifndef _EGG_MEMUTIL_H_
 #define _EGG_MEMUTIL_H_
 
-#include <stdarg.h>				/* va_list			*/
-
-#define free_null(ptr)							\
-	if (ptr) {							\
-		free(ptr);						\
-		ptr = NULL;						\
-	}
-
-/* Copy entry to target -- Uses dynamic memory allocation, which means you'll
- * eventually have to free the memory again. 'target' will be overwritten. */
-#define realloc_strcpy(target, entry)						\
-	do {									\
-		if (entry) {							\
-			(target) = realloc((target), strlen(entry) + 1);	\
-			strcpy((target), (entry));				\
-		}								\
-		else								\
-		free_null(target);						\
-	} while (0)
-
 extern void str_redup(char **str, const char *newstr);
 extern char *egg_mprintf(const char *format, ...);
 extern char *egg_msprintf(char *buf, int len, int *final_len, const char *format, ...);
Index: eggdrop1.9/lib/eggdrop/module.c
diff -u eggdrop1.9/lib/eggdrop/module.c:1.5 eggdrop1.9/lib/eggdrop/module.c:1.6
--- eggdrop1.9/lib/eggdrop/module.c:1.5	Sun Sep 26 04:42:09 2004
+++ eggdrop1.9/lib/eggdrop/module.c	Sun Oct 17 00:14:06 2004
@@ -18,15 +18,12 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: module.c,v 1.5 2004/09/26 09:42:09 stdarg Exp $";
+static const char rcsid[] = "$Id: module.c,v 1.6 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
+#include <eggdrop/eggdrop.h>
 #include <ltdl.h>
 #include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <eggdrop/eggdrop.h>
 
 typedef struct module_list {
 	struct module_list *next;
Index: eggdrop1.9/lib/eggdrop/net.c
diff -u eggdrop1.9/lib/eggdrop/net.c:1.4 eggdrop1.9/lib/eggdrop/net.c:1.5
--- eggdrop1.9/lib/eggdrop/net.c:1.4	Sat Oct  9 23:55:11 2004
+++ eggdrop1.9/lib/eggdrop/net.c	Sun Oct 17 00:14:06 2004
@@ -18,16 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: net.c,v 1.4 2004/10/10 04:55:11 stdarg Exp $";
+static const char rcsid[] = "$Id: net.c,v 1.5 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <eggdrop/eggdrop.h>
 
 #define EGGNET_LEVEL (SOCKBUF_LEVEL_INTERNAL+1)
Index: eggdrop1.9/lib/eggdrop/owner.c
diff -u eggdrop1.9/lib/eggdrop/owner.c:1.1 eggdrop1.9/lib/eggdrop/owner.c:1.2
--- eggdrop1.9/lib/eggdrop/owner.c:1.1	Mon Jun 21 15:35:11 2004
+++ eggdrop1.9/lib/eggdrop/owner.c	Sun Oct 17 00:14:06 2004
@@ -18,11 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: owner.c,v 1.1 2004/06/21 20:35:11 wingman Exp $";
+static const char rcsid[] = "$Id: owner.c,v 1.2 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <ctype.h>
-#include <string.h>
 #include <eggdrop/eggdrop.h>
 
 static char **owner = NULL;
Index: eggdrop1.9/lib/eggdrop/partychan.c
diff -u eggdrop1.9/lib/eggdrop/partychan.c:1.17 eggdrop1.9/lib/eggdrop/partychan.c:1.18
--- eggdrop1.9/lib/eggdrop/partychan.c:1.17	Wed Jun 23 15:19:45 2004
+++ eggdrop1.9/lib/eggdrop/partychan.c	Sun Oct 17 00:14:06 2004
@@ -18,12 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: partychan.c,v 1.17 2004/06/23 20:19:45 wingman Exp $";
+static const char rcsid[] = "$Id: partychan.c,v 1.18 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
 #include <eggdrop/eggdrop.h>
 
 /* When does cid wrap around? This lets cids get up to 99999. */
@@ -119,20 +116,21 @@
 	return(chan);
 }
 
-void partychan_delete(partychan_t *chan)
-{
-	if (chan->name) free(chan->name);
-	free(chan);
-}
-
 static int partychan_cleanup(partychan_t *chan)
 {
 	int i;
 	int dirty = 0;
 
+	if (chan->flags & PARTY_DELETED) {
+		free(chan->name);
+		free(chan->members);
+		free(chan);
+		return(0);
+	}
+
 	for (i = 0; i < chan->nmembers; i++) {
 		if (chan->members[i].flags & PARTY_DELETED) {
-			memcpy(chan->members+i, chan->members+i+1, sizeof(*chan->members) * (chan->nmembers-i-1));
+			memmove(chan->members+i, chan->members+i+1, sizeof(*chan->members) * (chan->nmembers-i-1));
 			chan->nmembers--;
 			dirty++;
 			i--;
@@ -143,6 +141,13 @@
 	return(0);
 }
 
+void partychan_delete(partychan_t *chan)
+{
+	chan->flags |= PARTY_DELETED;
+	hash_table_remove(cid_ht, (void *)chan->cid, NULL);
+	garbage_add((garbage_proc_t)partychan_cleanup, chan, GARBAGE_ONCE);
+}
+
 partychan_t *partychan_lookup_cid(int cid)
 {
 	partychan_t *chan = NULL;
Index: eggdrop1.9/lib/eggdrop/partychan.h
diff -u eggdrop1.9/lib/eggdrop/partychan.h:1.1 eggdrop1.9/lib/eggdrop/partychan.h:1.2
--- eggdrop1.9/lib/eggdrop/partychan.h:1.1	Wed Jun 23 15:19:45 2004
+++ eggdrop1.9/lib/eggdrop/partychan.h	Sun Oct 17 00:14:06 2004
@@ -16,14 +16,12 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: partychan.h,v 1.1 2004/06/23 20:19:45 wingman Exp $
+ * $Id: partychan.h,v 1.2 2004/10/17 05:14:06 stdarg Exp $
  */
 
 #ifndef _EGG_PARTYCHAN_H
 #define _EGG_PARTYCHAN_H
 
-#include <eggdrop/partychan.h>
-
 struct partychan_member {
         partymember_t *p;
         int flags;
Index: eggdrop1.9/lib/eggdrop/partyline.c
diff -u eggdrop1.9/lib/eggdrop/partyline.c:1.23 eggdrop1.9/lib/eggdrop/partyline.c:1.24
--- eggdrop1.9/lib/eggdrop/partyline.c:1.23	Tue Jun 22 15:12:37 2004
+++ eggdrop1.9/lib/eggdrop/partyline.c	Sun Oct 17 00:14:06 2004
@@ -18,13 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: partyline.c,v 1.23 2004/06/22 20:12:37 wingman Exp $";
+static const char rcsid[] = "$Id: partyline.c,v 1.24 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <ctype.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
 #include <eggdrop/eggdrop.h>
 
 static char *partyline_command_chars = NULL;
Index: eggdrop1.9/lib/eggdrop/partyline.h
diff -u eggdrop1.9/lib/eggdrop/partyline.h:1.22 eggdrop1.9/lib/eggdrop/partyline.h:1.23
--- eggdrop1.9/lib/eggdrop/partyline.h:1.22	Mon Oct  4 11:05:32 2004
+++ eggdrop1.9/lib/eggdrop/partyline.h	Sun Oct 17 00:14:06 2004
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: partyline.h,v 1.22 2004/10/04 16:05:32 stdarg Exp $
+ * $Id: partyline.h,v 1.23 2004/10/17 05:14:06 stdarg Exp $
  */
 
 #ifndef _EGG_PARTYLINE_H_
@@ -40,9 +40,6 @@
 typedef struct partymember_common partymember_common_t;
 typedef struct partyline_event partyline_event_t;
 
-#include <eggdrop/partychan.h>
-#include <eggdrop/partymember.h>
-
 struct partyline_event {
 	/* Events that don't depend on a single chan. */
 	int (*on_privmsg)(void *client_data, partymember_t *dest, partymember_t *src, const char *text, int len);
Index: eggdrop1.9/lib/eggdrop/partymember.c
diff -u eggdrop1.9/lib/eggdrop/partymember.c:1.18 eggdrop1.9/lib/eggdrop/partymember.c:1.19
--- eggdrop1.9/lib/eggdrop/partymember.c:1.18	Mon Oct  4 11:05:32 2004
+++ eggdrop1.9/lib/eggdrop/partymember.c	Sun Oct 17 00:14:06 2004
@@ -18,12 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: partymember.c,v 1.18 2004/10/04 16:05:32 stdarg Exp $";
+static const char rcsid[] = "$Id: partymember.c,v 1.19 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
 #include <eggdrop/eggdrop.h>
 
 /* When does pid wrap around? This lets pids get up to 99999. */
Index: eggdrop1.9/lib/eggdrop/partymember.h
diff -u eggdrop1.9/lib/eggdrop/partymember.h:1.2 eggdrop1.9/lib/eggdrop/partymember.h:1.3
--- eggdrop1.9/lib/eggdrop/partymember.h:1.2	Mon Jun 28 15:44:37 2004
+++ eggdrop1.9/lib/eggdrop/partymember.h	Sun Oct 17 00:14:06 2004
@@ -16,14 +16,12 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: partymember.h,v 1.2 2004/06/28 20:44:37 darko Exp $
+ * $Id: partymember.h,v 1.3 2004/10/17 05:14:06 stdarg Exp $
  */
 
 #ifndef _EGG_PARTYMEMBER_H
 #define _EGG_PARTYMEMBER_H
 
-#include <eggdrop/partyline.h>
-
 struct partymember {
         partymember_t *next;
 	partymember_t *prev;
Index: eggdrop1.9/lib/eggdrop/script.c
diff -u eggdrop1.9/lib/eggdrop/script.c:1.19 eggdrop1.9/lib/eggdrop/script.c:1.20
--- eggdrop1.9/lib/eggdrop/script.c:1.19	Fri Jun 25 12:44:03 2004
+++ eggdrop1.9/lib/eggdrop/script.c	Sun Oct 17 00:14:06 2004
@@ -18,16 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: script.c,v 1.19 2004/06/25 17:44:03 darko Exp $";
+static const char rcsid[] = "$Id: script.c,v 1.20 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
 #include <eggdrop/eggdrop.h>
 
 #define EVENT_VAR 1
Index: eggdrop1.9/lib/eggdrop/sockbuf.c
diff -u eggdrop1.9/lib/eggdrop/sockbuf.c:1.16 eggdrop1.9/lib/eggdrop/sockbuf.c:1.17
--- eggdrop1.9/lib/eggdrop/sockbuf.c:1.16	Sat Oct  9 23:55:11 2004
+++ eggdrop1.9/lib/eggdrop/sockbuf.c	Sun Oct 17 00:14:06 2004
@@ -18,20 +18,12 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: sockbuf.c,v 1.16 2004/10/10 04:55:11 stdarg Exp $";
+static const char rcsid[] = "$Id: sockbuf.c,v 1.17 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
+#include <eggdrop/eggdrop.h>
 #include <unistd.h>
-#include <string.h>
-#include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/time.h>
 
 #ifdef HAVE_POLL
 #  ifdef HAVE_SYS_POLL_H
@@ -44,7 +36,6 @@
 #endif
 
 #include <errno.h>
-#include <eggdrop/eggdrop.h>
 
 typedef struct {
 	int sock;	/* Underlying socket descriptor */
Index: eggdrop1.9/lib/eggdrop/socket.c
diff -u eggdrop1.9/lib/eggdrop/socket.c:1.6 eggdrop1.9/lib/eggdrop/socket.c:1.7
--- eggdrop1.9/lib/eggdrop/socket.c:1.6	Wed Jun 30 16:07:02 2004
+++ eggdrop1.9/lib/eggdrop/socket.c	Sun Oct 17 00:14:06 2004
@@ -18,22 +18,18 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: socket.c,v 1.6 2004/06/30 21:07:02 stdarg Exp $";
+static const char rcsid[] = "$Id: socket.c,v 1.7 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
+#include <eggdrop/eggdrop.h>
+
 #include <unistd.h>
-#include <string.h>
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <fcntl.h>
 #include <errno.h>
 
-#include <eggdrop/eggdrop.h>
-
 /* Apparently SHUT_RDWR is not defined on some systems. */
 #ifndef SHUT_RDWR
 #  define SHUT_RDWR 2
Index: eggdrop1.9/lib/eggdrop/string.c
diff -u eggdrop1.9/lib/eggdrop/string.c:1.2 eggdrop1.9/lib/eggdrop/string.c:1.3
--- eggdrop1.9/lib/eggdrop/string.c:1.2	Mon Oct  4 10:48:29 2004
+++ eggdrop1.9/lib/eggdrop/string.c	Sun Oct 17 00:14:06 2004
@@ -18,20 +18,10 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: string.c,v 1.2 2004/10/04 15:48:29 stdarg Exp $";
+static const char rcsid[] = "$Id: string.c,v 1.3 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <ctype.h>
-
 #include <eggdrop/eggdrop.h>				/* egg_return_val_if_fail	*/
-#include <eggdrop/string.h>				/* prototypes			*/
 
 int egg_get_word(const unsigned char *text, const char **next, char **word)
 {
Index: eggdrop1.9/lib/eggdrop/throttle.c
diff -u eggdrop1.9/lib/eggdrop/throttle.c:1.4 eggdrop1.9/lib/eggdrop/throttle.c:1.5
--- eggdrop1.9/lib/eggdrop/throttle.c:1.4	Fri Jan  9 19:43:18 2004
+++ eggdrop1.9/lib/eggdrop/throttle.c	Sun Oct 17 00:14:06 2004
@@ -18,14 +18,11 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: throttle.c,v 1.4 2004/01/10 01:43:18 stdarg Exp $";
+static const char rcsid[] = "$Id: throttle.c,v 1.5 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 #include <eggdrop/eggdrop.h>
+#include <unistd.h>
 
 #define THROTTLE_LEVEL SOCKBUF_LEVEL_THROTTLE
 
Index: eggdrop1.9/lib/eggdrop/timer.c
diff -u eggdrop1.9/lib/eggdrop/timer.c:1.6 eggdrop1.9/lib/eggdrop/timer.c:1.7
--- eggdrop1.9/lib/eggdrop/timer.c:1.6	Wed Oct  6 09:59:09 2004
+++ eggdrop1.9/lib/eggdrop/timer.c	Sun Oct 17 00:14:06 2004
@@ -18,13 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: timer.c,v 1.6 2004/10/06 14:59:09 stdarg Exp $";
+static const char rcsid[] = "$Id: timer.c,v 1.7 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/time.h>
 #include <eggdrop/eggdrop.h>
 
 static egg_timeval_t now;
Index: eggdrop1.9/lib/eggdrop/timeutil.c
diff -u eggdrop1.9/lib/eggdrop/timeutil.c:1.4 eggdrop1.9/lib/eggdrop/timeutil.c:1.5
--- eggdrop1.9/lib/eggdrop/timeutil.c:1.4	Sun Aug 29 02:34:12 2004
+++ eggdrop1.9/lib/eggdrop/timeutil.c	Sun Oct 17 00:14:06 2004
@@ -18,14 +18,10 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: timeutil.c,v 1.4 2004/08/29 07:34:12 takeda Exp $";
+static const char rcsid[] = "$Id: timeutil.c,v 1.5 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <time.h>
+#include <eggdrop/eggdrop.h>
 
 /* Returns pointer to static buffer containing string
    "12 days, 34 hours and 56 minutes"
Index: eggdrop1.9/lib/eggdrop/users.c
diff -u eggdrop1.9/lib/eggdrop/users.c:1.43 eggdrop1.9/lib/eggdrop/users.c:1.44
--- eggdrop1.9/lib/eggdrop/users.c:1.43	Tue Oct  5 21:35:15 2004
+++ eggdrop1.9/lib/eggdrop/users.c	Sun Oct 17 00:14:06 2004
@@ -18,12 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: users.c,v 1.43 2004/10/06 02:35:15 stdarg Exp $";
+static const char rcsid[] = "$Id: users.c,v 1.44 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <eggdrop/eggdrop.h>
 
 /* When we walk along irchost_cache_ht, we pass along this struct so the
Index: eggdrop1.9/lib/eggdrop/xml.c
diff -u eggdrop1.9/lib/eggdrop/xml.c:1.23 eggdrop1.9/lib/eggdrop/xml.c:1.24
--- eggdrop1.9/lib/eggdrop/xml.c:1.23	Fri Oct  1 10:31:18 2004
+++ eggdrop1.9/lib/eggdrop/xml.c	Sun Oct 17 00:14:06 2004
@@ -18,22 +18,11 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: xml.c,v 1.23 2004/10/01 15:31:18 stdarg Exp $";
+static const char rcsid[] = "$Id: xml.c,v 1.24 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <ctype.h>			/* isdigit		*/
-
 #include <eggdrop/eggdrop.h>
 
-#include "xml.h"			/* prototypes		*/
-
-#define XML_PATH_SEPARATOR '/'
-
-
 static char *last_error = NULL;
 
 const char *xml_last_error(void)
@@ -47,7 +36,7 @@
 }
 
 /* Get a new, blank node. */
-xml_node_t *xml_node_new(void)
+xml_node_t *xml_node_new()
 {
 	xml_node_t *node;
 
@@ -56,6 +45,14 @@
 	return node;
 }
 
+/* Get a new, named node. */
+xml_node_t *xml_node_new_named(const char *name)
+{
+	xml_node_t *node = xml_node_new();
+	node->name = strdup(name);
+	return(node);
+}
+
 /* Free all memory associated with a node. */
 void xml_node_free(xml_node_t *node)
 {
@@ -349,6 +346,30 @@
 	return(0);
 }
 
+int xml_node_set_vars(xml_node_t *node, const char *fmt, ...)
+{
+	va_list args;
+	char *name, *strptr;
+	int intptr;
+
+	va_start(args, fmt);
+	while (*fmt) {
+		name = va_arg(args, char *);
+		switch (*fmt) {
+			case 's':
+				strptr = va_arg(args, char *);
+				xml_node_set_str(strptr, node, name, 0, 0);
+				break;
+			case 'i':
+				intptr = va_arg(args, int);
+				xml_node_get_int(intptr, node, name, 0, 0);
+				break;
+		}
+		fmt++;
+	}
+	return(0);
+}
+
 xml_node_t *xml_root_element(xml_node_t *node)
 {
 	 if (node == NULL) return NULL;
Index: eggdrop1.9/lib/eggdrop/xml.h
diff -u eggdrop1.9/lib/eggdrop/xml.h:1.22 eggdrop1.9/lib/eggdrop/xml.h:1.23
--- eggdrop1.9/lib/eggdrop/xml.h:1.22	Fri Oct  1 10:31:18 2004
+++ eggdrop1.9/lib/eggdrop/xml.h	Sun Oct 17 00:14:06 2004
@@ -16,15 +16,12 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: xml.h,v 1.22 2004/10/01 15:31:18 stdarg Exp $
+ * $Id: xml.h,v 1.23 2004/10/17 05:14:06 stdarg Exp $
  */
 
 #ifndef _EGG_XML_H_
 #define _EGG_XML_H_
 
-#include <stdio.h>			/* FILE			*/
-#include <stdarg.h>			/* va_list		*/
-
 #define XML_NONE	(1 << 0)
 #define XML_INDENT	(1 << 1)
 #define XML_TRIM_TEXT	(1 << 2)
@@ -89,8 +86,10 @@
 int xml_node_set_int(int value, xml_node_t *node, ...);
 
 int xml_node_get_vars(xml_node_t *node, const char *fmt, ...);
+int xml_node_set_vars(xml_node_t *node, const char *fmt, ...);
 
 xml_node_t *xml_node_new(void);
+xml_node_t *xml_node_new_named(const char *name);
 void xml_node_free(xml_node_t *node);
 void xml_node_unlink(xml_node_t *node);
 void xml_node_delete(xml_node_t *node);
Index: eggdrop1.9/lib/eggdrop/xmlread.c
diff -u eggdrop1.9/lib/eggdrop/xmlread.c:1.18 eggdrop1.9/lib/eggdrop/xmlread.c:1.19
--- eggdrop1.9/lib/eggdrop/xmlread.c:1.18	Sun Sep 26 04:42:09 2004
+++ eggdrop1.9/lib/eggdrop/xmlread.c	Sun Oct 17 00:14:06 2004
@@ -1,10 +1,5 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-
 #include <eggdrop/eggdrop.h>
+#include <errno.h>
 
 static const char *name_terminators = "= \t\n\r?/>";
 
Index: eggdrop1.9/modules/dccparty/dccparty.c
diff -u eggdrop1.9/modules/dccparty/dccparty.c:1.8 eggdrop1.9/modules/dccparty/dccparty.c:1.9
--- eggdrop1.9/modules/dccparty/dccparty.c:1.8	Tue Jun 29 16:28:17 2004
+++ eggdrop1.9/modules/dccparty/dccparty.c	Sun Oct 17 00:14:06 2004
@@ -18,13 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: dccparty.c,v 1.8 2004/06/29 21:28:17 stdarg Exp $";
+static const char rcsid[] = "$Id: dccparty.c,v 1.9 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-
 #include <eggdrop/eggdrop.h>
 
 #include "dccparty.h"
Index: eggdrop1.9/modules/ircparty/events.c
diff -u eggdrop1.9/modules/ircparty/events.c:1.7 eggdrop1.9/modules/ircparty/events.c:1.8
--- eggdrop1.9/modules/ircparty/events.c:1.7	Wed Jun 23 06:19:52 2004
+++ eggdrop1.9/modules/ircparty/events.c	Sun Oct 17 00:14:06 2004
@@ -18,11 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: events.c,v 1.7 2004/06/23 11:19:52 wingman Exp $";
+static const char rcsid[] = "$Id: events.c,v 1.8 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <string.h>
-
 #include <eggdrop/eggdrop.h>
 
 #include "ircparty.h"
Index: eggdrop1.9/modules/ircparty/ircparty.c
diff -u eggdrop1.9/modules/ircparty/ircparty.c:1.12 eggdrop1.9/modules/ircparty/ircparty.c:1.13
--- eggdrop1.9/modules/ircparty/ircparty.c:1.12	Tue Jun 29 16:28:17 2004
+++ eggdrop1.9/modules/ircparty/ircparty.c	Sun Oct 17 00:14:06 2004
@@ -18,13 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: ircparty.c,v 1.12 2004/06/29 21:28:17 stdarg Exp $";
+static const char rcsid[] = "$Id: ircparty.c,v 1.13 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-
 #include <eggdrop/eggdrop.h>
 
 #include "ircparty.h"
Index: eggdrop1.9/modules/oldbotnet/events.c
diff -u eggdrop1.9/modules/oldbotnet/events.c:1.6 eggdrop1.9/modules/oldbotnet/events.c:1.7
--- eggdrop1.9/modules/oldbotnet/events.c:1.6	Mon Oct  4 11:05:32 2004
+++ eggdrop1.9/modules/oldbotnet/events.c	Sun Oct 17 00:14:06 2004
@@ -18,12 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: events.c,v 1.6 2004/10/04 16:05:32 stdarg Exp $";
+static const char rcsid[] = "$Id: events.c,v 1.7 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <ctype.h>
-#include <stdlib.h>
-
 #include <eggdrop/eggdrop.h>
 
 #include "oldbotnet.h"
Index: eggdrop1.9/modules/oldbotnet/oldbotnet.c
diff -u eggdrop1.9/modules/oldbotnet/oldbotnet.c:1.10 eggdrop1.9/modules/oldbotnet/oldbotnet.c:1.11
--- eggdrop1.9/modules/oldbotnet/oldbotnet.c:1.10	Mon Oct  4 11:05:32 2004
+++ eggdrop1.9/modules/oldbotnet/oldbotnet.c	Sun Oct 17 00:14:06 2004
@@ -18,13 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: oldbotnet.c,v 1.10 2004/10/04 16:05:32 stdarg Exp $";
+static const char rcsid[] = "$Id: oldbotnet.c,v 1.11 2004/10/17 05:14:06 stdarg Exp $";
 #endif
 
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-
 #include <eggdrop/eggdrop.h>
 
 #include "oldbotnet.h"
Index: eggdrop1.9/modules/proxy/http.c
diff -u eggdrop1.9/modules/proxy/http.c:1.4 eggdrop1.9/modules/proxy/http.c:1.5
--- eggdrop1.9/modules/proxy/http.c:1.4	Thu Jun 10 18:59:16 2004
+++ eggdrop1.9/modules/proxy/http.c	Sun Oct 17 00:14:06 2004
@@ -1,10 +1,6 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <eggdrop/eggdrop.h>
 #include <errno.h>
-#include <sys/types.h>
 #include <netinet/in.h>
-#include <eggdrop/eggdrop.h>
 #include "proxy.h"
 
 typedef struct {
Index: eggdrop1.9/modules/proxy/proxy.c
diff -u eggdrop1.9/modules/proxy/proxy.c:1.6 eggdrop1.9/modules/proxy/proxy.c:1.7
--- eggdrop1.9/modules/proxy/proxy.c:1.6	Wed Jun 23 06:19:52 2004
+++ eggdrop1.9/modules/proxy/proxy.c	Sun Oct 17 00:14:06 2004
@@ -1,5 +1,3 @@
-#include <string.h>
-
 #include <eggdrop/eggdrop.h>
 
 #include "proxy.h"
Index: eggdrop1.9/modules/proxy/socks5.c
diff -u eggdrop1.9/modules/proxy/socks5.c:1.3 eggdrop1.9/modules/proxy/socks5.c:1.4
--- eggdrop1.9/modules/proxy/socks5.c:1.3	Thu Jun 10 18:59:16 2004
+++ eggdrop1.9/modules/proxy/socks5.c	Sun Oct 17 00:14:06 2004
@@ -1,10 +1,6 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <eggdrop/eggdrop.h>
 #include <errno.h>
-#include <sys/types.h>
 #include <netinet/in.h>
-#include <eggdrop/eggdrop.h>
 #include "proxy.h"
 
 extern proxy_config_t proxy_config;
Index: eggdrop1.9/modules/script/scriptbind.c
diff -u eggdrop1.9/modules/script/scriptbind.c:1.12 eggdrop1.9/modules/script/scriptbind.c:1.13
--- eggdrop1.9/modules/script/scriptbind.c:1.12	Wed Jun 23 06:19:52 2004
+++ eggdrop1.9/modules/script/scriptbind.c	Sun Oct 17 00:14:07 2004
@@ -18,12 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: scriptbind.c,v 1.12 2004/06/23 11:19:52 wingman Exp $";
+static const char rcsid[] = "$Id: scriptbind.c,v 1.13 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#include <string.h>
-#include <stdlib.h>
-
 #include <eggdrop/eggdrop.h>
 
 /* Prototypes for the commands we create in this file. */
Index: eggdrop1.9/modules/script/scriptconfig.c
diff -u eggdrop1.9/modules/script/scriptconfig.c:1.8 eggdrop1.9/modules/script/scriptconfig.c:1.9
--- eggdrop1.9/modules/script/scriptconfig.c:1.8	Wed Jun 23 06:19:52 2004
+++ eggdrop1.9/modules/script/scriptconfig.c	Sun Oct 17 00:14:07 2004
@@ -18,12 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: scriptconfig.c,v 1.8 2004/06/23 11:19:52 wingman Exp $";
+static const char rcsid[] = "$Id: scriptconfig.c,v 1.9 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#include <string.h>
-#include <stdlib.h>
-
 #include <eggdrop/eggdrop.h>
 
 static void *resolve_path(void *root, char *path)
Index: eggdrop1.9/modules/script/scriptmisc.c
diff -u eggdrop1.9/modules/script/scriptmisc.c:1.16 eggdrop1.9/modules/script/scriptmisc.c:1.17
--- eggdrop1.9/modules/script/scriptmisc.c:1.16	Wed Jun 23 16:12:57 2004
+++ eggdrop1.9/modules/script/scriptmisc.c	Sun Oct 17 00:14:07 2004
@@ -18,34 +18,17 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: scriptmisc.c,v 1.16 2004/06/23 21:12:57 stdarg Exp $";
+static const char rcsid[] = "$Id: scriptmisc.c,v 1.17 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#include <string.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_CONFIG_H
-#	include <config.h>
-#endif
+#include <eggdrop/eggdrop.h>
 
-#ifdef TIME_WITH_SYS_TIME
-#  include <sys/time.h>
-#  include <time.h>
-#else
-#  ifdef HAVE_SYS_TIME_H
-#    include <sys/time.h>
-#  else
-#    include <time.h>
-#  endif
-#endif
+#include <sys/stat.h>
 
 #ifdef HAVE_UNAME
 #  include <sys/utsname.h>
 #endif
 
-#include <eggdrop/eggdrop.h>
-
 static char *script_duration(unsigned int sec)
 {
 	char s[70];
Index: eggdrop1.9/modules/script/scriptnet.c
diff -u eggdrop1.9/modules/script/scriptnet.c:1.7 eggdrop1.9/modules/script/scriptnet.c:1.8
--- eggdrop1.9/modules/script/scriptnet.c:1.7	Wed Jun 23 06:19:52 2004
+++ eggdrop1.9/modules/script/scriptnet.c	Sun Oct 17 00:14:07 2004
@@ -18,13 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: scriptnet.c,v 1.7 2004/06/23 11:19:52 wingman Exp $";
+static const char rcsid[] = "$Id: scriptnet.c,v 1.8 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
 #include <eggdrop/eggdrop.h>
 
 typedef struct script_net_info {
Index: eggdrop1.9/modules/script/scriptparty.c
diff -u eggdrop1.9/modules/script/scriptparty.c:1.5 eggdrop1.9/modules/script/scriptparty.c:1.6
--- eggdrop1.9/modules/script/scriptparty.c:1.5	Wed Jun 23 06:19:52 2004
+++ eggdrop1.9/modules/script/scriptparty.c	Sun Oct 17 00:14:07 2004
@@ -18,10 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: scriptparty.c,v 1.5 2004/06/23 11:19:52 wingman Exp $";
+static const char rcsid[] = "$Id: scriptparty.c,v 1.6 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#include <stdio.h>
 #include <eggdrop/eggdrop.h>
 
 script_command_t script_party_cmds[] = {
Index: eggdrop1.9/modules/script/scripttimer.c
diff -u eggdrop1.9/modules/script/scripttimer.c:1.7 eggdrop1.9/modules/script/scripttimer.c:1.8
--- eggdrop1.9/modules/script/scripttimer.c:1.7	Wed Oct  6 09:59:09 2004
+++ eggdrop1.9/modules/script/scripttimer.c	Sun Oct 17 00:14:07 2004
@@ -18,12 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: scripttimer.c,v 1.7 2004/10/06 14:59:09 stdarg Exp $";
+static const char rcsid[] = "$Id: scripttimer.c,v 1.8 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include <eggdrop/eggdrop.h>
 
 static int script_single_timer(int nargs, int sec, int usec, script_callback_t *callback);
Index: eggdrop1.9/modules/script/scriptuser.c
diff -u eggdrop1.9/modules/script/scriptuser.c:1.9 eggdrop1.9/modules/script/scriptuser.c:1.10
--- eggdrop1.9/modules/script/scriptuser.c:1.9	Wed Jun 23 06:19:52 2004
+++ eggdrop1.9/modules/script/scriptuser.c	Sun Oct 17 00:14:07 2004
@@ -18,11 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: scriptuser.c,v 1.9 2004/06/23 11:19:52 wingman Exp $";
+static const char rcsid[] = "$Id: scriptuser.c,v 1.10 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#include <string.h>
-
 #include <eggdrop/eggdrop.h>
 
 static char *script_uid_to_handle(int uid)
Index: eggdrop1.9/modules/server/help/en_US/commands.xml
diff -u eggdrop1.9/modules/server/help/en_US/commands.xml:1.3 eggdrop1.9/modules/server/help/en_US/commands.xml:1.4
--- eggdrop1.9/modules/server/help/en_US/commands.xml:1.3	Tue Oct  5 21:35:15 2004
+++ eggdrop1.9/modules/server/help/en_US/commands.xml	Sun Oct 17 00:14:07 2004
@@ -140,7 +140,7 @@
 		<seealso>
 			<see>deop</see>
 			<see>halfop</see>
-			<see>deehalfop</see>
+			<see>dehalfop</see>
 			<see>voice</see>
 			<see>devoice</see>
 		</seealso>
@@ -167,7 +167,7 @@
 		<seealso>
 			<see>op</see>
 			<see>halfop</see>
-			<see>deehalfop</see>
+			<see>dehalfop</see>
 			<see>voice</see>
 			<see>devoice</see>
 		</seealso>
@@ -195,7 +195,7 @@
 			<see>op</see>
 			<see>deop</see>
 			<see>halfop</see>
-			<see>deehalfop</see>
+			<see>dehalfop</see>
 			<see>devoice</see>
 		</seealso>
 	</help>
Index: eggdrop1.9/modules/server/server.h
diff -u eggdrop1.9/modules/server/server.h:1.23 eggdrop1.9/modules/server/server.h:1.24
--- eggdrop1.9/modules/server/server.h:1.23	Tue Oct  5 21:35:15 2004
+++ eggdrop1.9/modules/server/server.h	Sun Oct 17 00:14:07 2004
@@ -16,17 +16,12 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
- * $Id: server.h,v 1.23 2004/10/06 02:35:15 stdarg Exp $
+ * $Id: server.h,v 1.24 2004/10/17 05:14:07 stdarg Exp $
  */
 
 #ifndef _EGG_MOD_SERVER_SERVER_H_
 #define _EGG_MOD_SERVER_SERVER_H_
 
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include <eggdrop/eggdrop.h>
 
 #include "egg_server_internal.h"
Index: eggdrop1.9/modules/telnetparty/telnetparty.c
diff -u eggdrop1.9/modules/telnetparty/telnetparty.c:1.18 eggdrop1.9/modules/telnetparty/telnetparty.c:1.19
--- eggdrop1.9/modules/telnetparty/telnetparty.c:1.18	Tue Jun 29 16:28:17 2004
+++ eggdrop1.9/modules/telnetparty/telnetparty.c	Sun Oct 17 00:14:07 2004
@@ -18,13 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: telnetparty.c,v 1.18 2004/06/29 21:28:17 stdarg Exp $";
+static const char rcsid[] = "$Id: telnetparty.c,v 1.19 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-
 #include <eggdrop/eggdrop.h>
 
 #include "telnetparty.h"
Index: eggdrop1.9/src/bg.c
diff -u eggdrop1.9/src/bg.c:1.21 eggdrop1.9/src/bg.c:1.22
--- eggdrop1.9/src/bg.c:1.21	Sun Sep 26 04:42:09 2004
+++ eggdrop1.9/src/bg.c	Sun Oct 17 00:14:07 2004
@@ -20,24 +20,18 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: bg.c,v 1.21 2004/09/26 09:42:09 stdarg Exp $";
+static const char rcsid[] = "$Id: bg.c,v 1.22 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <eggdrop/eggdrop.h>
 
 #ifdef CYGWIN_HACKS
 #  include <windows.h>
 #endif
 
 #include <unistd.h>	/* fork(), setpgid() */
-#include <stdio.h>	/* printf() */
-#include <stdlib.h>	/* exit() */
-#include <sys/types.h>	/* pid_t, kill() */
 #include <sys/wait.h>	/* waitpid() */
 #include <signal.h>	/* kill() */
-#include <eggdrop/eggdrop.h>
 #include "main.h"	/* fatal()*/
 #include "bg.h"
 
@@ -61,7 +55,7 @@
 
 void bg_begin_split()
 {
-	pid_t parent_pid = -1, child_pid = -1;
+	int parent_pid = -1, child_pid = -1;
 	int result;
 	char temp = 0;
 
Index: eggdrop1.9/src/core_config.c
diff -u eggdrop1.9/src/core_config.c:1.23 eggdrop1.9/src/core_config.c:1.24
--- eggdrop1.9/src/core_config.c:1.23	Tue Oct  5 21:35:15 2004
+++ eggdrop1.9/src/core_config.c	Sun Oct 17 00:14:07 2004
@@ -18,10 +18,9 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: core_config.c,v 1.23 2004/10/06 02:35:15 stdarg Exp $";
+static const char rcsid[] = "$Id: core_config.c,v 1.24 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#include <string.h>
 #include <eggdrop/eggdrop.h>
 #include "core_config.h"
 
Index: eggdrop1.9/src/core_party.c
diff -u eggdrop1.9/src/core_party.c:1.44 eggdrop1.9/src/core_party.c:1.45
--- eggdrop1.9/src/core_party.c:1.44	Sat Oct  9 23:55:11 2004
+++ eggdrop1.9/src/core_party.c	Sun Oct 17 00:14:07 2004
@@ -18,24 +18,16 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: core_party.c,v 1.44 2004/10/10 04:55:11 stdarg Exp $";
+static const char rcsid[] = "$Id: core_party.c,v 1.45 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <ctype.h>
+#include <eggdrop/eggdrop.h>
 #include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
 
 #ifdef HAVE_UNAME
 #  include <sys/utsname.h>
 #endif
 
-#include <eggdrop/eggdrop.h>
-
 #include "core_config.h"
 #include "core_binds.h"
 #include "logfile.h"
Index: eggdrop1.9/src/logfile.c
diff -u eggdrop1.9/src/logfile.c:1.49 eggdrop1.9/src/logfile.c:1.50
--- eggdrop1.9/src/logfile.c:1.49	Mon Oct  4 10:48:30 2004
+++ eggdrop1.9/src/logfile.c	Sun Oct 17 00:14:07 2004
@@ -19,14 +19,11 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: logfile.c,v 1.49 2004/10/04 15:48:30 stdarg Exp $";
+static const char rcsid[] = "$Id: logfile.c,v 1.50 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
 #include <eggdrop/eggdrop.h>
+#include <unistd.h>
 #include "core_config.h"
 #include "terminal.h"					/* TERMINAL_NICK	*/
 #include "logfile.h"
@@ -329,7 +326,7 @@
 		fprintf(log->fp, "%s", timestamp);
 		fprintf(log->fp, _("Last message repeated %d time(s).\n"), log->repeats);
 		log->repeats = 0;
-		realloc_strcpy(log->last_msg, "");
+		str_redup(&log->last_msg, "");
 	}
 	fflush(log->fp);
 }
Index: eggdrop1.9/src/main.c
diff -u eggdrop1.9/src/main.c:1.185 eggdrop1.9/src/main.c:1.186
--- eggdrop1.9/src/main.c:1.185	Wed Sep 29 10:38:39 2004
+++ eggdrop1.9/src/main.c	Sun Oct 17 00:14:07 2004
@@ -19,40 +19,18 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: main.c,v 1.185 2004/09/29 15:38:39 stdarg Exp $";
+static const char rcsid[] = "$Id: main.c,v 1.186 2004/10/17 05:14:07 stdarg Exp $";
 #endif
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <ctype.h>
+#include <eggdrop/eggdrop.h>
 #include <unistd.h>
 #include <fcntl.h>
-#include <string.h>
-#include <stdlib.h>
 #include <sys/stat.h>
 #include <errno.h>
 #include <signal.h>
-#include <netdb.h>
-#include <setjmp.h>
 #include <locale.h>
-#include <ctype.h>
 #include <ltdl.h>
 
-#ifdef TIME_WITH_SYS_TIME
-#  include <sys/time.h>
-#  include <time.h>
-#else
-#  ifdef HAVE_SYS_TIME_H
-#    include <sys/time.h>
-#  else
-#    include <time.h>
-#  endif
-#endif
-
-#include <eggdrop/eggdrop.h>
-#include "lib/compat/compat.h"
 #include "debug.h"
 #include "core_config.h"
 #include "core_party.h"
@@ -594,7 +572,7 @@
 	core_party_init();
 
 	/* Load core help */
-	//help_load_by_module ("core");
+	help_load_by_module ("core");
 
 	/* Put the module directory in the ltdl search path. */
 	if (core_config.module_path) module_add_dir(core_config.module_path);
Index: eggdrop1.9/tcl.license.terms
diff -u /dev/null eggdrop1.9/tcl.license.terms:1.1
--- /dev/null	Sun Oct 17 00:14:18 2004
+++ eggdrop1.9/tcl.license.terms	Sun Oct 17 00:14:06 2004
@@ -0,0 +1,42 @@
+--- The following license applies to lib/eggdrop/date.c ---
+
+This software is copyrighted by the Regents of the University of
+California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
+Corporation and other parties.  The following terms apply to all files
+associated with the software unless explicitly disclaimed in
+individual files.
+
+The authors hereby grant permission to use, copy, modify, distribute,
+and license this software and its documentation for any purpose, provided
+that existing copyright notices are retained in all copies and that this
+notice is included verbatim in any distributions. No written agreement,
+license, or royalty fee is required for any of the authorized uses.
+Modifications to this software may be copyrighted by their authors
+and need not follow the licensing terms described here, provided that
+the new terms are clearly indicated on the first page of each file where
+they apply.
+
+IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
+FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
+DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
+IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
+NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
+MODIFICATIONS.
+
+GOVERNMENT USE: If you are acquiring this software on behalf of the
+U.S. government, the Government shall have only "Restricted Rights"
+in the software and related documentation as defined in the Federal 
+Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
+are acquiring the software on behalf of the Department of Defense, the
+software shall be classified as "Commercial Computer Software" and the
+Government shall have only "Restricted Rights" as defined in Clause
+252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing, the
+authors grant the U.S. Government and others acting in its behalf
+permission to use and distribute the software in accordance with the
+terms specified in this license. 
----------------------- End of diff -----------------------



More information about the Changes mailing list