[NeoStats-Devel] [Commits] r2442 - in trunk: include lib/adns

[email protected]
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
Author: Mark
Date: Mon Apr  4 05:29:13 2005
New Revision: 2442

Modified:
   trunk/include/configwin32.h
   trunk/lib/adns/adns.h
   trunk/lib/adns/check.c
   trunk/lib/adns/dlist.h
   trunk/lib/adns/event.c
   trunk/lib/adns/general.c
   trunk/lib/adns/internal.h
   trunk/lib/adns/parse.c
   trunk/lib/adns/query.c
   trunk/lib/adns/reply.c
   trunk/lib/adns/setup.c
   trunk/lib/adns/transmit.c
   trunk/lib/adns/tvarith.h
   trunk/lib/adns/types.c
Log:
more adns include tidy ups and copyright year update

Modified: trunk/include/configwin32.h
==============================================================================
--- trunk/include/configwin32.h	(original)
+++ trunk/include/configwin32.h	Mon Apr  4 05:29:13 2005
@@ -173,7 +173,7 @@
 #define HAVE_PERROR 1
 
 /* Define to 1 if you have the `poll' function. */
-#define HAVE_POLL 1
+/* #undef HAVE_POLL */
 
 /* Define to 1 if you have the <pwd.h> header file. */
 /* #undef HAVE_PWD_H */

Modified: trunk/lib/adns/adns.h
==============================================================================
--- trunk/lib/adns/adns.h	(original)
+++ trunk/lib/adns/adns.h	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is

Modified: trunk/lib/adns/check.c
==============================================================================
--- trunk/lib/adns/check.c	(original)
+++ trunk/lib/adns/check.c	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is

Modified: trunk/lib/adns/dlist.h
==============================================================================
--- trunk/lib/adns/dlist.h	(original)
+++ trunk/lib/adns/dlist.h	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is

Modified: trunk/lib/adns/event.c
==============================================================================
--- trunk/lib/adns/event.c	(original)
+++ trunk/lib/adns/event.c	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is
@@ -31,10 +31,9 @@
  * - user-visible check/wait and event-loop-related functions
  */
 
-#ifdef WIN32
-#else
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
-#endif
+#endif
 
 #include "internal.h"
 #include "tvarith.h"

Modified: trunk/lib/adns/general.c
==============================================================================
--- trunk/lib/adns/general.c	(original)
+++ trunk/lib/adns/general.c	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is
@@ -30,10 +30,9 @@
  * - vbuf handling
  */
 
-#ifdef WIN32
-#else
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
-#endif
+#endif
 
 #include "internal.h"
 

Modified: trunk/lib/adns/internal.h
==============================================================================
--- trunk/lib/adns/internal.h	(original)
+++ trunk/lib/adns/internal.h	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is

Modified: trunk/lib/adns/parse.c
==============================================================================
--- trunk/lib/adns/parse.c	(original)
+++ trunk/lib/adns/parse.c	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is

Modified: trunk/lib/adns/query.c
==============================================================================
--- trunk/lib/adns/query.c	(original)
+++ trunk/lib/adns/query.c	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is

Modified: trunk/lib/adns/reply.c
==============================================================================
--- trunk/lib/adns/reply.c	(original)
+++ trunk/lib/adns/reply.c	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is

Modified: trunk/lib/adns/setup.c
==============================================================================
--- trunk/lib/adns/setup.c	(original)
+++ trunk/lib/adns/setup.c	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is
@@ -36,9 +36,13 @@
 #include <iphlpapi.h>
 #else
 #include <limits.h>
-#include <fcntl.h>
-#include <arpa/inet.h>
 #endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h> 
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
 
 static void readconfig(adns_state ads, const char *filename, int warnmissing);
 
@@ -120,14 +124,12 @@
 	return 1;
 }
 
-static void ccf_nameserver(adns_state ads, const char *fn, int lno,
-			   const char *buf)
+static void ccf_nameserver(adns_state ads, const char *fn, int lno, const char *buf)
 {
 	struct in_addr ia;
 
 	if (!inet_aton(buf, &ia)) {
-		configparseerr(ads, fn, lno,
-			       "invalid nameserver address `%s'", buf);
+		configparseerr(ads, fn, lno, "invalid nameserver address `%s'", buf);
 		return;
 	}
 	adns__debug(ads, -1, 0, "using nameserver %s", inet_ntoa(ia));
@@ -178,8 +180,7 @@
 	ads->searchlist = newptrs;
 }
 
