Article View: news.software.nntp
Article #6514Re: patch for > flag for the newsfeeds file
From: Marc G. Fournier
Date: Fri, 12 Apr 1996 00:00
Date: Fri, 12 Apr 1996 00:00
62 lines
2493 bytes
2493 bytes
carlos@mci.net (Carlos Castro) writes:
I did this here awhile ago, to pretty good results, but you
made on error that might only affect 1 article every once
in a while. what if the article is exactly <size> in size? :)
I've modified your diff directly to fix that, so that anything
that if sp->MinSize is >= instead of just >...
diff -c innd.old/art.c innd/art.c
*** innd.old/art.c Mon Aug 7 13:42:24 1995
--- innd/art.c Fri Apr 12 11:41:59 1996
***************
*** 1536,1541 ****
--- 1536,1545 ----
if (sp->Master != NOSITE && Sites[sp->Master].Seenit)
continue;
+ if (sp->MinSize && sp->MinSize >= Data->SizeValue)
+ /* Too small for the site. */
+ continue;
+
if (sp->MaxSize && sp->MaxSize < Data->SizeValue)
/* Too big for the site. */
continue;
diff -c innd.old/innd.h innd/innd.h
*** innd.old/innd.h Fri Apr 12 11:35:41 1996
--- innd/innd.h Fri Apr 12 11:40:59 1996
***************
*** 216,221 ****
--- 216,222 ----
char *Param;
char FileFlags[FEED_MAXFLAGS + 1];
long MaxSize;
+ long MinSize;
CHANNEL *Channel;
BOOL IsMaster;
int Master;
diff -c innd.old/newsfeeds.c innd/newsfeeds.c
*** innd.old/newsfeeds.c Fri Jul 7 18:01:25 1995
--- innd/newsfeeds.c Fri Apr 12 11:42:27 1996
***************
*** 221,226 ****
--- 221,230 ----
return "unknown field 3 flag";
case '\0':
break;
+ case '>':
+ if (*++p && CTYPE(isdigit, *p))
+ sp->MinSize = atol(p);
+ break;
case '<':
if (*++p && CTYPE(isdigit, *p))
sp->MaxSize = atol(p);
--
--
Marc G. Fournier | POP Mail Telnet Acct DNS Hosting
System | WWW Services Database Services | Knowledge,
Administrator | | Information and
scrappy@ki.net | WWW: http://www.ki.net | Communications, Inc
Technical Details
Message-ID:
<4kme9n$acv@freebsd.ki.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<4km5tj$84a@news.internetmci.com>Show Full Headers
Complete Article Headers
Message-ID: <4kme9n$acv@freebsd.ki.net> Subject: Re: patch for > flag for the newsfeeds file Date: Fri, 12 Apr 1996 00:00:00 +0000 From: scrappy@ki.net (Marc G. Fournier) References: <4km5tj$84a@news.internetmci.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 147181099 Organization: Knowledge, Information and Communications, Inc (ki.net) Newsgroups: news.software.nntp