@@ -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) @@ -84,11 +84,11 @@ self = [super init]; @try { _categories = [[OFMutableArray alloc] init]; - [self OF_parseFile: path + [self of_parseFile: path encoding: encoding]; } @catch (id e) { [self release]; @throw e; } @@ -110,20 +110,20 @@ for (category in _categories) if ([[category name] isEqual: name]) return category; - category = [[[OFINICategory alloc] OF_init] autorelease]; + category = [[[OFINICategory alloc] of_init] autorelease]; [category setName: name]; [_categories addObject: category]; objc_autoreleasePoolPop(pool); return category; } -- (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; @@ -152,18 +152,18 @@ categoryName = [line substringWithRange: of_range(1, [line length] - 2)]; category = [[[OFINICategory alloc] - OF_init] autorelease]; + of_init] autorelease]; [category setName: categoryName]; [_categories addObject: category]; } else { if (category == nil) @throw [OFInvalidFormatException exception]; - [category OF_parseLine: line]; + [category of_parseLine: line]; } } objc_autoreleasePoolPop(pool); } @@ -181,13 +181,13 @@ OFFile *file = [OFFile fileWithPath: path mode: @"w"]; bool first = true; for (OFINICategory *category in _categories) - if ([category OF_writeToStream: file + if ([category of_writeToStream: file encoding: encoding first: first]) first = false; objc_autoreleasePoolPop(pool); } @end