home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / rn_4_3_blars.lzh / bits.c < prev    next >
Text File  |  1990-08-22  |  16KB  |  652 lines

  1. /* $Header: bits.c,v 4.3.2.3 89/11/28 01:52:02 sob Locked $
  2.  *
  3.  * $Log:    bits.c,v $
  4.  * Revision 4.3.2.3  89/11/28  01:52:02  sob
  5.  * Removed some lint.
  6.  * 
  7.  * Revision 4.3.2.2  89/11/27  01:30:04  sob
  8.  * Altered NNTP code per ideas suggested by Bela Lubkin
  9.  * <filbo@gorn.santa-cruz.ca.us>
  10.  * 
  11.  * Revision 4.3.1.4  86/10/31  15:23:53  lwall
  12.  * Separated firstart into two variables so KILL on new articles won't
  13.  * accidentally mark articles read.
  14.  * 
  15.  * Revision 4.3.1.3  86/09/09  16:01:43  lwall
  16.  * Fixed 'n more articles' bug.
  17.  * 
  18.  * Revision 4.3.1.2  86/07/24  14:40:23  lwall
  19.  * Gets host name from path instead of relay-version for news 2.10.3.
  20.  *
  21.  * Revision 4.3.1.1  85/05/10  11:31:41  lwall
  22.  * Branch for patches.
  23.  *
  24.  * Revision 4.3  85/05/01  11:36:15  lwall
  25.  * Baseline for release with 4.3bsd.
  26.  * 
  27.  */
  28.  
  29. #include "EXTERN.h"
  30. #include "common.h"
  31. #include "rcstuff.h"
  32. #include "head.h"
  33. #include "util.h"
  34. #include "final.h"
  35. #include "rn.h"
  36. #include "cheat.h"
  37. #include "ng.h"
  38. #include "artio.h"
  39. #include "intrp.h"
  40. #include "ngdata.h"
  41. #include "rcln.h"
  42. #include "kfile.h"
  43. #include "INTERN.h"
  44. #include "bits.h"
  45.  
  46. #ifdef DBM
  47. #    ifdef NULL
  48. #    undef NULL
  49. #    endif NULL
  50. #    include <dbm.h>
  51. #endif DBM
  52. MEM_SIZE ctlsize;            /* size of bitmap in bytes */
  53.  
  54. void
  55. bits_init()
  56. {
  57. #ifdef DELAYMARK
  58.     dmname = savestr(filexp(RNDELNAME));
  59. #else
  60.     ;
  61. #endif
  62. }
  63.  
  64. /* checkpoint the .newsrc */
  65.  
  66. void
  67. checkpoint_rc()
  68. {
  69. #ifdef DEBUGGING
  70.     if (debug & DEB_CHECKPOINTING) {
  71.     fputs("(ckpt)",stdout);
  72.     fflush(stdout);
  73.     }
  74. #endif
  75.     if (doing_ng)
  76.     restore_ng();            /* do not restore M articles */
  77.     if (rc_changed)
  78.     write_rc();
  79. #ifdef DEBUGGING
  80.     if (debug & DEB_CHECKPOINTING) {
  81.     fputs("(done)",stdout);
  82.     fflush(stdout);
  83.     }
  84. #endif
  85. }
  86.  
  87. /* reconstruct the .newsrc line in a human readable form */
  88.  
  89. void
  90. restore_ng()
  91. {
  92.     register char *s, *mybuf = buf;
  93.     register ART_NUM i;
  94.     ART_NUM count=0;
  95.     int safelen = LBUFLEN - 16;
  96.  
  97.     strcpy(buf,rcline[ng]);        /* start with the newsgroup name */
  98.     s = buf + rcnums[ng] - 1;        /* use s for buffer pointer */
  99.     *s++ = rcchar[ng];            /* put the requisite : or !*/
  100.     *s++ = ' ';                /* put the not-so-requisite space */
  101.     for (i=1; i<=lastart; i++) {    /* for each article in newsgroup */
  102.     if (s-mybuf > safelen) {    /* running out of room? */
  103.         safelen *= 2;
  104.         if (mybuf == buf) {        /* currently static? */
  105.         *s = '\0';
  106.         mybuf = safemalloc((MEM_SIZE)safelen + 16);
  107.         strcpy(mybuf,buf);    /* so we must copy it */
  108.         s = mybuf + (s-buf);
  109.                     /* fix the pointer, too */
  110.         }
  111.         else {            /* just grow in place, if possible */
  112.         char *newbuf;
  113.  
  114.         newbuf = saferealloc(mybuf,(MEM_SIZE)safelen + 16);
  115.         s = newbuf + (s-mybuf);
  116.         mybuf = newbuf;
  117.         }
  118.     }
  119.     if (!was_read(i))        /* still unread? */
  120.         count++;            /* then count it */
  121.     else {                /* article was read */
  122.         ART_NUM oldi;
  123.  
  124.         sprintf(s,"%ld",(long)i);    /* put out the min of the range */
  125.         s += strlen(s);        /* keeping house */
  126.         oldi = i;            /* remember this spot */
  127.         do i++; while (i <= lastart && was_read(i));
  128.                     /* find 1st unread article or end */
  129.         i--;            /* backup to last read article */
  130.         if (i > oldi) {        /* range of more than 1? */
  131.         sprintf(s,"-%ld,",(long)i);
  132.                     /* then it out as a range */
  133.         s += strlen(s);        /* and housekeep */
  134.         }
  135.         else
  136.         *s++ = ',';        /* otherwise, just a comma will do */
  137.     }
  138.     }
  139.     if (*(s-1) == ',')            /* is there a final ','? */
  140.     s--;                /* take it back */
  141.     *s++ = '\0';            /* and terminate string */
  142. #ifdef DEBUGGING
  143.     if (debug & DEB_NEWSRC_LINE && !panic) {
  144.     printf("%s: %s\n",rcline[ng],rcline[ng]+rcnums[ng]) FLUSH;
  145.     printf("%s\n",mybuf) FLUSH;
  146.     }
  147. #endif
  148.     free(rcline[ng]);            /* return old rc line */
  149.     if (mybuf == buf) {
  150.     rcline[ng] = safemalloc((MEM_SIZE)(s-buf)+1);
  151.                     /* grab a new rc line */
  152.     strcpy(rcline[ng], buf);    /* and load it */
  153.     }
  154.     else {
  155.     mybuf = saferealloc(mybuf,(MEM_SIZE)(s-mybuf)+1);
  156.                     /* be nice to the heap */
  157.     rcline[ng] = mybuf;
  158.     }
  159.     *(rcline[ng] + rcnums[ng] - 1) = '\0';
  160.     if (rcchar[ng] == NEGCHAR) {    /* did they unsubscribe? */
  161.     printf(unsubto,ngname) FLUSH;
  162.     toread[ng] = TR_UNSUB;        /* make line invisible */
  163.     }
  164.     else
  165.     /*NOSTRICT*/
  166.     toread[ng] = (ART_UNREAD)count;        /* remember how many unread there are */
  167. }
  168.  
  169. /* mark an article unread, keeping track of toread[] */
  170.  
  171. void
  172. onemore(artnum)
  173. ART_NUM artnum;
  174. {
  175. #ifdef DEBUGGING
  176.     if (debug && artnum < firstbit) {
  177.     printf("onemore: %d < %d\n",artnum,firstbit) FLUSH;
  178.     return;
  179.     }
  180. #endif
  181.     if (ctl_read(artnum)) {
  182.     ctl_clear(artnum);
  183.     ++toread[ng];
  184.     }
  185. }
  186.  
  187. /* mark an article read, keeping track of toread[] */
  188.  
  189. void
  190. oneless(artnum)
  191. ART_NUM artnum;
  192. {
  193. #ifdef DEBUGGING
  194.     if (debug && artnum < firstbit) {
  195.     printf("oneless: %d < %d\n",artnum,firstbit) FLUSH;
  196.     return;
  197.     }
  198. #endif
  199.     if (!ctl_read(artnum)) {
  200.     ctl_set(artnum);
  201.     if (toread[ng] > TR_NONE)
  202.         --toread[ng];
  203.     }
  204. }
  205.  
  206. /* mark an article as unread, making sure that firstbit is properly handled */
  207. /* cross-references are left as read in the other newsgroups */
  208.  
  209. void
  210. unmark_as_read(artnum)
  211. ART_NUM artnum;
  212. {
  213.     check_first(artnum);
  214.     onemore(artnum);
  215. #ifdef MCHASE
  216.     if (!parse_maybe(artnum))
  217.     chase_xrefs(artnum,FALSE);
  218. #endif
  219. }
  220.  
  221. #ifdef DELAYMARK
  222. /* temporarily mark article as read.  When newsgroup is exited, articles */
  223. /* will be marked as unread.  Called via M command */
  224.  
  225. void
  226. delay_unmark(artnum)
  227. ART_NUM artnum;
  228. {
  229.     if (dmfp == Nullfp) {
  230.     dmfp = fopen(dmname,"w");
  231.     if (dmfp == Nullfp) {
  232.         printf(cantcreate,dmname) FLUSH;
  233.         sig_catcher(0);
  234.     }
  235.     }
  236.     oneless(artnum);            /* set the correct bit */
  237.     dmcount++;
  238.     fprintf(dmfp,"%ld\n",(long)artnum);
  239. }
  240. #endif
  241.  
  242. /* mark article as read.  If article is cross referenced to other */
  243. /* newsgroups, mark them read there also. */
  244.  
  245. void
  246. mark_as_read(artnum)
  247. ART_NUM artnum;
  248. {
  249.     oneless(artnum);            /* set the correct bit */
  250.     checkcount++;            /* get more worried about crashes */
  251.     chase_xrefs(artnum,TRUE);
  252. }
  253.  
  254. /* make sure we have bits set correctly down to firstbit */
  255.  
  256. void
  257. check_first(min)
  258. ART_NUM min;
  259. {
  260.     register ART_NUM i = firstbit;
  261.  
  262.     if (min < absfirst)
  263.     min = absfirst;
  264.     if (min < i) {
  265.     for (i--; i>=min; i--)
  266.         ctl_set(i);        /* mark as read */
  267.     firstart = firstbit = min;
  268.     }
  269. }
  270.  
  271. /* bring back articles marked with M */
  272.  
  273. #ifdef DELAYMARK
  274. void
  275. yankback()
  276. {
  277.     register ART_NUM anum;
  278.  
  279.     if (dmfp) {            /* delayed unmarks pending? */
  280. #ifdef VERBOSE
  281.     printf("\nReturning %ld Marked article%s...\n",(long)dmcount,
  282.         dmcount == 1 ? nullstr : "s") FLUSH;
  283. #endif
  284.     fclose(dmfp);
  285.     if (dmfp = fopen(dmname,"r")) {
  286.         while (fgets(buf,sizeof buf,dmfp) != Nullch) {
  287.         anum = (ART_NUM)atol(buf);
  288.         /*NOSTRICT*/
  289.         onemore(anum);             /* then unmark them */
  290. #ifdef MCHASE
  291.         chase_xrefs(anum,FALSE);
  292. #endif
  293.         }
  294.         fclose(dmfp);
  295.         dmfp = Nullfp;
  296.         UNLINK(dmname);        /* and be tidy */
  297.     }
  298.     else {
  299.         printf(cantopen,dmname) FLUSH;
  300.         sig_catcher(0);
  301.     }
  302.     }
  303.     dmcount = 0;
  304. }
  305. #endif
  306.     
  307. /* run down xref list and mark as read or unread */
  308.  
  309. int
  310. chase_xrefs(artnum,markread)
  311. ART_NUM artnum;
  312. int markread;
  313. {
  314. #ifdef ASYNC_PARSE
  315.     if (parse_maybe(artnum))        /* make sure we have right header */
  316.     return -1;
  317. #endif
  318. #ifdef DBM
  319.     {
  320.     datum lhs, rhs;
  321.     datum fetch();
  322.     register char *idp;
  323.     char *ident_buf;
  324.     static FILE * hist_file = Nullfp;
  325. #else
  326.     if (
  327. #ifdef DEBUGGING
  328.     debug & DEB_FEED_XREF ||
  329. #endif
  330.     htype[XREF_LINE].ht_minpos >= 0) {
  331.                     /* are there article# xrefs? */
  332. #endif DBM
  333.     char *xref_buf, *curxref;
  334.     register char *xartnum;
  335.     char *rver_buf = Nullch;
  336.     static char *inews_site = Nullch;
  337.     register ART_NUM x;
  338.     char tmpbuf[128];
  339.  
  340. #ifdef DBM
  341.     rver_buf = fetchlines(artnum,NGS_LINE);
  342.                     /* get Newsgroups */
  343.     if (!index(rver_buf,','))    /* if no comma, no Xref! */
  344.         return 0;
  345.     if (hist_file == Nullfp) {    /* Init. file accesses */
  346. #ifdef DEBUGGING
  347.         if (debug)
  348.         printf ("chase_xref: opening files\n");
  349. #endif
  350.         dbminit(filexp(ARTFILE));
  351.         if ((hist_file = fopen (filexp(ARTFILE), "r")) == Nullfp)
  352.         return 0;
  353.     }
  354.     xref_buf = safemalloc((MEM_SIZE)BUFSIZ);
  355.     ident_buf = fetchlines(artnum,MESSID_LINE);
  356.                     /* get Message-ID */
  357. #ifdef DEBUGGING
  358.     if (debug)
  359.         printf ("chase_xref: Message-ID: %s\n", ident_buf);
  360. #endif
  361.     idp = ident_buf;
  362.     while (*++idp)            /* make message-id case insensitive */
  363.         if (isupper(*idp))
  364.             *idp = tolower (*idp);
  365.     lhs.dptr = ident_buf;        /* look up article by id */
  366.     lhs.dsize = strlen(lhs.dptr) + 1;
  367.     rhs = fetch(lhs);        /* fetch the record */
  368.     if (rhs.dptr == NULL)        /* if null, nothing there */
  369.         goto wild_goose;
  370.     fseek (hist_file, *((long *)rhs.dptr), 0);
  371.                     /* datum returned is position in hist file */
  372.     fgets (xref_buf, BUFSIZ, hist_file);
  373. #ifdef DEBUGGING
  374.     if (debug)
  375.         printf ("Xref from history: %s\n", xref_buf);
  376. #endif
  377.     curxref = cpytill(tmpbuf, xref_buf, '\t') + 1;
  378.     curxref = cpytill(tmpbuf, curxref, '\t') + 1;
  379. #ifdef DEBUGGING
  380.     if (debug)
  381.         printf ("chase_xref: curxref: %s\n", curxref);
  382. #endif
  383. #else !DBM
  384. #ifdef DEBUGGING
  385.     if (htype[XREF_LINE].ht_minpos >= 0)
  386. #endif
  387.         xref_buf = fetchlines(artnum,XREF_LINE);
  388.                     /* get xrefs list */
  389. #ifdef DEBUGGING
  390.     else {
  391.         xref_buf = safemalloc((MEM_SIZE)100);
  392.         printf("Give Xref: ") FLUSH;
  393.         gets(xref_buf);
  394.     }
  395. #endif
  396. #ifdef DEBUGGING
  397.     if (debug & DEB_XREF_MARKER)
  398.         printf("Xref: %s\n",xref_buf) FLUSH;
  399. #endif
  400.     curxref = cpytill(tmpbuf,xref_buf,' ') + 1;
  401.  
  402.     /* Make sure site name on Xref matches what inews thinks site is.
  403.      * Check first against last inews_site.  If it matches, fine.
  404.      * If not, fetch inews_site from current Relay-Version line and
  405.      * check again.  This is so that if the new administrator decides
  406.      * to change the system name as known to inews, rn will still do
  407.      * Xrefs correctly--each article need only match itself to be valid.
  408.      */ 
  409.     if (inews_site == Nullch || strNE(tmpbuf,inews_site)) {
  410. #ifndef NORELAY
  411.         char *t;
  412. #endif
  413.         if (inews_site != Nullch)
  414.         free(inews_site);
  415. #ifndef NORELAY
  416.         rver_buf = fetchlines(artnum,RVER_LINE);
  417.         if ((t = instr(rver_buf,"; site ")) == Nullch)
  418. #else NORELAY
  419.           /* In version 2.10.3 of news or afterwards, the Relay-Version
  420.            * and Posting-Version header lines have been removed.  For
  421.            * the code below to work as intended, I have modified it to
  422.            * extract the first component of the Path header line.  This
  423.            * should give the same effect as did the old code with respect
  424.            * to the use of the Relay-Version site name.
  425.            */
  426.           rver_buf = fetchlines(artnum,PATH_LINE);
  427.           if (instr(rver_buf,"!") == Nullch)
  428. #endif NORELAY
  429.         inews_site = savestr(nullstr);
  430.         else {
  431.         char new_site[128];
  432.  
  433. #ifndef NORELAY
  434.         cpytill(new_site,t + 7,'.');
  435. #else NORELAY
  436.               cpytill(new_site,rver_buf,'!');
  437. #endif NORELAY
  438.         inews_site = savestr(new_site);
  439.         }
  440.         if (strNE(tmpbuf,inews_site)) {
  441. #ifdef DEBUGGING
  442.         if (debug)
  443.             printf("Xref not from %s--ignoring\n",inews_site) FLUSH;
  444. #endif
  445.         goto wild_goose;
  446.         }
  447.     }
  448. #endif DBM
  449.     while (*curxref) {
  450.                     /* for each newsgroup */
  451.         curxref = cpytill(tmpbuf,curxref,' ');
  452. #ifdef DBM
  453.         xartnum = index(tmpbuf,'/');
  454. #else
  455.         xartnum = index(tmpbuf,':');
  456. #endif DBM
  457.         if (!xartnum)        /* probably an old-style Xref */
  458.         break;
  459.         *xartnum++ = '\0';
  460.         if (strNE(tmpbuf,ngname)) {/* not the current newsgroup? */
  461.         x = atol(xartnum);
  462.         if (x)
  463.             if (markread) {
  464.             if (addartnum(x,tmpbuf))
  465.                 goto wild_goose;
  466.             }
  467. #ifdef MCHASE
  468.             else
  469.             subartnum(x,tmpbuf);
  470. #endif
  471.         }
  472.         while (*curxref && isspace(*curxref))
  473.         curxref++;
  474.     }
  475.       wild_goose:
  476.     free(xref_buf);
  477. #ifdef DBM
  478.     free(ident_buf);
  479. #endif DBM
  480.     if (rver_buf != Nullch)
  481.         free(rver_buf);
  482.     }
  483.     return 0;
  484. }
  485.  
  486. int
  487. initctl()
  488. {
  489.     char *mybuf = buf;            /* place to decode rc line */
  490.     register char *s, *c, *h;
  491.     register long i;
  492.     register ART_NUM unread;
  493.     
  494. #ifdef DELAYMARK
  495.     dmcount = 0;
  496. #endif
  497.     if ((lastart = getngsize(ng)) < 0)    /* this cannot happen (laugh here) */
  498.     return -1;
  499.  
  500.     absfirst = getabsfirst(ng,lastart);    /* remember first existing article */
  501.     if (!absfirst)            /* no articles at all? */
  502.     absfirst = 1;            /* pretend there is one */
  503. #ifndef lint
  504.     ctlsize = (MEM_SIZE)(OFFSET(lastart)/BITSPERBYTE+20);
  505. #endif lint
  506.     ctlarea = safemalloc(ctlsize);    /* allocate control area */
  507.  
  508.     /* now modify ctlarea to reflect what has already been read */
  509.  
  510.     for (s = rcline[ng] + rcnums[ng]; *s == ' '; s++) ;
  511.                     /* find numbers in rc line */
  512.     i = strlen(s);
  513. #ifndef lint
  514.     if (i >= LBUFLEN-2)            /* bigger than buf? */
  515.     mybuf = safemalloc((MEM_SIZE)(i+2));
  516. #endif lint
  517.     strcpy(mybuf,s);            /* make scratch copy of line */
  518.     mybuf[i++] = ',';            /* put extra comma on the end */
  519.     mybuf[i] = '\0';
  520.     s = mybuf;                /* initialize the for loop below */
  521.     if (strnEQ(s,"1-",2)) {        /* can we save some time here? */
  522.     firstbit = atol(s+2)+1;        /* ignore first range thusly */
  523.     s=index(s,',') + 1;
  524.     }
  525.     else
  526.     firstbit = 1;            /* all the bits are valid for now */
  527.     if (absfirst > firstbit) {        /* do we know already? */
  528.     firstbit = absfirst;        /* no point calling getngmin again */
  529.     }
  530.     else if (artopen(firstbit) == Nullfp) {
  531.                     /* first unread article missing? */
  532.     i = getngmin(".",firstbit);    /* see if expire has been busy */
  533.     if (i) {            /* avoid a bunch of extra opens */
  534.         firstbit = i;
  535.     }
  536.     }
  537.     firstart = firstbit;        /* firstart > firstbit in KILL */
  538. #ifdef PENDING
  539. #   ifdef CACHESUBJ
  540.     subj_to_get = firstbit;
  541. #   endif
  542. #endif
  543.     unread = lastart - firstbit + 1;    /* assume this range unread */
  544.     for (i=OFFSET(firstbit)/BITSPERBYTE; i<ctlsize; i++)
  545.     ctlarea[i] = 0;            /* assume unread */
  546. #ifdef DEBUGGING
  547.     if (debug & DEB_CTLAREA_BITMAP) {
  548.     printf("\n%s\n",mybuf) FLUSH;
  549.     for (i=1; i <= lastart; i++)
  550.         if (! was_read(i))
  551.         printf("%ld ",(long)i) FLUSH;
  552.     }
  553. #endif
  554.     for ( ; (c = index(s,',')) != Nullch; s = ++c) {
  555.                     /* for each range */
  556.     ART_NUM min, max;
  557.  
  558.     *c = '\0';            /* do not let index see past comma */
  559.     if ((h = index(s,'-')) != Nullch) {    /* is there a -? */
  560.         min = atol(s);
  561.         max = atol(h+1);
  562.         if (min < firstbit)        /* make sure range is in range */
  563.         min = firstbit;
  564.         if (max > lastart)
  565.         max = lastart;
  566.         if (min <= max)        /* non-null range? */
  567.         unread -= max - min + 1;/* adjust unread count */
  568.         for (i=min; i<=max; i++)    /* for all articles in range */
  569.         ctl_set(i);        /* mark them read */
  570.     }
  571.     else if ((i = atol(s)) >= firstbit && i <= lastart) {
  572.                     /* is single number reasonable? */
  573.         ctl_set(i);            /* mark it read */
  574.         unread--;            /* decrement articles to read */
  575.     }
  576. #ifdef DEBUGGING
  577.     if (debug & DEB_CTLAREA_BITMAP) {
  578.         printf("\n%s\n",s) FLUSH;
  579.         for (i=1; i <= lastart; i++)
  580.         if (! was_read(i))
  581.             printf("%ld ",(long)i) FLUSH;
  582.     }
  583. #endif
  584.     }
  585. #ifdef DEBUGGING
  586.     if (debug & DEB_CTLAREA_BITMAP) {
  587.     fputs("\n(hit CR)",stdout) FLUSH;
  588.     gets(cmd_buf);
  589.     }
  590. #endif
  591.     if (mybuf != buf)
  592.     free(mybuf);
  593.     toread[ng] = unread;
  594.     return 0;
  595. }
  596.  
  597. void
  598. grow_ctl()
  599. {
  600.     ART_NUM newlast;
  601.     ART_NUM tmpfirst;
  602.     MEM_SIZE newsize;
  603.     register ART_NUM i;
  604.  
  605.     forcegrow = FALSE;
  606.     newlast = getngsize(ng);
  607.     if (newlast > lastart) {
  608.     ART_NUM tmpart = art;
  609. #ifndef lint
  610.     newsize = (MEM_SIZE)(OFFSET(newlast)/BITSPERBYTE+2);
  611. #else
  612.     newsize = Null(MEM_SIZE);
  613. #endif lint
  614.     if (newsize > ctlsize) {
  615.         newsize += 20;
  616.         ctlarea = saferealloc(ctlarea,newsize);
  617.         ctlsize = newsize;
  618.     }
  619.     toread[ng] += (ART_UNREAD)(newlast-lastart);
  620.     for (i=lastart+1; i<=newlast; i++)
  621.         ctl_clear(i);    /* these articles are unread */
  622. #ifdef CACHESUBJ
  623.     if (subj_list != Null(char**)) {
  624. #ifndef lint
  625.         subj_list = (char**)saferealloc((char*)subj_list,
  626.           (MEM_SIZE)((OFFSET(newlast)+2)*sizeof(char *)) );
  627. #endif lint
  628.         for (i=lastart+1; i<=newlast; i++)
  629.         subj_list[OFFSET(i)] = Nullch;
  630.     }
  631. #endif
  632.     tmpfirst = lastart+1;
  633.     lastart = newlast;
  634. #ifdef KILLFILES
  635. #ifdef VERBOSE
  636.     IF(verbose)
  637.         sprintf(buf,
  638.         "%ld more article%s arrived--looking for more to kill...\n\n",
  639.         (long)(lastart - tmpfirst + 1),
  640.         (lastart > tmpfirst ? "s have" : " has" ) );
  641.     ELSE            /* my, my, how clever we are */
  642. #endif
  643. #ifdef TERSE
  644.         strcpy(buf, "More news--killing...\n\n");
  645. #endif
  646.     kill_unwanted(tmpfirst,buf,TRUE);
  647. #endif
  648.     art = tmpart;
  649.     }
  650. }
  651.  
  652.