From:	MERC::"uunet!VM1.NODAK.EDU!owner-anu-news" 17-MAR-1993 20:49:10.90
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@VM1.NoDak.EDU>
CC:	
Subj:	Re: Additional problems with SEARCH on 61b6.

In article <1993Mar16.095847.16364@miavx1.acs.muohio.edu>, kacovert@miavx1.acs.m
uohio.edu (Kent Covert) writes:
> There was a question on this newsgroup concerning searching problems under
> ANU-NEWS 61b6.  The solution was to change the line get_filter(context) in
> NEWSSEARCH.C to get_filter(!context).  I implemented this change and noticed
> that searches succeeded the first time but subsequent searches would result in
> a string not found error.
>
> Is the change I made valid?  If so, what was the purpose of context?

Yes, but there were additional problems.  I'm attaching a patch from Bob Sloane
(thanks, Bob!).  This fixes almost all problems with Search.  I've been meaning
to e-mail Bob again but haven't found my roundtuit yet.  Search now acts like
the 6.03 SEARCH/ALL - ie it always starts from the top of the newsgroup instead
of starting at the current article and working down.

Anyway, with the patch below, it's a lot better than the version in the 6.1b6
archive.

------
The following patch to NEWSEXTRACT.C seems to help a lot.
--
USmail: Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045
E-mail: sloane@kuhub.cc.ukans.edu, sloane@ukanvax.bitnet, AT&T: (913)864-0444

*** newsextract.c;-0
--- newsextract.c;
**************
*** 170,176
          before_len,
          since_len;

!   if (cli$get_value(c$dsc("FROM"),&author_dsc,&author_len) & 1) {
      author[author_len] = '\0';
      lower_case(author);
      }
--- 170,177 -----
          before_len,
          since_len;

!   if ( cli$present(c$dsc("FROM")) & 1) {
!     c$cks(cli$get_value(c$dsc("FROM"),&author_dsc,&author_len));
      author[author_len] = '\0';
      lower_case(author);
      }
**************
*** 174,180
      author[author_len] = '\0';
      lower_case(author);
      }
!   else if (cli$get_value(c$dsc("AUTHOR"),&author_dsc,&author_len) & 1) {
      author[author_len] = '\0';
      lower_case(author);
      }
--- 175,182 -----
      author[author_len] = '\0';
      lower_case(author);
      }
!   else if ( cli$present(c$dsc("AUTHOR")) & 1) {
!     c$cks(cli$get_value(c$dsc("AUTHOR"),&author_dsc,&author_len));
      author[author_len] = '\0';
      lower_case(author);
      }
**************
*** 185,191
      sprintf(auth_2,"*<%s*",author);
      }

!   if (cli$get_value(c$dsc("KEYWORD"),&keyword_dsc,&keyword_len) & 1) {
      keyword[keyword_len] = '\0';
      lower_case(keyword);
      }
--- 187,194 -----
      sprintf(auth_2,"*<%s*",author);
      }

!   if ( cli$present(c$dsc("KEYWORD")) & 1) {
!     c$cks(cli$get_value(c$dsc("KEYWORD"),&keyword_dsc,&keyword_len));
      keyword[keyword_len] = '\0';
      lower_case(keyword);
      }
**************
*** 198,204
      sprintf(kw4,"*,%s,*",keyword);
      }

!   if (cli$get_value(c$dsc("SUBJECT"),&title_dsc,&title_len) & 1) {
      title[title_len] = '\0';
      lower_case(title);
      }
--- 201,208 -----
      sprintf(kw4,"*,%s,*",keyword);
      }

!   if ( cli$present(c$dsc("SUBJECT")) & 1) {
!     c$cks(cli$get_value(c$dsc("SUBJECT"),&title_dsc,&title_len));
      title[title_len] = '\0';
      lower_case(title);
      }
**************
*** 202,208
      title[title_len] = '\0';
      lower_case(title);
      }
!   else if (cli$get_value(c$dsc("TITLE"),&title_dsc,&title_len) & 1) {
      title[title_len] = '\0';
      lower_case(title);
      }
--- 206,213 -----
      title[title_len] = '\0';
      lower_case(title);
      }
!   else if ( cli$present(c$dsc("TITLE")) & 1) {
!     c$cks(cli$get_value(c$dsc("TITLE"),&title_dsc,&title_len));
      title[title_len] = '\0';
      lower_case(title);
      }
**************
*** 213,219
      }

    if (init_mode) bef_time = 0;
!   if (cli$get_value(c$dsc("BEFORE"),&before_dsc,&before_len) & 1) {
      before[before_len] = '\0';
      bef_time = cvt_date_val(before);
      }
--- 218,225 -----
      }

    if (init_mode) bef_time = 0;
!   if ( cli$present(c$dsc("BEFORE")) & 1) {
!     c$cks(cli$get_value(c$dsc("BEFORE"),&before_dsc,&before_len));
      before[before_len] = '\0';
      bef_time = cvt_date_val(before);
      }
**************
*** 220,226

    if (init_mode) sin_time = 0;
    since_len = 0;
!   if (cli$get_value(c$dsc("SINCE"),&since_dsc,&since_len) & 1) {
      since[since_len] = '\0';
      sin_time = cvt_date_val(since);
      }
--- 226,233 -----

    if (init_mode) sin_time = 0;
    since_len = 0;
!   if ( cli$present(c$dsc("SINCE"))  & 1) {
!     c$cks(cli$get_value(c$dsc("SINCE"),&since_dsc,&since_len));
      since[since_len] = '\0';
      sin_time = cvt_date_val(since);
      }
**************
*** 946,952
                      ((ga[g]->grp_flags & NEWS_M_NNTPSRV) ? '_' : ' '),
                      SUBJLEN,SUBJLEN,ga[g]->grp_name,ga[g]->grp_count,
                      ga[g]->grp_unread);
!               if (ga[g]->grp_reg) fprintf(pdf,"  (%5d)",ga[g]->grp_reg);
              }
            else {
              sprintf(err_oline,"%s\t",ga[g]->grp_name);
--- 953,959 -----
                      ((ga[g]->grp_flags & NEWS_M_NNTPSRV) ? '_' : ' '),
                      SUBJLEN,SUBJLEN,ga[g]->grp_name,ga[g]->grp_count,
                      ga[g]->grp_unread);
!               if (ga[g]->grp_reg) fprintf(pdf,"  (%5d)\n",ga[g]->grp_reg);
              }
            else {
              sprintf(err_oline,"%s\t",ga[g]->grp_name);

--
Ed Wilts, BC Systems, 4000 Seymour Place, Victoria, B.C., Canada, V8X 4S8
EWilts@Galaxy.Gov.BC.CA     Office:  (604) 389-3430   Fax: (604) 389-3412
