oc/utils: Move OCDumpPListData() function into plreader - this is the only user for this function

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
pull/49/head
Kamen Mazdrashki 2014-06-19 19:30:17 +02:00 committed by Julio García
parent bf0f2a76d5
commit 116e738e63
2 changed files with 44 additions and 43 deletions

View File

@ -139,46 +139,3 @@ const char *indentationStep = " ";
@end
static void
OCDumpPListData (NSData *content)
{
//NSDictionary *d;
//NSPropertyListFormat format;
//NSString *error = nil;
//const char *formatName;
//d = [NSPropertyListSerialization propertyListFromData: content
// mutabilityOption: NSPropertyListImmutable
// format: &format
// errorDescription: &error];
//d = [content BSONValue];
// if (d)
// {
// switch (format)
// {
// case NSPropertyListOpenStepFormat:
// formatName = "OpenStep";
// break;
// case NSPropertyListXMLFormat_v1_0:
// formatName = "XML";
// break;
// case NSPropertyListBinaryFormat_v1_0:
// formatName = "Binary";
// break;
// case NSPropertyListGNUstepFormat:
// formatName = "GNUstep";
// break;
// case NSPropertyListGNUstepBinaryFormat:
// formatName = "GNUstep binary";
// break;
// default: formatName = "unknown";
// }
// printf ("File format is: %s\n", formatName);
// [d displayWithIndentation: 0];
// printf ("\n");
// }
// else
// printf ("an error occurred: %s\n", [error UTF8String]);
}

View File

@ -29,6 +29,50 @@
#import "NSObject+PropertyList.m"
static void
OCDumpPListData (NSData *content)
{
//NSDictionary *d;
//NSPropertyListFormat format;
//NSString *error = nil;
//const char *formatName;
//d = [NSPropertyListSerialization propertyListFromData: content
// mutabilityOption: NSPropertyListImmutable
// format: &format
// errorDescription: &error];
//d = [content BSONValue];
// if (d)
// {
// switch (format)
// {
// case NSPropertyListOpenStepFormat:
// formatName = "OpenStep";
// break;
// case NSPropertyListXMLFormat_v1_0:
// formatName = "XML";
// break;
// case NSPropertyListBinaryFormat_v1_0:
// formatName = "Binary";
// break;
// case NSPropertyListGNUstepFormat:
// formatName = "GNUstep";
// break;
// case NSPropertyListGNUstepBinaryFormat:
// formatName = "GNUstep binary";
// break;
// default: formatName = "unknown";
// }
// printf ("File format is: %s\n", formatName);
// [d displayWithIndentation: 0];
// printf ("\n");
// }
// else
// printf ("an error occurred: %s\n", [error UTF8String]);
}
static void
PLReaderDumpPListFile (NSString *filename)
{