Ignore:
Timestamp:
10/18/06 01:49:50 (18 years ago)
Author:
mattausch
Message:

multiple path support for kd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/common.cpp

    r863 r1634  
    218218 
    219219char * 
     220StripPath(const char *s) 
     221{ 
     222        const int len = strlen(s); 
     223 
     224        int i = len; 
     225        for (; i>0; i--) { 
     226                if (s[i]=='/' || s[i]=='\\') 
     227                        break; 
     228        } 
     229 
     230        char *filename = new char[len - i]; 
     231        int j = 0; 
     232 
     233        for (; j < len - i; ++ j) 
     234                filename[j] = s[i + j + 1]; 
     235        //filename[j] = 0; 
     236 
     237        return filename; 
     238} 
     239 
     240char * 
    220241strdup(char *a) 
    221242{ 
Note: See TracChangeset for help on using the changeset viewer.