230 :(unsigned)inIndentation errorDescription:(NSString **)outErrorDescription
231{
232 NSMutableString *result;
234 NSArray *allKeys;
235 id key, value;
236 NSString *valueDesc;
237
238 result = [NSMutableString string];
239 allKeys = [[self allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
240 count = [allKeys count];
241
242 [result appendString:@"{"];
243
245
246 for (i = 0; i !=
count; ++i)
247 {
248 if (0 != i)
249 {
251 }
252
253 key = [allKeys objectAtIndex:i];
254 if (![key isKindOfClass:[NSString class]])
255 {
256 if (NULL != outErrorDescription) *outErrorDescription = [NSString stringWithFormat:@"non-string key in dictionary"];
258 }
259 value = [self objectForKey:key];
260 if (![value conformsToProtocol:@protocol(OldSchoolPropertyListWriting)])
261 {
262 if (
nil != value && NULL != outErrorDescription)
263 {
264 *outErrorDescription = [NSString stringWithFormat:@"non-plist object in dictionary"];
265 }
267 }
268
269 key = [key oldSchoolPListFormatWithIndentation:inIndentation + 1 errorDescription:outErrorDescription];
270 if (
nil == key)
return nil;
271 valueDesc = [value oldSchoolPListFormatWithIndentation:inIndentation + 1 errorDescription:outErrorDescription];
272 if (
nil == valueDesc)
return nil;
273
274 [result appendFormat:@"%@ =", key];
275 if ([value isKindOfClass:[NSArray class]] || [value isKindOfClass:[NSDictionary class]])
276 {
278 }
279 else
280 {
281 [result appendString:@" "];
282 }
283 [result appendFormat:@"%@;", valueDesc];
284 }
285
287 [result appendString:@"}"];
288
289 return result;
290}
static void AppendNewLineAndIndent(NSMutableString *ioString, unsigned indentDepth)