Changeset f166580 for util.c


Ignore:
Timestamp:
Feb 23, 2007, 3:25:53 PM (14 years ago)
Author:
Alejandro R. Sedeño <asedeno@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:
cc5b906
Parents:
59916e8
Message:
This is better still.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • util.c

    r59916e8 rf166580  
    743743char * owl_util_baseclass(char * class)
    744744{
    745   char *newClass;
    746745  char *ret;
    747746  char *start, *end;
    748747
    749   start = newClass = owl_strdup(class);
     748  start = class;
    750749  while(!strncmp(start, "un", 2)) {
    751750    start += 2;
    752751  }
     752
     753  start = owl_strdup(start);
    753754  end = start + strlen(start) - 1;
    754755  while(*end == 'd' && *(end-1) == '.') {
     
    757758  *(end + 1) = 0;
    758759
    759   ret = owl_strdup(start);
    760   owl_free(newClass);
    761 
    762   return ret;
     760  return start;
    763761}
    764762
Note: See TracChangeset for help on using the changeset viewer.