@@ -27,11 +27,11 @@ #import "OFInvalidFormatException.h" #import "OFOpenItemFailedException.h" @interface OFINIFile () -- (void)OF_parseFile: (OFString*)path +- (void)OF_parseFile: (OFString *)path encoding: (of_string_encoding_t)encoding; @end static bool isWhitespaceLine(OFString *line) @@ -53,16 +53,16 @@ return true; } @implementation OFINIFile -+ (instancetype)fileWithPath: (OFString*)path ++ (instancetype)fileWithPath: (OFString *)path { return [[[self alloc] initWithPath: path] autorelease]; } -+ (instancetype)fileWithPath: (OFString*)path ++ (instancetype)fileWithPath: (OFString *)path encoding: (of_string_encoding_t)encoding { return [[[self alloc] initWithPath: path encoding: encoding] autorelease]; } @@ -70,17 +70,17 @@ - init { OF_INVALID_INIT_METHOD } -- initWithPath: (OFString*)path +- initWithPath: (OFString *)path { return [self initWithPath: path encoding: OF_STRING_ENCODING_UTF_8]; } -- initWithPath: (OFString*)path +- initWithPath: (OFString *)path encoding: (of_string_encoding_t)encoding { self = [super init]; @try { @@ -101,11 +101,11 @@ [_categories release]; [super dealloc]; } -- (OFINICategory*)categoryForName: (OFString*)name +- (OFINICategory *)categoryForName: (OFString *)name { void *pool = objc_autoreleasePoolPush(); OFINICategory *category; for (category in _categories) { @@ -127,11 +127,11 @@ objc_autoreleasePoolPop(pool); return [category autorelease]; } -- (void)OF_parseFile: (OFString*)path +- (void)OF_parseFile: (OFString *)path encoding: (of_string_encoding_t)encoding { void *pool = objc_autoreleasePoolPush(); OFFile *file; OFINICategory *category = nil; @@ -174,17 +174,17 @@ } objc_autoreleasePoolPop(pool); } -- (void)writeToFile: (OFString*)path +- (void)writeToFile: (OFString *)path { [self writeToFile: path encoding: OF_STRING_ENCODING_UTF_8]; } -- (void)writeToFile: (OFString*)path +- (void)writeToFile: (OFString *)path encoding: (of_string_encoding_t)encoding { void *pool = objc_autoreleasePoolPush(); OFFile *file = [OFFile fileWithPath: path mode: @"w"];