Changeset bc08664
- Timestamp:
- Oct 26, 2003, 4:11:37 PM (20 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 995eb4b
- Parents:
- e3d9c77
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r25dd31a rbc08664 9 9 Added the 'loopwrite' command 10 10 Added a timestamp to the default style 11 Zpunt now works with weird regex characters 11 12 12 13 2.0.10 -
functions.c
re3d9c77 rbc08664 2660 2660 } 2661 2661 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); 2664 2664 if (!mclass || !*mclass || *mclass==' ' 2665 2665 || (!strcasecmp(mclass, "message") && !strcasecmp(minst, "personal")) … … 2681 2681 owl_free(cmd); 2682 2682 } 2683 owl_free(mclass); 2684 owl_free(minst); 2683 2685 } 2684 2686 … … 2734 2736 owl_list *fl; 2735 2737 char *buff; 2738 char *quoted; 2736 2739 int ret, i, j; 2737 2740 … … 2745 2748 strcat(buff, " .*"); 2746 2749 } 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); 2748 2753 } 2749 2754 if (!strcmp(inst, "*")) { 2750 2755 strcat(buff, " and instance .*"); 2751 2756 } 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); 2753 2760 } 2754 2761 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); 2756 2765 } 2757 2766 -
owl.h
r25dd31a rbc08664 141 141 #define OWL_WEBZEPHYR_CLASS "webzephyr" 142 142 #define OWL_WEBZEPHYR_OPCODE "webzephyr" 143 144 #define OWL_REGEX_QUOTECHARS "+*.?[]^\\" 145 #define OWL_REGEX_QUOTEWITH "\\" 143 146 144 147 #if defined(HAVE_DES_STRING_TO_KEY) && defined(HAVE_DES_KEY_SCHED) && defined(HAVE_DES_ECB_ENCRYPT) -
regex.c
re187445 rbc08664 36 36 } 37 37 38 return(0); 39 } 40 41 int owl_regex_create_quoted(owl_regex *re, char *string) 42 { 43 char *quoted; 44 45 quoted=owl_text_quote(string, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH); 46 owl_regex_create(re, quoted); 47 owl_free(quoted); 38 48 return(0); 39 49 }
Note: See TracChangeset
for help on using the changeset viewer.