Changeset 29ebcea


Ignore:
Timestamp:
Jan 29, 2007, 10:37:47 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
72db971
Parents:
30678ae
git-author:
Nelson Elhage <nelhage@mit.edu> (01/29/07 22:37:41)
git-committer:
Nelson Elhage <nelhage@mit.edu> (01/29/07 22:37:47)
Message:
Fixing the smartnarrow bug on instances with lots of periods or other
RE metacharacters.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r8fa9562 r29ebcea  
    26412641
    26422642  /* create the new filter */
    2643   argbuff=owl_malloc(len+20);
    26442643  tmpclass=owl_text_quote(class, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
    26452644  owl_text_tr(tmpclass, ' ', '.');
     
    26482647    owl_text_tr(tmpinstance, ' ', '.');
    26492648  }
    2650   sprintf(argbuff, "( class ^(un)*%s(\\.d)*$ )", tmpclass);
     2649  len = strlen(tmpclass);
     2650  if(tmpinstance) len += strlen(tmpinstance);
     2651  len += 60;
     2652  argbuff = owl_malloc(len);
     2653  sprintf(argbuff, "class ^(un)*%s(\\.d)*$", tmpclass);
    26512654  if (tmpinstance) {
    26522655    sprintf(argbuff, "%s and ( instance ^%s(\\.d)*$ )", argbuff, tmpinstance);
Note: See TracChangeset for help on using the changeset viewer.