-static void ccf_sortlist(adns_state ads, const char *fn, int lno,
-			 const char *buf)
+static void ccf_sortlist(adns_state ads, const char *fn, int lno, const char *buf)
 {
 	const char *word;
 	char tbuf[200], *slash, *ep;
@@ -270,8 +271,7 @@
 	}
 }
 
-static void ccf_options(adns_state ads, const char *fn, int lno,
-			const char *buf)
+static void ccf_options(adns_state ads, const char *fn, int lno, const char *buf)
 {
 	const char *word;
 	char *ep;
@@ -319,14 +319,12 @@
 	}
 }
 
-static void ccf_clearnss(adns_state ads, const char *fn, int lno,
-			 const char *buf)
+static void ccf_clearnss(adns_state ads, const char *fn, int lno, const char *buf)
 {
 	ads->nservers = 0;
 }
 
-static void ccf_include(adns_state ads, const char *fn, int lno,
-			const char *buf)
+static void ccf_include(adns_state ads, const char *fn, int lno, const char *buf)
 {
 	if (!*buf) {
 		configparseerr(ads, fn, lno,
@@ -338,8 +336,7 @@
 
 static const struct configcommandinfo {
 	const char *name;
-	void (*fn) (adns_state ads, const char *fn, int lno,
-		    const char *buf);
+	void (*fn) (adns_state ads, const char *fn, int lno, const char *buf);
 } configcommandinfos[] = {
   { "nameserver",        ccf_nameserver  },
   { "domain",            ccf_search      },
@@ -356,7 +353,7 @@
 	const char *text;
 } getline_ctx;
 
-static int gl_file(adns_state ads, getline_ctx * src_io,
+static int gl_file(adns_state ads, getline_ctx * src_io, 
 		   const char *filename, int lno, char *buf, int buflen)
 {
 	FILE *file = src_io->file;
@@ -435,25 +432,21 @@
 }
 
 static void readconfiggeneric(adns_state ads, const char *filename,
-			      int (*getline) (adns_state ads,
-					      getline_ctx *,
-					      const char *filename,
-					      int lno, char *buf,
-					      int buflen),
-			      /* Returns >=0 for success, -1 for EOF or error
-			       * (error will have been reported), or -2 for
-			       * bad line was encountered, try again.
-			       */
-			      getline_ctx gl_ctx)
+			int (*getline) (adns_state ads, getline_ctx *,
+				const char *filename, int lno, char *buf, int buflen),
+				/* Returns >=0 for success, -1 for EOF or error
+				 * (error will have been reported), or -2 for
+				 * bad line was encountered, try again.
+		         */
+			     getline_ctx gl_ctx)
 {
 	char linebuf[2000], *p, *q;
 	int lno, l, dirl;
 	const struct configcommandinfo *ccip;
 
 	for (lno = 1;
-	     (l =
-	      getline(ads, &gl_ctx, filename, lno, linebuf,
-		      sizeof(linebuf))) != -1; lno++) {
+	    (l = getline(ads, &gl_ctx, filename, lno, linebuf, sizeof(linebuf))) != -1; 
+		lno++) {
 		if (l == -2)
 			continue;
 		while (l > 0 && ctype_whitespace(linebuf[l - 1]))

Modified: trunk/lib/adns/transmit.c
==============================================================================
--- trunk/lib/adns/transmit.c	(original)
+++ trunk/lib/adns/transmit.c	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is

Modified: trunk/lib/adns/tvarith.h
==============================================================================
--- trunk/lib/adns/tvarith.h	(original)
+++ trunk/lib/adns/tvarith.h	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is

Modified: trunk/lib/adns/types.c
==============================================================================
--- trunk/lib/adns/types.c	(original)
+++ trunk/lib/adns/types.c	Mon Apr  4 05:29:13 2005
@@ -1,5 +1,5 @@
 /* NeoStats - IRC Statistical Services 
-** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond, Mark Hetherington
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
 ** http://www.neostats.net/
 **
 **  Based on adns, which is
@@ -29,10 +29,9 @@
  * - RR-type-specific code, and the machinery to call it
  */
 
-#ifdef WIN32
-#else
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
-#endif
+#endif
 
 #include "internal.h"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.