aboutsummaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2011-05-02 05:38:37 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2011-05-02 05:38:37 +0000
commitbef27b767dd00694a1dd52f92a02b132b5bc4e8c (patch)
treefbb0f6ee84b92d081616021c3d915ba956b82e56 /news
parent93aaca3a3cf2bc5b894539ca19af9050a74eb231 (diff)
downloadports-bef27b767dd00694a1dd52f92a02b132b5bc4e8c.tar.gz
ports-bef27b767dd00694a1dd52f92a02b132b5bc4e8c.zip
Notes
Diffstat (limited to 'news')
-rw-r--r--news/Makefile4
-rw-r--r--news/leafnode+/Makefile57
-rw-r--r--news/leafnode+/distinfo2
-rw-r--r--news/leafnode+/files/INSTALL.in27
-rw-r--r--news/leafnode+/files/patch-ab127
-rw-r--r--news/leafnode+/files/patch-ac52
-rw-r--r--news/leafnode+/files/patch-activutil.c18
-rw-r--r--news/leafnode+/files/patch-nntputil.c18
-rw-r--r--news/leafnode+/files/patch-util.c18
-rw-r--r--news/leafnode+/files/patch-xnntputil.c18
-rw-r--r--news/leafnode+/files/patch-xoverutil.c18
-rw-r--r--news/leafnode+/pkg-descr17
-rw-r--r--news/leafnode+/pkg-plist13
-rw-r--r--news/pyne/Makefile47
-rw-r--r--news/pyne/distinfo2
-rw-r--r--news/pyne/files/patch-src::po::Makefile46
-rw-r--r--news/pyne/files/patch-src::po::es_ES.po11
-rw-r--r--news/pyne/pkg-descr3
-rw-r--r--news/pyne/pkg-plist142
-rw-r--r--news/slurp/Makefile35
-rw-r--r--news/slurp/distinfo2
-rw-r--r--news/slurp/files/dbz.c1766
-rw-r--r--news/slurp/files/dbz.h32
-rw-r--r--news/slurp/files/patch-aa86
-rw-r--r--news/slurp/files/patch-ab24
-rw-r--r--news/slurp/files/patch-ac23
-rw-r--r--news/slurp/files/patch-ad38
-rw-r--r--news/slurp/files/patch-ae17
-rw-r--r--news/slurp/files/patch-af57
-rw-r--r--news/slurp/files/patch-ag12
-rw-r--r--news/slurp/files/patch-ah11
-rw-r--r--news/slurp/files/patch-misc.c11
-rw-r--r--news/slurp/files/siteexclude.c168
-rw-r--r--news/slurp/pkg-descr15
-rw-r--r--news/slurp/pkg-message4
-rw-r--r--news/slurp/pkg-plist5
-rw-r--r--news/slurp/scripts/configure23
-rw-r--r--news/unpost/Makefile28
-rw-r--r--news/unpost/distinfo2
-rw-r--r--news/unpost/files/patch-aa24
-rw-r--r--news/unpost/pkg-descr7
41 files changed, 0 insertions, 3030 deletions
diff --git a/news/Makefile b/news/Makefile
index 2a889375f0ee..eb857c8b1158 100644
--- a/news/Makefile
+++ b/news/Makefile
@@ -45,7 +45,6 @@
SUBDIR += klibido
SUBDIR += knews
SUBDIR += leafnode
- SUBDIR += leafnode+
SUBDIR += lottanzb
SUBDIR += lusernet
SUBDIR += mmail
@@ -83,7 +82,6 @@
SUBDIR += py-pynzb
SUBDIR += py-twistedNews
SUBDIR += py-yenc
- SUBDIR += pyne
SUBDIR += rawdog
SUBDIR += rkive
SUBDIR += s-news
@@ -92,7 +90,6 @@
SUBDIR += slrn
SUBDIR += slrnconf
SUBDIR += slrnface
- SUBDIR += slurp
SUBDIR += sn
SUBDIR += suck
SUBDIR += suck-cnews
@@ -100,7 +97,6 @@
SUBDIR += trn
SUBDIR += trn4
SUBDIR += ubh
- SUBDIR += unpost
SUBDIR += xmitbin
SUBDIR += xpn
SUBDIR += xrn
diff --git a/news/leafnode+/Makefile b/news/leafnode+/Makefile
deleted file mode 100644
index 16a18a6ef363..000000000000
--- a/news/leafnode+/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-# New ports collection makefile for: leafnode+
-# Date created: 19 November 1998
-# Whom: Tom Hukins <tom@FreeBSD.org>
-#
-# $FreeBSD$
-#
-
-PORTNAME= leafnode+
-PORTVERSION= 2.15
-PORTREVISION= 1
-CATEGORIES= news ipv6
-MASTER_SITES= http://www25.big.jp/~jam/leafnode+/ \
- http://mirror2.unixfreunde.de/ \
- http://freebsd.unixfreunde.de/sources/
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Multi-user offline Usenet news package for small sites
-
-DEPRECATED= Upstream disapear and distfile is no more available
-EXPIRATION_DATE= 2011-05-01
-
-MAN8= checkgroups.8 fetchnews.8 leafnode.8 texpire.8
-PKGINSTALL= ${WRKDIR}/INSTALL
-
-LEAFLIBDIR?= ${PREFIX}/lib/leafnode
-LEAFSPOOLDIR?= /var/spool/leafnode
-REWRITE= ${SED} -e "s:@LIBDIR@:${LEAFLIBDIR}:g" \
- -e "s:@SPOOLDIR@:${LEAFSPOOLDIR}:g" \
- -e "s:@PREFIX@:${PREFIX}:g"
-
-post-patch:
-.for file in Makefile FAQ INSTALL README leafnode.8
- @${MV} ${WRKSRC}/${file} ${WRKSRC}/${file}.bak
- @${REWRITE} ${WRKSRC}/${file}.bak > ${WRKSRC}/${file}
-.endfor
- @${REWRITE} ${FILESDIR}/INSTALL.in > ${PKGINSTALL}
- @${CHMOD} 755 ${PKGINSTALL}
-
-do-install:
-.for file in leafnode fetchnews texpire checkgroups leaftool
- @${INSTALL_PROGRAM} ${WRKSRC}/${file} ${PREFIX}/sbin
-.endfor
-.for file in ${MAN8}
- @${INSTALL_MAN} ${WRKSRC}/${file} ${PREFIX}/man/man8
-.endfor
-.if !defined(NOPORTDOCS)
- @${ECHO_MSG} "===> Copying documents to ${DOCSDIR}"
- @${MKDIR} ${DOCSDIR}
-.for file in Changes FAQ INSTALL README config.example
- @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
-.endfor
-.endif
-
-post-install:
- @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-
-.include <bsd.port.mk>
diff --git a/news/leafnode+/distinfo b/news/leafnode+/distinfo
deleted file mode 100644
index 3a3b461a0322..000000000000
--- a/news/leafnode+/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (leafnode+-2.15.tar.gz) = de8ac91f9d14fe1f97d21060c7c959353863392407223526d5316643fcd8fd25
-SIZE (leafnode+-2.15.tar.gz) = 58601
diff --git a/news/leafnode+/files/INSTALL.in b/news/leafnode+/files/INSTALL.in
deleted file mode 100644
index beb587c67837..000000000000
--- a/news/leafnode+/files/INSTALL.in
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-LIBDIR=@LIBDIR@
-SPOOLDIR=@SPOOLDIR@
-if [ x$2 = xPOST-INSTALL ]; then
- if [ ! -d $LIBDIR ]; then
- mkdir -p $LIBDIR
- chown -R news:news $LIBDIR/.
- fi
- if [ ! -d $SPOOLDIR ]; then
- mkdir -p $SPOOLDIR
- mkdir -p $SPOOLDIR/message.id
- mkdir -p $SPOOLDIR/interesting.groups
- mkdir -p $SPOOLDIR/out.going
- cd $SPOOLDIR/message.id ; for a in 0 1 2 3 4 5 6 7 8 9 ; do \
- for b in 0 1 2 3 4 5 6 7 8 9 ; do \
- mkdir -p ${a}${b}0 ${a}${b}1 ${a}${b}2 \
- ${a}${b}3 ${a}${b}4 ${a}${b}5 \
- ${a}${b}6 ${a}${b}7 ${a}${b}8 \
- ${a}${b}9 ; \
- done
- done
- chown -R news:news $SPOOLDIR/.
- chmod 2750 $SPOOLDIR
- fi
-fi
-exit 0
diff --git a/news/leafnode+/files/patch-ab b/news/leafnode+/files/patch-ab
deleted file mode 100644
index 2fc564719083..000000000000
--- a/news/leafnode+/files/patch-ab
+++ /dev/null
@@ -1,127 +0,0 @@
---- FAQ.orig Fri Jan 29 13:01:52 1999
-+++ FAQ Sat Jan 30 22:17:12 1999
-@@ -41,8 +41,8 @@
- 5. How do I configure Leafnode+?
-
- See the manual pages for information on how to configure Leafnode+.
--Also, see the sample configuration file, "config.example", in the
--Leafnode+ distribution.
-+Also, see the sample configuration file, "config.example", in
-+@PREFIX@/share/doc/leafnode+.
-
-
- 6. How do I upgrade from Leafnode?
-@@ -50,8 +50,8 @@
- Upgrading is easy - Leafnode+ can be used as a direct replacement
- for Leafnode. However, Leafnode+ will write some additional files in
- the LIBDIR defined when compiling Leafnode+, usually
--/usr/lib/leafnode. Therefore, the UID under which Leafnode+ runs,
--usually root or news, needs write access to this directory.
-+@LIBDIR@. Therefore, the UID under which Leafnode+
-+runs, usually root or news, needs write access to this directory.
-
- You will need to change all references to the "fetch" program to
- refer to "fetchnews". The name of this program has changed because
-@@ -59,8 +59,8 @@
- "fetchnews" describes the function of the program better.
-
- To update from Cornelius's Leafnode, copy
--/var/spool/news/leaf.node/groupinfo into your LIBDIR (usually
--/usr/lib/leafnode/groupinfo) then run "fetchnews".
-+@SPOOLDIR@/leaf.node/groupinfo into your LIBDIR
-+(@LIBDIR@/groupinfo) then run "fetchnews".
-
-
- 7. Can I use Leafnode+ with multiple news servers?
-@@ -90,7 +90,7 @@
- Most news reader software uses the NEWGROUPS command to learn about
- the creation of new groups. The Leafnode+ news server does not
- support this command. To check if new groups are available, see the
--"groupinfo" file in your LIBDIR (usually /usr/lib/leafnode).
-+"groupinfo" file in your LIBDIR (@LIBDIR@).
-
-
-
---- INSTALL.orig Thu Jan 6 01:43:13 2000
-+++ INSTALL Sat Jan 29 12:15:28 2000
-@@ -7,7 +7,8 @@
-
- 3. make installall
-
--4. Edit $(LIBDIR)/config so server points to your upstream news server
-+4. Edit @LIBDIR@/config so the server points to your
-+ upstream news server
- (generally, your IP provider's). Make sure $NNTPSERVER or
- /etc/nntpserver points to your own host so clients will talk to
- leafnode rather than try to go to the upstream server.
-@@ -15,25 +16,24 @@
- 5. Set up a cron job (as user "news") to run texpire every night or
- maybe every week. Here is my crontab line, which runs nightly:
-
--0 4 * * * /usr/local/sbin/texpire
-+0 4 * * * @PREFIX@/sbin/texpire
-
- I did "crontab -u news -e" as root to edit the crontab file, and
- added this line. Substituting "1" for the third "*", thus:
-
--0 4 * * 1 /usr/local/sbin/texpire
-+0 4 * * 1 @PREFIX@/sbin/texpire
-
- tells cron to run texpire at 4am Monday morning.
-
- 6. Make sure fetchnews is run at the appropriate time. If you have a
- full-time link, run it out of cron (as "news" again), if not, run
- it when your connection to the net is established. If it is run as
-- root, it will change user to "news". I use PPP, and run fetchnews
-- from /etc/ppp/ip-up.
-+ root, it will change user to "news".
-
--7. Edit /etc/inetd.conf so $(BINDIR)/leafnode is executed for incoming
-- NNTP connections. HUP inetd. Here is my inetd.conf line:
-+7. Edit /etc/inetd.conf so @PREFIX@/sbin/leafnode is executed for
-+ incoming NNTP connections. HUP inetd. Here is my inetd.conf line:
-
--nntp stream tcp nowait news /usr/local/sbin/leafnode
-+nntp stream tcp nowait news @PREFIX@/sbin/leafnode
-
- This starts leafnode for all connections on the nntp port.
-
---- leafnode.8.orig Sun Dec 6 19:37:53 1998
-+++ leafnode.8 Wed Dec 9 17:41:40 1998
-@@ -74,23 +74,23 @@
- .I must
- be writable by user "news".
- .PP
--.I /usr/lib/leafnode/groupinfo
-+.I @LIBDIR@/groupinfo
- contains the information about each USENET group. In case of harm, it
- is rebuilt by
- .BR fetchnews (8).
- .PP
--.I /usr/lib/leafnode/news-server-name
-+.I @LIBDIR@/news-server-name
- contains the information about every USENET group on each news server.
- In case of harm, it
- is rebuilt by
- .BR fetchnews (8).
- .PP
--.I /usr/lib/leafnode/news-server-name.active
-+.I @LIBDIR@/news-server-name.active
- is an empty file created when
- .BR fetchnews (8)
- get information about every USENET group on each news server.
- .PP
--.I /usr/lib/leafnode/config
-+.I @LIBDIR@/config
- contains the configuration parameters for
- .B leafnode.
- See CONFIGURATION below.
-@@ -152,7 +152,7 @@
-
- .SH CONFIGURATION
- All configuration is done using the file
--.I /usr/lib/leafnode/config.
-+.I @LIBDIR@/config.
- There is no GUI configuration tool yet.
- .PP
- The file is in the common UNIX format: One line per argument, white
diff --git a/news/leafnode+/files/patch-ac b/news/leafnode+/files/patch-ac
deleted file mode 100644
index 70aa73dac263..000000000000
--- a/news/leafnode+/files/patch-ac
+++ /dev/null
@@ -1,52 +0,0 @@
---- Makefile.orig Fri Jun 13 05:06:46 2003
-+++ Makefile Wed Jul 16 12:53:25 2003
-@@ -11,19 +11,19 @@
- #AR = ar
- #RANLIB = ranlib
- # Programs for distribution.
--CP = cp
--CHMOD = chmod
--CHOWN = chown
--GZIP = gzip -f9
--MKDIR = mkdir -p
--RM = rm -f
--SED = sed
--TAR = tar
-+#CP = cp
-+#CHMOD = chmod
-+#CHOWN = chown
-+#GZIP = gzip -f9
-+#MKDIR = mkdir -p
-+#RM = rm -f
-+#SED = sed
-+#TAR = tar
- #
- # You can specify the place programs are installed.
--PREFIX = /usr/local
--BINDIR = $(PREFIX)/sbin
--MANDIR = $(PREFIX)/man
-+#PREFIX = /usr/local
-+#BINDIR = $(PREFIX)/sbin
-+#MANDIR = $(PREFIX)/man
- #
- # If you want to build with debugging, use below.
- #CFLAGS += -g -Wall -Wformat -Wstrict-prototypes -Wmissing-prototypes
-@@ -64,15 +64,15 @@
- #CFLAGS += -DDONTSTRICTDATEFORMAT
- #
- # If you want to use IPv6, use below. It may work.
--#CFLAGS += -DINET6
-+CFLAGS += -DINET6
- #LIBS += -L/usr/local/v6/lib -linet6
- #
- # This is the directory where the news is stored.
--SPOOLDIR = /var/spool/news
-+SPOOLDIR = @SPOOLDIR@
- #
- # This is the directory where the configuration and group information is
- # kept. It should preferably not be on the same partition as spooldir
--LIBDIR = /var/leafnode
-+LIBDIR = @LIBDIR@
- #
- # These are about local library.
- LIBUTIL = libutil.a
diff --git a/news/leafnode+/files/patch-activutil.c b/news/leafnode+/files/patch-activutil.c
deleted file mode 100644
index 9b5175563b41..000000000000
--- a/news/leafnode+/files/patch-activutil.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- activutil.c.orig Thu Jan 30 11:21:44 2003
-+++ activutil.c Thu Jan 30 11:21:58 2003
-@@ -44,6 +44,7 @@
- #endif
-
- #include <fcntl.h>
-+#include <sys/types.h>
- #include <sys/uio.h>
- #include <sys/param.h>
- #include <sys/socket.h>
-@@ -59,7 +60,6 @@
- #include <stdio.h>
- #include <string.h>
- #include <sys/stat.h>
--#include <sys/types.h>
- #include <time.h>
- #include <unistd.h>
- #include <dirent.h>
diff --git a/news/leafnode+/files/patch-nntputil.c b/news/leafnode+/files/patch-nntputil.c
deleted file mode 100644
index ff551924a024..000000000000
--- a/news/leafnode+/files/patch-nntputil.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- nntputil.c.orig Thu Jan 30 11:22:08 2003
-+++ nntputil.c Thu Jan 30 11:22:15 2003
-@@ -44,6 +44,7 @@
- #endif
-
- #include <fcntl.h>
-+#include <sys/types.h>
- #include <sys/uio.h>
- #include <sys/param.h>
- #include <sys/socket.h>
-@@ -59,7 +60,6 @@
- #include <stdio.h>
- #include <string.h>
- #include <sys/stat.h>
--#include <sys/types.h>
- #include <time.h>
- #include <unistd.h>
- #include <dirent.h>
diff --git a/news/leafnode+/files/patch-util.c b/news/leafnode+/files/patch-util.c
deleted file mode 100644
index f569ffeb5c0e..000000000000
--- a/news/leafnode+/files/patch-util.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- util.c.orig Thu Jan 30 11:22:45 2003
-+++ util.c Thu Jan 30 11:22:54 2003
-@@ -40,6 +40,7 @@
- #include <assert.h>
- #include <stdarg.h>
- #include <fcntl.h>
-+#include <sys/types.h>
- #include <sys/uio.h>
- #include <sys/param.h>
- #include <sys/socket.h>
-@@ -55,7 +56,6 @@
- #include <stdio.h>
- #include <string.h>
- #include <sys/stat.h>
--#include <sys/types.h>
- #include <time.h>
- #include <unistd.h>
- #include <dirent.h>
diff --git a/news/leafnode+/files/patch-xnntputil.c b/news/leafnode+/files/patch-xnntputil.c
deleted file mode 100644
index 68833b513a2a..000000000000
--- a/news/leafnode+/files/patch-xnntputil.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- xnntputil.c.orig Thu Jan 30 11:22:21 2003
-+++ xnntputil.c Thu Jan 30 11:22:27 2003
-@@ -30,6 +30,7 @@
-
- #include <assert.h>
- #include <fcntl.h>
-+#include <sys/types.h>
- #include <sys/uio.h>
- #include <sys/param.h>
- #include <sys/socket.h>
-@@ -45,7 +46,6 @@
- #include <stdio.h>
- #include <string.h>
- #include <sys/stat.h>
--#include <sys/types.h>
- #include <time.h>
- #include <unistd.h>
- #include <dirent.h>
diff --git a/news/leafnode+/files/patch-xoverutil.c b/news/leafnode+/files/patch-xoverutil.c
deleted file mode 100644
index e1a512677093..000000000000
--- a/news/leafnode+/files/patch-xoverutil.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- xoverutil.c.orig Thu Jan 30 11:22:33 2003
-+++ xoverutil.c Thu Jan 30 11:22:39 2003
-@@ -44,6 +44,7 @@
- #endif
-
- #include <fcntl.h>
-+#include <sys/types.h>
- #include <sys/uio.h>
- #include <sys/param.h>
- #include <sys/socket.h>
-@@ -59,7 +60,6 @@
- #include <stdio.h>
- #include <string.h>
- #include <sys/stat.h>
--#include <sys/types.h>
- #include <time.h>
- #include <unistd.h>
- #include <dirent.h>
diff --git a/news/leafnode+/pkg-descr b/news/leafnode+/pkg-descr
deleted file mode 100644
index b8cf770ca5ea..000000000000
--- a/news/leafnode+/pkg-descr
+++ /dev/null
@@ -1,17 +0,0 @@
-Leafnode+ is a simple NNTP server designed for small sites, derived from
-the Leafnode package.
-
-Leafnode+ only downloads the contents of newsgroups that users have
-accessed recently, considerably reducing bandwidth requirements.
-
-When installing Leafnode+ for the first time, set the
-LEAFNODE_SETUP_WRKDIRS environment variable to "yes" before running make
-install or pkg_add. This creates the configuration files and a working
-directory required to run Leafnode+, typically PREFIX/lib/leafnode and
-/var/spool/leafnode.
-
-NOTE: This software contains a number of data-loss bugs and does not
-appear to be actively maintained. For new installations, the
-news/leafnode port is likely to serve your needs better.
-
-WWW: http://www25.big.jp/~jam/leafnode+/
diff --git a/news/leafnode+/pkg-plist b/news/leafnode+/pkg-plist
deleted file mode 100644
index 967dc54d7fa3..000000000000
--- a/news/leafnode+/pkg-plist
+++ /dev/null
@@ -1,13 +0,0 @@
-sbin/leafnode
-sbin/fetchnews
-sbin/texpire
-sbin/checkgroups
-sbin/leaftool
-%%PORTDOCS%%%%DOCSDIR%%/Changes
-%%PORTDOCS%%%%DOCSDIR%%/FAQ
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/config.example
-@exec if [ ! -d %D/lib/leafnode ]; then mkdir -p %D/lib/leafnode; fi
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrm lib/leafnode
diff --git a/news/pyne/Makefile b/news/pyne/Makefile
deleted file mode 100644
index 6371214099d0..000000000000
--- a/news/pyne/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-# ex:ts=8
-# New ports collection makefile for: pyne
-# Date created: Dec 10, 2001
-# Whom: ijliao
-#
-# $FreeBSD$
-#
-
-PORTNAME= pyne
-PORTVERSION= 1.1.0
-PORTREVISION= 6
-CATEGORIES= news python mail
-MASTER_SITES= http://www.soul-less.pwp.blueyonder.co.uk/pyne/
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= An X11 offline Newsreader/Emailer
-
-DEPRECATED= Upstream disapear and distfile is no more available
-EXPIRATION_DATE= 2011-05-01
-
-BUILD_WRKSRC= ${WRKDIR}/${DISTNAME}/src/po
-INSTALL_WRKSRC= ${WRKDIR}/${DISTNAME}/src/po
-
-USE_GNOME= pygtk2
-USE_PYTHON= yes
-
-post-patch:
- @${REINPLACE_CMD} -e 's/# Originally/# coding:latin1/g' \
- ${WRKSRC}/src/po/pygettext.py
-
-pre-build:
- @${ECHO_CMD} "#!/bin/sh" > ${WRKDIR}/pyne.sh
- @${ECHO_CMD} "exec ${PYTHON_CMD} -O ${PYTHON_SITELIBDIR}/pyne/pyne.py \$$*" >> ${WRKDIR}/pyne.sh
-
-post-build:
- cd ${WRKSRC} && ${CC} ${CFLAGS} yencdec.c -o yencdec
-
-post-install:
- ${INSTALL_SCRIPT} ${WRKDIR}/pyne.sh ${PREFIX}/bin/pyne
- ${INSTALL_PROGRAM} ${WRKSRC}/yencdec ${PREFIX}/bin/yencdec
- @${MKDIR} ${PYTHON_SITELIBDIR}/pyne
- ${TAR} -C ${WRKSRC}/src --exclude po --exclude test -cf - . | \
- ${TAR} -C ${PYTHON_SITELIBDIR}/pyne --unlink -xf -
- @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PYTHON_SITELIBDIR}/pyne
- ${PYTHON_CMD} -O -c "import compileall ; compileall.compile_dir(\"${PYTHON_SITELIBDIR}/pyne\")"
-
-.include <bsd.port.mk>
diff --git a/news/pyne/distinfo b/news/pyne/distinfo
deleted file mode 100644
index efc7cc59a860..000000000000
--- a/news/pyne/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (pyne-1.1.0.tar.gz) = 6664b34fe42507035a9f12e1a2da2ae5def6af985699529244ba9095f4016c3f
-SIZE (pyne-1.1.0.tar.gz) = 218018
diff --git a/news/pyne/files/patch-src::po::Makefile b/news/pyne/files/patch-src::po::Makefile
deleted file mode 100644
index 7589b4b6f068..000000000000
--- a/news/pyne/files/patch-src::po::Makefile
+++ /dev/null
@@ -1,46 +0,0 @@
---- src/po/Makefile.orig Mon Aug 30 22:23:03 2004
-+++ src/po/Makefile Thu Sep 2 22:42:12 2004
-@@ -1,7 +1,7 @@
-
- DATADIR = $(shell gnome-config --datadir)
- LOCALEDIR = $(DATADIR)/share/locale
--MAINDIR =
-+MAINDIR =
- BOXTYPE = boxtypes
- BOXFORMATS = boxformats
- PTK = ptk
-@@ -12,8 +12,8 @@
- all:pot update-po mo
-
-
--
--POTFILES:
-+
-+POTFILES:
-
- grep -l "_(['|\"]" ../$(MAINDIR)/*.py > POTFILES.in
- grep -l "_(['|\"]" ../$(BOXTYPE)/*.py >> POTFILES.in
-@@ -23,11 +23,11 @@
-
-
- # add more directories here, which need to be added in POTFILES.in ****
--
-+
- #create pot file
- pot: POTFILES
- ./pygettext.py -o $(DOMAIN).pot `cat POTFILES.in`
--
-+
-
- #update all po fles
- update-po:
-@@ -55,7 +55,8 @@
- install:
- for mo in *.mo; do\
- lingua=`basename $$mo .mo`; \
-- install -D --mode=644 $$lingua.mo $(PREFIX)$(LOCALEDIR)/$$lingua/LC_MESSAGES/$(DOMAIN).mo ; \
-+ mkdir -p $(PREFIX)$(LOCALEDIR)/$$lingua/LC_MESSAGES ; \
-+ install -m 644 $$lingua.mo $(PREFIX)$(LOCALEDIR)/$$lingua/LC_MESSAGES/$(DOMAIN).mo ; \
- done
-
- clean:
diff --git a/news/pyne/files/patch-src::po::es_ES.po b/news/pyne/files/patch-src::po::es_ES.po
deleted file mode 100644
index 1b47188407e9..000000000000
--- a/news/pyne/files/patch-src::po::es_ES.po
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/po/es_ES.po.orig Mon Aug 30 22:23:03 2004
-+++ ./src/po/es_ES.po Thu Sep 2 22:31:20 2004
-@@ -11,7 +11,7 @@
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
- "Language-Team: LANGUAGE <LL@li.org>\n"
- "MIME-Version: 1.0\n"
--"Content-Type: text/plain; charset=CHARSET\n"
-+"Content-Type: text/plain; charset=iso-8859-1\n"
- "Content-Transfer-Encoding: 8bit\n"
- "Generated-By: pygettext.py 1.3\n"
-
diff --git a/news/pyne/pkg-descr b/news/pyne/pkg-descr
deleted file mode 100644
index d1c43b55846a..000000000000
--- a/news/pyne/pkg-descr
+++ /dev/null
@@ -1,3 +0,0 @@
-Pyne is an X11 offline Newsreader/Emailer using the GTK+ toolkit.
-
-WWW: http://www.soul-less.pwp.blueyonder.co.uk/pyne/
diff --git a/news/pyne/pkg-plist b/news/pyne/pkg-plist
deleted file mode 100644
index 57ed265d086c..000000000000
--- a/news/pyne/pkg-plist
+++ /dev/null
@@ -1,142 +0,0 @@
-bin/pyne
-bin/yencdec
-%%PYTHON_SITELIBDIR%%/pyne/AppRun
-%%PYTHON_SITELIBDIR%%/pyne/addressbook.py
-%%PYTHON_SITELIBDIR%%/pyne/addressbook.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxformats/__init__.py
-%%PYTHON_SITELIBDIR%%/pyne/boxformats/__init__.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxformats/configbox.py
-%%PYTHON_SITELIBDIR%%/pyne/boxformats/configbox.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxformats/flatfilebox.py
-%%PYTHON_SITELIBDIR%%/pyne/boxformats/flatfilebox.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxformats/mhbox.py
-%%PYTHON_SITELIBDIR%%/pyne/boxformats/mhbox.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxformats/pynebox.py
-%%PYTHON_SITELIBDIR%%/pyne/boxformats/pynebox.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxformats/superbox.py
-%%PYTHON_SITELIBDIR%%/pyne/boxformats/superbox.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/__init__.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/__init__.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/loader.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/loader.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_recv/__init__.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_recv/__init__.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_recv/imap4_recv.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_recv/imap4_recv.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_recv/null_recv.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_recv/null_recv.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_recv/pop3_recv.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_recv/pop3_recv.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_recv/recv.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_recv/recv.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_send/__init__.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_send/__init__.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_send/null_send.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_send/null_send.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_send/smtp_send.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_send/smtp_send.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mailbox.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/mailbox.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/net_exceptions.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/net_exceptions.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/nntp_io/__init__.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/nntp_io/__init__.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/nntp_io/nntp_io.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/nntp_io/nntp_io.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/nntpbox.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/nntpbox.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/outbox.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/outbox.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/storebox.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/storebox.pyo
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/superbox.py
-%%PYTHON_SITELIBDIR%%/pyne/boxtypes/superbox.pyo
-%%PYTHON_SITELIBDIR%%/pyne/docs/fig1.png
-%%PYTHON_SITELIBDIR%%/pyne/docs/index.html
-%%PYTHON_SITELIBDIR%%/pyne/docs/intro.html
-%%PYTHON_SITELIBDIR%%/pyne/docs/quickstart.html
-%%PYTHON_SITELIBDIR%%/pyne/icons/logo.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/msg_read.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/msg_read_marked.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/msg_read_replied.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/msg_read_replied_marked.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/msg_uncached.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/msg_uncached_marked.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/msg_unread.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/msg_unread_marked.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/msg_unread_replied.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/msg_unread_replied_marked.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/pyne.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_address_book.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_delete_message.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_edit_message.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_forward_message.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_msg_down.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_msg_up.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_new_message.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_print_message.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_reply_message.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_replyall_message.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_shred_message.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_update_mail.xpm
-%%PYTHON_SITELIBDIR%%/pyne/icons/tb_updateall_mail.xpm
-%%PYTHON_SITELIBDIR%%/pyne/mainwin.py
-%%PYTHON_SITELIBDIR%%/pyne/mainwin.pyo
-%%PYTHON_SITELIBDIR%%/pyne/msgeditbox.py
-%%PYTHON_SITELIBDIR%%/pyne/msgeditbox.pyo
-%%PYTHON_SITELIBDIR%%/pyne/msgfilter.py
-%%PYTHON_SITELIBDIR%%/pyne/msgfilter.pyo
-%%PYTHON_SITELIBDIR%%/pyne/personality.py
-%%PYTHON_SITELIBDIR%%/pyne/personality.pyo
-%%PYTHON_SITELIBDIR%%/pyne/printmodule.py
-%%PYTHON_SITELIBDIR%%/pyne/printmodule.pyo
-%%PYTHON_SITELIBDIR%%/pyne/ptk/__init__.py
-%%PYTHON_SITELIBDIR%%/pyne/ptk/__init__.pyo
-%%PYTHON_SITELIBDIR%%/pyne/ptk/big_edit_box.py
-%%PYTHON_SITELIBDIR%%/pyne/ptk/big_edit_box.pyo
-%%PYTHON_SITELIBDIR%%/pyne/ptk/folder_tree.py
-%%PYTHON_SITELIBDIR%%/pyne/ptk/folder_tree.pyo
-%%PYTHON_SITELIBDIR%%/pyne/ptk/message_tree.py
-%%PYTHON_SITELIBDIR%%/pyne/ptk/message_tree.pyo
-%%PYTHON_SITELIBDIR%%/pyne/ptk/misc_widgets.py
-%%PYTHON_SITELIBDIR%%/pyne/ptk/misc_widgets.pyo
-%%PYTHON_SITELIBDIR%%/pyne/ptk/msg_view_box.py
-%%PYTHON_SITELIBDIR%%/pyne/ptk/msg_view_box.pyo
-%%PYTHON_SITELIBDIR%%/pyne/ptk/personalitybox.py
-%%PYTHON_SITELIBDIR%%/pyne/ptk/personalitybox.pyo
-%%PYTHON_SITELIBDIR%%/pyne/ptk/progresswin.py
-%%PYTHON_SITELIBDIR%%/pyne/ptk/progresswin.pyo
-%%PYTHON_SITELIBDIR%%/pyne/pyne.py
-%%PYTHON_SITELIBDIR%%/pyne/pyne.pyo
-%%PYTHON_SITELIBDIR%%/pyne/pyneheaders.py
-%%PYTHON_SITELIBDIR%%/pyne/pyneheaders.pyo
-%%PYTHON_SITELIBDIR%%/pyne/pynei18n.py
-%%PYTHON_SITELIBDIR%%/pyne/pynei18n.pyo
-%%PYTHON_SITELIBDIR%%/pyne/pynemsg.py
-%%PYTHON_SITELIBDIR%%/pyne/pynemsg.pyo
-%%PYTHON_SITELIBDIR%%/pyne/pynenntp.py
-%%PYTHON_SITELIBDIR%%/pyne/pynenntp.pyo
-%%PYTHON_SITELIBDIR%%/pyne/sort.py
-%%PYTHON_SITELIBDIR%%/pyne/sort.pyo
-%%PYTHON_SITELIBDIR%%/pyne/timeoutsocket.py
-%%PYTHON_SITELIBDIR%%/pyne/timeoutsocket.pyo
-%%PYTHON_SITELIBDIR%%/pyne/ui_mainwin.xml
-%%PYTHON_SITELIBDIR%%/pyne/ui_msgeditbox.xml
-%%PYTHON_SITELIBDIR%%/pyne/userconfig.py
-%%PYTHON_SITELIBDIR%%/pyne/userconfig.pyo
-%%PYTHON_SITELIBDIR%%/pyne/utils.py
-%%PYTHON_SITELIBDIR%%/pyne/utils.pyo
-%%PYTHON_SITELIBDIR%%/pyne/viewattach.py
-%%PYTHON_SITELIBDIR%%/pyne/viewattach.pyo
-share/locale/es_ES/LC_MESSAGES/pyne.mo
-share/locale/nl/LC_MESSAGES/pyne.mo
-share/locale/zh_TW.Big5/LC_MESSAGES/pyne.mo
-@dirrm %%PYTHON_SITELIBDIR%%/pyne/ptk
-@dirrm %%PYTHON_SITELIBDIR%%/pyne/icons
-@dirrm %%PYTHON_SITELIBDIR%%/pyne/docs
-@dirrm %%PYTHON_SITELIBDIR%%/pyne/boxtypes/nntp_io
-@dirrm %%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_send
-@dirrm %%PYTHON_SITELIBDIR%%/pyne/boxtypes/mail_recv
-@dirrm %%PYTHON_SITELIBDIR%%/pyne/boxtypes
-@dirrm %%PYTHON_SITELIBDIR%%/pyne/boxformats
-@dirrm %%PYTHON_SITELIBDIR%%/pyne
diff --git a/news/slurp/Makefile b/news/slurp/Makefile
deleted file mode 100644
index 2ad6ff0d94c7..000000000000
--- a/news/slurp/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-# New ports collection makefile for: slurp
-# Date created: 30 Jun 1996
-# Whom: jraynard
-#
-# $FreeBSD$
-#
-
-PORTNAME= slurp
-PORTVERSION= 1.10
-PORTREVISION= 2
-CATEGORIES= news
-MASTER_SITES= ftp://ftp.demon.co.uk/pub/news/slurp/
-EXTRACT_SUFX= .tar.Z
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Passive NNTP client to retrieve Usenet articles from a remote server
-
-DEPRECATED= Upstream disapear and distfile is no more available
-EXPIRATION_DATE= 2011-05-01
-
-NO_WRKSUBDIR= yes
-MAN1= slurp.1
-
-pre-install:
- ${MKDIR} ${PREFIX}/news/lib ${PREFIX}/news/bin
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/slurp ${PREFIX}/news/bin
- ${INSTALL_MAN} ${WRKSRC}/slurp.1 ${PREFIX}/man/man1
- ${INSTALL_DATA} ${WRKSRC}/slurp.sys ${PREFIX}/news/lib/slurp.sys.sample
-
-post-install:
- ${CAT} ${PKGMESSAGE}
-
-.include <bsd.port.mk>
diff --git a/news/slurp/distinfo b/news/slurp/distinfo
deleted file mode 100644
index b87510208534..000000000000
--- a/news/slurp/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (slurp-1.10.tar.Z) = dff1694c6aeb8ffa0deec5a6168ec346de3b650edb658e6e5279f8634aaeeeb0
-SIZE (slurp-1.10.tar.Z) = 54382
diff --git a/news/slurp/files/dbz.c b/news/slurp/files/dbz.c
deleted file mode 100644
index b8b1886e7e0a..000000000000
--- a/news/slurp/files/dbz.c
+++ /dev/null
@@ -1,1766 +0,0 @@
-/*
-
-dbz.c V3.2
-
-Copyright 1988 Jon Zeeff (zeeff@b-tech.ann-arbor.mi.us)
-You can use this code in any manner, as long as you leave my name on it
-and don't hold me responsible for any problems with it.
-
-Hacked on by gdb@ninja.UUCP (David Butler); Sun Jun 5 00:27:08 CDT 1988
-
-Various improvments + INCORE by moraes@ai.toronto.edu (Mark Moraes)
-
-Major reworking by Henry Spencer as part of the C News project.
-
-These routines replace dbm as used by the usenet news software
-(it's not a full dbm replacement by any means). It's fast and
-simple. It contains no AT&T code.
-
-In general, dbz's files are 1/20 the size of dbm's. Lookup performance
-is somewhat better, while file creation is spectacularly faster, especially
-if the incore facility is used.
-
-*/
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#ifndef __STDC__
-extern int errno;
-#endif
-#include <dbz.h>
-
-/*
- * #ifdef index. "LIA" = "leave it alone unless you know what you're doing".
- *
- * FUNNYSEEKS SEEK_SET is not 0, get it from <unistd.h>
- * INDEX_SIZE backward compatibility with old dbz; avoid using this
- * NMEMORY number of days of memory for use in sizing new table (LIA)
- * INCORE backward compatibility with old dbz; use dbzincore() instead
- * DBZDEBUG enable debugging
- * DEFSIZE default table size (not as critical as in old dbz)
- * OLDBNEWS default case mapping as in old B News; set NOBUFFER
- * BNEWS default case mapping as in current B News; set NOBUFFER
- * DEFCASE default case-map algorithm selector
- * NOTAGS fseek offsets are strange, do not do tagging (see below)
- * NPAGBUF size of .pag buffer, in longs (LIA)
- * SHISTBUF size of ASCII-file buffer, in bytes (LIA)
- * MAXRUN length of run which shifts to next table (see below) (LIA)
- * OVERFLOW long-int arithmetic overflow must be avoided, will trap
- * NOBUFFER do not buffer hash-table i/o, B News locking is defective
- */
-
-#ifdef FUNNYSEEKS
-#include <unistd.h>
-#else
-#define SEEK_SET 0
-#endif
-#ifdef OVERFLOW
-#include <limits.h>
-#endif
-
-static int dbzversion = 3; /* for validating .dir file format */
-
-/*
- * The dbz database exploits the fact that when news stores a <key,value>
- * tuple, the `value' part is a seek offset into a text file, pointing to
- * a copy of the `key' part. This avoids the need to store a copy of
- * the key in the dbz files. However, the text file *must* exist and be
- * consistent with the dbz files, or things will fail.
- *
- * The basic format of the database is a simple hash table containing the
- * values. A value is stored by indexing into the table using a hash value
- * computed from the key; collisions are resolved by linear probing (just
- * search forward for an empty slot, wrapping around to the beginning of
- * the table if necessary). Linear probing is a performance disaster when
- * the table starts to get full, so a complication is introduced. The
- * database is actually one *or more* tables, stored sequentially in the
- * .pag file, and the length of linear-probe sequences is limited. The
- * search (for an existing item or an empty slot) always starts in the
- * first table, and whenever MAXRUN probes have been done in table N,
- * probing continues in table N+1. This behaves reasonably well even in
- * cases of massive overflow. There are some other small complications
- * added, see comments below.
- *
- * The table size is fixed for any particular database, but is determined
- * dynamically when a database is rebuilt. The strategy is to try to pick
- * the size so the first table will be no more than 2/3 full, that being
- * slightly before the point where performance starts to degrade. (It is
- * desirable to be a bit conservative because the overflow strategy tends
- * to produce files with holes in them, which is a nuisance.)
- */
-
-/*
- * The following is for backward compatibility.
- */
-#ifdef INDEX_SIZE
-#define DEFSIZE INDEX_SIZE
-#endif
-
-/*
- * ANSI C says an offset into a file is a long, not an off_t, for some
- * reason. This actually does simplify life a bit, but it's still nice
- * to have a distinctive name for it. Beware, this is just for readability,
- * don't try to change this.
- */
-#define of_t long
-#define SOF (sizeof(of_t))
-
-/*
- * We assume that unused areas of a binary file are zeros, and that the
- * bit pattern of `(of_t)0' is all zeros. The alternative is rather
- * painful file initialization. Note that okayvalue(), if OVERFLOW is
- * defined, knows what value of an offset would cause overflow.
- */
-#define VACANT ((of_t)0)
-#define BIAS(o) ((o)+1) /* make any valid of_t non-VACANT */
-#define UNBIAS(o) ((o)-1) /* reverse BIAS() effect */
-
-/*
- * In a Unix implementation, or indeed any in which an of_t is a byte
- * count, there are a bunch of high bits free in an of_t. There is a
- * use for them. Checking a possible hit by looking it up in the base
- * file is relatively expensive, and the cost can be dramatically reduced
- * by using some of those high bits to tag the value with a few more bits
- * of the key's hash. This detects most false hits without the overhead of
- * seek+read+strcmp. We use the top bit to indicate whether the value is
- * tagged or not, and don't tag a value which is using the tag bits itself.
- * We're in trouble if the of_t representation wants to use the top bit.
- * The actual bitmasks and offset come from the configuration stuff,
- * which permits fiddling with them as necessary, and also suppressing
- * them completely (by defining the masks to 0). We build pre-shifted
- * versions of the masks for efficiency.
- */
-static of_t tagbits; /* pre-shifted tag mask */
-static of_t taghere; /* pre-shifted tag-enable bit */
-static of_t tagboth; /* tagbits|taghere */
-#define HASTAG(o) ((o)&taghere)
-#define TAG(o) ((o)&tagbits)
-#define NOTAG(o) ((o)&~tagboth)
-#define CANTAG(o) (((o)&tagboth) == 0)
-#define MKTAG(v) (((v)<<conf.tagshift)&tagbits)
-
-/*
- * A new, from-scratch database, not built as a rebuild of an old one,
- * needs to know table size, casemap algorithm, and tagging. Normally
- * the user supplies this info, but there have to be defaults.
- */
-#ifndef DEFSIZE
-#define DEFSIZE 120011 /* 300007 might be better */
-#endif
-#ifdef OLDBNEWS
-#define DEFCASE '0' /* B2.10 -- no mapping */
-#define NOBUFFER /* B News locking is defective */
-#endif
-#ifdef BNEWS
-#define DEFCASE '=' /* B2.11 -- all mapped */
-#define NOBUFFER /* B News locking is defective */
-#endif
-#ifndef DEFCASE /* C News compatibility is the default */
-#define DEFCASE 'C' /* C News -- RFC822 mapping */
-#endif
-#ifndef NOTAGS
-#define TAGENB 0x80 /* tag enable is top bit, tag is next 7 */
-#define TAGMASK 0x7f
-#define TAGSHIFT 24
-#else
-#define TAGENB 0 /* no tags */
-#define TAGMASK 0
-#define TAGSHIFT 0
-#endif
-
-/*
- * We read configuration info from the .dir file into this structure,
- * so we can avoid wired-in assumptions for an existing database.
- *
- * Among the info is a record of recent peak usages, so that a new table
- * size can be chosen intelligently when rebuilding. 10 is a good
- * number of usages to keep, since news displays marked fluctuations
- * in volume on a 7-day cycle.
- */
-struct dbzconfig {
- int olddbz; /* .dir file empty but .pag not? */
- of_t tsize; /* table size */
-# ifndef NMEMORY
-# define NMEMORY 10 /* # days of use info to remember */
-# endif
-# define NUSEDS (1+NMEMORY)
- of_t used[NUSEDS]; /* entries used today, yesterday, ... */
- int valuesize; /* size of table values, == SOF */
- int bytemap[SOF]; /* byte-order map */
- char casemap; /* case-mapping algorithm (see cipoint()) */
- char fieldsep; /* field separator in base file, if any */
- of_t tagenb; /* unshifted tag-enable bit */
- of_t tagmask; /* unshifted tag mask */
- int tagshift; /* shift count for tagmask and tagenb */
-};
-static struct dbzconfig conf;
-static int getconf();
-static long getno();
-static int putconf();
-static void mybytemap();
-static of_t bytemap();
-
-/*
- * For a program that makes many, many references to the database, it
- * is a large performance win to keep the table in core, if it will fit.
- * Note that this does hurt robustness in the event of crashes, and
- * dbmclose() *must* be called to flush the in-core database to disk.
- * The code is prepared to deal with the possibility that there isn't
- * enough memory. There *is* an assumption that a size_t is big enough
- * to hold the size (in bytes) of one table, so dbminit() tries to figure
- * out whether this is possible first.
- *
- * The preferred way to ask for an in-core table is to do dbzincore(1)
- * before dbminit(). The default is not to do it, although -DINCORE
- * overrides this for backward compatibility with old dbz.
- *
- * We keep only the first table in core. This greatly simplifies the
- * code, and bounds memory demand. Furthermore, doing this is a large
- * performance win even in the event of massive overflow.
- */
-#ifdef INCORE
-static int incore = 1;
-#else
-static int incore = 0;
-#endif
-
-/*
- * Stdio buffer for .pag reads. Buffering more than about 16 does not help
- * significantly at the densities we try to maintain, and the much larger
- * buffers that most stdios default to are much more expensive to fill.
- * With small buffers, stdio is performance-competitive with raw read(),
- * and it's much more portable.
- */
-#ifndef NPAGBUF
-#define NPAGBUF 16
-#endif
-#ifndef NOBUFFER
-#ifdef _IOFBF
-static of_t pagbuf[NPAGBUF]; /* only needed if !NOBUFFER && _IOFBF */
-#endif
-#endif
-
-/*
- * Stdio buffer for base-file reads. Message-IDs (all news ever needs to
- * read) are essentially never longer than 64 bytes, and the typical stdio
- * buffer is so much larger that it is much more expensive to fill.
- */
-#ifndef SHISTBUF
-#define SHISTBUF 64
-#endif
-#ifdef _IOFBF
-static char basebuf[SHISTBUF]; /* only needed if _IOFBF exists */
-#endif
-
-/*
- * Data structure for recording info about searches.
- */
-struct searcher {
- of_t place; /* current location in file */
- int tabno; /* which table we're in */
- int run; /* how long we'll stay in this table */
-# ifndef MAXRUN
-# define MAXRUN 100
-# endif
- long hash; /* the key's hash code (for optimization) */
- of_t tag; /* tag we are looking for */
- int seen; /* have we examined current location? */
- int aborted; /* has i/o error aborted search? */
-};
-static void start();
-#define FRESH ((struct searcher *)NULL)
-static of_t search();
-#define NOTFOUND ((of_t)-1)
-static int okayvalue();
-static int set();
-
-/*
- * Arguably the searcher struct for a given routine ought to be local to
- * it, but a fetch() is very often immediately followed by a store(), and
- * in some circumstances it is a useful performance win to remember where
- * the fetch() completed. So we use a global struct and remember whether
- * it is current.
- */
-static struct searcher srch;
-static struct searcher *prevp; /* &srch or FRESH */
-
-/* byte-ordering stuff */
-static int mybmap[SOF]; /* my byte order (see mybytemap()) */
-static int bytesame; /* is database order same as mine? */
-#define MAPIN(o) ((bytesame) ? (o) : bytemap((o), conf.bytemap, mybmap))
-#define MAPOUT(o) ((bytesame) ? (o) : bytemap((o), mybmap, conf.bytemap))
-
-/*
- * The double parentheses needed to make this work are ugly, but the
- * alternative (under most compilers) is to pack around 2K of unused
- * strings -- there's just no way to get rid of them.
- */
-static int debug; /* controlled by dbzdebug() */
-#ifdef DBZDEBUG
-#define DEBUG(args) if (debug) { (void) printf args ; }
-#else
-#define DEBUG(args) ;
-#endif
-
-/* externals used */
-extern char *malloc();
-extern char *calloc();
-extern void free(); /* ANSI C; some old implementations say int */
-extern int atoi();
-extern long atol();
-
-/* misc. forwards */
-static long hash();
-static void crcinit();
-static char *cipoint();
-static char *mapcase();
-static int isprime();
-static FILE *latebase();
-
-/* file-naming stuff */
-static char dir[] = ".dir";
-static char pag[] = ".pag";
-static char *enstring();
-
-/* central data structures */
-static FILE *basef; /* descriptor for base file */
-static char *basefname; /* name for not-yet-opened base file */
-static FILE *dirf; /* descriptor for .dir file */
-static int dirronly; /* dirf open read-only? */
-static FILE *pagf = NULL; /* descriptor for .pag file */
-static of_t pagpos; /* posn in pagf; only search may set != -1 */
-static int pagronly; /* pagf open read-only? */
-static of_t *corepag; /* incore version of .pag file, if any */
-static FILE *bufpagf; /* well-buffered pagf, for incore rewrite */
-static of_t *getcore();
-static int putcore();
-static int written; /* has a store() been done? */
-
-/*
- - dbzfresh - set up a new database, no historical info
- */
-int /* 0 success, -1 failure */
-dbzfresh(name, size, fs, cmap, tagmask)
-char *name; /* base name; .dir and .pag must exist */
-long size; /* table size (0 means default) */
-int fs; /* field-separator character in base file */
-int cmap; /* case-map algorithm (0 means default) */
-of_t tagmask; /* 0 default, 1 no tags */
-{
- register char *fn;
- struct dbzconfig c;
- register of_t m;
- register FILE *f;
-
- if (pagf != NULL) {
- DEBUG(("dbzfresh: database already open\n"));
- return(-1);
- }
- if (size != 0 && size < 2) {
- DEBUG(("dbzfresh: preposterous size (%ld)\n", size));
- return(-1);
- }
-
- /* get default configuration */
- if (getconf((FILE *)NULL, (FILE *)NULL, &c) < 0)
- return(-1); /* "can't happen" */
-
- /* and mess with it as specified */
- if (size != 0)
- c.tsize = size;
- c.fieldsep = fs;
- switch (cmap) {
- case 0:
- case '0':
- case 'B': /* 2.10 compat */
- c.casemap = '0'; /* '\0' nicer, but '0' printable! */
- break;
- case '=':
- case 'b': /* 2.11 compat */
- c.casemap = '=';
- break;
- case 'C':
- c.casemap = 'C';
- break;
- case '?':
- c.casemap = DEFCASE;
- break;
- default:
- DEBUG(("dbzfresh case map `%c' unknown\n", cmap));
- return(-1);
- break;
- }
- switch (tagmask) {
- case 0: /* default */
- break;
- case 1: /* no tags */
- c.tagshift = 0;
- c.tagmask = 0;
- c.tagenb = 0;
- break;
- default:
- m = tagmask;
- c.tagshift = 0;
- while (!(m&01)) {
- m >>= 1;
- c.tagshift++;
- }
- c.tagmask = m;
- c.tagenb = (m << 1) & ~m;
- break;
- }
-
- /* write it out */
- fn = enstring(name, dir);
- if (fn == NULL)
- return(-1);
- f = fopen(fn, "w");
- free(fn);
- if (f == NULL) {
- DEBUG(("dbzfresh: unable to write config\n"));
- return(-1);
- }
- if (putconf(f, &c) < 0) {
- (void) fclose(f);
- return(-1);
- }
- if (fclose(f) == EOF) {
- DEBUG(("dbzfresh: fclose failure\n"));
- return(-1);
- }
-
- /* create/truncate .pag */
- fn = enstring(name, pag);
- if (fn == NULL)
- return(-1);
- f = fopen(fn, "w");
- free(fn);
- if (f == NULL) {
- DEBUG(("dbzfresh: unable to create/truncate .pag file\n"));
- return(-1);
- } else
- (void) fclose(f);
-
- /* and punt to dbminit for the hard work */
- return(dbminit(name));
-}
-
-/*
- - dbzsize - what's a good table size to hold this many entries?
- */
-long
-dbzsize(contents)
-long contents; /* 0 means what's the default */
-{
- register long n;
-
- if (contents <= 0) { /* foulup or default inquiry */
- DEBUG(("dbzsize: preposterous input (%ld)\n", contents));
- return(DEFSIZE);
- }
- n = (contents/2)*3; /* try to keep table at most 2/3 full */
- if (!(n&01)) /* make it odd */
- n++;
- DEBUG(("dbzsize: tentative size %ld\n", n));
- while (!isprime(n)) /* and look for a prime */
- n += 2;
- DEBUG(("dbzsize: final size %ld\n", n));
-
- return(n);
-}
-
-/*
- - isprime - is a number prime?
- *
- * This is not a terribly efficient approach.
- */
-static int /* predicate */
-isprime(x)
-register long x;
-{
- static int quick[] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 0 };
- register int *ip;
- register long div;
- register long stop;
-
- /* hit the first few primes quickly to eliminate easy ones */
- /* this incidentally prevents ridiculously small tables */
- for (ip = quick; (div = *ip) != 0; ip++)
- if (x%div == 0) {
- DEBUG(("isprime: quick result on %ld\n", (long)x));
- return(0);
- }
-
- /* approximate square root of x */
- for (stop = x; x/stop < stop; stop >>= 1)
- continue;
- stop <<= 1;
-
- /* try odd numbers up to stop */
- for (div = *--ip; div < stop; div += 2)
- if (x%div == 0)
- return(0);
-
- return(1);
-}
-
-/*
- - dbzagain - set up a new database to be a rebuild of an old one
- */
-int /* 0 success, -1 failure */
-dbzagain(name, oldname)
-char *name; /* base name; .dir and .pag must exist */
-char *oldname; /* base name; all must exist */
-{
- register char *fn;
- struct dbzconfig c;
- register int i;
- register long top;
- register FILE *f;
- register int newtable;
- register of_t newsize;
-
- if (pagf != NULL) {
- DEBUG(("dbzagain: database already open\n"));
- return(-1);
- }
-
- /* pick up the old configuration */
- fn = enstring(oldname, dir);
- if (fn == NULL)
- return(-1);
- f = fopen(fn, "r");
- free(fn);
- if (f == NULL) {
- DEBUG(("dbzagain: cannot open old .dir file\n"));
- return(-1);
- }
- i = getconf(f, (FILE *)NULL, &c);
- (void) fclose(f);
- if (i < 0) {
- DEBUG(("dbzagain: getconf failed\n"));
- return(-1);
- }
-
- /* tinker with it */
- top = 0;
- newtable = 0;
- for (i = 0; i < NUSEDS; i++) {
- if (top < c.used[i])
- top = c.used[i];
- if (c.used[i] == 0)
- newtable = 1; /* hasn't got full usage history yet */
- }
- if (top == 0) {
- DEBUG(("dbzagain: old table has no contents!\n"));
- newtable = 1;
- }
- for (i = NUSEDS-1; i > 0; i--)
- c.used[i] = c.used[i-1];
- c.used[0] = 0;
- newsize = dbzsize(top);
- if (!newtable || newsize > c.tsize) /* don't shrink new table */
- c.tsize = newsize;
-
- /* write it out */
- fn = enstring(name, dir);
- if (fn == NULL)
- return(-1);
- f = fopen(fn, "w");
- free(fn);
- if (f == NULL) {
- DEBUG(("dbzagain: unable to write new .dir\n"));
- return(-1);
- }
- i = putconf(f, &c);
- (void) fclose(f);
- if (i < 0) {
- DEBUG(("dbzagain: putconf failed\n"));
- return(-1);
- }
-
- /* create/truncate .pag */
- fn = enstring(name, pag);
- if (fn == NULL)
- return(-1);
- f = fopen(fn, "w");
- free(fn);
- if (f == NULL) {
- DEBUG(("dbzagain: unable to create/truncate .pag file\n"));
- return(-1);
- } else
- (void) fclose(f);
-
- /* and let dbminit do the work */
- return(dbminit(name));
-}
-
-/*
- - dbminit - open a database, creating it (using defaults) if necessary
- *
- * We try to leave errno set plausibly, to the extent that underlying
- * functions permit this, since many people consult it if dbminit() fails.
- */
-int /* 0 success, -1 failure */
-dbminit(name)
-char *name;
-{
- register int i;
- register size_t s;
- register char *dirfname;
- register char *pagfname;
-
- if (pagf != NULL) {
- DEBUG(("dbminit: dbminit already called once\n"));
- errno = 0;
- return(-1);
- }
-
- /* open the .dir file */
- dirfname = enstring(name, dir);
- if (dirfname == NULL)
- return(-1);
- dirf = fopen(dirfname, "r+");
- if (dirf == NULL) {
- dirf = fopen(dirfname, "r");
- dirronly = 1;
- } else
- dirronly = 0;
- free(dirfname);
- if (dirf == NULL) {
- DEBUG(("dbminit: can't open .dir file\n"));
- return(-1);
- }
-
- /* open the .pag file */
- pagfname = enstring(name, pag);
- if (pagfname == NULL) {
- (void) fclose(dirf);
- return(-1);
- }
- pagf = fopen(pagfname, "r+b");
- if (pagf == NULL) {
- pagf = fopen(pagfname, "rb");
- if (pagf == NULL) {
- DEBUG(("dbminit: .pag open failed\n"));
- (void) fclose(dirf);
- free(pagfname);
- return(-1);
- }
- pagronly = 1;
- } else if (dirronly)
- pagronly = 1;
- else
- pagronly = 0;
-#ifdef NOBUFFER
- /*
- * B News does not do adequate locking on its database accesses.
- * Why it doesn't get into trouble using dbm is a mystery. In any
- * case, doing unbuffered i/o does not cure the problem, but does
- * enormously reduce its incidence.
- */
- (void) setbuf(pagf, (char *)NULL);
-#else
-#ifdef _IOFBF
- (void) setvbuf(pagf, (char *)pagbuf, _IOFBF, sizeof(pagbuf));
-#endif
-#endif
- pagpos = -1;
- /* don't free pagfname, need it below */
-
- /* open the base file */
- basef = fopen(name, "r");
- if (basef == NULL) {
- DEBUG(("dbminit: basefile open failed\n"));
- basefname = enstring(name, "");
- if (basefname == NULL) {
- (void) fclose(pagf);
- (void) fclose(dirf);
- free(pagfname);
- pagf = NULL;
- return(-1);
- }
- } else
- basefname = NULL;
-#ifdef _IOFBF
- if (basef != NULL)
- (void) setvbuf(basef, basebuf, _IOFBF, sizeof(basebuf));
-#endif
-
- /* pick up configuration */
- if (getconf(dirf, pagf, &conf) < 0) {
- DEBUG(("dbminit: getconf failure\n"));
- (void) fclose(basef);
- (void) fclose(pagf);
- (void) fclose(dirf);
- free(pagfname);
- pagf = NULL;
- errno = EDOM; /* kind of a kludge, but very portable */
- return(-1);
- }
- tagbits = conf.tagmask << conf.tagshift;
- taghere = conf.tagenb << conf.tagshift;
- tagboth = tagbits | taghere;
- mybytemap(mybmap);
- bytesame = 1;
- for (i = 0; i < SOF; i++)
- if (mybmap[i] != conf.bytemap[i])
- bytesame = 0;
-
- /* get first table into core, if it looks desirable and feasible */
- s = (size_t)conf.tsize * SOF;
- if (incore && (of_t)(s/SOF) == conf.tsize) {
- bufpagf = fopen(pagfname, (pagronly) ? "rb" : "r+b");
- if (bufpagf != NULL)
- corepag = getcore(bufpagf);
- } else {
- bufpagf = NULL;
- corepag = NULL;
- }
- free(pagfname);
-
- /* misc. setup */
- crcinit();
- written = 0;
- prevp = FRESH;
- DEBUG(("dbminit: succeeded\n"));
- return(0);
-}
-
-/*
- - enstring - concatenate two strings into a malloced area
- */
-static char * /* NULL if malloc fails */
-enstring(s1, s2)
-char *s1;
-char *s2;
-{
- register char *p;
-
- p = malloc((size_t)strlen(s1) + (size_t)strlen(s2) + 1);
- if (p != NULL) {
- (void) strcpy(p, s1);
- (void) strcat(p, s2);
- } else {
- DEBUG(("enstring(%s, %s) out of memory\n", s1, s2));
- }
- return(p);
-}
-
-/*
- - dbmclose - close a database
- */
-int
-dbmclose()
-{
- register int ret = 0;
-
- if (pagf == NULL) {
- DEBUG(("dbmclose: not opened!\n"));
- return(-1);
- }
-
- if (fclose(pagf) == EOF) {
- DEBUG(("dbmclose: fclose(pagf) failed\n"));
- ret = -1;
- }
- pagf = basef; /* ensure valid pointer; dbzsync checks it */
- if (dbzsync() < 0)
- ret = -1;
- if (bufpagf != NULL && fclose(bufpagf) == EOF) {
- DEBUG(("dbmclose: fclose(bufpagf) failed\n"));
- ret = -1;
- }
- if (corepag != NULL)
- free((char *)corepag);
- corepag = NULL;
- if (fclose(basef) == EOF) {
- DEBUG(("dbmclose: fclose(basef) failed\n"));
- ret = -1;
- }
- if (basefname != NULL)
- free(basefname);
- basef = NULL;
- pagf = NULL;
- if (fclose(dirf) == EOF) {
- DEBUG(("dbmclose: fclose(dirf) failed\n"));
- ret = -1;
- }
-
- DEBUG(("dbmclose: %s\n", (ret == 0) ? "succeeded" : "failed"));
- return(ret);
-}
-
-/*
- - dbzsync - push all in-core data out to disk
- */
-int
-dbzsync()
-{
- register int ret = 0;
-
- if (pagf == NULL) {
- DEBUG(("dbzsync: not opened!\n"));
- return(-1);
- }
- if (!written)
- return(0);
-
- if (corepag != NULL) {
- if (putcore(corepag, bufpagf) < 0) {
- DEBUG(("dbzsync: putcore failed\n"));
- ret = -1;
- }
- }
- if (!conf.olddbz)
- if (putconf(dirf, &conf) < 0)
- ret = -1;
-
- DEBUG(("dbzsync: %s\n", (ret == 0) ? "succeeded" : "failed"));
- return(ret);
-}
-
-/*
- - dbzcancel - cancel writing of in-core data
- * Mostly for use from child processes.
- * Note that we don't need to futz around with stdio buffers, because we
- * always fflush them immediately anyway and so they never have stale data.
- */
-int
-dbzcancel()
-{
- if (pagf == NULL) {
- DEBUG(("dbzcancel: not opened!\n"));
- return(-1);
- }
-
- written = 0;
- return(0);
-}
-
-/*
- - dbzfetch - fetch() with case mapping built in
- */
-datum
-dbzfetch(key)
-datum key;
-{
- char buffer[DBZMAXKEY + 1];
- datum mappedkey;
- register size_t keysize;
-
- DEBUG(("dbzfetch: (%s)\n", key.dptr));
-
- /* Key is supposed to be less than DBZMAXKEY */
- keysize = key.dsize;
- if (keysize >= DBZMAXKEY) {
- keysize = DBZMAXKEY;
- DEBUG(("keysize is %d - truncated to %d\n", key.dsize, DBZMAXKEY));
- }
-
- mappedkey.dptr = mapcase(buffer, key.dptr, keysize);
- buffer[keysize] = '\0'; /* just a debug aid */
- mappedkey.dsize = keysize;
-
- return(fetch(mappedkey));
-}
-
-/*
- - fetch - get an entry from the database
- *
- * Disgusting fine point, in the name of backward compatibility: if the
- * last character of "key" is a NUL, that character is (effectively) not
- * part of the comparison against the stored keys.
- */
-datum /* dptr NULL, dsize 0 means failure */
-fetch(key)
-datum key;
-{
- char buffer[DBZMAXKEY + 1];
- static of_t key_ptr; /* return value points here */
- datum output;
- register size_t keysize;
- register size_t cmplen;
- register char *sepp;
-
- DEBUG(("fetch: (%s)\n", key.dptr));
- output.dptr = NULL;
- output.dsize = 0;
- prevp = FRESH;
-
- /* Key is supposed to be less than DBZMAXKEY */
- keysize = key.dsize;
- if (keysize >= DBZMAXKEY) {
- keysize = DBZMAXKEY;
- DEBUG(("keysize is %d - truncated to %d\n", key.dsize, DBZMAXKEY));
- }
-
- if (pagf == NULL) {
- DEBUG(("fetch: database not open!\n"));
- return(output);
- } else if (basef == NULL) { /* basef didn't exist yet */
- basef = latebase();
- if (basef == NULL)
- return(output);
- }
-
- cmplen = keysize;
- sepp = &conf.fieldsep;
- if (key.dptr[keysize-1] == '\0') {
- cmplen--;
- sepp = &buffer[keysize-1];
- }
- start(&srch, &key, FRESH);
- while ((key_ptr = search(&srch)) != NOTFOUND) {
- DEBUG(("got 0x%lx\n", key_ptr));
-
- /* fetch the key */
- if (fseek(basef, key_ptr, SEEK_SET) != 0) {
- DEBUG(("fetch: seek failed\n"));
- return(output);
- }
- if (fread(buffer, 1, keysize, basef) != keysize) {
- DEBUG(("fetch: read failed\n"));
- return(output);
- }
-
- /* try it */
- buffer[keysize] = '\0'; /* terminated for DEBUG */
- (void) mapcase(buffer, buffer, keysize);
- DEBUG(("fetch: buffer (%s) looking for (%s) size = %d\n",
- buffer, key.dptr, keysize));
- if (memcmp(key.dptr, buffer, cmplen) == 0 &&
- (*sepp == conf.fieldsep || *sepp == '\0')) {
- /* we found it */
- output.dptr = (char *)&key_ptr;
- output.dsize = SOF;
- DEBUG(("fetch: successful\n"));
- return(output);
- }
- }
-
- /* we didn't find it */
- DEBUG(("fetch: failed\n"));
- prevp = &srch; /* remember where we stopped */
- return(output);
-}
-
-/*
- - latebase - try to open a base file that wasn't there at the start
- */
-static FILE *
-latebase()
-{
- register FILE *it;
-
- if (basefname == NULL) {
- DEBUG(("latebase: name foulup\n"));
- return(NULL);
- }
- it = fopen(basefname, "r");
- if (it == NULL) {
- DEBUG(("latebase: still can't open base\n"));
- } else {
- DEBUG(("latebase: late open succeeded\n"));
- free(basefname);
- basefname = NULL;
-#ifdef _IOFBF
- (void) setvbuf(it, basebuf, _IOFBF, sizeof(basebuf));
-#endif
- }
- return(it);
-}
-
-/*
- - dbzstore - store() with case mapping built in
- */
-int
-dbzstore(key, data)
-datum key;
-datum data;
-{
- char buffer[DBZMAXKEY + 1];
- datum mappedkey;
- register size_t keysize;
-
- DEBUG(("dbzstore: (%s)\n", key.dptr));
-
- /* Key is supposed to be less than DBZMAXKEY */
- keysize = key.dsize;
- if (keysize >= DBZMAXKEY) {
- DEBUG(("dbzstore: key size too big (%d)\n", key.dsize));
- return(-1);
- }
-
- mappedkey.dptr = mapcase(buffer, key.dptr, keysize);
- buffer[keysize] = '\0'; /* just a debug aid */
- mappedkey.dsize = keysize;
-
- return(store(mappedkey, data));
-}
-
-/*
- - store - add an entry to the database
- */
-int /* 0 success, -1 failure */
-store(key, data)
-datum key;
-datum data;
-{
- of_t value;
-
- if (pagf == NULL) {
- DEBUG(("store: database not open!\n"));
- return(-1);
- } else if (basef == NULL) { /* basef didn't exist yet */
- basef = latebase();
- if (basef == NULL)
- return(-1);
- }
- if (pagronly) {
- DEBUG(("store: database open read-only\n"));
- return(-1);
- }
- if (data.dsize != SOF) {
- DEBUG(("store: value size wrong (%d)\n", data.dsize));
- return(-1);
- }
- if (key.dsize >= DBZMAXKEY) {
- DEBUG(("store: key size too big (%d)\n", key.dsize));
- return(-1);
- }
-
- /* copy the value in to ensure alignment */
- (void) memcpy((char *)&value, data.dptr, SOF);
- DEBUG(("store: (%s, %ld)\n", key.dptr, (long)value));
- if (!okayvalue(value)) {
- DEBUG(("store: reserved bit or overflow in 0x%lx\n", value));
- return(-1);
- }
-
- /* find the place, exploiting previous search if possible */
- start(&srch, &key, prevp);
- while (search(&srch) != NOTFOUND)
- continue;
-
- prevp = FRESH;
- conf.used[0]++;
- DEBUG(("store: used count %ld\n", conf.used[0]));
- written = 1;
- return(set(&srch, value));
-}
-
-/*
- - dbzincore - control attempts to keep .pag file in core
- */
-int /* old setting */
-dbzincore(value)
-int value;
-{
- register int old = incore;
-
- incore = value;
- return(old);
-}
-
-/*
- - getconf - get configuration from .dir file
- */
-static int /* 0 success, -1 failure */
-getconf(df, pf, cp)
-register FILE *df; /* NULL means just give me the default */
-register FILE *pf; /* NULL means don't care about .pag */
-register struct dbzconfig *cp;
-{
- register int c;
- register int i;
- int err = 0;
-
- c = (df != NULL) ? getc(df) : EOF;
- if (c == EOF) { /* empty file, no configuration known */
- cp->olddbz = 0;
- if (df != NULL && pf != NULL && getc(pf) != EOF)
- cp->olddbz = 1;
- cp->tsize = DEFSIZE;
- cp->fieldsep = '\t';
- for (i = 0; i < NUSEDS; i++)
- cp->used[i] = 0;
- cp->valuesize = SOF;
- mybytemap(cp->bytemap);
- cp->casemap = DEFCASE;
- cp->tagenb = TAGENB;
- cp->tagmask = TAGMASK;
- cp->tagshift = TAGSHIFT;
- DEBUG(("getconf: defaults (%ld, %c, (0x%lx/0x%lx<<%d))\n",
- cp->tsize, cp->casemap, cp->tagenb,
- cp->tagmask, cp->tagshift));
- return(0);
- }
- (void) ungetc(c, df);
-
- /* first line, the vital stuff */
- if (getc(df) != 'd' || getc(df) != 'b' || getc(df) != 'z')
- err = -1;
- if (getno(df, &err) != dbzversion)
- err = -1;
- cp->tsize = getno(df, &err);
- cp->fieldsep = getno(df, &err);
- while ((c = getc(df)) == ' ')
- continue;
- cp->casemap = c;
- cp->tagenb = getno(df, &err);
- cp->tagmask = getno(df, &err);
- cp->tagshift = getno(df, &err);
- cp->valuesize = getno(df, &err);
- if (cp->valuesize != SOF) {
- DEBUG(("getconf: wrong of_t size (%d)\n", cp->valuesize));
- err = -1;
- cp->valuesize = SOF; /* to protect the loops below */
- }
- for (i = 0; i < cp->valuesize; i++)
- cp->bytemap[i] = getno(df, &err);
- if (getc(df) != '\n')
- err = -1;
- DEBUG(("size %ld, sep %d, cmap %c, tags 0x%lx/0x%lx<<%d, ", cp->tsize,
- cp->fieldsep, cp->casemap, cp->tagenb, cp->tagmask,
- cp->tagshift));
- DEBUG(("bytemap (%d)", cp->valuesize));
- for (i = 0; i < cp->valuesize; i++) {
- DEBUG((" %d", cp->bytemap[i]));
- }
- DEBUG(("\n"));
-
- /* second line, the usages */
- for (i = 0; i < NUSEDS; i++)
- cp->used[i] = getno(df, &err);
- if (getc(df) != '\n')
- err = -1;
- DEBUG(("used %ld %ld %ld...\n", cp->used[0], cp->used[1], cp->used[2]));
-
- if (err < 0) {
- DEBUG(("getconf error\n"));
- return(-1);
- }
- return(0);
-}
-
-/*
- - getno - get a long
- */
-static long
-getno(f, ep)
-FILE *f;
-int *ep;
-{
- register char *p;
-# define MAXN 50
- char getbuf[MAXN];
- register int c;
-
- while ((c = getc(f)) == ' ')
- continue;
- if (c == EOF || c == '\n') {
- DEBUG(("getno: missing number\n"));
- *ep = -1;
- return(0);
- }
- p = getbuf;
- *p++ = c;
- while ((c = getc(f)) != EOF && c != '\n' && c != ' ')
- if (p < &getbuf[MAXN-1])
- *p++ = c;
- if (c == EOF) {
- DEBUG(("getno: EOF\n"));
- *ep = -1;
- } else
- (void) ungetc(c, f);
- *p = '\0';
-
- if (strspn(getbuf, "-1234567890") != strlen(getbuf)) {
- DEBUG(("getno: `%s' non-numeric\n", getbuf));
- *ep = -1;
- }
- return(atol(getbuf));
-}
-
-/*
- - putconf - write configuration to .dir file
- */
-static int /* 0 success, -1 failure */
-putconf(f, cp)
-register FILE *f;
-register struct dbzconfig *cp;
-{
- register int i;
- register int ret = 0;
-
- if (fseek(f, (of_t)0, SEEK_SET) != 0) {
- DEBUG(("fseek failure in putconf\n"));
- ret = -1;
- }
- fprintf(f, "dbz %d %ld %d %c %ld %ld %d %d", dbzversion, cp->tsize,
- cp->fieldsep, cp->casemap, cp->tagenb,
- cp->tagmask, cp->tagshift, cp->valuesize);
- for (i = 0; i < cp->valuesize; i++)
- fprintf(f, " %d", cp->bytemap[i]);
- fprintf(f, "\n");
- for (i = 0; i < NUSEDS; i++)
- fprintf(f, "%ld%c", cp->used[i], (i < NUSEDS-1) ? ' ' : '\n');
-
- (void) fflush(f);
- if (ferror(f))
- ret = -1;
-
- DEBUG(("putconf status %d\n", ret));
- return(ret);
-}
-
-/*
- - getcore - try to set up an in-core copy of .pag file
- */
-static of_t * /* pointer to copy, or NULL */
-getcore(f)
-FILE *f;
-{
- register of_t *p;
- register size_t i;
- register size_t nread;
- register char *it;
-
- it = malloc((size_t)conf.tsize * SOF);
- if (it == NULL) {
- DEBUG(("getcore: malloc failed\n"));
- return(NULL);
- }
-
- nread = fread(it, SOF, (size_t)conf.tsize, f);
- if (ferror(f)) {
- DEBUG(("getcore: read failed\n"));
- free(it);
- return(NULL);
- }
-
- p = (of_t *)it + nread;
- i = (size_t)conf.tsize - nread;
- while (i-- > 0)
- *p++ = VACANT;
- return((of_t *)it);
-}
-
-/*
- - putcore - try to rewrite an in-core table
- */
-static int /* 0 okay, -1 fail */
-putcore(tab, f)
-of_t *tab;
-FILE *f;
-{
- if (fseek(f, (of_t)0, SEEK_SET) != 0) {
- DEBUG(("fseek failure in putcore\n"));
- return(-1);
- }
- (void) fwrite((char *)tab, SOF, (size_t)conf.tsize, f);
- (void) fflush(f);
- return((ferror(f)) ? -1 : 0);
-}
-
-/*
- - start - set up to start or restart a search
- */
-static void
-start(sp, kp, osp)
-register struct searcher *sp;
-register datum *kp;
-register struct searcher *osp; /* may be FRESH, i.e. NULL */
-{
- register long h;
-
- h = hash(kp->dptr, kp->dsize);
- if (osp != FRESH && osp->hash == h) {
- if (sp != osp)
- *sp = *osp;
- DEBUG(("search restarted\n"));
- } else {
- sp->hash = h;
- sp->tag = MKTAG(h / conf.tsize);
- DEBUG(("tag 0x%lx\n", sp->tag));
- sp->place = h % conf.tsize;
- sp->tabno = 0;
- sp->run = (conf.olddbz) ? conf.tsize : MAXRUN;
- sp->aborted = 0;
- }
- sp->seen = 0;
-}
-
-/*
- - search - conduct part of a search
- */
-static of_t /* NOTFOUND if we hit VACANT or error */
-search(sp)
-register struct searcher *sp;
-{
- register of_t dest;
- register of_t value;
- of_t val; /* buffer for value (can't fread register) */
- register of_t place;
-
- if (sp->aborted)
- return(NOTFOUND);
-
- for (;;) {
- /* determine location to be examined */
- place = sp->place;
- if (sp->seen) {
- /* go to next location */
- if (--sp->run <= 0) {
- sp->tabno++;
- sp->run = MAXRUN;
- }
- place = (place+1)%conf.tsize + sp->tabno*conf.tsize;
- sp->place = place;
- } else
- sp->seen = 1; /* now looking at current location */
- DEBUG(("search @ %ld\n", place));
-
- /* get the tagged value */
- if (corepag != NULL && place < conf.tsize) {
- DEBUG(("search: in core\n"));
- value = MAPIN(corepag[place]);
- } else {
- /* seek, if necessary */
- dest = place * SOF;
- if (pagpos != dest) {
- if (fseek(pagf, dest, SEEK_SET) != 0) {
- DEBUG(("search: seek failed\n"));
- pagpos = -1;
- sp->aborted = 1;
- return(NOTFOUND);
- }
- pagpos = dest;
- }
-
- /* read it */
- if (fread((char *)&val, sizeof(val), 1, pagf) == 1)
- value = MAPIN(val);
- else if (ferror(pagf)) {
- DEBUG(("search: read failed\n"));
- pagpos = -1;
- sp->aborted = 1;
- return(NOTFOUND);
- } else
- value = VACANT;
-
- /* and finish up */
- pagpos += sizeof(val);
- }
-
- /* vacant slot is always cause to return */
- if (value == VACANT) {
- DEBUG(("search: empty slot\n"));
- return(NOTFOUND);
- };
-
- /* check the tag */
- value = UNBIAS(value);
- DEBUG(("got 0x%lx\n", value));
- if (!HASTAG(value)) {
- DEBUG(("tagless\n"));
- return(value);
- } else if (TAG(value) == sp->tag) {
- DEBUG(("match\n"));
- return(NOTAG(value));
- } else {
- DEBUG(("mismatch 0x%lx\n", TAG(value)));
- }
- }
- /* NOTREACHED */
-}
-
-/*
- - okayvalue - check that a value can be stored
- */
-static int /* predicate */
-okayvalue(value)
-of_t value;
-{
- if (HASTAG(value))
- return(0);
-#ifdef OVERFLOW
- if (value == LONG_MAX) /* BIAS() and UNBIAS() will overflow */
- return(0);
-#endif
- return(1);
-}
-
-/*
- - set - store a value into a location previously found by search
- */
-static int /* 0 success, -1 failure */
-set(sp, value)
-register struct searcher *sp;
-of_t value;
-{
- register of_t place = sp->place;
- register of_t v = value;
-
- if (sp->aborted)
- return(-1);
-
- if (CANTAG(v) && !conf.olddbz) {
- v |= sp->tag | taghere;
- if (v != UNBIAS(VACANT)) /* BIAS(v) won't look VACANT */
-#ifdef OVERFLOW
- if (v != LONG_MAX) /* and it won't overflow */
-#endif
- value = v;
- }
- DEBUG(("tagged value is 0x%lx\n", value));
- value = BIAS(value);
- value = MAPOUT(value);
-
- /* If we have the index file in memory, use it */
- if (corepag != NULL && place < conf.tsize) {
- corepag[place] = value;
- DEBUG(("set: incore\n"));
- return(0);
- }
-
- /* seek to spot */
- pagpos = -1; /* invalidate position memory */
- if (fseek(pagf, place * SOF, SEEK_SET) != 0) {
- DEBUG(("set: seek failed\n"));
- sp->aborted = 1;
- return(-1);
- }
-
- /* write in data */
- if (fwrite((char *)&value, SOF, 1, pagf) != 1) {
- DEBUG(("set: write failed\n"));
- sp->aborted = 1;
- return(-1);
- }
- /* fflush improves robustness, and buffer re-use is rare anyway */
- if (fflush(pagf) == EOF) {
- DEBUG(("set: fflush failed\n"));
- sp->aborted = 1;
- return(-1);
- }
-
- DEBUG(("set: succeeded\n"));
- return(0);
-}
-
-/*
- - mybytemap - determine this machine's byte map
- *
- * A byte map is an array of ints, sizeof(of_t) of them. The 0th int
- * is the byte number of the high-order byte in my of_t, and so forth.
- */
-static void
-mybytemap(map)
-int map[]; /* -> int[SOF] */
-{
- union {
- of_t o;
- char c[SOF];
- } u;
- register int *mp = &map[SOF];
- register int ntodo;
- register int i;
-
- u.o = 1;
- for (ntodo = (int)SOF; ntodo > 0; ntodo--) {
- for (i = 0; i < SOF; i++)
- if (u.c[i] != 0)
- break;
- if (i == SOF) {
- /* trouble -- set it to *something* consistent */
- DEBUG(("mybytemap: nonexistent byte %d!!!\n", ntodo));
- for (i = 0; i < SOF; i++)
- map[i] = i;
- return;
- }
- DEBUG(("mybytemap: byte %d\n", i));
- *--mp = i;
- while (u.c[i] != 0)
- u.o <<= 1;
- }
-}
-
-/*
- - bytemap - transform an of_t from byte ordering map1 to map2
- */
-static of_t /* transformed result */
-bytemap(ino, map1, map2)
-of_t ino;
-int *map1;
-int *map2;
-{
- union oc {
- of_t o;
- char c[SOF];
- };
- union oc in;
- union oc out;
- register int i;
-
- in.o = ino;
- for (i = 0; i < SOF; i++)
- out.c[map2[i]] = in.c[map1[i]];
- return(out.o);
-}
-
-/*
- * This is a simplified version of the pathalias hashing function.
- * Thanks to Steve Belovin and Peter Honeyman
- *
- * hash a string into a long int. 31 bit crc (from andrew appel).
- * the crc table is computed at run time by crcinit() -- we could
- * precompute, but it takes 1 clock tick on a 750.
- *
- * This fast table calculation works only if POLY is a prime polynomial
- * in the field of integers modulo 2. Since the coefficients of a
- * 32-bit polynomial won't fit in a 32-bit word, the high-order bit is
- * implicit. IT MUST ALSO BE THE CASE that the coefficients of orders
- * 31 down to 25 are zero. Happily, we have candidates, from
- * E. J. Watson, "Primitive Polynomials (Mod 2)", Math. Comp. 16 (1962):
- * x^32 + x^7 + x^5 + x^3 + x^2 + x^1 + x^0
- * x^31 + x^3 + x^0
- *
- * We reverse the bits to get:
- * 111101010000000000000000000000001 but drop the last 1
- * f 5 0 0 0 0 0 0
- * 010010000000000000000000000000001 ditto, for 31-bit crc
- * 4 8 0 0 0 0 0 0
- */
-
-#define POLY 0x48000000L /* 31-bit polynomial (avoids sign problems) */
-
-static long CrcTable[128];
-
-/*
- - crcinit - initialize tables for hash function
- */
-static void
-crcinit()
-{
- register int i, j;
- register long sum;
-
- for (i = 0; i < 128; ++i) {
- sum = 0L;
- for (j = 7 - 1; j >= 0; --j)
- if (i & (1 << j))
- sum ^= POLY >> j;
- CrcTable[i] = sum;
- }
- DEBUG(("crcinit: done\n"));
-}
-
-/*
- - hash - Honeyman's nice hashing function
- */
-static long
-hash(name, size)
-register char *name;
-register int size;
-{
- register long sum = 0L;
-
- while (size--) {
- sum = (sum >> 7) ^ CrcTable[(sum ^ (*name++)) & 0x7f];
- }
- DEBUG(("hash: returns (%ld)\n", sum));
- return(sum);
-}
-
-/*
- * case-mapping stuff
- *
- * Borrowed from C News, by permission of the authors. Somewhat modified.
- *
- * We exploit the fact that we are dealing only with headers here, and
- * headers are limited to the ASCII characters by RFC822. It is barely
- * possible that we might be dealing with a translation into another
- * character set, but in particular it's very unlikely for a header
- * character to be outside -128..255.
- *
- * Life would be a whole lot simpler if tolower() could safely and portably
- * be applied to any char.
- */
-
-#define OFFSET 128 /* avoid trouble with negative chars */
-
-/* must call casencmp before invoking TOLOW... */
-#define TOLOW(c) (cmap[(c)+OFFSET])
-
-/* ...but the use of it in CISTREQN is safe without the preliminary call (!) */
-/* CISTREQN is an optimised case-insensitive strncmp(a,b,n)==0; n > 0 */
-#define CISTREQN(a, b, n) \
- (TOLOW((a)[0]) == TOLOW((b)[0]) && casencmp(a, b, n) == 0)
-
-#define MAPSIZE (256+OFFSET)
-static char cmap[MAPSIZE]; /* relies on init to '\0' */
-static int mprimed = 0; /* has cmap been set up? */
-
-/*
- - mapprime - set up case-mapping stuff
- */
-static void
-mapprime()
-{
- register char *lp;
- register char *up;
- register int c;
- register int i;
- static char lower[] = "abcdefghijklmnopqrstuvwxyz";
- static char upper[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-
- for (lp = lower, up = upper; *lp != '\0'; lp++, up++) {
- c = *lp;
- cmap[c+OFFSET] = c;
- cmap[*up+OFFSET] = c;
- }
- for (i = 0; i < MAPSIZE; i++)
- if (cmap[i] == '\0')
- cmap[i] = (char)(i-OFFSET);
- mprimed = 1;
-}
-
-/*
- - casencmp - case-independent strncmp
- */
-static int /* < == > 0 */
-casencmp(s1, s2, len)
-char *s1;
-char *s2;
-int len;
-{
- register char *p1;
- register char *p2;
- register int n;
-
- if (!mprimed)
- mapprime();
-
- p1 = s1;
- p2 = s2;
- n = len;
- while (--n >= 0 && *p1 != '\0' && TOLOW(*p1) == TOLOW(*p2)) {
- p1++;
- p2++;
- }
- if (n < 0)
- return(0);
-
- /*
- * The following case analysis is necessary so that characters
- * which look negative collate low against normal characters but
- * high against the end-of-string NUL.
- */
- if (*p1 == '\0' && *p2 == '\0')
- return(0);
- else if (*p1 == '\0')
- return(-1);
- else if (*p2 == '\0')
- return(1);
- else
- return(TOLOW(*p1) - TOLOW(*p2));
-}
-
-/*
- - mapcase - do case-mapped copy
- */
-static char * /* returns src or dst */
-mapcase(dst, src, siz)
-char *dst; /* destination, used only if mapping needed */
-char *src; /* source; src == dst is legal */
-size_t siz;
-{
- register char *s;
- register char *d;
- register char *c; /* case break */
- register char *e; /* end of source */
-
-
- c = cipoint(src, siz);
- if (c == NULL)
- return(src);
-
- if (!mprimed)
- mapprime();
- s = src;
- e = s + siz;
- d = dst;
-
- while (s < c)
- *d++ = *s++;
- while (s < e)
- *d++ = TOLOW(*s++);
-
- return(dst);
-}
-
-/*
- - cipoint - where in this message-ID does it become case-insensitive?
- *
- * The RFC822 code is not quite complete. Absolute, total, full RFC822
- * compliance requires a horrible parsing job, because of the arcane
- * quoting conventions -- abc"def"ghi is not equivalent to abc"DEF"ghi,
- * for example. There are three or four things that might occur in the
- * domain part of a message-id that are case-sensitive. They don't seem
- * to ever occur in real news, thank Cthulhu. (What? You were expecting
- * a merciful and forgiving deity to be invoked in connection with RFC822?
- * Forget it; none of them would come near it.)
- */
-static char * /* pointer into s, or NULL for "nowhere" */
-cipoint(s, siz)
-char *s;
-size_t siz;
-{
- register char *p;
- static char post[] = "postmaster";
- static int plen = sizeof(post)-1;
-
- switch (conf.casemap) {
- case '0': /* unmapped, sensible */
- return(NULL);
- break;
- case 'C': /* C News, RFC 822 conformant (approx.) */
- p = memchr(s, '@', siz);
- if (p == NULL) /* no local/domain split */
- return(NULL); /* assume all local */
- else if (p - (s+1) == plen && CISTREQN(s+1, post, plen)) {
- /* crazy -- "postmaster" is case-insensitive */
- return(s);
- } else
- return(p);
- break;
- case '=': /* 2.11, neither sensible nor conformant */
- return(s); /* all case-insensitive */
- break;
- }
-
- DEBUG(("cipoint: unknown case mapping `%c'\n", conf.casemap));
- return(NULL); /* just leave it alone */
-}
-
-/*
- - dbzdebug - control dbz debugging at run time
- */
-int /* old value */
-dbzdebug(value)
-int value;
-{
-#ifdef DBZDEBUG
- register int old = debug;
-
- debug = value;
- return(old);
-#else
- return(-1);
-#endif
-}
diff --git a/news/slurp/files/dbz.h b/news/slurp/files/dbz.h
deleted file mode 100644
index 3d7e8ed702cb..000000000000
--- a/news/slurp/files/dbz.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* for dbm and dbz */
-typedef struct {
- char *dptr;
- int dsize;
-} datum;
-
-/* standard dbm functions */
-extern int dbminit();
-extern datum fetch();
-extern int store();
-extern int delete(); /* not in dbz */
-extern datum firstkey(); /* not in dbz */
-extern datum nextkey(); /* not in dbz */
-extern int dbmclose(); /* in dbz, but not in old dbm */
-
-/* new stuff for dbz */
-extern int dbzfresh();
-extern int dbzagain();
-extern datum dbzfetch();
-extern int dbzstore();
-extern int dbzsync();
-extern long dbzsize();
-extern int dbzincore();
-extern int dbzcancel();
-extern int dbzdebug();
-
-/*
- * In principle we could handle unlimited-length keys by operating a chunk
- * at a time, but it's not worth it in practice. Setting a nice large
- * bound on them simplifies the code and doesn't hurt anything.
- */
-#define DBZMAXKEY 255
diff --git a/news/slurp/files/patch-aa b/news/slurp/files/patch-aa
deleted file mode 100644
index 54089e764786..000000000000
--- a/news/slurp/files/patch-aa
+++ /dev/null
@@ -1,86 +0,0 @@
---- Makefile.orig Tue Feb 7 12:37:45 1995
-+++ Makefile Sun Nov 9 18:14:24 1997
-@@ -15,10 +15,10 @@
- # appropriate header file and library for the news database format that
- # you have chosen.
-
--DBINCLUDE = -I/usr/local/src/cnews/dbz
--DBLIB = /usr/local/src/cnews/dbz/dbz.o
-+#DBINCLUDE = -I/usr/local/src/cnews/dbz
-+#DBLIB = /usr/local/src/cnews/dbz/dbz.o
-
--#DBINCLUDE =
-+DBINCLUDE = -I .
- #DBLIB = -ldbz
-
- #DBINCLUDE = -I/usr/local/include
-@@ -28,7 +28,11 @@
- # C compilation flags
- # Add here any additional compilation flags you need.
-
--CFLAGS = -O
-+# To enable the site exclusion features, define SITEEXCLUDING.
-+#
-+# If KEEPMISSINGARTS is defined, slurp will attempt on the next run
-+# to fetch articles which were not available on the current download.
-+CFLAGS+=-DSITEEXCLUDING -DKEEPMISSINGARTS
-
-
- # Loader flags
-@@ -41,8 +45,8 @@
- # On some systems (e.g. SVR4) you need to include additional socket
- # libraries. On others (e.g. Linux, BSD) this is not required.
-
--LIBS = -lnsl -lsocket
--#LIBS =
-+#LIBS = -lnsl -lsocket
-+LIBS =
-
-
- # If you don't have the syslog facility then uncomment these two lines
-@@ -54,15 +58,16 @@
- # Everything else probably doesn't need changing
-
- SOURCE = slurp.c newnews.c articles.c history.c time.c sockets.c misc.c \
-- cache.c hostfiles.c space.c $(FAKESRC)
-+ dbz.c cache.c hostfiles.c siteexclude.c space.c $(FAKESRC)
-
- OBJECT = slurp.o newnews.o articles.o history.o time.o sockets.o misc.o \
-- cache.o hostfiles.o space.o $(FAKEOBJ)
-+ dbz.o cache.o hostfiles.o siteexclude.o space.o $(FAKEOBJ)
-
- MANIFEST = README slurp.c newnews.c articles.c history.c time.c sockets.c \
- misc.c cache.c hostfiles.c space.c fakesyslog.c conf.h slurp.h \
- nntp.h syslog.h patchlevel.h Makefile slurp.sys slurp.1 HISTORY
-
-+all: slurp
-
- slurp: $(OBJECT)
- $(CC) $(LDFLAGS) $(OBJECT) -o slurp $(DBLIB) $(LIBS)
-@@ -71,17 +76,17 @@
- $(CC) $(CFLAGS) $(DBINCLUDE) -c $<
-
-
--slurp.o: slurp.c slurp.h conf.h nntp.h syslog.h patchlevel.h
--newnews.o: newnews.c slurp.h conf.h nntp.h syslog.h
--articles.o: articles.c slurp.h conf.h nntp.h syslog.h
-+slurp.o: slurp.c slurp.h conf.h nntp.h patchlevel.h
-+newnews.o: newnews.c slurp.h conf.h nntp.h
-+articles.o: articles.c slurp.h conf.h nntp.h
- history.o: history.c slurp.h conf.h nntp.h
- time.o: time.c slurp.h conf.h
--sockets.o: sockets.c slurp.h conf.h nntp.h syslog.h
--misc.o: misc.c slurp.h conf.h syslog.h
--cache.o: cache.c slurp.h conf.h syslog.h
--hostfiles.o: hostfiles.c slurp.h conf.h syslog.h
--space.o: space.c slurp.h conf.h syslog.h
--fakesyslog.o: fakesyslog.c slurp.h conf.h syslog.h
-+sockets.o: sockets.c slurp.h conf.h nntp.h
-+misc.o: misc.c slurp.h conf.h
-+cache.o: cache.c slurp.h conf.h
-+hostfiles.o: hostfiles.c slurp.h conf.h
-+space.o: space.c slurp.h conf.h
-+fakesyslog.o: fakesyslog.c slurp.h conf.h
-
- lint:
- lint -p $(CFLAGS) $(SOURCE) > slurp.lint
diff --git a/news/slurp/files/patch-ab b/news/slurp/files/patch-ab
deleted file mode 100644
index 492c05683c60..000000000000
--- a/news/slurp/files/patch-ab
+++ /dev/null
@@ -1,24 +0,0 @@
---- articles.c.orig Sun Nov 9 18:14:49 1997
-+++ articles.c Sun Nov 9 18:16:40 1997
-@@ -348,6 +348,10 @@
- case OK_ARTICLE:
- fetch_article ();
- xfrart++;
-+#ifdef KEEPMISSINGARTS
-+ /* Note that this article has been retrieved and filed */
-+ idnode -> used = TRUE;
-+#endif /* KEEPMISSINGARTS */
- break;
-
- /* Otherwise must be a protocol error */
-@@ -358,8 +362,10 @@
- exit (4);
- }
-
-+#ifndef KEEPMISSINGARTS
- /* Note that this article has been retrieved and filed */
- idnode -> used = TRUE;
-+#endif /* KEEPMISSINGARTS */
-
- /* Print progress if required */
- if (progress_flag)
diff --git a/news/slurp/files/patch-ac b/news/slurp/files/patch-ac
deleted file mode 100644
index e5d5fbfa40e9..000000000000
--- a/news/slurp/files/patch-ac
+++ /dev/null
@@ -1,23 +0,0 @@
---- conf.h.orig Tue Feb 7 14:29:19 1995
-+++ conf.h Sun Nov 9 18:13:56 1997
-@@ -57,6 +57,11 @@
- #define SYSFILE "/usr/lib/news/slurp.sys"
- #define HOSTFILE "/usr/lib/news/slurp."
-
-+/* These files will be used by the site exclusion feature. SITEFILE
-+ is a list of sites that you do not wish to receive articles from.
-+ The IDs of articles thus rejected will be kept in DROPFILE. */
-+#define SITEFILE "/usr/lib/news/excludesites"
-+#define DROPFILE "/usr/lib/news/exclarticles"
-
- /* Speedup sets the number of extra ARTICLE requests that are stacked
- up at the NNTP server awaiting transmission - aka pipelining.
-@@ -155,7 +160,7 @@
- undefined. If the required define is not supplied by the compiler
- (e.g. SVR4, SVR3) then you will need to include it yourself here. */
-
--#define SVR4
-+/* #define SVR4 */
-
-
- /* The facility name which syslog reports errors and stats under. If
diff --git a/news/slurp/files/patch-ad b/news/slurp/files/patch-ad
deleted file mode 100644
index ee108d18d11f..000000000000
--- a/news/slurp/files/patch-ad
+++ /dev/null
@@ -1,38 +0,0 @@
---- newnews.c.orig Sun Nov 9 18:17:14 1997
-+++ newnews.c Sun Nov 9 18:19:29 1997
-@@ -158,10 +158,16 @@
- process_id (char *msgid)
- {
- char *cp;
-+#ifdef SITEEXCLUDING
-+ char *host;
-+#endif /*SITEXCLUDING*/
-
- /* Modify the message id appropriate to C-News history files */
- if ((cp = strchr (msgid, '@')) != NULL)
- {
-+#ifdef SITEEXCLUDING
-+ host = cp;
-+#endif /*SITEXCLUDING*/
- for (; *cp != '\0'; cp++)
- if (isupper (*cp))
- *cp = tolower (*cp);
-@@ -169,6 +175,18 @@
-
- if (debug_flag)
- (void) fprintf (stderr, "-> %s", msgid);
-+
-+#ifdef SITEEXCLUDING
-+ if((host)&&(site_check(host)))
-+ {
-+ if (debug_flag)
-+ (void) fprintf (stderr, " (Excluded host %s)", host);
-+ /* Excluded host */
-+ site_droparticle(msgid);
-+ exclart++;
-+ return;
-+ }
-+#endif /*SITEXCLUDING*/
-
- /* If hit maximum cache size, then store in a temporary file */
- #ifdef MAXCACHE
diff --git a/news/slurp/files/patch-ae b/news/slurp/files/patch-ae
deleted file mode 100644
index d0b2f26a5036..000000000000
--- a/news/slurp/files/patch-ae
+++ /dev/null
@@ -1,17 +0,0 @@
---- patchlevel.h.orig Tue Feb 7 14:33:35 1995
-+++ patchlevel.h Sat Nov 15 01:58:23 1997
-@@ -6,3 +6,6 @@
- *
- * See README for more information and disclaimers
- *
-+ * 1.10.pf.b - Add siteexclusion stuff
-+ * 1.10.pf.a - Save missing article ids, to try later
-+ *
-@@ -18,6 +21,6 @@
- *
- */
-
--#define PATCHLEVEL "1.10"
-+#define PATCHLEVEL "1.10.pf.b"
-
- /* END-OF-FILE */
diff --git a/news/slurp/files/patch-af b/news/slurp/files/patch-af
deleted file mode 100644
index 19c220e848e5..000000000000
--- a/news/slurp/files/patch-af
+++ /dev/null
@@ -1,57 +0,0 @@
---- slurp.c.orig Sun Nov 9 18:20:54 1997
-+++ slurp.c Sun Nov 9 18:25:16 1997
-@@ -151,6 +151,9 @@
- int waiting = 0;
- int dupart = 0;
- int misart = 0;
-+#ifdef SITEEXCLUDING
-+int exclart = 0;
-+#endif /* SITEEXCLUDING */
- int xfrart = 0;
- long totalsize = 0;
-
-@@ -627,6 +630,11 @@
- if (open_history ())
- log_sys ("can't open history file %s", HISTORY_FILE);
-
-+#ifdef SITEEXCLUDING
-+ /* Get site names to exclude */
-+ site_init();
-+#endif /* SITEEXCLUDING */
-+
- /* Load start time or ids from hostfile if appropriate */
- read_hostfile ();
-
-@@ -697,6 +705,9 @@
- /* Time to say goodbye */
- close_server ();
- close_history ();
-+#ifdef SITEEXCLUDING
-+ site_close();
-+#endif /* SITEEXCLUDING */
-
- /* Submit the remaining batch, if present */
- enqueue_batch ();
-@@ -706,12 +717,22 @@
-
- #ifdef SYSLOG
- if (!debug_flag)
-+#ifdef SITEEXCLUDING
-+ syslog (LOG_INFO, "Processed %d new, %d duplicate, %d missing, %d excluded articles",
-+ xfrart, dupart, misart, exclart);
-+#else
- syslog (LOG_INFO, "Processed %d new, %d duplicate, %d missing articles",
- xfrart, dupart, misart);
-+#endif /* SITEEXCLUDING */
- else
- #endif
-+#ifdef SITEEXCLUDING
-+ (void) fprintf (stderr, "Processed %d new, %d duplicate, %d missing, %d excluded articles\n",
-+ xfrart, dupart, misart, exclart);
-+#else
- (void) fprintf (stderr, "Processed %d new, %d duplicate, %d missing articles\n",
- xfrart, dupart, misart);
-+#endif /* SITEEXCLUDING */
-
- #ifdef SPEEDSTATS
- #ifdef SYSLOG
diff --git a/news/slurp/files/patch-ag b/news/slurp/files/patch-ag
deleted file mode 100644
index 864ed21d2510..000000000000
--- a/news/slurp/files/patch-ag
+++ /dev/null
@@ -1,12 +0,0 @@
---- slurp.h.orig Sun Nov 9 18:25:22 1997
-+++ slurp.h Sun Nov 9 18:26:04 1997
-@@ -97,6 +97,9 @@
- extern int dupart; /* Number of duplicate articles */
- extern int misart; /* Number of missing articles */
- extern int xfrart; /* Number of transferred articles */
-+#ifdef SITEEXCLUDING
-+extern int exclart; /* Number of excluded articles */
-+#endif /* SITEEXCLUDING */
- extern long totalsize; /* Total size of articles tranferred */
-
- /* Misc variables */
diff --git a/news/slurp/files/patch-ah b/news/slurp/files/patch-ah
deleted file mode 100644
index 0343dd5ff157..000000000000
--- a/news/slurp/files/patch-ah
+++ /dev/null
@@ -1,11 +0,0 @@
---- hostfiles.c.orig Sat Sep 11 10:40:33 1999
-+++ hostfiles.c Sat Sep 11 10:42:36 1999
-@@ -166,7 +166,7 @@
- else
- {
- tmtime = gmtime (&nexttime);
-- ndate = (tmtime -> tm_year * 10000) +
-+ ndate = (tmtime -> tm_year%100 * 10000) +
- ((tmtime -> tm_mon + 1) * 100) +
- tmtime -> tm_mday;
- ntime = (tmtime -> tm_hour * 10000) +
diff --git a/news/slurp/files/patch-misc.c b/news/slurp/files/patch-misc.c
deleted file mode 100644
index bb4de48e9238..000000000000
--- a/news/slurp/files/patch-misc.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- misc.c.orig Tue Feb 7 06:32:01 1995
-+++ misc.c Wed Jun 5 06:12:43 2002
-@@ -108,7 +108,7 @@
- (void) strcat (buf, "\n");
- #ifdef SYSLOG
- if (!debug_flag)
-- syslog (LOG_ERR, buf);
-+ syslog (LOG_ERR, "%s", buf);
- else
- #endif
- (void) fprintf (stderr, "%s: %s", pname, buf);
diff --git a/news/slurp/files/siteexclude.c b/news/slurp/files/siteexclude.c
deleted file mode 100644
index 67e4aaa05616..000000000000
--- a/news/slurp/files/siteexclude.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/* siteexclude.c - check article id for excluded sites
- *
- * Copyright (C) 1995 Peter Fox <fox@roestock.demon.co.uk>
- *
- * This code may be freely copied in it's entirety, but the
- * above notice may not be removed or altered without
- * reference to the author.
- * Individuals may make changes for their own use, however
- * any changed copies may not be distributed without
- * reference to the author.
- * There isn't any guarantee of usefulness or efficacy for
- * any particular purpose. Take it as it is.
- */
-#include <stdio.h>
-#include <string.h>
-#include "syslog.h"
-#include "conf.h"
-
-#ifdef TEST
-#define SITEEXCLUDING
-#endif /*TEST*/
-
-#ifdef SITEEXCLUDING
-typedef struct slist
-{
- struct slist *next;
- char *str;
-} SLIST, *SLISTPTR;
-
-#define HASHSIZE 256
-#define HASHFN(x) (((x[1] & 15) << 4)|(x[2] & 15)) /* x is (char *), skip '@' */
-
-#ifdef TEST
-#define SITEFILE "./sites"
-#define DROPFILE "./dropped"
-#define log_msg printf
-#define log_sys printf
-#define debug_flag 1
-#else /*!TEST*/
-extern int debug_flag;
-#ifndef SITEFILE
-#define SITEFILE "/var/lib/news/excludesites"
-#endif /*SITEFILE*/
-#ifndef DROPFILE
-#define DROPFILE "/var/lib/news/droppedarticles"
-#endif /*DROPFILE*/
-#endif /*TEST*/
-
-SLIST hash[HASHSIZE];
-
-static FILE *dropfp = (FILE*)0;
-
-site_init()
-{
- int i;
- FILE *fp;
- char linbuf[BUFSIZ];
- SLISTPTR ptr;
- int entries, collisions;
- entries = 0;
- collisions = 0;
- for(i = 0; i < HASHSIZE; i++)
- {
- hash[i].next = (SLISTPTR)0;
- hash[i].str = (char *)0;
- }
- if(!(fp = fopen(SITEFILE, "r")))
- {
- log_msg("site_init: warning - no site exclude file %s", SITEFILE);
- return;
- }
- if(!(dropfp = fopen(DROPFILE, "a")))
- {
- log_msg("site_init: warning - cannot open file %s for append, dropped articles logged instead", DROPFILE);
- }
- else
- fprintf(dropfp, "-----\n");
- /* File contains lines with complete site names to exclude */
- /* We add the leading @ and trailing > */
- linbuf[0] = '@';
- while(1)
- {
- /* Read in a line */
- (void) fgets(linbuf+1, sizeof (linbuf)-2, fp);
- if(feof(fp))
- break;
- /* If a read error then report it and abort */
- if (ferror(fp))
- {
- log_sys("site_init: error reading %s", SITEFILE);
- break;
- }
- if(linbuf[1])
- {
- /* Kill the \n */
- linbuf[strlen(linbuf)-1] = '>';
- entries++;
- ptr = &hash[HASHFN(linbuf)];
- if(debug_flag)
- fprintf(stderr, "'%s: %08lx'\n", linbuf, ptr);
- if(!ptr->str)
- ptr->str = strdup(linbuf);
- else
- {
- /* Run along to the last in line */
- while(ptr->next)
- ptr = ptr->next;
- ptr->next = (SLISTPTR)malloc(sizeof(SLIST));
- ptr = ptr->next;
- ptr->next = (SLISTPTR)0;
- ptr->str = strdup(linbuf);
- collisions++;
- }
- }
- }
- fclose(fp);
- if(debug_flag)
- log_msg("site_init: site exclude file %s read: %d entries, %d collisions",
- SITEFILE, entries, collisions);
-}
-
-site_check(char *site)
-{
- SLISTPTR ptr;
- ptr = &hash[HASHFN(site)];
- if(debug_flag)
- fprintf(stderr, " '%s: %08lx'", site, ptr);
- if(!ptr->str)
- return(0);
- while(ptr)
- {
- if(strcmp(site, ptr->str) == 0)
- return(1);
- ptr = ptr->next;
- }
- return(0);
-}
-
-site_droparticle(char *id)
-{
- if(dropfp)
- fprintf(dropfp, "%s\n", id);
- else
- log_msg("Excluded article: %s", id);
-}
-
-site_close()
-{
- if(dropfp)
- fclose(dropfp);
-}
-
-#ifdef TEST
-main(int argc, char **argv)
-{
- site_init();
- argv++;
- argc--;
- while(argc--)
- {
- if(site_check(*argv))
- printf("Found %s\n", *argv);
- argv++;
- }
- return(0);
-}
-#endif /*TEST*/
-#endif /* SITEEXCLUDING */
diff --git a/news/slurp/pkg-descr b/news/slurp/pkg-descr
deleted file mode 100644
index fcc2813134e4..000000000000
--- a/news/slurp/pkg-descr
+++ /dev/null
@@ -1,15 +0,0 @@
-Slurp is an advanced passive NNTP client for UNIX. It will connect to a
-remote NNTP server and retrieve articles in a specified set of Usenet
-newsgroups that have arrived after a particular date (typically the
-last time it was invoked) for processing by your local news system or
-forwarding on via UUCP to another news system. It replaces nntpxfer
-from the NNTP 1.5.12 reference implementation and nntpget from the INN
-distribution.
-
-Patches from Peter Fox (fox@roestock.demon.co.uk) have been added to
-avoid downloading articles from certain sites. To make use of this
-facility, create a file ${PREFIX}/news/lib/excludesites and list the
-sites in it, eg
-
-fritter.spam.com
-hackers.org
diff --git a/news/slurp/pkg-message b/news/slurp/pkg-message
deleted file mode 100644
index 2ed9d0e0fbab..000000000000
--- a/news/slurp/pkg-message
+++ /dev/null
@@ -1,4 +0,0 @@
-*******************************************************************************
-Copy ${LOCALBASE}/news/lib/slurp.sys.sample to slurp.sys before you
-start slurp and all will be fine!
-*******************************************************************************
diff --git a/news/slurp/pkg-plist b/news/slurp/pkg-plist
deleted file mode 100644
index b3d771012ab8..000000000000
--- a/news/slurp/pkg-plist
+++ /dev/null
@@ -1,5 +0,0 @@
-news/bin/slurp
-news/lib/slurp.sys.sample
-@dirrmtry news/lib
-@dirrmtry news/bin
-@dirrmtry news
diff --git a/news/slurp/scripts/configure b/news/slurp/scripts/configure
deleted file mode 100644
index e2cc18aaa79e..000000000000
--- a/news/slurp/scripts/configure
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-TMPFILE=${TMPDIR:-/tmp}/tmp.slurp.sed.$$
-trap 'rm -f ${TMPFILE}' 1 2 13 15
-
-echo "s!/usr/lib/news!${PREFIX}/news/lib!" > ${TMPFILE}
-
-if [ -d /var/news ]
-then
- echo 's!/var/spool!/var!' >> ${TMPFILE}
-fi
-
-sed -f ${TMPFILE} < ${WRKSRC}/conf.h > ${WRKSRC}/conf.h.tmp
-mv ${WRKSRC}/conf.h.tmp ${WRKSRC}/conf.h
-rm -f ${TMPFILE}
-
-rm -f ${WRKDIR}/syslog.h
-
-cp ${FILESDIR}/dbz.* ${WRKSRC}
-cp ${FILESDIR}/siteexclude.c ${WRKSRC}
diff --git a/news/unpost/Makefile b/news/unpost/Makefile
deleted file mode 100644
index 85e403b241ef..000000000000
--- a/news/unpost/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-# New ports collection makefile for: unpoost
-# Date created: 14 october 1997
-# Whom: volf@oasis.IAEhv.nl
-#
-# $FreeBSD$
-#
-
-PORTNAME= unpost
-PORTVERSION= 2.3.4
-CATEGORIES= news
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= steve
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Extract binary files from multi-segment uuencoded postings
-
-DEPRECATED= Upstream disapear and distfile is no more available
-EXPIRATION_DATE= 2011-05-01
-
-MAKEFILE= makefils/linux.mkf
-MAN1= unpost.1
-PLIST_FILES= bin/unpost
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/unpost ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/unpost.doc ${PREFIX}/man/man1/unpost.1
-
-.include <bsd.port.mk>
diff --git a/news/unpost/distinfo b/news/unpost/distinfo
deleted file mode 100644
index 0c54d298126e..000000000000
--- a/news/unpost/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (unpost-2.3.4.tar.gz) = 31112245899ee84e18c3b96990f415c699db793d146e8d4805788327594e1b76
-SIZE (unpost-2.3.4.tar.gz) = 186885
diff --git a/news/unpost/files/patch-aa b/news/unpost/files/patch-aa
deleted file mode 100644
index ebadf911bed3..000000000000
--- a/news/unpost/files/patch-aa
+++ /dev/null
@@ -1,24 +0,0 @@
---- compiler.h.org Fri Nov 14 14:04:42 1997
-+++ compiler.h Fri Nov 14 14:06:55 1997
-@@ -70,9 +70,11 @@
- -----------------------------------------------------------------------------*/
- #elif defined(GCC_COMPILER)
-
-+#ifndef __FreeBSD__
- extern char *sys_errlist[];
-
- #define strerror(x) sys_errlist[x]
-+#endif
-
- /* Defines for fopen calls. */
- #define TXT_APPEND "a"
-@@ -82,7 +84,9 @@
- #define BIN_WRITE "w"
- #define BIN_RD_WRT "w+"
-
-+#ifndef __FreeBSD__
- #include <malloc.h>
-+#endif
- #include <unistd.h>
-
- /*-----------------------------------------------------------------------------
diff --git a/news/unpost/pkg-descr b/news/unpost/pkg-descr
deleted file mode 100644
index 8ef31845fe75..000000000000
--- a/news/unpost/pkg-descr
+++ /dev/null
@@ -1,7 +0,0 @@
-UNPOST is a tool designed primarily to extract binaries from USENET
-binaries postings such as those made to alt.binaries.pictures.misc
-and comp.binaries.ibm.pc. As well as extracting binaries from USENET
-postings, UNPOST can extract binaries from multi-segment uuencoded
-mailings as well, however, to simplify this documentation only
-USENET article postings will be discussed. The principles are the
-same for multi-segment mailings.