Changeset 3918
- Timestamp:
- Oct 24, 2014, 10:08:32 PM (11 years ago)
- Location:
- trunk/libc/src/kNIX/os2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libc/src/kNIX/os2/fs-os2.c
r3914 r3918 271 271 && ((psz[0] >= 'A' && psz[0] <= 'Z') || (psz[0] >= 'a' && psz[0] <= 'z')) 272 272 && psz[1] == ':' 273 && (psz[2] == '\\' || psz[2] == '/' )273 && (psz[2] == '\\' || psz[2] == '/' || psz[2] == '\0') 274 274 ) 275 275 { … … 287 287 __libc_gszUnixRoot[0] -= 'a' - 'A'; 288 288 289 size_t off = cch; 290 while (off-- > 0) 291 if (__libc_gszUnixRoot[off] == '\\') 292 __libc_gszUnixRoot[off] = '/'; 289 if (cch == 2) 290 { 291 __libc_gszUnixRoot[cch++] = '/'; 292 __libc_gszUnixRoot[cch] = '\0'; 293 } 294 else 295 { 296 size_t off = cch; 297 while (off-- > 0) 298 if (__libc_gszUnixRoot[off] == '\\') 299 __libc_gszUnixRoot[off] = '/'; 300 301 while (cch > 3 && __libc_gszUnixRoot[cch - 1] == '/') 302 __libc_gszUnixRoot[--cch] = '\0'; 303 } 293 304 294 305 /* Register the rewrite rule. */ -
trunk/libc/src/kNIX/os2/pathrewrite.c
r3862 r3918 650 650 while ((ch = *pszEnd) && ch != '/' && ch != '\\') 651 651 pszEnd++; 652 cch = pszEnd - psz;652 cch = (unsigned)(pszEnd - psz); 653 653 if (cch > 255) 654 654 { … … 697 697 continue; 698 698 } 699 else 700 { 701 /* 699 700 /* 702 701 * Complete match. We're done! 703 702 */ … … 718 717 } 719 718 /* not a match, the directory wasn't rewritten, quit searching. */ 720 }721 719 } 722 720 /* no match, we're done. */
Note:
See TracChangeset
for help on using the changeset viewer.