[ Arggh!   Sorry about the content-free message I just sent! ]

On Wed, 10 Jan 2001, I wrote:
> I believe I need something equivalent to:
> 
>               FILEINCLUDE   /~wombat/*
>   =>          FILEEXCLUDE   NOT pages


Here's a little patch to implement a token "!pages" by analogy with
the existing "pages" token.   Quick tests (on about 30Mb of logs)
seem to indicate no noticeable effect in processing speed, and the
results of  "FILEINCLUDE pages" vs "FILEEXCLUDE !pages" (and vice versa)
appear to be identical.

I offer this for inclusion or rejection, as you see fit.

Dave


*** /var/tmp/,RCSt1a03843       Tue Jan 16 12:02:09 2001
--- init2.c     Tue Jan 16 10:44:02 2001
***************
*** 1560,1565
    else {
      if (strcaseeq((*include)->name, "pages"))
        strcpy((*include)->name, "pages");
      (*include)->type = in?(NORMAL_INC):(NORMAL_EXC);
    }
  }

--- 1560,1567 -----
    else {
      if (strcaseeq((*include)->name, "pages"))
        strcpy((*include)->name, "pages");
+     if (strcaseeq((*include)->name, "!pages"))
+       strcpy((*include)->name, "!pages");
      (*include)->type = in?(NORMAL_INC):(NORMAL_EXC);
    }
  }
*** /var/tmp/,RCSt1a03846       Tue Jan 16 12:02:17 2001
--- utils.c     Tue Jan 16 10:44:14 2001
***************
*** 707,713
  
    for (lp = listhead; lp != NULL; TO_NEXT(lp)) {
      is_regex = IS_REGEXT(lp->type);
!     if (!is_regex && STREQ((char *)(lp->name), "pages")) {
        /* 'pages' is made case insensitive at config time */
        if (ispage % 16)
        return(IS_INC(lp->type));

--- 707,715 -----
  
    for (lp = listhead; lp != NULL; TO_NEXT(lp)) {
      is_regex = IS_REGEXT(lp->type);
!     if (!is_regex && (
!               STREQ((char *)(lp->name), "pages") ||
!               STREQ((char *)(lp->name), "!pages"))) {
        /* 'pages' is made case insensitive at config time */
        if (STREQ((char *)(lp->name), "pages") && ispage % 16)
        return(IS_INC(lp->type));
***************
*** 709,715
      is_regex = IS_REGEXT(lp->type);
      if (!is_regex && STREQ((char *)(lp->name), "pages")) {
        /* 'pages' is made case insensitive at config time */
!       if (ispage % 16)
        return(IS_INC(lp->type));
      }
      else if (matchq(name,

--- 711,719 -----
                STREQ((char *)(lp->name), "pages") ||
                STREQ((char *)(lp->name), "!pages"))) {
        /* 'pages' is made case insensitive at config time */
!       if (STREQ((char *)(lp->name), "pages") && ispage % 16)
!       return(IS_INC(lp->type));
!       if (STREQ((char *)(lp->name), "!pages") && !(ispage % 16))
        return(IS_INC(lp->type));
      }
      else if (matchq(name,

Reply via email to