Changeset a0e6082
- Timestamp:
- Feb 11, 2009, 12:20:21 PM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- c894c15
- Parents:
- c1d166b
- git-author:
- Nelson Elhage <nelhage@mit.edu> (02/10/09 18:35:46)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (02/11/09 12:20:21)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
rc1d166b ra0e6082 2398 2398 char *tmpclass, *tmpinstance = NULL; 2399 2399 char *class, *instance = NULL; 2400 int len;2401 2400 2402 2401 class = owl_util_baseclass(c); … … 2408 2407 2409 2408 /* name for the filter */ 2410 len=strlen(class)+30;2411 if (instance) len+=strlen(instance);2412 filtname=owl_malloc(len);2413 2409 if (!instance) { 2414 sprintf(filtname,"class-%s", class);2415 } else { 2416 sprintf(filtname,"class-%s-instance-%s", class, instance);2410 filtname = owl_sprintf("class-%s", class); 2411 } else { 2412 filtname = owl_sprintf("class-%s-instance-%s", class, instance); 2417 2413 } 2418 2414 /* downcase it */ … … 2445 2441 owl_text_tr(tmpinstance, '"', '.'); 2446 2442 } 2447 len = strlen(tmpclass); 2448 if(tmpinstance) len += strlen(tmpinstance); 2449 len += 60; 2450 argbuff = owl_malloc(len); 2451 sprintf(argbuff, "class ^(un)*%s(\\.d)*$", tmpclass); 2443 2444 argbuff = owl_sprintf("class ^(un)*%s(\\.d)*$", tmpclass); 2452 2445 if (tmpinstance) { 2453 sprintf(argbuff + strlen(argbuff), " and ( instance ^(un)*%s(\\.d)*$ )", tmpinstance); 2446 char *tmp = argbuff; 2447 argbuff = owl_sprintf("%s and ( instance ^(un)*%s(\\.d)*$ )", tmp, tmpinstance); 2448 owl_free(tmp); 2454 2449 } 2455 2450 owl_free(tmpclass);
Note: See TracChangeset
for help on using the changeset viewer.