Changeset 2648 for branches/libc-0.6
- Timestamp:
- Mar 15, 2006, 5:24:06 AM (19 years ago)
- Location:
- branches/libc-0.6/src
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/libc-0.6/src/emx/src/lib/misc/basename.c
r1506 r2648 71 71 } 72 72 73 /* d:/ */ 74 if (*endp == ':' && endp == path + 1) { 75 (void)strncpy(bname, path, 3); 76 bname[3] = '\0'; 77 return(bname); 78 } 79 73 80 /* Find the start of the base */ 74 81 startp = endp; 75 while (startp > path && *(startp - 1) != '/' && *(startp - 1) != '\\' && *(startp - 1) != ':') 82 while ( startp > path 83 && *(startp - 1) != '/' 84 && *(startp - 1) != '\\' 85 && (*(startp - 1) != ':' || startp != path + 2)) 76 86 startp--; 77 87 -
branches/libc-0.6/src/emx/src/lib/misc/dirname.c
r1506 r2648 67 67 68 68 /* Find the start of the dir */ 69 while (endp > path && *endp != '/' && *endp != ' /' && *endp != ':')69 while (endp > path && *endp != '/' && *endp != '\\' && (*endp != ':' || endp != path + 1)) 70 70 endp--; 71 71 … … 74 74 (void)strcpy(bname, *endp == '/' || *endp == '\\' ? "/" : "."); 75 75 return(bname); 76 } else { 76 } 77 78 if (*endp == ':' && endp == path + 1) { 79 if (endp[1] == '/' || endp[1] == '\\') 80 endp++; 81 } else if (endp != path + 2 || path[1] != ':') { 77 82 do { 78 83 endp--; -
branches/libc-0.6/src/libctests/libc/Makefile
r2547 r2648 96 96 smoketests/fchmod-1.c \ 97 97 smoketests/nonblock-1.c \ 98 smoketests/fclose-2.c 98 smoketests/fclose-2.c \ 99 smoketests/basename-dirname-1.c 99 100 100 101 # smoketests/weak-export-1.c - dll
Note:
See TracChangeset
for help on using the changeset viewer.