6 void _splitpath(const char* path
, char* drive
, char* dir
, char* fname
, char* ext
)
12 tmp_drive
= (char*)strchr(path
,':');
15 strncpy(drive
,tmp_drive
-1,2);
22 tmp_drive
= (char*)path
- 1;
25 tmp_dir
= (char*)strrchr(path
,'\\');
28 strncpy(dir
,tmp_drive
+1,tmp_dir
-tmp_drive
);
29 *(dir
+(tmp_dir
-tmp_drive
)) = 0;
35 tmp_ext
= (char*)strrchr(path
,'.');
37 tmp_ext
= (char*)path
+strlen(path
);
44 strncpy(fname
,tmp_dir
+1,tmp_ext
-tmp_dir
-1);
45 *(fname
+(tmp_ext
-tmp_dir
-1)) = 0;
47 strncpy(fname
,tmp_drive
+1,tmp_ext
-tmp_drive
-1);
48 *(fname
+(tmp_ext
-path
))=0;