Changeset 7a20e4c
- Timestamp:
- Feb 8, 2007, 4:39:31 PM (16 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 952b1660
- Parents:
- 801b7ac
- git-author:
- Nelson Elhage <nelhage@mit.edu> (02/01/07 12:03:34)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (02/08/07 16:39:31)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r801b7ac r7a20e4c 2617 2617 * name of the filter, which the caller must free. 2618 2618 */ 2619 char *owl_function_classinstfilt(char *c lass, char *instance)2619 char *owl_function_classinstfilt(char *c, char *i) 2620 2620 { 2621 2621 owl_list *fl; … … 2623 2623 char *argbuff, *filtname; 2624 2624 char *tmpclass, *tmpinstance = NULL; 2625 char *class, *instance = NULL; 2625 2626 int len; 2627 2628 class = owl_util_baseclass(c); 2629 if(i) { 2630 instance = owl_util_baseclass(i); 2631 } 2626 2632 2627 2633 fl=owl_global_get_filterlist(&g); -
util.c
r0138478 r7a20e4c 737 737 } 738 738 739 /* Return the base class or instance from a zephyr class, by removing 740 leading `un' or trailing `.d'. 741 Modified ``class'' in place, and does not allocate memory. 742 */ 743 char * owl_util_baseclass(char * class) 744 { 745 char * end; 746 while(!strncmp(class, "un", 2)) { 747 class += 2; 748 } 749 end = class + strlen(class) - 1; 750 while(*end == 'd' && *(end-1) == '.') { 751 end -= 2; 752 } 753 *(end + 1) = 0; 754 return class; 755 } 756 739 757 /**************************************************************************/ 740 758 /************************* REGRESSION TESTS *******************************/
Note: See TracChangeset
for help on using the changeset viewer.