diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2014-03-19 14:09:29 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2014-03-19 14:09:29 +0000 |
commit | ee16702944acbaa397c4d9d1684c7b5c22226d4b (patch) | |
tree | 378f852b8e0b16aa0e7c0c1dc3689a9c30e2d34c /news/cnews | |
parent | 4ea18476790c819cd2836ee38327e7a77b4ca6b1 (diff) | |
download | ports-ee16702944acbaa397c4d9d1684c7b5c22226d4b.tar.gz ports-ee16702944acbaa397c4d9d1684c7b5c22226d4b.zip |
- revert r346880
Approved by: bapt
- update LICENSE
- fix build with new clang
Notes
Notes:
svn path=/head/; revision=348620
Diffstat (limited to 'news/cnews')
-rw-r--r-- | news/cnews/Makefile | 6 | ||||
-rw-r--r-- | news/cnews/files/patch-batcher.c | 17 | ||||
-rw-r--r-- | news/cnews/files/patch-canonhdr.c | 19 | ||||
-rw-r--r-- | news/cnews/files/patch-fileart.c | 17 | ||||
-rw-r--r-- | news/cnews/files/patch-header.c | 19 | ||||
-rw-r--r-- | news/cnews/files/patch-mkov.c | 19 | ||||
-rw-r--r-- | news/cnews/files/patch-newsrc.c | 70 | ||||
-rw-r--r-- | news/cnews/files/patch-readnews.c | 90 | ||||
-rw-r--r-- | news/cnews/files/patch-trbatch | 51 | ||||
-rw-r--r-- | news/cnews/files/patch-trbatch.c | 94 | ||||
-rw-r--r-- | news/cnews/files/patch-trbatch.h | 19 |
11 files changed, 357 insertions, 64 deletions
diff --git a/news/cnews/Makefile b/news/cnews/Makefile index d5f917399b53..87dc96dd6e17 100644 --- a/news/cnews/Makefile +++ b/news/cnews/Makefile @@ -33,11 +33,13 @@ PATCHFILES= c-news-patch-fileart.c c-news-patch-namelen \ MAINTAINER= dinoex@FreeBSD.org COMMENT= An news server -LICENSE= BSD4CLAUSE +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/COPYRIGHT MAKE_JOBS_UNSAFE= yes -CFLAGS+= -Wno-return-type +USE_GCC= any + DIST_SUBDIR= ${DISTNAME} NO_WRKSUBDIR= yes MAKEFILE= makefile diff --git a/news/cnews/files/patch-batcher.c b/news/cnews/files/patch-batcher.c index 71479640d328..4ddb6c68ab5d 100644 --- a/news/cnews/files/patch-batcher.c +++ b/news/cnews/files/patch-batcher.c @@ -1,5 +1,5 @@ --- batch/batcher.c.orig 1994-11-28 02:14:35.000000000 +0100 -+++ batch/batcher.c 2011-05-12 14:53:06.000000000 +0200 ++++ batch/batcher.c 2014-02-07 16:48:39.000000000 +0100 @@ -12,6 +12,7 @@ */ @@ -8,3 +8,18 @@ #include <string.h> #include <signal.h> #include <sys/types.h> +@@ -116,7 +117,7 @@ + */ + if (debug) + warning("can't find `%s'", article); +- return; ++ return 0; + } + + if (fstat(artfile, &sbuf) < 0) +@@ -143,4 +144,5 @@ + } + + (void) close(artfile); ++ return 0; + } diff --git a/news/cnews/files/patch-canonhdr.c b/news/cnews/files/patch-canonhdr.c new file mode 100644 index 000000000000..63cc89b51d9e --- /dev/null +++ b/news/cnews/files/patch-canonhdr.c @@ -0,0 +1,19 @@ +--- util/canonhdr.c.orig 1995-04-28 02:51:38.000000000 +0200 ++++ util/canonhdr.c 2014-02-07 16:47:48.000000000 +0100 +@@ -92,7 +92,7 @@ + static char expiresnm[] = "Expires: "; + + if (!washdr) +- return; ++ return 0; + while ((hdr = gethdr(in, &nolimit, &ishdr)) != NULL && ishdr) { + register char *cp; + static char canonmsgid[] = "Message-Id:"; +@@ -141,6 +141,7 @@ + (void) fputs(datenm, stdout); + (void) fputs(canondate("now", "now"), stdout); + } ++ return 0; + } + + int diff --git a/news/cnews/files/patch-fileart.c b/news/cnews/files/patch-fileart.c new file mode 100644 index 000000000000..b3c6497bd813 --- /dev/null +++ b/news/cnews/files/patch-fileart.c @@ -0,0 +1,17 @@ +--- relay/fileart.c.orig 1995-04-28 02:51:36.000000000 +0200 ++++ relay/fileart.c 2014-02-07 17:03:01.000000000 +0100 +@@ -791,7 +805,7 @@ + canthappen(art, 'i', + "mkcopies called with ST_REFUSED set (can't happen)", ""); + if (links == NULL) /* fileart failed? */ +- return; ++ return 0; + + /* fill in any empty links */ + for (lp = link1; lp < linklim; lp++) { +@@ -807,4 +821,5 @@ + nnfree(&lp->l_num); + } + free((char *)links); ++ return 0; + } diff --git a/news/cnews/files/patch-header.c b/news/cnews/files/patch-header.c new file mode 100644 index 000000000000..b0203bc9f1e0 --- /dev/null +++ b/news/cnews/files/patch-header.c @@ -0,0 +1,19 @@ +--- readnews/header.c.orig 1994-08-25 22:15:09.000000000 +0200 ++++ readnews/header.c 2014-02-07 16:54:07.000000000 +0100 +@@ -142,7 +142,7 @@ + memset((char *) hp, 0, sizeof(header)); + while (hfgets(buf, sizeof(buf), f)) { + if (buf[0] == '\n') +- return; ++ return 0; + if (isupper(buf[0]) && (colon = strchr(buf, ':')) && + (space = strchr(buf, ' ')) && (colon + 1 == space)) { + *colon = '\0'; +@@ -220,6 +220,7 @@ + } + } + } ++ return 0; + } + + diff --git a/news/cnews/files/patch-mkov.c b/news/cnews/files/patch-mkov.c new file mode 100644 index 000000000000..483441a3d9c1 --- /dev/null +++ b/news/cnews/files/patch-mkov.c @@ -0,0 +1,19 @@ +--- nov/mkov.c.orig 1994-10-18 04:49:48.000000000 +0100 ++++ nov/mkov.c 2014-02-07 16:52:25.000000000 +0100 +@@ -176,7 +176,7 @@ + error("fstat of %s failed", inname); + if ((statb.st_mode&S_IFMT) == S_IFDIR || + (oldtime > 0 && statb.st_mtime > oldtime)) +- return; /* ignore directories and new files */ ++ return 0; /* ignore directories and new files */ + artnumstr = base; + (void) sprintf(bytes, "%ld", (long)statb.st_size); + } +@@ -212,6 +212,7 @@ + + freehdrs(&hdrs); + } while (!articles && hdr != NULL); ++ return 0; + } + + char * /* NULL at EOF, or malloced, don't free */ diff --git a/news/cnews/files/patch-newsrc.c b/news/cnews/files/patch-newsrc.c new file mode 100644 index 000000000000..7f00ea15403f --- /dev/null +++ b/news/cnews/files/patch-newsrc.c @@ -0,0 +1,70 @@ +--- readnews/newsrc.c.orig 1995-04-28 03:12:19.000000000 +0200 ++++ readnews/newsrc.c 2014-02-07 17:01:23.000000000 +0100 +@@ -30,7 +30,7 @@ + error("No $HOME in environment."); + rcname = newstr3(rcname, "/", nrcname); + if ((f = fopen(rcname, "r")) == NULL) +- return; ++ return 0; + + rclineno = 0; + while (getline(f, word, rest)) +@@ -39,6 +39,7 @@ + else + dorcline(word, rest); + (void) fclose(f); ++ return 0; + } + + /* +@@ -101,7 +102,7 @@ + while (isspace(*cp)) + cp++; + if (!*cp) +- return; ++ return 0; + + argc = 2; + argv = (char **) myalloc(2 * sizeof(char *)); +@@ -120,6 +121,7 @@ + if (options(argc, argv, false) < 0) + error("Bad options: %s line %d: %s", rcname, rclineno, s); + free((char *) argv); ++ return 0; + } + + /* +@@ -210,7 +212,7 @@ + donesome = true; + switch (act = (*func)(ap, np, false, false)) { + case stop: +- return; ++ return 0; + case next: + continue; + case nextgroup: +@@ -226,6 +228,7 @@ + if (act != searchgroup && dolast && donesome) + act = (*func)(NIL(active), NIL(newsrc), true, false); + } while (act == searchgroup); ++ return 0; + } + + /* +@@ -281,7 +284,7 @@ + extern int usize; + + if (!rc && (!rcgrps || !*rcgrps)) +- return; ++ return 0; + + signal(SIGINT, SIG_IGN); + signal(SIGQUIT, SIG_IGN); +@@ -301,6 +304,7 @@ + for (np = rc; np; np = np->n_next) + writengline(f, np); + (void) fclose(f); ++ return 0; + } + + static int diff --git a/news/cnews/files/patch-readnews.c b/news/cnews/files/patch-readnews.c index 2f6cdf6da9d8..f6c3754601ab 100644 --- a/news/cnews/files/patch-readnews.c +++ b/news/cnews/files/patch-readnews.c @@ -1,5 +1,5 @@ --- readnews/readnews.c.orig 1995-04-28 03:12:21.000000000 +0200 -+++ readnews/readnews.c 2011-05-12 16:07:47.000000000 +0200 ++++ readnews/readnews.c 2014-02-07 16:57:21.000000000 +0100 @@ -33,7 +33,7 @@ active *alist; /* internal active list */ @@ -9,7 +9,55 @@ bool interrupt; /* if interrupt hit */ char *newsdir; /* %news */ bool su; /* if super user (not used) */ -@@ -950,7 +950,7 @@ +@@ -783,11 +783,12 @@ + helppath = ctlfile("readnews.help"); + if ((f = fopen(helppath, "r")) == NIL(FILE)) { + (void) printf("Can't open %s\n", helppath); +- return; ++ return 0; + } + while ((c = getc(f)) != EOF) + (void) putc(c, stdout); + (void) fclose(f); ++ return 0; + } + + /* +@@ -806,7 +807,7 @@ + #ifdef UNSWMAIL + argv[argc++] = "-s"; + if ((argv[argc++] = getsubject(hp)) == NIL(char)) +- return; ++ return 0; + argv[argc++] = "-i"; + argv[argc++] = fname; + #endif +@@ -821,6 +822,7 @@ + run(mailpath, argv, false); + + free(argv[argc - 2]); ++ return 0; + } + + +@@ -838,7 +840,7 @@ + char *s = getsubject(hp); + + if (s == NULL) +- return; ++ return 0; + (void) strcpy(tmpf, "/tmp/rfXXXXXX"); + (void) mktemp(tmpf); + fo = fopen(tmpf, "w"); +@@ -859,6 +861,7 @@ + free(s); + + (void) unlink(tmpf); ++ return 0; + } + + /* +@@ -950,20 +953,20 @@ register char *cp; register FILE *sf; register char *aname; @@ -18,3 +66,41 @@ extern char *getenv(); if (!*s) { + if ((aname = getenv("HOME")) == NIL(char)) { + (void) printf("No $HOME in environment.\n"); +- return; ++ return 0; + } + s = aname = newstr3(aname, "/", ARTICLES); + } else + aname = NIL(char); + if ((sf = fopen(s, "a")) == NIL(FILE)) { + (void) fprintf(stderr, "readnews: can't open %s\n", s); +- return; ++ return 0; + } + if (aname) + free(aname); +@@ -983,6 +986,7 @@ + (void) putc('\n', sf); + (void) fclose(sf); + fseek(f, pos, 0); ++ return 0; + } + + /* +@@ -1083,7 +1087,7 @@ + fname = ctlfile("readnews.ctl"); + f = fopen(fname, "r"); + if (f == NULL) +- return; ++ return 0; + + while (fgets(line, sizeof(line), f) != NULL) { + line[strlen(line)-1] = '\0'; /* dispose of newline */ +@@ -1103,4 +1107,5 @@ + } + + (void) fclose(f); ++ return 0; + } diff --git a/news/cnews/files/patch-trbatch b/news/cnews/files/patch-trbatch deleted file mode 100644 index 9e4065e4dfa7..000000000000 --- a/news/cnews/files/patch-trbatch +++ /dev/null @@ -1,51 +0,0 @@ ---- include/trbatch.h.orig Fri Dec 17 00:17:03 1993 -+++ include/trbatch.h Sun Oct 8 11:23:50 2006 -@@ -23,12 +23,12 @@ - }; - - /* imports from trbatch.c */ --extern struct batchfile *bfopen(), *bfisopen(); --extern statust bffkclose(), bfrealclose(); -+extern struct batchfile *bfopen(); -+extern statust bffkclose(); - extern int bfflush(); - /* imports from trbatcomm.c */ --extern statust bfclose(), bfrclose(); --extern struct batchfile *bfincache(), *fakebf(); -+extern statust bfclose(); -+extern struct batchfile *fakebf(); - - extern struct batchfile batchfile[]; /* try to keep open always */ - #define lastbf &batchfile[NOPENBFS-1] ---- explode/trbatch.c.orig Wed Nov 30 23:09:10 1994 -+++ explode/trbatch.c Sun Oct 8 11:22:03 2006 -@@ -23,6 +23,9 @@ - - static HASHTABLE *nmbftbl; /* name -> batchfile mapping */ - -+static struct batchfile *bfisopen(char *name), *bfincache(char *name); -+static statust bfrealclose(), bfrclose(); -+ - /* - * open "name" for appending. - * -@@ -86,7 +89,7 @@ - /* - * returns a batchfile, never NULL, corresponding to name. - */ --struct batchfile * -+static struct batchfile * - bfincache(name) - char *name; - { ---- relay/trbatch.c.orig Fri Jan 15 05:27:11 1993 -+++ relay/trbatch.c Sun Oct 8 11:24:34 2006 -@@ -14,6 +14,8 @@ - #include "msgs.h" - #include "trbatch.h" - -+static struct batchfile *bfincache(char *name, int ord); -+ - /* tunable parameters */ - #ifndef MASTERDIR - #define MASTERDIR artfile("out.master") diff --git a/news/cnews/files/patch-trbatch.c b/news/cnews/files/patch-trbatch.c index 66508ec7ec28..f2e46e16a21a 100644 --- a/news/cnews/files/patch-trbatch.c +++ b/news/cnews/files/patch-trbatch.c @@ -1,10 +1,88 @@ --- explode/trbatch.c.orig 1994-11-30 23:09:10.000000000 +0100 -+++ explode/trbatch.c 2011-05-12 15:45:54.000000000 +0200 -@@ -2,6 +2,7 @@ - * transmit batch file management (exploder version) ++++ explode/trbatch.c 2014-02-07 18:02:12.000000000 +0100 +@@ -23,6 +23,9 @@ + + static HASHTABLE *nmbftbl; /* name -> batchfile mapping */ + ++static struct batchfile *bfisopen(char *name), *bfincache(char *name); ++static statust bfrealclose(), bfrclose(); ++ + /* + * open "name" for appending. + * +@@ -69,7 +72,7 @@ + nmbftbl = hashcreate(HASHFILSZ, (unsigned (*)())NULL); + bf = (struct batchfile *)hashfetch(nmbftbl, name); + if (bf != NULL) +- return; /* error: name present */ ++ return 0; /* error: name present */ + /* allocate, append & initialise a new entry */ + bf = (struct batchfile *)nemalloc(sizeof *bf); + (void) memset((char *)bf, 0, sizeof *bf); +@@ -81,12 +84,13 @@ + bf->bf_lines = FLUSHEVERY; + if (!hashstore(nmbftbl, bf->bf_name, (HASHDATUM)bf)) + error("can't store under hash key `%s'", name); /* canthappen */ ++ return 0; + } + + /* + * returns a batchfile, never NULL, corresponding to name. */ - #include <stdio.h> -+#include <string.h> - #include <errno.h> - #include "fixerrno.h" - #include <sys/types.h> +-struct batchfile * ++static struct batchfile * + bfincache(name) + char *name; + { +@@ -152,12 +156,13 @@ + register struct batchfile *bf; + + if (chp->closedone) +- return; ++ return 0; + bf = (struct batchfile *)data; + if (bf->bf_str == NULL) +- return; ++ return 0; + chp->status = bfclose(bf); + chp->closedone = YES; ++ return 0; + } + + STATIC statust +@@ -194,6 +199,7 @@ + #endif + if (!hashdelete(nmbftbl, key)) + error("can't delete hash key `%s'", key); /* canthappen */ ++ return 0; + } + + STATIC statust +--- relay/trbatch.c.orig 1993-01-15 05:27:11.000000000 +0100 ++++ relay/trbatch.c 2014-02-07 18:02:37.000000000 +0100 +@@ -14,6 +14,8 @@ + #include "msgs.h" + #include "trbatch.h" + ++static struct batchfile *bfincache(char *name, int ord); ++ + /* tunable parameters */ + #ifndef MASTERDIR + #define MASTERDIR artfile("out.master") +@@ -89,7 +91,7 @@ + nmordtbl = hashcreate(HASHFILSZ, (unsigned (*)())NULL); + hf = (struct hashfilename *)hashfetch(nmordtbl, name); + if (hf != NULL) +- return; /* error: name present */ ++ return 0; /* error: name present */ + /* allocate, append & initialise a new entry */ + hf = (struct hashfilename *)nemalloc(sizeof *hf); + hf->hf_mbf = mbford; +@@ -97,6 +99,7 @@ + errunlock("can't store under hash key `%s'", name); + ordtombfs[ord] = mbford; + otomvalid[ord] = YES; ++ return 0; + } + + diff --git a/news/cnews/files/patch-trbatch.h b/news/cnews/files/patch-trbatch.h new file mode 100644 index 000000000000..0a97060164d7 --- /dev/null +++ b/news/cnews/files/patch-trbatch.h @@ -0,0 +1,19 @@ +--- include/trbatch.h.orig Fri Dec 17 00:17:03 1993 ++++ include/trbatch.h Sun Oct 8 11:23:50 2006 +@@ -23,12 +23,12 @@ + }; + + /* imports from trbatch.c */ +-extern struct batchfile *bfopen(), *bfisopen(); +-extern statust bffkclose(), bfrealclose(); ++extern struct batchfile *bfopen(); ++extern statust bffkclose(); + extern int bfflush(); + /* imports from trbatcomm.c */ +-extern statust bfclose(), bfrclose(); +-extern struct batchfile *bfincache(), *fakebf(); ++extern statust bfclose(); ++extern struct batchfile *fakebf(); + + extern struct batchfile batchfile[]; /* try to keep open always */ + #define lastbf &batchfile[NOPENBFS-1] |