patch 5
Bear Giles
bear at coyotesong.com
Sat Jun 9 19:06:31 UTC 2001
diff -Naur --recursive inn2-2.3.1.orig/authprogs/ckpasswd.c inn2-2.3.1/authprogs/ckpasswd.c
--- inn2-2.3.1.orig/authprogs/ckpasswd.c Thu Jan 11 01:55:23 2001
+++ inn2-2.3.1/authprogs/ckpasswd.c Sat Jun 9 00:06:37 2001
@@ -72,7 +72,7 @@
if (!found)
return(0);
iter = colon+1;
- if (colon = strchr(iter, ':'))
+ if ((colon = strchr(iter, ':')) != NULL)
*colon = 0;
strcpy(pass, iter);
return(pass);
diff -Naur --recursive inn2-2.3.1.orig/authprogs/radius.c inn2-2.3.1/authprogs/radius.c
--- inn2-2.3.1.orig/authprogs/radius.c Thu Jan 11 01:55:23 2001
+++ inn2-2.3.1/authprogs/radius.c Sat Jun 9 00:06:37 2001
@@ -76,7 +76,7 @@
lineno++;
buf[strlen(buf)-1] = '\0'; /* strip '\n' */
- if (iter = strchr(buf, '#'))
+ if ((iter = strchr(buf, '#')) != NULL)
*iter = '\0'; /* strip comments */
iter = buf+strlen(buf)-1; /* strip trailing whitespace */
diff -Naur --recursive inn2-2.3.1.orig/backends/innxmit.c inn2-2.3.1/backends/innxmit.c
--- inn2-2.3.1.orig/backends/innxmit.c Fri Jun 8 22:55:27 2001
+++ inn2-2.3.1/backends/innxmit.c Sat Jun 9 00:06:37 2001
@@ -83,7 +83,9 @@
static char STAT1[] =
"%s stats offered %lu accepted %lu refused %lu rejected %lu missing %lu accsize %.0f rejsize %.0f";
static char STAT2[] = "%s times user %.3f system %.3f elapsed %.3f";
+#if 0
static char GOT_RESENDIT[] = "%s requeued %s %s";
+#endif
static char GOT_BADCOMMAND[] = "%s rejected %s %s";
static char REJECTED[] = "%s rejected %s (%s) %s";
static char CANT_CONNECT[] = "%s connect failed %s";
diff -Naur --recursive inn2-2.3.1.orig/expire/expire.c inn2-2.3.1/expire/expire.c
--- inn2-2.3.1.orig/expire/expire.c Fri Jun 8 22:55:27 2001
+++ inn2-2.3.1/expire/expire.c Sat Jun 9 00:14:43 2001
@@ -75,10 +75,12 @@
static BOOL Ignoreselfexpire = FALSE;
static char *ACTIVE;
static char *SPOOL = NULL;
-static int nGroups;
static FILE *EXPunlinkfile;
-static NEWSGROUP *Groups;
-static NEWSGROUP EXPdefault;
+#if defined (UNUSED)
+/**/static int nGroups;
+/**/static NEWSGROUP *Groups;
+/**/static NEWSGROUP EXPdefault;
+#endif
static EXPIRECLASS EXPclasses[NUM_STORAGE_CLASSES+1];
static char *EXPreason;
static time_t EXPremember;
@@ -216,32 +218,34 @@
/*
** Set the expiration fields for all groups that match this pattern.
*/
-static void EXPmatch(char *p, NEWSGROUP *v, char mod)
-{
- NEWSGROUP *ngp;
- int i;
- BOOL negate;
-
- negate = *p == '!';
- if (negate)
- p++;
- for (ngp = Groups, i = nGroups; --i >= 0; ngp++)
- if (negate ? !wildmat(ngp->Name, p) : wildmat(ngp->Name, p))
- if (mod == 'a'
- || (mod == 'm' && ngp->Rest[0] == NF_FLAG_MODERATED)
- || (mod == 'u' && ngp->Rest[0] != NF_FLAG_MODERATED)) {
- ngp->Keep = v->Keep;
- ngp->Default = v->Default;
- ngp->Purge = v->Purge;
- if (EXPverbose > 4) {
- (void)printf("%s", ngp->Name);
- (void)printf(" %13.13s", ctime(&v->Keep) + 3);
- (void)printf(" %13.13s", ctime(&v->Default) + 3);
- (void)printf(" %13.13s", ctime(&v->Purge) + 3);
- (void)printf(" (%s)\n", p);
- }
- }
-}
+#if defined (UNUSED)
+/**/static void EXPmatch(char *p, NEWSGROUP *v, char mod)
+/**/{
+/**/ NEWSGROUP *ngp;
+/**/ int i;
+/**/ BOOL negate;
+/**/
+/**/ negate = *p == '!';
+/**/ if (negate)
+/**/ p++;
+/**/ for (ngp = Groups, i = nGroups; --i >= 0; ngp++)
+/**/ if (negate ? !wildmat(ngp->Name, p) : wildmat(ngp->Name, p))
+/**/ if (mod == 'a'
+/**/ || (mod == 'm' && ngp->Rest[0] == NF_FLAG_MODERATED)
+/**/ || (mod == 'u' && ngp->Rest[0] != NF_FLAG_MODERATED)) {
+/**/ ngp->Keep = v->Keep;
+/**/ ngp->Default = v->Default;
+/**/ ngp->Purge = v->Purge;
+/**/ if (EXPverbose > 4) {
+/**/ (void)printf("%s", ngp->Name);
+/**/ (void)printf(" %13.13s", ctime(&v->Keep) + 3);
+/**/ (void)printf(" %13.13s", ctime(&v->Default) + 3);
+/**/ (void)printf(" %13.13s", ctime(&v->Purge) + 3);
+/**/ (void)printf(" (%s)\n", p);
+/**/ }
+/**/ }
+/**/}
+#endif
/*
@@ -252,13 +256,9 @@
char *p;
int i;
int j;
- int k;
- char mod;
- NEWSGROUP v;
BOOL SawDefault;
char buff[BUFSIZ];
char *fields[7];
- char **patterns;
/* Scan all lines. */
EXPremember = -1;
diff -Naur --recursive inn2-2.3.1.orig/expire/expireover.c inn2-2.3.1/expire/expireover.c
--- inn2-2.3.1.orig/expire/expireover.c Fri Jun 8 22:55:27 2001
+++ inn2-2.3.1/expire/expireover.c Sat Jun 9 00:06:37 2001
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <errno.h>
#include <signal.h>
+#include <time.h>
#include "configdata.h"
#include "clibrary.h"
#include "qio.h"
diff -Naur --recursive inn2-2.3.1.orig/expire/makehistory.c inn2-2.3.1/expire/makehistory.c
--- inn2-2.3.1.orig/expire/makehistory.c Fri Jun 8 22:55:27 2001
+++ inn2-2.3.1/expire/makehistory.c Sat Jun 9 00:06:37 2001
@@ -351,7 +351,7 @@
if (sorttype == OVNOSORT) {
if (Fork) {
- (void)fprintf(Overchan, "%s %d %d ", TokenToText(*token), arrived, expires);
+ (void)fprintf(Overchan, "%s %ld %ld ", TokenToText(*token), arrived, expires);
if (fwrite(overdata, (size_t)1, (size_t)overlen, Overchan) != overlen) {
fprintf(stderr, "makehistory: writing overview failed\n");
exit(1);
@@ -407,11 +407,11 @@
/* q points to start of ng name, r points to its end. */
strncpy(temp, q, r-q);
temp[r-q] = '\0';
- fprintf(OverTmpFile, "%s\t%10lu\t%u\t%s\t", temp,
+ fprintf(OverTmpFile, "%s\t%10lu\t%lu\t%s\t", temp,
(unsigned long) arrived, (unsigned long) expires,
TokenToText(*token));
} else
- fprintf(OverTmpFile, "%10lu\t%u\t%s\t", (unsigned long) arrived,
+ fprintf(OverTmpFile, "%10lu\t%lu\t%s\t", (unsigned long) arrived,
(unsigned long) expires,
TokenToText(*token));
@@ -813,7 +813,9 @@
char *HistoryDir;
char *p;
char *OldHistoryPath;
- dbzoptions opt;
+#if defined (UNUSED)
+/**/dbzoptions opt;
+#endif
char *buff;
/* First thing, set up logging and our identity. */
diff -Naur --recursive inn2-2.3.1.orig/expire/newsrequeue.c inn2-2.3.1/expire/newsrequeue.c
--- inn2-2.3.1.orig/expire/newsrequeue.c Fri Jun 8 22:55:27 2001
+++ inn2-2.3.1/expire/newsrequeue.c Sat Jun 9 00:15:13 2001
@@ -58,18 +58,22 @@
** Bit array, indexed by character (8bit chars only). If ARTpathbits['x']
** is non-zero, then 'x' is a valid character for a host name.
*/
-static char ARTpathbits[256];
-#define ARThostchar(c) (ARTpathbits[(int) c] != '\0')
+#if defined (UNUSED)
+/**/static char ARTpathbits[256];
+/**/#define ARThostchar(c) (ARTpathbits[(int) c] != '\0')
+#endif
/*
** Global variables.
*/
-static SITE *Sites;
-static int nSites;
-static NEWSGROUP *Groups;
-static int nGroups;
-static NGHASH NGHtable[NGH_SIZE];
+#if defined(UNUSED)
+/**/static SITE *Sites;
+/**/static int nSites;
+/**/static NEWSGROUP *Groups;
+/**/static int nGroups;
+/**/static NGHASH NGHtable[NGH_SIZE];
+#endif
@@ -77,284 +81,292 @@
** Read the active file and fill in the Groups array. Note that
** NEWSGROUP.Sites is filled in later.
*/
-static void
-ParseActive(name)
- char *name;
-{
- char *active;
- register char *p;
- register char *q;
- register int i;
- register unsigned j;
- register NGHASH *htp;
- register NEWSGROUP *ngp;
- int NGHbuckets;
-
- /* Read the file, count the number of groups. */
- if ((active = ReadInFile(name, (struct stat *)NULL)) == NULL) {
- (void)fprintf(stderr, "Can't read \"%s\", %s\n",
- name, strerror(errno));
- exit(1);
- }
- for (p = active, i = 0; (p = strchr(p, '\n')) != NULL; p++, i++)
- continue;
- nGroups = i;
- Groups = NEW(NEWSGROUP, i);
-
- /* Set up the default hash buckets. */
- NGHbuckets = i / NGH_SIZE;
- if (NGHbuckets == 0)
- NGHbuckets = 1;
- for (i = NGH_SIZE, htp = NGHtable; --i >= 0; htp++) {
- htp->Size = NGHbuckets;
- htp->Groups = NEW(NEWSGROUP*, htp->Size);
- htp->Used = 0;
- }
-
- /* Fill in the newsgroups array. */
- for (p = active, ngp = Groups, i = nGroups; --i >= 0; ngp++, p = q + 1) {
- if ((q = strchr(p, '\n')) == NULL) {
- (void)fprintf(stderr, "Missing newline near \"%.10s...\"\n", p);
- exit(1);
- }
- *q = '\0';
- ngp->Name = p;
- ngp->nSites = 0;
-
- /* Get the first character after the third space. */
- for (j = 0; *p; p++)
- if (*p == ' ' && ++j == 3)
- break;
- if (*p == '\0') {
- (void)fprintf(stderr, "Bad format near \"%.10s...\"\n", ngp->Name);
- exit(1);
- }
- ngp->Flag = p[1];
-
- /* Find the right bucket for the group, make sure there is room. */
- /* SUPPRESS 6 *//* Over/underflow from plus expression */
- p = strchr(ngp->Name, ' ');
- *p = '\0';
- NGH_HASH(ngp->Name, p, j);
- htp = NGH_BUCKET(j);
- if (htp->Used >= htp->Size) {
- htp->Size += NGHbuckets;
- RENEW(htp->Groups, NEWSGROUP*, htp->Size);
- }
- htp->Groups[htp->Used++] = ngp;
- }
-
- /* Note that we don't bother to sort the buckets. */
-}
+#if defined (UNUSED)
+/**/static void
+/**/ParseActive(name)
+/**/ char *name;
+/**/{
+/**/ char *active;
+/**/ register char *p;
+/**/ register char *q;
+/**/ register int i;
+/**/ register unsigned j;
+/**/ register NGHASH *htp;
+/**/ register NEWSGROUP *ngp;
+/**/ int NGHbuckets;
+/**/
+/**/ /* Read the file, count the number of groups. */
+/**/ if ((active = ReadInFile(name, (struct stat *)NULL)) == NULL) {
+/**/ (void)fprintf(stderr, "Can't read \"%s\", %s\n",
+/**/ name, strerror(errno));
+/**/ exit(1);
+/**/ }
+/**/ for (p = active, i = 0; (p = strchr(p, '\n')) != NULL; p++, i++)
+/**/ continue;
+/**/ nGroups = i;
+/**/ Groups = NEW(NEWSGROUP, i);
+/**/
+/**/ /* Set up the default hash buckets. */
+/**/ NGHbuckets = i / NGH_SIZE;
+/**/ if (NGHbuckets == 0)
+/**/ NGHbuckets = 1;
+/**/ for (i = NGH_SIZE, htp = NGHtable; --i >= 0; htp++) {
+/**/ htp->Size = NGHbuckets;
+/**/ htp->Groups = NEW(NEWSGROUP*, htp->Size);
+/**/ htp->Used = 0;
+/**/ }
+/**/
+/**/ /* Fill in the newsgroups array. */
+/**/ for (p = active, ngp = Groups, i = nGroups; --i >= 0; ngp++, p = q + 1) {
+/**/ if ((q = strchr(p, '\n')) == NULL) {
+/**/ (void)fprintf(stderr, "Missing newline near \"%.10s...\"\n", p);
+/**/ exit(1);
+/**/ }
+/**/ *q = '\0';
+/**/ ngp->Name = p;
+/**/ ngp->nSites = 0;
+/**/
+/**/ /* Get the first character after the third space. */
+/**/ for (j = 0; *p; p++)
+/**/ if (*p == ' ' && ++j == 3)
+/**/ break;
+/**/ if (*p == '\0') {
+/**/ (void)fprintf(stderr, "Bad format near \"%.10s...\"\n", ngp->Name);
+/**/ exit(1);
+/**/ }
+/**/ ngp->Flag = p[1];
+/**/
+/**/ /* Find the right bucket for the group, make sure there is room. */
+/**/ /* SUPPRESS 6 *//* Over/underflow from plus expression */
+/**/ p = strchr(ngp->Name, ' ');
+/**/ *p = '\0';
+/**/ NGH_HASH(ngp->Name, p, j);
+/**/ htp = NGH_BUCKET(j);
+/**/ if (htp->Used >= htp->Size) {
+/**/ htp->Size += NGHbuckets;
+/**/ RENEW(htp->Groups, NEWSGROUP*, htp->Size);
+/**/ }
+/**/ htp->Groups[htp->Used++] = ngp;
+/**/ }
+/**/
+/**/ /* Note that we don't bother to sort the buckets. */
+/**/}
+#endif
/*
** Split text into comma-separated fields.
*/
-static char **
-CommaSplit(text)
- char *text;
-{
- register int i;
- register char *p;
- register char **argv;
- char **save;
-
- /* How much space do we need? */
- for (i = 2, p = text; *p; p++)
- if (*p == ',')
- i++;
-
- for (argv = save = NEW(char*, i), *argv++ = p = text; *p; )
- if (*p == ',') {
- *p++ = '\0';
- *argv++ = p;
- }
- else
- p++;
- *argv = NULL;
- return save;
-}
+#if defined (UNUSED)
+/**/static char **
+/**/CommaSplit(text)
+/**/ char *text;
+/**/{
+/**/ register int i;
+/**/ register char *p;
+/**/ register char **argv;
+/**/ char **save;
+/**/
+/**/ /* How much space do we need? */
+/**/ for (i = 2, p = text; *p; p++)
+/**/ if (*p == ',')
+/**/ i++;
+/**/
+/**/ for (argv = save = NEW(char*, i), *argv++ = p = text; *p; )
+/**/ if (*p == ',') {
+/**/ *p++ = '\0';
+/**/ *argv++ = p;
+/**/ }
+/**/ else
+/**/ p++;
+/**/ *argv = NULL;
+/**/ return save;
+/**/}
+#endif
/*
** Read the newsfeeds file and fill in the Sites array. Finish off the
** Groups array.
*/
-static void
-ParseNewsfeeds(name)
- char *name;
-{
- register char *p;
- register char *to;
- register int i;
- register NEWSGROUP *ngp;
- register SITE *sp;
- char **strings;
- char *save;
- char *newsfeeds;
-
- /* Read in the file, get a gross count of the number of sites. */
- if ((newsfeeds = ReadInFile(name, (struct stat *)NULL)) == NULL) {
- (void)fprintf(stderr, "Can't read \"%s\", %s\n",
- name, strerror(errno));
- exit(1);
- }
- for (p = newsfeeds, i = 0; (p = strchr(p, '\n')) != NULL; p++, i++)
- continue;
-
- /* Scan the file, parse all multi-line entries. */
- for (strings = NEW(char*, i + 1), i = 0, to = p = newsfeeds; *p; ) {
- for (save = to; *p; ) {
- if (*p == '\n') {
- p++;
- *to = '\0';
- break;
- }
- if (*p == '\\' && p[1] == '\n')
- while (*++p && CTYPE(isspace, (int)*p))
- continue;
- else
- *to++ = *p++;
- }
- *to++ = '\0';
- if (*save == COMMENT_CHAR || *save == '\0')
- continue;
- strings[i++] = COPY(save);
- }
- DISPOSE(newsfeeds);
- if (i == 0) {
- (void)fprintf(stderr, "No sites.\n");
- exit(1);
- }
-
- /* Get space for the sites. */
- nSites = i;
- Sites = NEW(SITE, nSites);
- for (i = nGroups, ngp = Groups; --i >= 0; ngp++)
- ngp->Sites = NEW(SITE*, nSites);
-
- /* Do initial processing of the site entries. */
- for (i = 0, sp = Sites; i < nSites; i++, sp++) {
- /* Nip off the first and second fields. */
- sp->Name = strings[i];
- if ((p = strchr(sp->Name, NF_FIELD_SEP)) == NULL) {
- (void)fprintf(stderr, "No separator for site \"%.10s...\"\n",
- sp->Name);
- exit(1);
- }
- *p++ = '\0';
- sp->Patterns = p;
-
- /* Nip off the third field. */
- if ((p = strchr(sp->Patterns, NF_FIELD_SEP)) == NULL) {
- (void)fprintf(stderr, "No flags for site \"%s\"\n", sp->Name);
- exit(1);
- }
- *p++ = '\0';
- sp->Flags = p;
-
- /* Nip off the last field, build the filename. */
- if ((p = strchr(sp->Flags, NF_FIELD_SEP)) == NULL) {
- (void)fprintf(stderr, "No last field for site \"%s\"\n", sp->Name);
- exit(1);
- }
- *p++ = '\0';
-
- /* Handle the subfields. */
- if ((p = strchr(sp->Name, NF_SUBFIELD_SEP)) != NULL) {
- *p++ = '\0';
- sp->Exclusions = CommaSplit(p);
- }
- else
- sp->Exclusions = NULL;
- if ((p = strchr(sp->Patterns, NF_SUBFIELD_SEP)) != NULL) {
- *p++ = '\0';
- sp->Distributions = CommaSplit(p);
- }
- else
- sp->Distributions = NULL;
- }
-}
+#if defined (UNUSED)
+/**/static void
+/**/ParseNewsfeeds(name)
+/**/ char *name;
+/**/{
+/**/ register char *p;
+/**/ register char *to;
+/**/ register int i;
+/**/ register NEWSGROUP *ngp;
+/**/ register SITE *sp;
+/**/ char **strings;
+/**/ char *save;
+/**/ char *newsfeeds;
+/**/
+/**/ /* Read in the file, get a gross count of the number of sites. */
+/**/ if ((newsfeeds = ReadInFile(name, (struct stat *)NULL)) == NULL) {
+/**/ (void)fprintf(stderr, "Can't read \"%s\", %s\n",
+/**/ name, strerror(errno));
+/**/ exit(1);
+/**/ }
+/**/ for (p = newsfeeds, i = 0; (p = strchr(p, '\n')) != NULL; p++, i++)
+/**/ continue;
+/**/
+/**/ /* Scan the file, parse all multi-line entries. */
+/**/ for (strings = NEW(char*, i + 1), i = 0, to = p = newsfeeds; *p; ) {
+/**/ for (save = to; *p; ) {
+/**/ if (*p == '\n') {
+/**/ p++;
+/**/ *to = '\0';
+/**/ break;
+/**/ }
+/**/ if (*p == '\\' && p[1] == '\n')
+/**/ while (*++p && CTYPE(isspace, (int)*p))
+/**/ continue;
+/**/ else
+/**/ *to++ = *p++;
+/**/ }
+/**/ *to++ = '\0';
+/**/ if (*save == COMMENT_CHAR || *save == '\0')
+/**/ continue;
+/**/ strings[i++] = COPY(save);
+/**/ }
+/**/ DISPOSE(newsfeeds);
+/**/ if (i == 0) {
+/**/ (void)fprintf(stderr, "No sites.\n");
+/**/ exit(1);
+/**/ }
+/**/
+/**/ /* Get space for the sites. */
+/**/ nSites = i;
+/**/ Sites = NEW(SITE, nSites);
+/**/ for (i = nGroups, ngp = Groups; --i >= 0; ngp++)
+/**/ ngp->Sites = NEW(SITE*, nSites);
+/**/
+/**/ /* Do initial processing of the site entries. */
+/**/ for (i = 0, sp = Sites; i < nSites; i++, sp++) {
+/**/ /* Nip off the first and second fields. */
+/**/ sp->Name = strings[i];
+/**/ if ((p = strchr(sp->Name, NF_FIELD_SEP)) == NULL) {
+/**/ (void)fprintf(stderr, "No separator for site \"%.10s...\"\n",
+/**/ sp->Name);
+/**/ exit(1);
+/**/ }
+/**/ *p++ = '\0';
+/**/ sp->Patterns = p;
+/**/
+/**/ /* Nip off the third field. */
+/**/ if ((p = strchr(sp->Patterns, NF_FIELD_SEP)) == NULL) {
+/**/ (void)fprintf(stderr, "No flags for site \"%s\"\n", sp->Name);
+/**/ exit(1);
+/**/ }
+/**/ *p++ = '\0';
+/**/ sp->Flags = p;
+/**/
+/**/ /* Nip off the last field, build the filename. */
+/**/ if ((p = strchr(sp->Flags, NF_FIELD_SEP)) == NULL) {
+/**/ (void)fprintf(stderr, "No last field for site \"%s\"\n", sp->Name);
+/**/ exit(1);
+/**/ }
+/**/ *p++ = '\0';
+/**/
+/**/ /* Handle the subfields. */
+/**/ if ((p = strchr(sp->Name, NF_SUBFIELD_SEP)) != NULL) {
+/**/ *p++ = '\0';
+/**/ sp->Exclusions = CommaSplit(p);
+/**/ }
+/**/ else
+/**/ sp->Exclusions = NULL;
+/**/ if ((p = strchr(sp->Patterns, NF_SUBFIELD_SEP)) != NULL) {
+/**/ *p++ = '\0';
+/**/ sp->Distributions = CommaSplit(p);
+/**/ }
+/**/ else
+/**/ sp->Distributions = NULL;
+/**/ }
+/**/}
+#endif
/*
** Build the subscription list for a site.
*/
-static void
-BuildSubList(sp, subbed)
- register SITE *sp;
- char *subbed;
-{
- static char SEPS[] = ",";
- register char subvalue;
- register char *pat;
- register char *p;
- register NEWSGROUP *ngp;
- register int i;
- BOOL JustModerated;
- BOOL JustUnmoderated;
-
- if (EQ(sp->Name, "ME"))
- return;
-
- /* Fill in the subbed array with the mask of groups. */
- (void)memset(subbed, SUB_DEFAULT, (size_t)nGroups);
- if ((pat = strtok(sp->Patterns, SEPS)) != NULL)
- do {
- subvalue = *pat != SUB_NEGATE;
- if (!subvalue)
- pat++;
- for (p = subbed, ngp = Groups, i = nGroups; --i >= 0; ngp++, p++)
- if (wildmat(ngp->Name, pat))
- *p = subvalue;
- } while ((pat = strtok((char *)NULL, SEPS)) != NULL);
-
- /* Parse the flags.. */
- JustModerated = FALSE;
- JustUnmoderated = FALSE;
- if ((p = strtok(sp->Flags, SEPS)) != NULL)
- do {
- switch (*p) {
- case 'W':
- if (EQ(p, "Wnm"))
- break;
- /* FALLTHROUGH */
- default:
- (void)fprintf(stderr, "Ignoring \"%s\" flag for \"%s\"\n",
- p, sp->Name);
- break;
- case 'N':
- while (*++p)
- switch (*p) {
- default:
- (void)fprintf(stderr, "Unknown N%c flag for \"%s\"\n",
- *p, sp->Name);
- break;
- case 'm': JustModerated = TRUE; break;
- case 'u': JustUnmoderated = TRUE; break;
- }
- break;
- case 'T':
- break;
- }
- } while ((p = strtok((char *)NULL, SEPS)) != NULL);
-
- /* Modify the subscription list based on the flags. */
- if (JustModerated)
- for (p = subbed, ngp = Groups, i = nGroups; --i >= 0; ngp++, p++)
- if (ngp->Flag != NF_FLAG_MODERATED)
- *p = FALSE;
- if (JustUnmoderated)
- for (p = subbed, ngp = Groups, i = nGroups; --i >= 0; ngp++, p++)
- if (ngp->Flag == NF_FLAG_MODERATED)
- *p = FALSE;
-
- /* Tell the groups that this site gets that they should feed this site. */
- for (p = subbed, ngp = Groups, i = nGroups; --i >= 0; ngp++)
- if (*p++)
- ngp->Sites[ngp->nSites++] = sp;
-}
+#if defined (UNUSED)
+/**/static void
+/**/BuildSubList(sp, subbed)
+/**/ register SITE *sp;
+/**/ char *subbed;
+/**/{
+/**/ static char SEPS[] = ",";
+/**/ register char subvalue;
+/**/ register char *pat;
+/**/ register char *p;
+/**/ register NEWSGROUP *ngp;
+/**/ register int i;
+/**/ BOOL JustModerated;
+/**/ BOOL JustUnmoderated;
+/**/
+/**/ if (EQ(sp->Name, "ME"))
+/**/ return;
+/**/
+/**/ /* Fill in the subbed array with the mask of groups. */
+/**/ (void)memset(subbed, SUB_DEFAULT, (size_t)nGroups);
+/**/ if ((pat = strtok(sp->Patterns, SEPS)) != NULL)
+/**/ do {
+/**/ subvalue = *pat != SUB_NEGATE;
+/**/ if (!subvalue)
+/**/ pat++;
+/**/ for (p = subbed, ngp = Groups, i = nGroups; --i >= 0; ngp++, p++)
+/**/ if (wildmat(ngp->Name, pat))
+/**/ *p = subvalue;
+/**/ } while ((pat = strtok((char *)NULL, SEPS)) != NULL);
+/**/
+/**/ /* Parse the flags.. */
+/**/ JustModerated = FALSE;
+/**/ JustUnmoderated = FALSE;
+/**/ if ((p = strtok(sp->Flags, SEPS)) != NULL)
+/**/ do {
+/**/ switch (*p) {
+/**/ case 'W':
+/**/ if (EQ(p, "Wnm"))
+/**/ break;
+/**/ /* FALLTHROUGH */
+/**/ default:
+/**/ (void)fprintf(stderr, "Ignoring \"%s\" flag for \"%s\"\n",
+/**/ p, sp->Name);
+/**/ break;
+/**/ case 'N':
+/**/ while (*++p)
+/**/ switch (*p) {
+/**/ default:
+/**/ (void)fprintf(stderr, "Unknown N%c flag for \"%s\"\n",
+/**/ *p, sp->Name);
+/**/ break;
+/**/ case 'm': JustModerated = TRUE; break;
+/**/ case 'u': JustUnmoderated = TRUE; break;
+/**/ }
+/**/ break;
+/**/ case 'T':
+/**/ break;
+/**/ }
+/**/ } while ((p = strtok((char *)NULL, SEPS)) != NULL);
+/**/
+/**/ /* Modify the subscription list based on the flags. */
+/**/ if (JustModerated)
+/**/ for (p = subbed, ngp = Groups, i = nGroups; --i >= 0; ngp++, p++)
+/**/ if (ngp->Flag != NF_FLAG_MODERATED)
+/**/ *p = FALSE;
+/**/ if (JustUnmoderated)
+/**/ for (p = subbed, ngp = Groups, i = nGroups; --i >= 0; ngp++, p++)
+/**/ if (ngp->Flag == NF_FLAG_MODERATED)
+/**/ *p = FALSE;
+/**/
+/**/ /* Tell the groups that this site gets that they should feed this site. */
+/**/ for (p = subbed, ngp = Groups, i = nGroups; --i >= 0; ngp++)
+/**/ if (*p++)
+/**/ ngp->Sites[ngp->nSites++] = sp;
+/**/}
+#endif
diff -Naur --recursive inn2-2.3.1.orig/frontends/inews.c inn2-2.3.1/frontends/inews.c
--- inn2-2.3.1.orig/frontends/inews.c Fri Jun 8 22:55:27 2001
+++ inn2-2.3.1/frontends/inews.c Sat Jun 9 00:06:37 2001
@@ -51,12 +51,16 @@
char *Value;
} HEADER;
-static char *tmpPtr ;
+#if defined (UNUSED)
+/**/static char *tmpPtr ;
+#endif
static BOOL Dump;
static BOOL Revoked;
static BOOL Spooling;
static char **OtherHeaders;
-static char NGSEPS[] = NG_SEPARATOR;
+#if defined (UNUSED)
+/**/static char NGSEPS[] = NG_SEPARATOR;
+#endif
static char SIGSEP[] = SIG_SEPARATOR;
static FILE *FromServer;
static FILE *ToServer;
@@ -597,11 +601,9 @@
HEADER *hp;
char *p;
TIMEINFO Now;
- struct tm *tm;
char buff[SMBUF];
char from[SMBUF];
int i;
- long zone;
/* Do some preliminary fix-ups. */
for (hp = Table; hp < ENDOF(Table); hp++) {
@@ -1000,7 +1002,6 @@
int port;
int Mode;
int SigLines;
- FILE *F;
struct passwd *pwp;
char *article;
char *deadfile;
diff -Naur --recursive inn2-2.3.1.orig/innd/art.c inn2-2.3.1/innd/art.c
--- inn2-2.3.1.orig/innd/art.c Fri Jun 8 22:55:27 2001
+++ inn2-2.3.1/innd/art.c Sat Jun 9 00:06:37 2001
@@ -1532,7 +1532,7 @@
}
/* Write that the site is getting it, and flag to send it. */
- if (innconf->logsitename && fprintf(Log, " %s", sp->Name) == EOF || ferror(Log)) {
+ if (innconf->logsitename && (fprintf(Log, " %s", sp->Name) == EOF || ferror(Log))) {
j = errno;
syslog(L_ERROR, "%s cant write log_site %m", LogName);
IOError("logging site", j);
@@ -1648,7 +1648,7 @@
s1 = (char **) p1;
s2 = (char **) p2;
- if (cdiff = (**s1)-(**s2))
+ if ((cdiff = (**s1)-(**s2)) != 0)
return cdiff;
return strcmp((*s1)+1, (*s2)+1);
}
diff -Naur --recursive inn2-2.3.1.orig/innd/cc.c inn2-2.3.1/innd/cc.c
--- inn2-2.3.1.orig/innd/cc.c Fri Jun 8 22:55:27 2001
+++ inn2-2.3.1/innd/cc.c Sat Jun 9 00:06:37 2001
@@ -1005,7 +1005,7 @@
sprintf(buff, ":reject::");
break;
case CTnntp:
- sprintf(buff, ":nntp:%d:%s", Now.time - cp->LastActive, (cp->MaxCnx > 0 && cp->ActiveCnx == 0) ? "paused" : "");
+ sprintf(buff, ":nntp:%ld:%s", Now.time - cp->LastActive, (cp->MaxCnx > 0 && cp->ActiveCnx == 0) ? "paused" : "");
break;
case CTlocalconn:
sprintf(buff, ":localconn::");
diff -Naur --recursive inn2-2.3.1.orig/innd/innd.c inn2-2.3.1/innd/innd.c
--- inn2-2.3.1.orig/innd/innd.c Fri Jun 8 22:55:27 2001
+++ inn2-2.3.1/innd/innd.c Sat Jun 9 00:06:37 2001
@@ -428,7 +428,6 @@
{
char buff[SMBUF];
char *p;
- int oerrno;
if (Mode == OMrunning) {
if (Reservation) {
diff -Naur --recursive inn2-2.3.1.orig/innd/nc.c inn2-2.3.1/innd/nc.c
--- inn2-2.3.1.orig/innd/nc.c Fri Jun 8 22:55:27 2001
+++ inn2-2.3.1/innd/nc.c Sat Jun 9 00:06:37 2001
@@ -702,28 +702,30 @@
/*
** Remove the \r\n and leading dot escape that the NNTP protocol adds.
*/
-static void
-NCclean(BUFFER *bp)
-{
- char *end;
- char *p;
- char *dest;
-
- for (p = bp->Data, dest = p, end = p + bp->Used; p < end; ) {
- if (p[0] == '\r' && p[1] == '\n') {
- p += 2;
- *dest++ = '\n';
- if (p[0] == '.' && p[1] == '.') {
- p += 2;
- *dest++ = '.';
- }
- }
- else
- *dest++ = *p++;
- }
- *dest = '\0';
- bp->Used = dest - bp->Data;
-}
+#if defined (UNUSED)
+/**/static void
+/**/NCclean(BUFFER *bp)
+/**/{
+/**/ char *end;
+/**/ char *p;
+/**/ char *dest;
+/**/
+/**/ for (p = bp->Data, dest = p, end = p + bp->Used; p < end; ) {
+/**/ if (p[0] == '\r' && p[1] == '\n') {
+/**/ p += 2;
+/**/ *dest++ = '\n';
+/**/ if (p[0] == '.' && p[1] == '.') {
+/**/ p += 2;
+/**/ *dest++ = '.';
+/**/ }
+/**/ }
+/**/ else
+/**/ *dest++ = *p++;
+/**/ }
+/**/ *dest = '\0';
+/**/ bp->Used = dest - bp->Data;
+/**/}
+#endif
/*
@@ -1034,7 +1036,7 @@
syslog(L_NOTICE, "%s internal rejecting too long command line (%d > %d)",
CHANname(cp), i, NNTP_STRLEN);
cp->LargeCmdSize = 0;
- (void)sprintf(buff, "%d command exceeds local limit of %ld bytes",
+ (void)sprintf(buff, "%d command exceeds local limit of %d bytes",
NNTP_BAD_COMMAND_VAL, NNTP_STRLEN);
cp->State = CSgetcmd;
NCwritereply(cp, buff);
diff -Naur --recursive inn2-2.3.1.orig/innfeed/host.c inn2-2.3.1/innfeed/host.c
--- inn2-2.3.1.orig/innfeed/host.c Thu Jan 11 01:55:23 2001
+++ inn2-2.3.1/innfeed/host.c Sat Jun 9 00:13:05 2001
@@ -95,7 +95,7 @@
#define TRYBLOCKEDHOSTPERIOD 120
extern char *configFile ;
-extern mainLogStatus (FILE *fp) ;
+extern void mainLogStatus (FILE *fp) ;
#if defined(hpux) || defined(__hpux) || defined(_SCO_DS)
extern int h_errno;
#endif
@@ -1135,7 +1135,6 @@
char **newIpAddrs = NULL;
struct in_addr ipAddr, *returnAddr ;
struct hostent *hostEnt ;
- char *msgstr[SMBUF] ;
ASSERT(host->params != NULL);
@@ -2522,10 +2521,7 @@
}
if (s != NULL)
- if (getString (s,IP_NAME,&q,NO_INHERIT))
- p->ipName = q ;
- else
- p->ipName = strdup (name) ;
+ p->ipName = getString (s,IP_NAME,&q,NO_INHERIT) ? q : strdup (name) ;
}
diff -Naur --recursive inn2-2.3.1.orig/innfeed/tape.c inn2-2.3.1/innfeed/tape.c
--- inn2-2.3.1.orig/innfeed/tape.c Thu Jan 11 01:55:23 2001
+++ inn2-2.3.1/innfeed/tape.c Sat Jun 9 00:06:37 2001
@@ -179,7 +179,9 @@
static u_int tapeCkNewFilePeriod ;
/* the callback ID of the tape rotation timer callback. */
-static TimeoutId rotateId ; /* XXX */
+#if defined (UNUSED)
+/**/static TimeoutId rotateId ; /* XXX */
+#endif
static time_t rotatePeriod = TAPE_ROTATE_PERIOD ;
diff -Naur --recursive inn2-2.3.1.orig/lib/dbz.c inn2-2.3.1/lib/dbz.c
--- inn2-2.3.1.orig/lib/dbz.c Fri Jun 8 22:55:27 2001
+++ inn2-2.3.1/lib/dbz.c Sat Jun 9 00:06:37 2001
@@ -1024,11 +1024,6 @@
*value = offset;
return TRUE;
}
-
- /* we didn't find it */
- DEBUG(("fetch: failed\n"));
- prevp = &srch; /* remember where we stopped */
- return FALSE;
#else /* DO_TAGGED_HASH */
if (search(&srch) == TRUE) {
/* Actually get the data now */
@@ -1046,12 +1041,12 @@
DEBUG(("fetch: successful\n"));
return TRUE;
}
+#endif
/* we didn't find it */
DEBUG(("fetch: failed\n"));
prevp = &srch; /* remember where we stopped */
return FALSE;
-#endif
}
/*
diff -Naur --recursive inn2-2.3.1.orig/nnrpd/article.c inn2-2.3.1/nnrpd/article.c
--- inn2-2.3.1.orig/nnrpd/article.c Fri Jun 8 22:55:28 2001
+++ inn2-2.3.1/nnrpd/article.c Sat Jun 9 00:06:37 2001
@@ -300,29 +300,31 @@
return FALSE;
}
-static BOOL ARTinstorebyartnum(int artnum)
-{
- ARTHANDLE *art;
- struct timeval stv, etv;
- TOKEN token;
-
- if (PERMaccessconf->nnrpdoverstats)
- gettimeofday(&stv, NULL);
- if (!OVgetartinfo(GRPcur, artnum, NULL, NULL, &token))
- return FALSE;
-
- art = SMretrieve(token, RETR_STAT);
- if (PERMaccessconf->nnrpdoverstats) {
- gettimeofday(&etv, NULL);
- OVERartcheck+=(etv.tv_sec - stv.tv_sec) * 1000;
- OVERartcheck+=(etv.tv_usec - stv.tv_usec) / 1000;
- }
- if (art) {
- SMfreearticle(art);
- return TRUE;
- }
- return FALSE;
-}
+#if defined (UNUSED)
+/**/static BOOL ARTinstorebyartnum(int artnum)
+/**/{
+/**/ ARTHANDLE *art;
+/**/ struct timeval stv, etv;
+/**/ TOKEN token;
+/**/
+/**/ if (PERMaccessconf->nnrpdoverstats)
+/**/ gettimeofday(&stv, NULL);
+/**/ if (!OVgetartinfo(GRPcur, artnum, NULL, NULL, &token))
+/**/ return FALSE;
+/**/
+/**/ art = SMretrieve(token, RETR_STAT);
+/**/ if (PERMaccessconf->nnrpdoverstats) {
+/**/ gettimeofday(&etv, NULL);
+/**/ OVERartcheck+=(etv.tv_sec - stv.tv_sec) * 1000;
+/**/ OVERartcheck+=(etv.tv_usec - stv.tv_usec) / 1000;
+/**/ }
+/**/ if (art) {
+/**/ SMfreearticle(art);
+/**/ return TRUE;
+/**/ }
+/**/ return FALSE;
+/**/}
+#endif
/*
** If the article name is valid, open it and stuff in the ID.
@@ -674,7 +676,7 @@
Reply("%s\r\n", ARTnocurrart);
return;
}
- (void)sprintf(buff, "%ld", ARTnumber);
+ (void)sprintf(buff, "%d", ARTnumber);
tart=ARTnumber;
}
else {
@@ -692,7 +694,7 @@
Reply("%s\r\n", ARTnoartingroup);
return;
}
- (void)sprintf(buff, "%ld", ARTnumber);
+ (void)sprintf(buff, "%d", ARTnumber);
tart=ARTnumber;
}
if (ac > 1)
@@ -841,7 +843,7 @@
}
/* Skip leading headers. */
- for (field; field >= 0 && *p; p++)
+ for ( ; field >= 0 && *p; p++)
if ((p = strchr(p, '\t')) == NULL)
return NULL;
else
@@ -1227,7 +1229,7 @@
continue;
p = GetHeader(header, FALSE);
if (p && wildmat(p, pattern)) {
- sprintf(buff, "%lu ", i);
+ sprintf(buff, "%u ", i);
SendIOb(buff, strlen(buff));
SendIOb(p, strlen(p));
SendIOb("\r\n", 2);
diff -Naur --recursive inn2-2.3.1.orig/nnrpd/nnrpd.c inn2-2.3.1/nnrpd/nnrpd.c
--- inn2-2.3.1.orig/nnrpd/nnrpd.c Fri Jun 8 22:55:28 2001
+++ inn2-2.3.1/nnrpd/nnrpd.c Sat Jun 9 00:06:37 2001
@@ -1088,7 +1088,7 @@
gettimeofday(&tv,NULL);
count += pid;
vid = tv.tv_sec ^ tv.tv_usec ^ pid ^ count;
- sprintf(LocalLogFileName, "%s/tracklogs/log-%ld", innconf->pathlog,vid);
+ sprintf(LocalLogFileName, "%s/tracklogs/log-%d", innconf->pathlog,vid);
if ((locallog=fopen(LocalLogFileName, "w")) != NULL) {
syslog(L_NOTICE, "%s Local Logging begins (%s) %s",ClientHost, Username, LocalLogFileName);
fprintf(locallog, "%s Tracking Enabled (%s)\n", ClientHost, Username);
diff -Naur --recursive inn2-2.3.1.orig/nnrpd/perl.c inn2-2.3.1/nnrpd/perl.c
--- inn2-2.3.1.orig/nnrpd/perl.c Thu Jan 11 01:55:23 2001
+++ inn2-2.3.1/nnrpd/perl.c Sat Jun 9 00:06:37 2001
@@ -285,6 +285,7 @@
FREETMPS;
LEAVE;
+ return 0;
}
int perlAuthenticate(char *ClientHost, char *ClientIP, char *ServerHost, char *user, char *passwd, char *accesslist) {
diff -Naur --recursive inn2-2.3.1.orig/storage/buffindexed/buffindexed.c inn2-2.3.1/storage/buffindexed/buffindexed.c
--- inn2-2.3.1.orig/storage/buffindexed/buffindexed.c Fri Jun 8 22:55:28 2001
+++ inn2-2.3.1/storage/buffindexed/buffindexed.c Sat Jun 9 00:08:58 2001
@@ -237,7 +237,6 @@
static BOOL Cutofflow;
static int ovbuffmode;
-static int ovpadamount = 128;
static GROUPLOC GROUPnewnode(void);
static BOOL GROUPremapifneeded(GROUPLOC loc);
@@ -1001,7 +1000,6 @@
HASH grouphash;
GROUPLOC gloc;
GROUPENTRY *ge;
- void *handle;
#ifdef OV_DEBUG
struct ov_name_table *ntp;
#endif /* OV_DEBUG */
@@ -1142,7 +1140,6 @@
BOOL buffindexed_groupdel(char *group) {
GROUPLOC gloc;
GROUPENTRY *ge;
- void *handle;
gloc = GROUPfind(group, FALSE);
if (GROUPLOCempty(gloc)) {
@@ -1183,7 +1180,6 @@
#endif /* OV_DEBUG */
OVBUFF *ovbuff;
OV ov;
- int delta, i;
OVINDEXHEAD ovindexhead;
/* there is no index */
@@ -1417,7 +1413,6 @@
#endif /* OV_DEBUG */
GROUPDATABLOCK *gdb;
int i;
- OV ov;
GIBLIST *giblist;
for (giblist = Giblist ; giblist != NULL ; giblist = giblist->next) {
@@ -1495,7 +1490,7 @@
OV ov = ge->baseindex;
OVBUFF *ovbuff;
GROUPDATABLOCK *gdb;
- int pagefudge, base, limit, i, count, len;
+ int pagefudge, limit, i, count, len;
OFFSET_T offset, mmapoffset;
OVBLOCK *ovblock;
caddr_t addr;
@@ -1658,7 +1653,6 @@
BOOL ovsearch(void *handle, ARTNUM *artnum, char **data, int *len, TOKEN *token, time_t *arrived, time_t *expires) {
OVSEARCH *search = (OVSEARCH *)handle;
- OVBLOCK *ovblock;
OV srchov;
GROUPDATABLOCK *gdb;
@@ -2004,7 +1998,6 @@
char *group, flag[2], buff[OV_BLOCKSIZE];
int lo, hi, count, flags, i;
OVSEARCH *search;
- OVBLOCK *ovblock;
OVINDEX *ovindex;
OVBUFF *ovbuff;
GROUPENTRY *ge;
diff -Naur --recursive inn2-2.3.1.orig/storage/cnfs/cnfs.c inn2-2.3.1/storage/cnfs/cnfs.c
--- inn2-2.3.1.orig/storage/cnfs/cnfs.c Fri Jun 8 22:55:28 2001
+++ inn2-2.3.1/storage/cnfs/cnfs.c Sat Jun 9 00:07:57 2001
@@ -1205,7 +1205,7 @@
CNFSARTHEADER cah;
PRIV_CNFS *private;
char *p;
- long pagefudge, blockfudge;
+ long pagefudge;
CYCBUFF_OFF_T mmapoffset;
static TOKEN ret_token;
static BOOL nomessage = FALSE;
diff -Naur --recursive inn2-2.3.1.orig/storage/ov.c inn2-2.3.1/storage/ov.c
--- inn2-2.3.1.orig/storage/ov.c Fri Jun 8 22:55:28 2001
+++ inn2-2.3.1/storage/ov.c Sat Jun 9 00:10:07 2001
@@ -245,7 +245,7 @@
* If there are other fields beyond Xref in overview, then
* we must find Xref's end, or data following is misinterpreted.
*/
- if (xrefend = memchr(next, '\t', xreflen))
+ if ((xrefend = memchr(next, '\t', xreflen)) != NULL)
xreflen = xrefend - next;
if (xrefdatalen == 0) {
@@ -301,7 +301,7 @@
if (artnum <= 0)
continue;
- sprintf(overdata, "%d\t", artnum);
+ sprintf(overdata, "%ld\t", artnum);
i = strlen(overdata);
memcpy(overdata + i, data, len);
i += len;
@@ -815,8 +815,6 @@
{
static NEWSGROUP Removeit;
BADGROUP *bg;
- char *p;
- char buff[SPOOLNAMEBUFF];
/* See if we already know about this group. */
for (bg = EXPbadgroups; bg; bg = bg->Next)
@@ -971,7 +969,7 @@
static int buffsize;
int i;
ARTOVERFIELD *fp;
- char *next, *q;
+ char *next;
fp = &ARTfields[field];
@@ -1017,7 +1015,7 @@
/*
** Read overview.fmt and find index for headers
*/
-static OVfindheaderindex() {
+static void OVfindheaderindex() {
FILE *F;
char *active;
int i;
@@ -1068,12 +1066,10 @@
char *p;
int i;
int count;
- time_t posted;
time_t when;
BOOL poisoned;
BOOL keeper;
BOOL remove;
- ARTHANDLE *article;
char *Xref;
if (SMprobe(SELFEXPIRE, &token, NULL)) {
More information about the inn-patches
mailing list