mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
- fix include and prototype problems with ansi patches
This commit is contained in:
parent
622689a81c
commit
ec0dda1ae6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=425688
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= cnews
|
||||
PORTVERSION= cr.g
|
||||
PORTREVISION= 16
|
||||
PORTREVISION= 17
|
||||
CATEGORIES= news
|
||||
MASTER_SITES= ftp://ftp.cs.toronto.edu/pub/c-news/ \
|
||||
ftp://ftp.funet.fi/pub/unix/news/cnews/ \
|
||||
@ -25,8 +25,8 @@ PATCHFILES= c-news-patch-fileart.c c-news-patch-namelen \
|
||||
c-news-patch-ctl-underscore \
|
||||
c-news-patch-y2k-2 \
|
||||
c-news-patch-inews-path \
|
||||
c-news-patch-expovguts.c \
|
||||
c-news-patch-gawk3 \
|
||||
c-news-patch-ansi \
|
||||
c-news-patch-pgpverify-1.12-perl4
|
||||
|
||||
MAINTAINER= dinoex@FreeBSD.org
|
||||
|
@ -1,3 +1,4 @@
|
||||
TIMESTAMP = 1478588176
|
||||
SHA256 (c-news/c-news.tar.Z) = 897ffa8e05bcf3fe8734cf83c893ca78416266665e06106ff52b733d319835d3
|
||||
SIZE (c-news/c-news.tar.Z) = 676481
|
||||
SHA256 (c-news/pgpverify-1.12) = 8c96efad40f06ffd520eb41bc5fd84233718b92b55c3e140c9b9e6e1d22d0a88
|
||||
@ -28,9 +29,9 @@ SHA256 (c-news/c-news-patch-y2k-2) = 4b7212e8e8a3376d846e25400cc63cdd9b6cd18bf24
|
||||
SIZE (c-news/c-news-patch-y2k-2) = 1459
|
||||
SHA256 (c-news/c-news-patch-inews-path) = ca7f05f9301003e6bb7fcd8107c11dfebc93d724359c3df481437431838beedf
|
||||
SIZE (c-news/c-news-patch-inews-path) = 355
|
||||
SHA256 (c-news/c-news-patch-expovguts.c) = 3254ba2e997de2576868bbcc9af0c90f4ee150e76411b02689cf0986a4584faa
|
||||
SIZE (c-news/c-news-patch-expovguts.c) = 646
|
||||
SHA256 (c-news/c-news-patch-pgpverify-1.12-perl4) = b3f935533d241cf04f92942ea33905968f24bedcf09bc6b33a241c66ba2f73c9
|
||||
SIZE (c-news/c-news-patch-pgpverify-1.12-perl4) = 1450
|
||||
SHA256 (c-news/c-news-patch-gawk3) = 6072cff1c060b059a5915f24e95252540a22d89889fcc4d1cb1fa49ebbb33205
|
||||
SIZE (c-news/c-news-patch-gawk3) = 1393
|
||||
SHA256 (c-news/c-news-patch-ansi) = eb22b48edf1dbbf010b6e27fb2664733c6617bf94944cc48e1882bc5a7db616c
|
||||
SIZE (c-news/c-news-patch-ansi) = 111850
|
||||
SHA256 (c-news/c-news-patch-pgpverify-1.12-perl4) = b3f935533d241cf04f92942ea33905968f24bedcf09bc6b33a241c66ba2f73c9
|
||||
SIZE (c-news/c-news-patch-pgpverify-1.12-perl4) = 1450
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- inject/actflag.c.orig 1993-08-22 02:52:27.000000000 +0200
|
||||
+++ inject/actflag.c 2011-05-12 15:29:52.000000000 +0200
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include "news.h"
|
@ -1,25 +0,0 @@
|
||||
--- batch/batcher.c.orig 1994-11-28 02:14:35.000000000 +0100
|
||||
+++ batch/batcher.c 2014-02-07 16:48:39.000000000 +0100
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#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;
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
--- input/bdecode.c.orig 1991-11-04 19:18:39.000000000 +0100
|
||||
+++ input/bdecode.c 2011-05-12 15:34:41.000000000 +0200
|
||||
@@ -2,6 +2,7 @@
|
||||
* bdecode [file]
|
||||
*/
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "coder.h"
|
||||
char *myname, *inputfile = "(stdin)";
|
@ -1,10 +0,0 @@
|
||||
--- batch/bencode.c.orig 1991-11-04 19:16:50.000000000 +0100
|
||||
+++ batch/bencode.c 2011-05-12 14:53:40.000000000 +0200
|
||||
@@ -2,6 +2,7 @@
|
||||
* bencode [file]
|
||||
*/
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include "coder.h"
|
||||
#define MAXPERLINE 78 /* max chars/line */
|
||||
char *myname;
|
@ -1,8 +0,0 @@
|
||||
--- input/c7decode.c.orig 1989-02-21 23:57:32.000000000 +0100
|
||||
+++ input/c7decode.c 2011-05-12 15:32:27.000000000 +0200
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
/*
|
||||
* This program is the inverse of encode
|
@ -1,8 +0,0 @@
|
||||
--- batch/c7encode.c.orig 1989-02-21 01:04:56.000000000 +0100
|
||||
+++ batch/c7encode.c 2011-05-12 15:10:12.000000000 +0200
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
#ifdef SCCSID
|
||||
static char *SccsId = "@(#)encode.c 1.3 5/15/85";
|
@ -1,19 +0,0 @@
|
||||
--- 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
|
@ -59,4 +59,4 @@ diff -urN ../pre-conf/include/config.make include/config.make
|
||||
+
|
||||
+# fake files needed
|
||||
+HFAKE= sys/timeb.h
|
||||
+OFAKE= fgetline.o fsync.o
|
||||
+OFAKE= fgetline.o
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- relay/control.c.orig 1994-09-08 21:42:09.000000000 +0200
|
||||
+++ relay/control.c 2011-05-12 15:38:44.000000000 +0200
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
@ -1,10 +0,0 @@
|
||||
--- inject/defaults.c.orig 1995-01-02 22:48:38.000000000 +0100
|
||||
+++ inject/defaults.c 2011-05-12 15:31:22.000000000 +0200
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <pwd.h>
|
@ -1,11 +0,0 @@
|
||||
--- util/dostatfs.c.orig 1995-04-28 02:51:39.000000000 +0200
|
||||
+++ util/dostatfs.c 2015-06-10 06:28:42.000000000 +0200
|
||||
@@ -77,7 +77,7 @@
|
||||
long bperi;
|
||||
{
|
||||
struct statfs info;
|
||||
- register long n;
|
||||
+ register long long n;
|
||||
# define LOTS 10000
|
||||
register long iperfile = filesize/bperi + 1;
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- libc/error.c.orig 1988-12-30 10:50:06.000000000 +0100
|
||||
+++ libc/error.c 2010-10-08 19:38:21.000000000 +0200
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
extern void warning();
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- libc/fgetfln.c.orig 1993-03-09 07:22:54.000000000 +0100
|
||||
+++ libc/fgetfln.c 2010-10-08 19:40:28.000000000 +0200
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
+#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <fgetfln.h>
|
||||
#include <hdbm.h>
|
@ -1,17 +0,0 @@
|
||||
--- 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;
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
--- libc/hdbm.c.orig 1993-03-09 07:04:52.000000000 +0100
|
||||
+++ libc/hdbm.c 2011-05-12 16:17:51.000000000 +0200
|
||||
@@ -81,6 +81,7 @@
|
||||
* free all the memory associated with tbl, erase the pointers to it, and
|
||||
* invalidate tbl to prevent further use via other pointers to it.
|
||||
*/
|
||||
+void
|
||||
hdbmdestroy(tbl)
|
||||
register HASHTABLE *tbl;
|
||||
{
|
||||
@@ -260,6 +261,7 @@
|
||||
* arguments. hook is an attempt to allow side-effects and reentrancy at
|
||||
* the same time.
|
||||
*/
|
||||
+void
|
||||
hdbmwalk(tbl, nodefunc, hook)
|
||||
HASHTABLE *tbl;
|
||||
register int (*nodefunc)();
|
@ -1,10 +0,0 @@
|
||||
--- include/hdbm.h.orig 1991-11-07 21:44:14.000000000 +0100
|
||||
+++ include/hdbm.h 2011-05-12 16:16:36.000000000 +0200
|
||||
@@ -13,6 +13,6 @@
|
||||
#endif
|
||||
|
||||
extern HASHTABLE *hdbmcreate();
|
||||
-extern hdbmdestroy(), hdbmwalk();
|
||||
+extern void hdbmdestroy(), hdbmwalk();
|
||||
extern int hdbmstore(), hdbmdelete();
|
||||
extern HDBMDATUM hdbmfetch(), hdbmentry();
|
@ -1,19 +0,0 @@
|
||||
--- 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;
|
||||
}
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- maint/histinfo.c.orig 1995-01-02 22:48:43.000000000 +0100
|
||||
+++ maint/histinfo.c 2011-05-12 15:36:35.000000000 +0200
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h> /* for modified time (date received) */
|
||||
#include <string.h>
|
@ -1,10 +0,0 @@
|
||||
--- libcnews/hostname.c.orig 1993-11-21 03:24:17.000000000 +0100
|
||||
+++ libcnews/hostname.c 2011-05-12 14:49:50.000000000 +0200
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "libc.h"
|
@ -1,19 +0,0 @@
|
||||
--- 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 */
|
@ -1,15 +0,0 @@
|
||||
--- explode/morefds.c.orig 1991-07-13 06:11:48.000000000 +0200
|
||||
+++ explode/morefds.c 2011-05-12 16:13:29.000000000 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-int
|
||||
+void
|
||||
morefds()
|
||||
{
|
||||
}
|
||||
--- relay/morefds.c.orig 1993-03-13 07:07:14.000000000 +0100
|
||||
+++ relay/morefds.c 2011-05-12 16:13:37.000000000 +0200
|
||||
@@ -1,3 +1,4 @@
|
||||
+void
|
||||
morefds()
|
||||
{
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
--- util/newslock.c.orig 1989-05-22 04:12:16.000000000 +0200
|
||||
+++ util/newslock.c 2011-05-12 14:51:20.000000000 +0200
|
||||
@@ -4,6 +4,7 @@
|
||||
* (System V has broken ln(1) itself.)
|
||||
*/
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
main(argc, argv)
|
||||
int argc;
|
@ -1,70 +0,0 @@
|
||||
--- 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
|
@ -1,10 +0,0 @@
|
||||
--- util/now.c.orig 1995-04-28 02:51:46.000000000 +0200
|
||||
+++ util/now.c 2011-05-12 14:52:23.000000000 +0200
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#include <time.h>
|
||||
#include "libc.h"
|
||||
|
19
news/cnews/files/patch-quiz
Normal file
19
news/cnews/files/patch-quiz
Normal file
@ -0,0 +1,19 @@
|
||||
--- quiz.orig 1995-04-28 02:50:34.000000000 +0200
|
||||
+++ quiz 2016-09-05 23:40:26.915845000 +0200
|
||||
@@ -268,11 +268,11 @@
|
||||
esac
|
||||
|
||||
newfakehdrs=
|
||||
-#if test " `$notinlist "$newfake" ftime.o`" != " yes"
|
||||
-#then
|
||||
-# newfakehdrs="$newfakehdrs sys/timeb.h"
|
||||
-#fi
|
||||
-newfakehdrs="$newfakehdrs sys/timeb.h"
|
||||
+#if test " `$notinlist "$newfake" ftime.o`" != " yes"
|
||||
+#then
|
||||
+# newfakehdrs="$newfakehdrs sys/timeb.h"
|
||||
+#fi
|
||||
+#newfakehdrs="$newfakehdrs sys/timeb.h"
|
||||
if test " `$notinlist "$newfake" gettimeofday.o`" != " yes"
|
||||
then
|
||||
newfakehdrs="$newfakehdrs sys/time.h"
|
@ -27,7 +27,7 @@ diff -urN ../pre-conf/conf/quiz.def conf/quiz.def
|
||||
+# These answers are interdependent; do not edit this file!
|
||||
+addrsize="big"
|
||||
+# These answers are interdependent; do not edit this file!
|
||||
+fake=" fgetline.o fsync.o"
|
||||
+fake=" fgetline.o"
|
||||
+# These answers are interdependent; do not edit this file!
|
||||
+storeval=""
|
||||
+# These answers are interdependent; do not edit this file!
|
||||
|
@ -1,106 +0,0 @@
|
||||
--- readnews/readnews.c.orig 1995-04-28 03:12:21.000000000 +0200
|
||||
+++ readnews/readnews.c 2014-02-07 16:57:21.000000000 +0100
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
active *alist; /* internal active list */
|
||||
|
||||
-long now; /* current time */
|
||||
+time_t now; /* current time */
|
||||
bool interrupt; /* if interrupt hit */
|
||||
char *newsdir; /* %news */
|
||||
bool su; /* if super user (not used) */
|
||||
@@ -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;
|
||||
- long then;
|
||||
+ time_t then;
|
||||
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;
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
--- libcnews/rerror.c.orig 1994-09-19 05:26:08.000000000 +0200
|
||||
+++ libcnews/rerror.c 2011-05-12 15:41:43.000000000 +0200
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/* common log reporting */
|
||||
static
|
||||
-log(stream, art, code, fmt, arg, sverrno)
|
||||
+cnews_log(stream, art, code, fmt, arg, sverrno)
|
||||
register FILE *stream;
|
||||
register struct article *art;
|
||||
int code;
|
||||
@@ -60,7 +60,7 @@
|
||||
int code;
|
||||
char *fmt, *arg;
|
||||
{
|
||||
- log(stdout, art, code, fmt, arg, 0);
|
||||
+ cnews_log(stdout, art, code, fmt, arg, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -72,7 +72,7 @@
|
||||
int code;
|
||||
char *fmt, *arg;
|
||||
{
|
||||
- log(stdout, art, code, fmt, arg, 0);
|
||||
+ cnews_log(stdout, art, code, fmt, arg, 0);
|
||||
if (art != NULL)
|
||||
art->a_status |= ST_REFUSED;
|
||||
}
|
||||
@@ -86,7 +86,7 @@
|
||||
int code;
|
||||
char *fmt, *arg;
|
||||
{
|
||||
- log(stderr, art, code, fmt, arg, errno);
|
||||
+ cnews_log(stderr, art, code, fmt, arg, errno);
|
||||
if (art != NULL)
|
||||
art->a_status |= ST_NEEDATTN|ST_DROPPED;
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
--- libc/stdfdopen.c.orig 1990-10-28 08:20:54.000000000 +0100
|
||||
+++ libc/stdfdopen.c 2011-05-12 14:46:36.000000000 +0200
|
||||
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#ifndef __STDC__
|
||||
extern int errno;
|
@ -1,88 +0,0 @@
|
||||
--- explode/trbatch.c.orig 1994-11-30 23:09:10.000000000 +0100
|
||||
+++ 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.
|
||||
*/
|
||||
-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;
|
||||
}
|
||||
|
||||
|
@ -1,19 +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]
|
@ -1,10 +0,0 @@
|
||||
--- libc/warning.c.orig 1991-01-09 20:12:55.000000000 +0100
|
||||
+++ libc/warning.c 2010-10-08 19:41:45.000000000 +0200
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#ifndef __STDC__
|
||||
extern int errno;
|
Loading…
Reference in New Issue
Block a user