Differences From Artifact [4ef14749f7]:
- File src/OFFile.m — part of check-in [5ca844dd3b] at 2014-02-28 00:41:27 on branch trunk — Make MinGW32 and MinGW-w64 happy at the same time (user: js, size: 20593) [annotate] [blame] [check-ins using]
To Artifact [fd77a17f17]:
- File
src/OFFile.m
— part of check-in
[9da9b2b64c]
at
2014-04-14 00:45:58
on branch trunk
— Coding style
No functional change intended. (user: js, size: 20661) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
132 133 134 135 136 137 138 | buffer); #endif } static int parseMode(const char *mode) { | | | | | | | | | | | | | | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | buffer); #endif } static int parseMode(const char *mode) { if (strcmp(mode, "r") == 0) return O_RDONLY; if (strcmp(mode, "rb") == 0) return O_RDONLY | O_BINARY; if (strcmp(mode, "r+") == 0) return O_RDWR; if (strcmp(mode, "rb+") == 0 || strcmp(mode, "r+b") == 0) return O_RDWR | O_BINARY; if (strcmp(mode, "w") == 0) return O_WRONLY | O_CREAT | O_TRUNC; if (strcmp(mode, "wb") == 0) return O_WRONLY | O_CREAT | O_TRUNC | O_BINARY; if (strcmp(mode, "w+") == 0) return O_RDWR | O_CREAT | O_TRUNC; if (strcmp(mode, "wb+") == 0 || strcmp(mode, "w+b") == 0) return O_RDWR | O_CREAT | O_TRUNC | O_BINARY; if (strcmp(mode, "a") == 0) return O_WRONLY | O_CREAT | O_APPEND; if (strcmp(mode, "ab") == 0) return O_WRONLY | O_CREAT | O_APPEND | O_BINARY; if (strcmp(mode, "a+") == 0) return O_RDWR | O_CREAT | O_APPEND; if (strcmp(mode, "ab+") == 0 || strcmp(mode, "a+b") == 0) return O_RDWR | O_CREAT | O_APPEND | O_BINARY; return -1; } @implementation OFFile + (void)initialize |
︙ | ︙ | |||
350 351 352 353 354 355 356 | mode: @"r"]; @try { while ((dirent = readdir(dir)) != NULL) { void *pool = objc_autoreleasePoolPush(); OFString *file; | | | | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | mode: @"r"]; @try { while ((dirent = readdir(dir)) != NULL) { void *pool = objc_autoreleasePoolPush(); OFString *file; if (strcmp(dirent->d_name, ".") == 0 || strcmp(dirent->d_name, "..") == 0) continue; file = [OFString stringWithCString: dirent->d_name encoding: encoding]; [files addObject: file]; objc_autoreleasePoolPop(pool); |
︙ | ︙ |