Patch for snfetch.c
"Marc L. de Bruin" <[email protected]>
| Newsgroups | gmane.network.sn |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm in progress of building a files-from-articles grabber and found in 'sn' a great pal to store articles locally.
However, I have a need to only get specific individual articles and I found no alternative then to patch snfetch.c. I couldn't get this working with the default behaviour of snfetch. Basically this patch mis-uses the params snfetch needs to be called with; if both 'serial' and 'max' are equal, this (and ONLY this) serial is fetched.
Please consider applying this patch or add this functionality in a different way.
Thanks,
Marc.
--- snfetch.c Tue Nov 12 21:00:28 2002
+++ ../../sn-0.3.6/snfetch.c Sun Nov 23 16:43:59 2003
@@ -466,7 +466,9 @@
else
from = serial; /* normally taken */
- if (max > 0)
+ if (from == max)
+ to = from;
+ else if (max > 0)
if (to - from > max)
from = to - max - 1; /* -1 added to make the number of arts downloaded == max. */