Changeset bc08664 for functions.c


Ignore:
Timestamp:
Oct 26, 2003, 4:11:37 PM (17 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
995eb4b
Parents:
e3d9c77
Message:
zpunt now works wtih weird regex characters
	CVS: ----------------------------------------------------------------------
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    re3d9c77 rbc08664  
    26602660  }
    26612661
    2662   mclass = owl_message_get_class(m);
    2663   minst = owl_message_get_instance(m);
     2662  mclass = owl_text_quote(owl_message_get_class(m), OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
     2663  minst = owl_text_quote(owl_message_get_instance(m), OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
    26642664  if (!mclass || !*mclass || *mclass==' '
    26652665      || (!strcasecmp(mclass, "message") && !strcasecmp(minst, "personal"))
     
    26812681    owl_free(cmd);
    26822682  }
     2683  owl_free(mclass);
     2684  owl_free(minst);
    26832685}
    26842686
     
    27342736  owl_list *fl;
    27352737  char *buff;
     2738  char *quoted;
    27362739  int ret, i, j;
    27372740
     
    27452748    strcat(buff, " .*");
    27462749  } else {
    2747     sprintf(buff, "%s ^%s$", buff, class);
     2750    quoted=owl_text_quote(class, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
     2751    sprintf(buff, "%s ^%s$", buff, quoted);
     2752    owl_free(quoted);
    27482753  }
    27492754  if (!strcmp(inst, "*")) {
    27502755    strcat(buff, " and instance .*");
    27512756  } else {
    2752     sprintf(buff, "%s and instance ^%s$", buff, inst);
     2757    quoted=owl_text_quote(inst, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
     2758    sprintf(buff, "%s and instance ^%s$", buff, quoted);
     2759    owl_free(quoted);
    27532760  }
    27542761  if (strcmp(recip, "*")) {
    2755     sprintf(buff, "%s and recipient ^%s$", buff, recip);
     2762    quoted=owl_text_quote(recip, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
     2763    sprintf(buff, "%s and recipient ^%s$", buff, quoted);
     2764    owl_free(quoted);
    27562765  }
    27572766 
Note: See TracChangeset for help on using the changeset viewer.