Differences From Artifact [65676b97b5]:
- File src/OFFile.m — part of check-in [35dafd5c57] at 2013-11-23 01:12:40 on branch trunk — Add OF_INVALID_INIT_METHOD. (user: js, size: 17760) [annotate] [blame] [check-ins using]
To Artifact [c8979c52b6]:
- File
src/OFFile.m
— part of check-in
[fa6496efc7]
at
2013-12-05 17:48:11
on branch trunk
— Make coding style consistent.
A file documenting the coding style will be written soon. This will
hopefully prevent conflicts in the future, such as whether static
functions are written in camelCase or_with_underscores, like was the
case here. (user: js, size: 17758) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
104 105 106 107 108 109 110 | #define DIR_MODE DEFAULT_MODE | S_IXUSR | S_IXGRP | S_IXOTH #if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) static of_mutex_t mutex; #endif static int | | | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | #define DIR_MODE DEFAULT_MODE | S_IXUSR | S_IXGRP | S_IXOTH #if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) static of_mutex_t mutex; #endif static int parseMode(const char *mode) { if (!strcmp(mode, "r")) return O_RDONLY; if (!strcmp(mode, "rb")) return O_RDONLY | O_BINARY; if (!strcmp(mode, "r+")) return O_RDWR; |
︙ | ︙ | |||
698 699 700 701 702 703 704 | mode: (OFString*)mode { self = [super init]; @try { int flags; | | | 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 | mode: (OFString*)mode { self = [super init]; @try { int flags; if ((flags = parseMode([mode UTF8String])) == -1) @throw [OFInvalidArgumentException exception]; #ifndef _WIN32 if ((_fd = open([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], flags, DEFAULT_MODE)) == -1) #else if ((_fd = _wopen([path UTF16String], flags, |
︙ | ︙ |