@@ -37,11 +37,11 @@ @public OFString *_comment; } @end -static OFString* +static OFString * escapeString(OFString *string) { OFMutableString *mutableString; /* FIXME: Optimize */ @@ -70,11 +70,11 @@ [mutableString makeImmutable]; return mutableString; } -static OFString* +static OFString * unescapeString(OFString *string) { OFMutableString *mutableString; if (![string hasPrefix: @"\""] || ![string hasSuffix: @"\""]) @@ -146,11 +146,11 @@ [_lines release]; [super dealloc]; } -- (void)OF_parseLine: (OFString*)line +- (void)OF_parseLine: (OFString *)line { if (![line hasPrefix: @";"]) { OFINICategory_Pair *pair = [[[OFINICategory_Pair alloc] init] autorelease]; OFString *key, *value; @@ -181,18 +181,18 @@ [_lines addObject: comment]; } } -- (OFString*)stringForKey: (OFString*)key +- (OFString *)stringForKey: (OFString *)key { return [self stringForKey: key defaultValue: nil]; } -- (OFString*)stringForKey: (OFString*)key - defaultValue: (OFString*)defaultValue +- (OFString *)stringForKey: (OFString *)key + defaultValue: (OFString *)defaultValue { for (id line in _lines) { OFINICategory_Pair *pair; if (![line isKindOfClass: [OFINICategory_Pair class]]) @@ -205,11 +205,11 @@ } return defaultValue; } -- (intmax_t)integerForKey: (OFString*)key +- (intmax_t)integerForKey: (OFString *)key defaultValue: (intmax_t)defaultValue { void *pool = objc_autoreleasePoolPush(); OFString *value = [self stringForKey: key defaultValue: nil]; @@ -226,11 +226,11 @@ objc_autoreleasePoolPop(pool); return ret; } -- (bool)boolForKey: (OFString*)key +- (bool)boolForKey: (OFString *)key defaultValue: (bool)defaultValue { void *pool = objc_autoreleasePoolPush(); OFString *value = [self stringForKey: key defaultValue: nil]; @@ -249,11 +249,11 @@ objc_autoreleasePoolPop(pool); return ret; } -- (float)floatForKey: (OFString*)key +- (float)floatForKey: (OFString *)key defaultValue: (float)defaultValue { void *pool = objc_autoreleasePoolPush(); OFString *value = [self stringForKey: key defaultValue: nil]; @@ -267,11 +267,11 @@ objc_autoreleasePoolPop(pool); return ret; } -- (double)doubleForKey: (OFString*)key +- (double)doubleForKey: (OFString *)key defaultValue: (double)defaultValue { void *pool = objc_autoreleasePoolPush(); OFString *value = [self stringForKey: key defaultValue: nil]; @@ -285,11 +285,11 @@ objc_autoreleasePoolPop(pool); return ret; } -- (OFArray*)arrayForKey: (OFString*)key +- (OFArray *)arrayForKey: (OFString *)key { OFMutableArray *ret = [OFMutableArray array]; void *pool = objc_autoreleasePoolPush(); for (id line in _lines) { @@ -309,12 +309,12 @@ [ret makeImmutable]; return ret; } -- (void)setString: (OFString*)string - forKey: (OFString*)key +- (void)setString: (OFString *)string + forKey: (OFString *)key { void *pool = objc_autoreleasePoolPush(); OFINICategory_Pair *pair; for (id line in _lines) { @@ -351,11 +351,11 @@ objc_autoreleasePoolPop(pool); } - (void)setInteger: (intmax_t)integer - forKey: (OFString*)key + forKey: (OFString *)key { void *pool = objc_autoreleasePoolPush(); [self setString: [OFString stringWithFormat: @"%jd", integer] forKey: key]; @@ -362,18 +362,18 @@ objc_autoreleasePoolPop(pool); } - (void)setBool: (bool)bool_ - forKey: (OFString*)key + forKey: (OFString *)key { [self setString: (bool_ ? @"true" : @"false") forKey: key]; } - (void)setFloat: (float)float_ - forKey: (OFString*)key + forKey: (OFString *)key { void *pool = objc_autoreleasePoolPush(); [self setString: [OFString stringWithFormat: @"%g", float_] forKey: key]; @@ -380,22 +380,22 @@ objc_autoreleasePoolPop(pool); } - (void)setDouble: (double)double_ - forKey: (OFString*)key + forKey: (OFString *)key { void *pool = objc_autoreleasePoolPush(); [self setString: [OFString stringWithFormat: @"%g", double_] forKey: key]; objc_autoreleasePoolPop(pool); } -- (void)setArray: (OFArray*)array - forKey: (OFString*)key +- (void)setArray: (OFArray *)array + forKey: (OFString *)key { void *pool; OFMutableArray *pairs; id const *lines; size_t count; @@ -459,11 +459,11 @@ [_lines addObjectsFromArray: pairs]; objc_autoreleasePoolPop(pool); } -- (void)removeValueForKey: (OFString*)key +- (void)removeValueForKey: (OFString *)key { void *pool = objc_autoreleasePoolPush(); id const *lines = [_lines objects]; size_t count = [_lines count]; @@ -487,11 +487,11 @@ } objc_autoreleasePoolPop(pool); } -- (bool)OF_writeToStream: (OFStream*)stream +- (bool)OF_writeToStream: (OFStream *)stream encoding: (of_string_encoding_t)encoding first: (bool)first { if ([_lines count] == 0) return false;