Browse code

Merged reorg code. Improved NSData printing again.

Nat! authored on 30-06-2015 12:08:15
Showing 24 changed files
... ...
@@ -1,7 +1,7 @@
1
-<!-- MAKEFILE GENERATE README.md. DO NOT EDIT. EDIT .ugly -->
1
+<!-- MAKEFILE GENERATES README.md. EDIT .ugly -->
2 2
 # mulle-plist-utilities
3 3
 
4
-Just say *sudo make install* and the files will end up in /usr/local.
4
+Just say *sudo make install* and the files will end up in `/usr/local`.
5 5
 
6 6
 ---
7 7
 
... ...
@@ -1,6 +1,8 @@
1 1
 #
2 2
 # old skool Makefile by Nat!
3 3
 #
4
+CFLAGS=$(CFLAGS) -Wno-deprecated-declarations
5
+
4 6
 MANPAGES = mulle-plist-from-files/mulle-plist-from-files.8 \
5 7
 	mulle-plist-compress/mulle-plist-compress.8 \
6 8
 	mulle-plist-fix/mulle-plist-fix.8 \
... ...
@@ -1,7 +1,7 @@
1
-<!-- MAKEFILE GENERATE README.md. DO NOT EDIT. EDIT .ugly -->
1
+<!-- MAKEFILE GENERATES README.md. EDIT .ugly -->
2 2
 # mulle-plist-utilities
3 3
 
4
-Just say *sudo make install* and the files will end up in /usr/local.
4
+Just say *sudo make install* and the files will end up in `/usr/local`.
5 5
 
6 6
 ---
7 7
 
... ...
@@ -29,7 +29,7 @@ AUTHOR
29 29
 
30 30
      http://www.mulle‐kybernetik.com/software/git/mulle‐plist‐utilities
31 31
 
32
-Darwin			       February 15, 2013			Darwin
32
+Darwin				 June 30, 2015				Darwin
33 33
 </pre>
34 34
 ---
35 35
 ## mulle-plist-compress
... ...
@@ -41,13 +41,13 @@ NAME
41 41
      in C code.
42 42
 
43 43
 SYNOPSIS
44
-     mulle‐plist‐compress [−s style] [−c compression] [−f format]
44
+     mulle‐plist‐compress [−s style] [−c compression] [−e format]
45 45
 
46 46
 DESCRIPTION
47 47
      Reads a property plist from standard input and writes it’s result to
48 48
      standard output. The property list is by default space optimized and
49 49
      escaped to be used in a C‐String. The options are processed in the order
50
-     s, c, f.
50
+     s, c, e.
51 51
 
52 52
      The following options are available:
53 53
 
... ...
@@ -67,7 +67,7 @@ DESCRIPTION
67 67
 
68 68
 	      zlib to create a zlib compressed blob.
69 69
 
70
-     −f       Choose an output format:
70
+     −e       Choose an output format:
71 71
 
72 72
 	      escaped for inclusion into a C‐String (default). Not useful in
73 73
 	      combination with compression.
... ...
@@ -94,7 +94,7 @@ AUTHOR
94 94
      http://www.mulle‐kybernetik.com/software/git/mulle‐plist‐utilities
95 95
 
96 96
 
97
-Darwin			       February 15, 2013			Darwin
97
+Darwin				 June 30, 2015				Darwin
98 98
 </pre>
99 99
 ---
100 100
 ## mulle-plist-fix
... ...
@@ -120,7 +120,7 @@ AUTHOR
120 120
 
121 121
      http://www.mulle‐kybernetik.com/software/git/mulle‐plist‐utilities
122 122
 
123
-Darwin			       February 15, 2013			Darwin
123
+Darwin				 June 30, 2015				Darwin
124 124
 </pre>
125 125
 ---
126 126
 ## mulle-plist-hack
... ...
@@ -182,5 +182,5 @@ AUTHOR
182 182
 
183 183
      http://www.mulle‐kybernetik.com/software/git/mulle‐plist‐utilities
184 184
 
185
-Darwin			       February 15, 2013			Darwin
185
+Darwin				 June 30, 2015				Darwin
186 186
 </pre>
187 187
new file mode 100755
... ...
@@ -0,0 +1,56 @@
1
+# !/bin/sh
2
+# ###############################################
3
+# (c) 2013 Mulle kybernetiK
4
+# Coded by Nat!
5
+#
6
+# Put this script in a Run Script phase of your
7
+# target.
8
+# Set your EOModels as a source for this script 
9
+# and a C-file as the output for it. The rest
10
+# should just work.
11
+#
12
+outfile="$SCRIPT_OUTPUT_FILE_0"
13
+
14
+models="$SCRIPT_INPUT_FILE_0"
15
+modelnames=`basename $SCRIPT_INPUT_FILE_0`
16
+memo=`[ "$models" -nt "$outfile" ]`
17
+
18
+i=1
19
+while [ $i -lt $SCRIPT_INPUT_FILE_COUNT ]
20
+do
21
+   filename="SCRIPT_INPUT_FILE_$i"
22
+   if [ "$filename" -nt "$outfile" ]
23
+   then
24
+     memo=0
25
+   fi
26
+
27
+   models="$models $filename"
28
+   modelnames="$modelnames `basename $filename`"
29
+   i=`expr $i + 1`
30
+done
31
+
32
+#
33
+# allows build with a distributions w/o having mulle-plist-from-files
34
+# installed (within reason :))
35
+#
36
+if [ memo ]
37
+then
38
+   exit 0
39
+fi
40
+
41
+modelname=`basename "$model"`
42
+
43
+MULLE_PLIST_HEADER="/* DONT EDIT!! This file is autogenerated from $modelnames by mulle-plist-from-files */
44
+char eomodelgroup_as_plist[] = \""
45
+
46
+
47
+MULLE_PLIST_FOOTER='";'
48
+
49
+export MULLE_PLIST_HEADER
50
+export MULLE_PLIST_FOOTER
51
+
52
+
53
+PATH=/usr/local/bin:$PATH
54
+
55
+mulle-plist-from-files "$models" | mulle-plist-compress > "$outfile"
56
+
0 57
similarity index 100%
1 58
rename from mulle-plist-hack/NSDictionary+PListOldSkool.h
2 59
rename to mulle-plist-compress/NSDictionary+PListOldSkool.h
3 60
similarity index 100%
4 61
rename from mulle-plist-hack/NSDictionary+PListOldSkool.m
5 62
rename to mulle-plist-compress/NSDictionary+PListOldSkool.m
6 63
similarity index 100%
7 64
rename from mulle-plist-hack/NSObject+PListOldSkool.h
8 65
rename to mulle-plist-compress/NSObject+PListOldSkool.h
9 66
similarity index 100%
10 67
rename from mulle-plist-hack/NSObject+PListOldSkool.m
11 68
rename to mulle-plist-compress/NSObject+PListOldSkool.m
... ...
@@ -82,7 +82,6 @@
82 82
    size_t          len;
83 83
    NSMutableData   *target;
84 84
    
85
-   // don't do this for larger strings
86 85
    data = [self dataUsingEncoding:NSUTF8StringEncoding];
87 86
    if( ! [data propertyListUTF8DataNeedsQuoting])
88 87
       return( data);
... ...
@@ -97,7 +96,7 @@
97 96
    sentinel = &q[ len];
98 97
    *s++     = '\"';
99 98
    
100
-   do
99
+   while( q < sentinel)
101 100
    {
102 101
       switch( *q)
103 102
       {
... ...
@@ -115,8 +114,8 @@
115 114
          case 0    : *s++ = '\\'; *s++ = '0'; break;
116 115
 #endif
117 116
       }
117
+      ++q;
118 118
    }
119
-   while( ++q < sentinel);
120 119
    
121 120
    *s++   = '\"';
122 121
    
123 122
similarity index 100%
124 123
rename from mulle-plist-hack/NSPropertyListSerialization+MullePlistReader.h
125 124
rename to mulle-plist-compress/NSPropertyListSerialization+MullePlistReader.h
126 125
similarity index 91%
127 126
rename from mulle-plist-compress/mulle-plist-hack/NSPropertyListSerialization+MullePlistReader.m
128 127
rename to mulle-plist-compress/NSPropertyListSerialization+MullePlistReader.m
... ...
@@ -14,9 +14,9 @@ static inline int   iswhite( int c)
14 14
 }
15 15
 
16 16
 
17
-static id  _parse_object( char **s, unsigned int *len);
17
+static id  _parse_object( char **s, NSUInteger *len);
18 18
 
19
-static int   skip_white( char **s, unsigned int *len)
19
+static int   skip_white( char **s, NSUInteger *len)
20 20
 {
21 21
     while( *len)
22 22
     {
... ...
@@ -48,7 +48,7 @@ static NSString  *slurp_identifier( char **s, unsigned int *len)
48 48
 }
49 49
 */
50 50
 
51
-static id   _parse_value( char **s, unsigned int *len)
51
+static id   _parse_value( char **s, NSUInteger *len)
52 52
 {
53 53
     int        c;
54 54
     char       *memo;
... ...
@@ -107,12 +107,11 @@ static id   _parse_value( char **s, unsigned int *len)
107 107
 }
108 108
 
109 109
 
110
-static int   _parse_key_value_into_dictionary( char **s, unsigned int *len, NSMutableDictionary *dictionary)
110
+static int   _parse_key_value_into_dictionary( char **s, NSUInteger *len, NSMutableDictionary *dictionary)
111 111
 {
112 112
     id   key;
113 113
     id   value;
114 114
     
115
-    
116 115
     key = _parse_value( s, len);
117 116
     if( ! key)
118 117
         return( -1);
... ...
@@ -151,7 +150,7 @@ static int   _parse_key_value_into_dictionary( char **s, unsigned int *len, NSMu
151 150
 }
152 151
 
153 152
 
154
-static id   _parse_array( char **s, unsigned int *len)
153
+static id   _parse_array( char **s, NSUInteger *len)
155 154
 {
156 155
     NSMutableArray   *array;
157 156
     id               parsed;
... ...
@@ -186,7 +185,7 @@ static id   _parse_array( char **s, unsigned int *len)
186 185
 }
187 186
 
188 187
 
189
-static id   _parse_dictionary( char **s, unsigned int *len)
188
+static id   _parse_dictionary( char **s, NSUInteger *len)
190 189
 {
191 190
     NSMutableDictionary   *dictionary;
192 191
     
... ...
@@ -218,7 +217,7 @@ static id   _parse_dictionary( char **s, unsigned int *len)
218 217
 }
219 218
 
220 219
 
221
-static id  _parse_object( char **s, unsigned int *len)
220
+static id  _parse_object( char **s, NSUInteger *len)
222 221
 {
223 222
     if( skip_white( s, len))
224 223
         return( nil);
225 224
similarity index 100%
226 225
rename from mulle-plist-hack/NSPropertyListSerialization+MullePlistWriter.h
227 226
rename to mulle-plist-compress/NSPropertyListSerialization+MullePlistWriter.h
228 227
similarity index 94%
229 228
rename from mulle-plist-hack/NSPropertyListSerialization+MullePlistWriter.m
230 229
rename to mulle-plist-compress/NSPropertyListSerialization+MullePlistWriter.m
... ...
@@ -18,7 +18,7 @@ NSString *MullePlistWriterException = @"MullePlistWriterException";
18 18
                           indent:(NSData *) indent
19 19
 {
20 20
    [NSException raise:MullePlistWriterException
21
-               format:@"Objects of class %@ can't be saved in a plist", [self class]];
21
+               format:@"Objects of class %@ can't be saved in a plist", isa];
22 22
 }
23 23
 
24 24
 @end
... ...
@@ -36,9 +36,9 @@ NSString *MullePlistWriterException = @"MullePlistWriterException";
36 36
 @end
37 37
 
38 38
 
39
-static inline char	hexit( unsigned char c)
39
+static inline char   hexit( unsigned char c)
40 40
 {
41
-   return( c > 10 ? 'a' - 10 + c : '0' + c);
41
+   return( c > 10 ? 'a' - 10 + c : '0' + c);  // znek wants lowercase
42 42
 }
43 43
 
44 44
 
... ...
@@ -51,27 +51,30 @@ static inline char	hexit( unsigned char c)
51 51
    char            *hex;
52 52
    unsigned char   *s;
53 53
    unsigned char   *sentinel;
54
+   unsigned char   *spacer;
54 55
    NSUInteger      len;
55
-   NSUInteger      i;
56 56
    
57 57
    len    = [self length];
58 58
    buffer = [NSMutableData dataWithLength:len * 3 + 3];
59
-   
59
+
60 60
    hex    = (char *) [buffer bytes];
61 61
    *hex++ = '<';
62
-
62
+   
63 63
    s        = (unsigned char *) [self bytes];
64 64
    sentinel = &s[ len];
65
-   
66
-   i = 0;
65
+   spacer   = &s[ 4];
66
+
67 67
    while( s < sentinel)
68 68
    {
69 69
       *hex++ = hexit( *s >> 4);
70 70
       *hex++ = hexit( *s & 0xF);
71 71
       s++;
72 72
       
73
-      if( ! (++i & 0x3) && s != sentinel)
73
+      if( s == spacer && s != sentinel)
74
+      {
74 75
          *hex++ = ' ';
76
+         spacer = &s[ 4];
77
+      }
75 78
    }
76 79
    *hex++ = '>';
77 80
    
... ...
@@ -176,11 +179,11 @@ static inline char	hexit( unsigned char c)
176 179
                           indent:(NSData *) indent
177 180
 {
178 181
    NSMutableData   *indent2;
179
-   unsigned int    i, n;
182
+   NSUInteger       i, n;
180 183
 
181 184
    [data appendBytes:"("
182 185
               length:1];
183
-   n = (unsigned int) [self count];
186
+   n = [self count];
184 187
    if( n)
185 188
    {
186 189
       [data appendBytes:"\n"
... ...
@@ -231,12 +234,12 @@ static inline char	hexit( unsigned char c)
231 234
    id              key;
232 235
    id              value;
233 236
    NSMutableData   *indent2;
234
-   unsigned int    i, n;
237
+   NSUInteger      i, n;
235 238
 
236 239
    [data appendBytes:"{"
237 240
               length:1];
238 241
    keys = [self allKeys];  // sort'em ?
239
-   n    = (unsigned int) [keys count];
242
+   n    = [keys count];
240 243
 
241 244
    if( n)
242 245
    {
... ...
@@ -244,7 +247,7 @@ static inline char	hexit( unsigned char c)
244 247
                  length:1];
245 248
 
246 249
 //      keys    = [keys sortedArrayUsingSelector:@selector( compare:)];
247
-      indent2 = [[indent mutableCopy] autorelease];
250
+      indent2 = [indent mutableCopy];
248 251
       [indent2 appendBytes:"   "
249 252
                     length:3];
250 253
 
... ...
@@ -276,7 +279,6 @@ static inline char	hexit( unsigned char c)
276 279
 
277 280
 @implementation NSPropertyListSerialization ( MullePlistWriter)
278 281
 
279
-
280 282
 + (NSData *) plistDataFromObject:(id) obj
281 283
                 errorDescription:(NSString **) error
282 284
 {
... ...
@@ -180,10 +180,10 @@ static struct
180 180
 
181 181
 static void  usage( char *name)
182 182
 {
183
-   fprintf( stderr, "%s [-s <style>][-c <compression>[-f <format>]\n"
183
+   fprintf( stderr, "%s [-s <style>][-c <compression>][-e <encoding>]\n"
184 184
            "\t-s <condensed|pretty|xml|binary>\n"
185 185
            "\t-c <none|zlib>\n"
186
-           "\t-f <escaped|plain|hex>\n"
186
+           "\t-e <escaped|plain|hex>\n"
187 187
            , name);
188 188
    fprintf( stderr, "\tv%s\n", version);
189 189
 }
... ...
@@ -224,6 +224,8 @@ int main(int argc, const char * argv[])
224 224
    NSString              *footer;
225 225
    NSString              *header;
226 226
    NSString              *option;
227
+   NSString              *inputFile;
228
+   NSString              *outputFile;
227 229
    NSString              *processName;
228 230
    NSString              *s;
229 231
    id                    plist;
... ...
@@ -233,8 +235,9 @@ int main(int argc, const char * argv[])
233 235
    int                   style;
234 236
    int                   value;
235 237
    unichar               c;
238
+   FILE                  *fout;
236 239
    
237
-   pool   = [NSAutoreleasePool new];
240
+   pool = [NSAutoreleasePool new];
238 241
    
239 242
    processInfo = [NSProcessInfo processInfo];
240 243
    environment = [processInfo environment];
... ...
@@ -246,11 +249,24 @@ int main(int argc, const char * argv[])
246 249
    style       = 0;
247 250
    compression = 0;
248 251
    output      = 0;
252
+   inputFile   = nil;
253
+   outputFile  = nil;
249 254
    
250 255
    while( option = [rover nextObject])
251 256
    {
252
-      if( [option length] < 2 || ! [option hasPrefix:@"-"])
257
+      if( ! [option hasPrefix:@"-"])
258
+      {
259
+         if( ! inputFile)
260
+         {
261
+            inputFile = option;
262
+            continue;
263
+         }
253 264
          goto usage;
265
+      }
266
+      
267
+      if( [option length] < 2)
268
+         goto usage;
269
+      
254 270
       c = [option characterAtIndex:1];
255 271
       s = [rover nextObject];
256 272
       if( ! [s length])
... ...
@@ -261,13 +277,35 @@ int main(int argc, const char * argv[])
261 277
       {
262 278
       case 's' : style       = value; break;
263 279
       case 'c' : compression = value; break;
264
-      case 'f' : output      = value; break;
280
+      case 'e' : output      = value; break;
281
+      case 'o' : outputFile  = s; break;
265 282
       default  : fprintf( stderr, "Unknown argument %s\n", [option cString]);
266 283
                  goto usage;
267 284
       }
268 285
    }
269 286
    
270
-   handle = [NSFileHandle fileHandleWithStandardInput];
287
+   if( inputFile)
288
+   {
289
+      handle = [NSFileHandle fileHandleForReadingAtPath:inputFile];
290
+      if( ! handle)
291
+      {
292
+         perror( "open:");
293
+         goto usage;
294
+      }
295
+   }
296
+   else
297
+      handle = [NSFileHandle fileHandleWithStandardInput];
298
+
299
+   fout = stdout;
300
+   if( outputFile)
301
+   {
302
+      fout = fopen( [outputFile cString], "w");
303
+      if( ! fout)
304
+      {
305
+         perror( "open:");
306
+         goto usage;
307
+      }
308
+   }
271 309
    data   = [handle readDataToEndOfFile];
272 310
    
273 311
    error  = nil;
... ...
@@ -283,15 +321,15 @@ int main(int argc, const char * argv[])
283 321
    
284 322
    header = [environment objectForKey:@"MULLE_PLIST_HEADER"];
285 323
    if( header)
286
-      fprintf( stdout, "%s", [header cString]);
324
+      fprintf( fout, "%s", [header cString]);
287 325
    
288
-   rval = write_plist( plist, style, compression, output, stdout);
326
+   rval = write_plist( plist, style, compression, output, fout);
289 327
    if( rval)
290 328
       return( rval);
291 329
    
292 330
    footer = [environment objectForKey:@"MULLE_PLIST_FOOTER"];
293 331
    if( footer)
294
-      fprintf( stdout, "%s", [footer cString]);
332
+      fprintf( fout, "%s", [footer cString]);
295 333
    return( 0);
296 334
    
297 335
 usage:
... ...
@@ -16,14 +16,14 @@
16 16
 .Nm
17 17
 .Op Fl s Ar style       
18 18
 .Op Fl c Ar compression
19
-.Op Fl f Ar format
19
+.Op Fl e Ar format
20 20
 .Sh DESCRIPTION          \" Section Header - required - don't modify
21 21
 Reads a 
22 22
 .Em property plist 
23 23
 from standard input and writes it's result to standard output. The 
24 24
 .Em property list
25 25
 is by default space optimized and escaped to be used in a C-String. The options are 
26
-processed in the order s, c, f. 
26
+processed in the order s, c, e. 
27 27
 .Pp                      \" Inserts a space
28 28
 The following options are available:
29 29
 .Bl -tag -width -indent  \" Differs from above in tag removed 
... ...
@@ -50,7 +50,7 @@ to not compress (default), use
50 50
 .Sy zlib
51 51
 to create a zlib compressed blob.
52 52
 .Pp
53
-.It Fl f                 \"-f flag as a list item
53
+.It Fl e                 \"-e flag as a list item
54 54
 Choose an output format:
55 55
 .Pp
56 56
 .Sy escaped
57 57
deleted file mode 100644
... ...
@@ -1,319 +0,0 @@
1
-#import "NSPropertyListSerialization+MullePlistWriter.h"
2
-
3
-
4
-NSString *MullePlistWriterException = @"MullePlistWriterException";
5
-
6
-
7
-@interface NSObject ( MullePlistWriter)
8
-
9
-- (void) mullePlistWriteIntoData:(NSMutableData *) data
10
-                          indent:(NSData *) indent;
11
-
12
-@end
13
-
14
-
15
-@implementation NSObject ( MullePlistWriter)
16
-
17
-- (void) mullePlistWriteIntoData:(NSMutableData *) data
18
-                          indent:(NSData *) indent
19
-{
20
-   [NSException raise:MullePlistWriterException
21
-               format:@"Objects of class %@ can't be saved in a plist", isa];
22
-}
23
-
24
-@end
25
-
26
-
27
-/*
28
- *
29
- *
30
- */
31
-
32
-@interface NSData ( MullePlistWriter)
33
-
34
-- (void) mullePlistWriteIntoData:(NSMutableData *) data
35
-                          indent:(NSData *) indent;
36
-@end
37
-
38
-
39
-static inline char	hexit( unsigned char c)
40
-{
41
-   return( c > 10 ? 'A' - 10 + c : '0' + c);
42
-}
43
-
44
-
45
-@implementation NSData ( MullePlistWriter)
46
-
47
-- (void) mullePlistWriteIntoData:(NSMutableData *) data
48
-                          indent:(NSData *) indent
49
-{
50
-   NSMutableData   *buffer;
51
-   char            *hex;
52
-   unsigned char   *s;
53
-   NSUInteger      len;
54
-   NSUInteger      i;
55
-   
56
-   len    = [self length];
57
-   buffer = [NSMutableData dataWithLength:len * 3 + 3];
58
-   
59
-   hex = (char *) [buffer bytes];
60
-   s   = (unsigned char *) [self bytes];
61
-
62
-   *hex++ = '<';
63
-   i = 0;
64
-   while( len)
65
-   {
66
-      *hex++ = hexit( *s >> 4);
67
-      *hex++ = hexit( *s & 0xF);
68
-      if( ! (++i & 0x7))
69
-         *hex++ = ' ';
70
-      s++;
71
-   }
72
-   *hex++ = '>';
73
-   
74
-   len = (char *) hex - (char *) [buffer bytes];
75
-   [buffer setLength:len];
76
-   [data appendBytes:buffer
77
-              length:len];
78
-}
79
-
80
-@end
81
-
82
-/*
83
- *
84
- *
85
- */
86
-
87
-@interface NSNumber ( MullePlistWriter)
88
-
89
-- (void) mullePlistWriteIntoData:(NSMutableData *) data
90
-                          indent:(NSData *) indent;
91
-@end
92
-
93
-
94
-@implementation NSNumber ( MullePlistWriter)
95
-
96
-- (void) mullePlistWriteIntoData:(NSMutableData *) data
97
-                          indent:(NSData *) indent
98
-{
99
-   char  *s;
100
-
101
-   s = (char *) [[self descriptionWithLocale:nil] UTF8String];
102
-   [data appendBytes:s
103
-              length:strlen( s)];
104
-}
105
-
106
-@end
107
-
108
-/*
109
- *
110
- *
111
- */
112
-
113
-
114
-@interface NSString ( MullePlistWriter)
115
-
116
-- (void) mullePlistWriteIntoData:(NSMutableData *) data
117
-                          indent:(NSData *) indent;
118
-
119
-@end
120
-
121
-
122
-@implementation NSString ( MullePlistWriter)
123
-
124
-- (void) mullePlistWriteIntoData:(NSMutableData *) data
125
-                          indent:(NSData *) indent
126
-{
127
-   char      *s;
128
-   BOOL      quoted;
129
-   NSArray   *components;
130
-   NSString  *quotedSelf;
131
-   
132
-   quoted  = [self rangeOfCharacterFromSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length;
133
-   quoted |= [self rangeOfCharacterFromSet:[NSCharacterSet punctuationCharacterSet]].length;
134
-   quoted |= [self length] == 0;
135
-      
136
-   components = [self componentsSeparatedByString:@"\""];
137
-   quotedSelf = [components componentsJoinedByString:@"\\\""];
138
-   quoted |= [components count] > 1;
139
-      
140
-   if( quoted)
141
-      [data appendBytes:"\""
142
-                 length:1];
143
-
144
-
145
-   s = (char *) [quotedSelf UTF8String];
146
-   [data appendBytes:s
147
-              length:strlen( s)];
148
-   if( quoted)
149
-      [data appendBytes:"\""
150
-                 length:1];
151
-}
152
-
153
-@end
154
-
155
-/*
156
- *
157
- *
158
- */
159
-
160
-
161
-@interface NSArray ( MullePlistWriter)
162
-
163
-- (void) mullePlistWriteIntoData:(NSMutableData *) data
164
-                          indent:(NSData *) indent;
165
-
166
-@end
167
-
168
-
169
-@implementation NSArray ( MullePlistWriter)
170
-
171
-- (void) mullePlistWriteIntoData:(NSMutableData *) data
172
-                          indent:(NSData *) indent
173
-{
174
-   NSMutableData   *indent2;
175
-   unsigned int    i, n;
176
-
177
-   [data appendBytes:"("
178
-              length:1];
179
-   n = [self count];
180
-   if( n)
181
-   {
182
-      [data appendBytes:"\n"
183
-                 length:1];
184
-      indent2 = [indent mutableCopy];
185
-      [indent2 appendBytes:"   "
186
-                    length:3];
187
-      for( i = 0; i < n; i++)
188
-      {
189
-         if( i > 0)
190
-            [data appendBytes:",\n"
191
-                       length:2];
192
-         [data appendData:indent2];
193
-         [[self objectAtIndex:i] mullePlistWriteIntoData:data
194
-                                                  indent:indent2];
195
-      }
196
-      [data appendBytes:"\n"
197
-                 length:1];
198
-      [data appendData:indent];
199
-   }
200
-   [data appendBytes:")"
201
-              length:1];
202
-}
203
-
204
-
205
-@end
206
-
207
-/*
208
- *
209
- *
210
- */
211
-
212
-
213
-@interface NSDictionary ( MullePlistWriter)
214
-
215
-- (void) mullePlistWriteIntoData:(NSMutableData *) data
216
-                          indent:(NSData *) indent;
217
-
218
-@end
219
-
220
-
221
-@implementation NSDictionary ( MullePlistWriter)
222
-
223
-- (void) mullePlistWriteIntoData:(NSMutableData *) data
224
-                          indent:(NSData *) indent
225
-{
226
-   NSArray         *keys;
227
-   id              key;
228
-   id              value;
229
-   NSMutableData   *indent2;
230
-   unsigned int    i, n;
231
-
232
-   [data appendBytes:"{"
233
-              length:1];
234
-   keys = [self allKeys];  // sort'em ?
235
-   n    = [keys count];
236
-
237
-   if( n)
238
-   {
239
-      [data appendBytes:"\n"
240
-                 length:1];
241
-
242
-//      keys    = [keys sortedArrayUsingSelector:@selector( compare:)];
243
-      indent2 = [indent mutableCopy];
244
-      [indent2 appendBytes:"   "
245
-                    length:3];
246
-
247
-      for( i = 0; i < n; i++)
248
-      {
249
-         key   = [keys objectAtIndex:i];
250
-         value = [self objectForKey:key];
251
-
252
-         [data appendData:indent2];
253
-         [key mullePlistWriteIntoData:data
254
-                               indent:nil];
255
-         [data appendBytes:" = "
256
-                    length:3];
257
-         [value mullePlistWriteIntoData:data
258
-                                 indent:indent2];
259
-         [data appendBytes:";\n"
260
-                    length:2];
261
-
262
-      }
263
-      [data appendData:indent];
264
-   }
265
-   [data appendBytes:"}"
266
-              length:1];
267
-}
268
-
269
-@end
270
-
271
-
272
-
273
-@implementation NSPropertyListSerialization ( MullePlistWriter)
274
-
275
-
276
-+ (NSData *) plistDataFromObject:(id) obj
277
-                errorDescription:(NSString **) error
278
-{
279
-   NSMutableData   *data;
280
-   
281
-   if( ! obj)
282
-   {
283
-      *error = @"plist is nil";
284
-      return( nil);
285
-   }
286
-   
287
-   data = [NSMutableData dataWithCapacity:0x1000];
288
-   [obj mullePlistWriteIntoData:data
289
-                         indent:[NSData data]];
290
-   if( ! [data length])
291
-   {
292
-      *error = @"Some objects were not plist compatible";
293
-      return( nil);
294
-   }
295
-
296
-#if 0   
297
-   [data appendBytes:""  // trailin zero
298
-              length:1];
299
-#endif   
300
-   return( data);
301
-}
302
-
303
-
304
-+ (id) mulleDataFromPropertyList:(id) plist
305
-                          format:(NSPropertyListFormat) format
306
-                errorDescription:(NSString **) error
307
-{
308
-   if( format != NSPropertyListOpenStepFormat)
309
-      return( [self dataFromPropertyList:plist
310
-                                  format:format
311
-                         errorDescription:error]);
312
-   
313
-   return( [self plistDataFromObject:plist
314
-                    errorDescription:error]);
315
-}
316
-
317
-
318
-@end
319
-
... ...
@@ -10,7 +10,7 @@
10 10
 #include <ctype.h>
11 11
 
12 12
 
13
-/* this is really very, very old cold, that has been resurrected */
13
+/* this is really very, very old code, that has been resurrected */
14 14
 
15 15
 #define TRY_VALIANTLY_TO_CONVERT  0
16 16
 
... ...
@@ -61,12 +61,12 @@ static id   get_value_from_file_or_dir( NSFileManager *fileManager, NSString *na
61 61
       if( ! [fileManager fileExistsAtPath:path
62 62
                               isDirectory:&isDir])
63 63
       {
64
-         fprintf( stderr, "File %s not found\n", [name cString]);
64
+         NSLog( @"File %@ not found", path);
65 65
          return( nil);
66 66
       }
67 67
       if( ! isDir)
68 68
       {
69
-         fprintf( stderr, "File %s open failed %s\n", [name cString], [[error description] cString]);
69
+         NSLog( @"File %@ open failed %@", path, error);
70 70
          return( nil);
71 71
       }
72 72
       // do the recursive
... ...
@@ -7,7 +7,7 @@ MANDST=/usr/local/share/man/man8
7 7
 
8 8
 all:	mulle-plist-hack
9 9
 
10
-mulle-plist-hack:	main.o NSDictionary+PListOldSkool.o  NSObject+PListOldSkool.o NSPropertyListSerialization+MullePlistWriter.o NSPropertyListSerialization+MullePlistReader.o
10
+mulle-plist-hack:	main.o
11 11
 	gcc -o mulle-plist-hack $+ -framework Foundation
12 12
 
13 13
 install:	all
14 14
deleted file mode 100644
... ...
@@ -1,279 +0,0 @@
1
-#import "NSPropertyListSerialization+MullePlistReader.h"
2
-#include <ctype.h>
3
-
4
-
5
-#define TRY_VALIANTLY_TO_CONVERT  0
6
-
7
-
8
-@implementation NSPropertyListSerialization ( MullePlistReader)
9
-
10
-
11
-static inline int   iswhite( int c)
12
-{
13
-   return( c == ' ' || c == '\n' || c == '\r' || c == '\t');
14
-}
15
-
16
-
17
-static id  _parse_object( char **s, unsigned int *len);
18
-
19
-static int   skip_white( char **s, unsigned int *len)
20
-{
21
-    while( *len)
22
-    {
23
-        if( ! iswhite( **s))
24
-            return( 0);
25
-        ++*s;
26
-        --*len;
27
-    }
28
-    return( -1);
29
-}
30
-
31
-/*
32
-static NSString  *slurp_identifier( char **s, unsigned int *len)
33
-{
34
-    int    c;
35
-    char   *memo;
36
-
37
-    memo = *s;
38
-    while( *len)
39
-    {
40
-        c = **s;
41
-        if( ! (isalnum( c) || c == '_'))
42
-           break;
43
-        ++*s;
44
-        --*len;
45
-    }
46
-    return( [NSString stringWithCString:memo
47
-                                 length:*s - memo]);
48
-}
49
-*/
50
-
51
-static id   _parse_value( char **s, unsigned int *len)
52
-{
53
-    int        c;
54
-    char       *memo;
55
-    int        quoted;
56
-    NSString   *string;
57
-    
58
-    quoted = **s == '"';
59
-    if( quoted)
60
-    {
61
-        ++*s;
62
-        --*len;
63
-    }
64
-    
65
-    memo = *s;
66
-    while( *len)
67
-    {
68
-        c = **s;
69
-        if( quoted)
70
-        {
71
-            if( c == '"')
72
-                break;
73
-        }
74
-        else
75
-        {
76
-            if( iswhite( c) || c == ',' || c == ';')
77
-                break;
78
-        }
79
-        ++*s;
80
-        --*len;
81
-    }
82
-    
83
-
84
-    string = [NSString stringWithCString:memo
85
-                                  length:*s - memo];
86
-    if( quoted)
87
-    {
88
-        ++*s;
89
-        --*len;
90
-    }
91
-
92
-// brute force, try NSCalendarDate first    
93
-// then NSDecimalNumber Number 
94
-// finally stay as NSString
95
-#if TRY_VALIANTLY_TO_CONVERT
96
-    if( isdigit( *memo))
97
-    {
98
-        if( value = [NSDecimalNumber decimalNumberWithString:string])
99
-            return( value);
100
-    }
101
-    
102
-    if( value = [NSCalendarDate dateWithString:string])
103
-        return( value);
104
-#endif
105
-        
106
-    return( string);
107
-}
108
-
109
-
110
-static int   _parse_key_value_into_dictionary( char **s, unsigned int *len, NSMutableDictionary *dictionary)
111
-{
112
-    id   key;
113
-    id   value;
114
-    
115
-    
116
-    key = _parse_value( s, len);
117
-    if( ! key)
118
-        return( -1);
119
-    
120
-    if( skip_white( s, len))
121
-    {
122
-       NSLog( @"Malformed key value pair, only key %@ present", key);
123
-       return( -2);
124
-    }
125
-
126
-    if( **s != '=')
127
-    {
128
-       NSLog( @"Malformed key value pair, = missing after key %@", key);
129
-       return( -3);
130
-    }
131
-    
132
-    ++*s;
133
-    --*len;
134
-    
135
-    if( skip_white( s, len))
136
-    {
137
-       NSLog( @"Malformed key value pair, missing value after key %@", key);
138
-       return( -4);
139
-    }
140
-   
141
-    value = _parse_object( s, len);
142
-    if( ! value)
143
-    {
144
-       NSLog( @"Malformed key value pair, missing value after key %@", key);
145
-       return( -4);
146
-    }
147
-    [dictionary setObject:value
148
-                   forKey:key];
149
-                   
150
-    return( 0);
151
-}
152
-
153
-
154
-static id   _parse_array( char **s, unsigned int *len)
155
-{
156
-    NSMutableArray   *array;
157
-    id               parsed;
158
-    
159
-    array = [NSMutableArray array];
160
-    while( *len)
161
-    {
162
-        if( skip_white( s, len))
163
-            return( nil);
164
-    
165
-        if( **s == ',')
166
-        {
167
-           ++*s;
168
-           --*len;
169
-           continue;
170
-        }
171
-
172
-        if( **s == ')')
173
-        {
174
-           ++*s;
175
-           --*len;
176
-           return( array);
177
-        }
178
-
179
-        parsed = _parse_object( s, len);
180
-        if( ! parsed)
181
-            break;
182
-        [array addObject:parsed];
183
-    }
184
-    NSLog( @"Array truncated");
185
-    return( nil);
186
-}
187
-
188
-
189
-static id   _parse_dictionary( char **s, unsigned int *len)
190
-{
191
-    NSMutableDictionary   *dictionary;
192
-    
193
-    dictionary = [NSMutableDictionary dictionary];
194
-    while( *len)
195
-    {
196
-        if( skip_white( s, len))
197
-            break;
198
-                
199
-        if( **s == ';')
200
-        {
201
-           ++*s;
202
-           --*len;
203
-           continue;
204
-        }
205
-        
206
-        if( **s == '}')
207
-        {
208
-           ++*s;
209
-           --*len;
210
-           return( dictionary);
211
-        }
212
-        
213
-        if( _parse_key_value_into_dictionary( s, len, dictionary) < 0)
214
-            return( nil);
215
-    }
216
-    NSLog( @"Dictionary truncated");
217
-    return( nil);
218
-}
219
-
220
-
221
-static id  _parse_object( char **s, unsigned int *len)
222
-{
223
-    if( skip_white( s, len))
224
-        return( nil);
225
-        
226
-    switch( **s)
227
-    {
228
-    case '{' :
229
-        ++*s;
230
-        --*len;
231
-        return( _parse_dictionary( s, len));
232
-
233
-    case '(' :
234
-        ++*s;
235
-        --*len;
236
-        return( _parse_array( s, len));
237
-    }
238
-    return( _parse_value( s, len));
239
-}
240
-
241
-
242
-static id  parse_old_plist( NSData *data)
243
-{
244
-   char         *s;
245
-   unsigned int len;
246
-   
247
-   s   = (char *) [data bytes];
248
-   len = (unsigned int) [data length];
249
-   return( _parse_object( &s, &len));
250
-}
251
-
252
-
253
-+ (id) mullePropertyListFromData:(NSData *) data
254
-                mutabilityOption:(NSPropertyListMutabilityOptions) option 
255
-                          format:(NSPropertyListFormat *) format
256
-                errorDescription:(NSString **) error
257
-{
258
-   id   list;
259
-   
260
-   list = [NSPropertyListSerialization propertyListFromData:data
261
-                                           mutabilityOption:option 
262
-                                                     format:format 
263
-                                           errorDescription:error];
264
-   if( ! list)
265
-   {
266
-      // can only do immutable containers
267
-      if( option == NSPropertyListImmutable)
268
-      {
269
-         list = parse_old_plist( data);
270
-         if( list)
271
-            *format = NSPropertyListOpenStepFormat;
272
-      }
273
-      // fall through, if this is nil then Foundation
274
-      // will provide the error 
275
-   }
276
-   return( list);
277
-}
278
-
279
-@end
... ...
@@ -65,11 +65,10 @@
65 65
 static char  rcs_id__[] = "$Id: main.m,v 1.5 2005/06/16 13:31:04 nat Exp $";
66 66
 
67 67
 #import <Foundation/Foundation.h>
68
-#import "NSDictionary+PListOldSkool.h"
69
-#import "NSPropertyListSerialization+MullePlistReader.h"
70
-#import "NSPropertyListSerialization+MullePlistWriter.h"
68
+
71 69
 
72 70
 //#define DEBUG   1
71
+/* this is really very, very old code, that has been resurrected */
73 72
 
74 73
 
75 74
 typedef enum
... ...
@@ -85,8 +84,7 @@ static NSMutableArray         *ops;
85 84
 static int                    concise;
86 85
 static int                    changes;
87 86
 static int		      silent;
88
-static int		      force;
89
-static int		      oldskool;
87
+static int		      miserly;
90 88
 static ActionType             action;
91 89
 static NSArray                *targetPath;
92 90
 static NSInteger              targetPathLen;
... ...
@@ -116,9 +114,8 @@ static void  usage( const char *s)
116 114
             "\t-a : add entry with path\n"
117 115
             "\t-c : concise, if only one key given omit the key= output\n"
118 116
             "\t-d : delete entry\n"
119
-            "\t-f : force rewrite even if no changes\n"
117
+            "\t-m : suppress output of property list, if no changes\n"
120 118
             "\t-h : advertisement\n"
121
-            "\t-o : write out old skool plist format\n"
122 119
             "\t-p : print entry\n"
123 120
             "\t-s : fail w/o complaining (in some cases)\n"
124 121
             "\n"
... ...
@@ -147,8 +144,7 @@ static void   parse( int argc, char **argv)
147 144
          {
148 145
          case 's' : silent = 1; break;
149 146
          case 'c' : concise = 1; break;
150
-         case 'o' : oldskool = 1; break;
151
-         case 'f' : force = 1; break;
147
+         case 'm' : miserly = 1; break;
152 148
          case 'a' : action = Add; break;
153 149
          case 'p' : action = Print; break;
154 150
          case 'd' : action = Delete; break;
... ...
@@ -372,7 +368,9 @@ static BOOL  hack_all( NSMutableDictionary *dict,
372 368
             flag = YES;
373 369
    }
374 370
    else
375
-      if( value = [dict objectForKey:key])
371
+   {
372
+      value = [dict objectForKey:key];
373
+      if( value)
376 374
       {
377 375
          BOOL  memo;
378 376
 
... ...
@@ -383,6 +381,7 @@ static BOOL  hack_all( NSMutableDictionary *dict,
383 381
             if( performAction( dict, key, value, newValue))
384 382
                flag = YES;
385 383
       }
384
+   }
386 385
    
387 386
 //
388 387
 // or else just perform the Action
... ...
@@ -399,10 +398,10 @@ static id   plistOrString( NSString *s)
399 398
    
400 399
    // new: allow plist to be set
401 400
    data  = [s dataUsingEncoding:NSUTF8StringEncoding];
402
-   plist = [NSPropertyListSerialization mullePropertyListFromData:data
403
-                                                 mutabilityOption:NSPropertyListImmutable
404
-                                                           format:&plistFormat
405
-                                                 errorDescription:&error];
401
+   plist = [NSPropertyListSerialization propertyListFromData:data
402
+                                            mutabilityOption:NSPropertyListImmutable
403
+                                                      format:&plistFormat
404
+                                            errorDescription:&error];
406 405
   if( ! plist)
407 406
   {
408 407
      fprintf( stderr, "plist parse failed for\n%s\n***Error: %s.\nArgument will be used as plain string\n",
... ...
@@ -428,12 +427,11 @@ static void  doAction( NSData *data)
428 427
    NSString               *valueString;
429 428
    NSUInteger             n;
430 429
    
431
-   
432 430
    changes = 0;
433
-   dict = [NSPropertyListSerialization mullePropertyListFromData:data
434
-                                                mutabilityOption:NSPropertyListImmutable
435
-                                                          format:&plistFormat
436
-                                                errorDescription:&error];
431
+   dict = [NSPropertyListSerialization propertyListFromData:data
432
+                                           mutabilityOption:NSPropertyListImmutable
433
+                                                     format:&plistFormat
434
+                                           errorDescription:&error];
437 435
    if( ! [dict isKindOfClass:[NSDictionary class]])
438 436
       bail( [NSString stringWithFormat:@"Not a plist\n"]);
439 437
    
... ...
@@ -465,31 +463,13 @@ static void  doAction( NSData *data)
465 463
       hack_all( dict, key, newValue, [NSMutableArray arrayWithObject:@"/"]);
466 464
    }
467 465
 
468
-   if( changes || force)
466
+   if( changes || miserly)
469 467
    {
470 468
 #if DEBUG > 1
471 469
       NSLog( @"writing changed dictionary %@ back to %@", dict, filename);
472 470
 #endif
473
-      if( oldskool)
474
-      {
475
-         if( NO == [dict writeOldSkoolFormatToFileHandle:[NSFileHandle fileHandleWithStandardOutput]])
476
-         {
477
-            NSLog( @"Update of file failed (mysteriously)");
478
-            return;
479
-         }
480
-      }
481
-      else
482
-      {
483
-         data = [NSPropertyListSerialization mulleDataFromPropertyList:dict
484
-                                                                format:plistFormat
485
-                                                      errorDescription:&error];
486
-         if( ! data)
487
-         {
488
-            NSLog( @"Serialization of %@ failed: %@", [dict class], error);
489
-         }
490
-         
491
-         [[NSFileHandle fileHandleWithStandardOutput] writeData:data];
492
-      }
471
+      data = [[dict description] dataUsingEncoding:NSUTF8StringEncoding];
472
+      [[NSFileHandle fileHandleWithStandardOutput] writeData:data];
493 473
    }
494 474
    changes = 0;
495 475
 }
... ...
@@ -519,5 +499,6 @@ int main (int argc, char *argv[])
519 499
    doAction( data);
520 500
 
521 501
    [pool release];
502
+   
522 503
    return( changes);      // 0 == OK, else FAILURE (SIC!!)
523 504
 }
... ...
@@ -33,15 +33,15 @@
33 33
 		4160067E16C6679800347385 /* NSData+ZLib.m in Sources */ = {isa = PBXBuildFile; fileRef = 4160067B16C6679800347385 /* NSData+ZLib.m */; };
34 34
 		4160067F16C6679800347385 /* NSObject+UnformattedDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 4160067D16C6679800347385 /* NSObject+UnformattedDescription.m */; };
35 35
 		4160068016C66B2F00347385 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 41E9D74A16C57766001F6DD9 /* libz.dylib */; };
36
+		41BB204916CE641F001FF614 /* NSDictionary+PListOldSkool.m in Sources */ = {isa = PBXBuildFile; fileRef = 41BB204516CE641F001FF614 /* NSDictionary+PListOldSkool.m */; };
37
+		41BB204A16CE641F001FF614 /* NSObject+PListOldSkool.m in Sources */ = {isa = PBXBuildFile; fileRef = 41BB204616CE641F001FF614 /* NSObject+PListOldSkool.m */; };
38
+		41BB204B16CE641F001FF614 /* NSPropertyListSerialization+MullePlistReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 41BB204716CE641F001FF614 /* NSPropertyListSerialization+MullePlistReader.m */; };
39
+		41BB204C16CE641F001FF614 /* NSPropertyListSerialization+MullePlistWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 41BB204816CE641F001FF614 /* NSPropertyListSerialization+MullePlistWriter.m */; };
36 40
 		41C74E6516C99569005FA265 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4118321116C4115F00D3542B /* Foundation.framework */; };
37 41
 		41C74E6816C99569005FA265 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 41C74E6716C99569005FA265 /* main.m */; };
38 42
 		41C74E6C16C99569005FA265 /* mulle-plist-fix.8 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 41C74E6B16C99569005FA265 /* mulle-plist-fix.8 */; };
39 43
 		41C74E7516C99A2B005FA265 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4118321116C4115F00D3542B /* Foundation.framework */; };
40 44
 		41C74E7C16C99A2B005FA265 /* mulle-plist-hack.8 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 41C74E7B16C99A2B005FA265 /* mulle-plist-hack.8 */; };
41
-		41C74E8D16C99A48005FA265 /* NSDictionary+PListOldSkool.m in Sources */ = {isa = PBXBuildFile; fileRef = 41C74E8316C99A48005FA265 /* NSDictionary+PListOldSkool.m */; };
42
-		41C74E8E16C99A48005FA265 /* NSObject+PListOldSkool.m in Sources */ = {isa = PBXBuildFile; fileRef = 41C74E8516C99A48005FA265 /* NSObject+PListOldSkool.m */; };
43
-		41C74E8F16C99A48005FA265 /* NSPropertyListSerialization+MullePlistReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 41C74E8716C99A48005FA265 /* NSPropertyListSerialization+MullePlistReader.m */; };
44
-		41C74E9016C99A48005FA265 /* NSPropertyListSerialization+MullePlistWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 41C74E8916C99A48005FA265 /* NSPropertyListSerialization+MullePlistWriter.m */; };
45 45
 		41C74E9316C99A60005FA265 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 41C74E9216C99A60005FA265 /* main.m */; };
46 46
 /* End PBXBuildFile section */
47 47
 
... ...
@@ -133,19 +133,19 @@
133 133
 		4160067D16C6679800347385 /* NSObject+UnformattedDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+UnformattedDescription.m"; sourceTree = "<group>"; };
134 134
 		4160068116C67F9800347385 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = SOURCE_ROOT; };
135 135
 		4160068216C67F9800347385 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; path = README.md; sourceTree = SOURCE_ROOT; };
136
+		41BB204116CE641F001FF614 /* NSDictionary+PListOldSkool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+PListOldSkool.h"; sourceTree = "<group>"; };
137
+		41BB204216CE641F001FF614 /* NSObject+PListOldSkool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+PListOldSkool.h"; sourceTree = "<group>"; };
138
+		41BB204316CE641F001FF614 /* NSPropertyListSerialization+MullePlistReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSPropertyListSerialization+MullePlistReader.h"; sourceTree = "<group>"; };
139
+		41BB204416CE641F001FF614 /* NSPropertyListSerialization+MullePlistWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSPropertyListSerialization+MullePlistWriter.h"; sourceTree = "<group>"; };
140
+		41BB204516CE641F001FF614 /* NSDictionary+PListOldSkool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+PListOldSkool.m"; sourceTree = "<group>"; };
141
+		41BB204616CE641F001FF614 /* NSObject+PListOldSkool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+PListOldSkool.m"; sourceTree = "<group>"; };
142
+		41BB204716CE641F001FF614 /* NSPropertyListSerialization+MullePlistReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSPropertyListSerialization+MullePlistReader.m"; sourceTree = "<group>"; };
143
+		41BB204816CE641F001FF614 /* NSPropertyListSerialization+MullePlistWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSPropertyListSerialization+MullePlistWriter.m"; sourceTree = "<group>"; };
136 144
 		41C74E6416C99569005FA265 /* mulle-plist-fix */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "mulle-plist-fix"; sourceTree = BUILT_PRODUCTS_DIR; };
137 145
 		41C74E6716C99569005FA265 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
138 146
 		41C74E6B16C99569005FA265 /* mulle-plist-fix.8 */ = {isa = PBXFileReference; lastKnownFileType = text; path = "mulle-plist-fix.8"; sourceTree = "<group>"; };
139 147
 		41C74E7416C99A2B005FA265 /* mulle-plist-hack */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "mulle-plist-hack"; sourceTree = BUILT_PRODUCTS_DIR; };
140 148
 		41C74E7B16C99A2B005FA265 /* mulle-plist-hack.8 */ = {isa = PBXFileReference; lastKnownFileType = text; path = "mulle-plist-hack.8"; sourceTree = "<group>"; };
141
-		41C74E8216C99A48005FA265 /* NSDictionary+PListOldSkool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+PListOldSkool.h"; sourceTree = "<group>"; };
142
-		41C74E8316C99A48005FA265 /* NSDictionary+PListOldSkool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+PListOldSkool.m"; sourceTree = "<group>"; };
143
-		41C74E8416C99A48005FA265 /* NSObject+PListOldSkool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+PListOldSkool.h"; sourceTree = "<group>"; };
144
-		41C74E8516C99A48005FA265 /* NSObject+PListOldSkool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+PListOldSkool.m"; sourceTree = "<group>"; };
145
-		41C74E8616C99A48005FA265 /* NSPropertyListSerialization+MullePlistReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSPropertyListSerialization+MullePlistReader.h"; sourceTree = "<group>"; };
146
-		41C74E8716C99A48005FA265 /* NSPropertyListSerialization+MullePlistReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSPropertyListSerialization+MullePlistReader.m"; sourceTree = "<group>"; };
147
-		41C74E8816C99A48005FA265 /* NSPropertyListSerialization+MullePlistWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSPropertyListSerialization+MullePlistWriter.h"; sourceTree = "<group>"; };
148
-		41C74E8916C99A48005FA265 /* NSPropertyListSerialization+MullePlistWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSPropertyListSerialization+MullePlistWriter.m"; sourceTree = "<group>"; };
149 149
 		41C74E9216C99A60005FA265 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
150 150
 		41C74EA116C9A7C6005FA265 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
151 151
 		41C74EA416C9A7DA005FA265 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
... ...
@@ -237,11 +237,19 @@
237 237
 		4160066E16C6646400347385 /* mulle-plist-compress */ = {
238 238
 			isa = PBXGroup;
239 239
 			children = (
240
-				4160066F16C6646400347385 /* main.m */,
240
+				41BB204116CE641F001FF614 /* NSDictionary+PListOldSkool.h */,
241
+				41BB204516CE641F001FF614 /* NSDictionary+PListOldSkool.m */,
242
+				41BB204216CE641F001FF614 /* NSObject+PListOldSkool.h */,
243
+				41BB204616CE641F001FF614 /* NSObject+PListOldSkool.m */,
244
+				41BB204316CE641F001FF614 /* NSPropertyListSerialization+MullePlistReader.h */,
245
+				41BB204716CE641F001FF614 /* NSPropertyListSerialization+MullePlistReader.m */,
246
+				41BB204416CE641F001FF614 /* NSPropertyListSerialization+MullePlistWriter.h */,
247
+				41BB204816CE641F001FF614 /* NSPropertyListSerialization+MullePlistWriter.m */,
241 248
 				4160067A16C6679800347385 /* NSData+ZLib.h */,
242 249
 				4160067B16C6679800347385 /* NSData+ZLib.m */,
243 250
 				4160067C16C6679800347385 /* NSObject+UnformattedDescription.h */,
244 251
 				4160067D16C6679800347385 /* NSObject+UnformattedDescription.m */,
252
+				4160066F16C6646400347385 /* main.m */,
245 253
 				4160067316C6646400347385 /* mulle-plist-compress.8 */,
246 254
 				41C74EA316C9A7CB005FA265 /* Supporting Files */,
247 255
 			);
... ...
@@ -279,14 +287,6 @@
279 287
 		41C74E7616C99A2B005FA265 /* mulle-plist-hack */ = {
280 288
 			isa = PBXGroup;
281 289
 			children = (
282
-				41C74E8416C99A48005FA265 /* NSObject+PListOldSkool.h */,
283
-				41C74E8516C99A48005FA265 /* NSObject+PListOldSkool.m */,
284
-				41C74E8216C99A48005FA265 /* NSDictionary+PListOldSkool.h */,
285
-				41C74E8316C99A48005FA265 /* NSDictionary+PListOldSkool.m */,
286
-				41C74E8616C99A48005FA265 /* NSPropertyListSerialization+MullePlistReader.h */,
287
-				41C74E8716C99A48005FA265 /* NSPropertyListSerialization+MullePlistReader.m */,
288
-				41C74E8816C99A48005FA265 /* NSPropertyListSerialization+MullePlistWriter.h */,
289
-				41C74E8916C99A48005FA265 /* NSPropertyListSerialization+MullePlistWriter.m */,
290 290
 				41C74E9216C99A60005FA265 /* main.m */,
291 291
 				41C74E7B16C99A2B005FA265 /* mulle-plist-hack.8 */,
292 292
 				41C74E7916C99A2B005FA265 /* Supporting Files */,
... ...
@@ -435,6 +435,10 @@
435 435
 				4160067016C6646400347385 /* main.m in Sources */,
436 436
 				4160067E16C6679800347385 /* NSData+ZLib.m in Sources */,
437 437
 				4160067F16C6679800347385 /* NSObject+UnformattedDescription.m in Sources */,
438
+				41BB204916CE641F001FF614 /* NSDictionary+PListOldSkool.m in Sources */,
439
+				41BB204A16CE641F001FF614 /* NSObject+PListOldSkool.m in Sources */,
440
+				41BB204B16CE641F001FF614 /* NSPropertyListSerialization+MullePlistReader.m in Sources */,
441
+				41BB204C16CE641F001FF614 /* NSPropertyListSerialization+MullePlistWriter.m in Sources */,
438 442
 			);
439 443
 			runOnlyForDeploymentPostprocessing = 0;
440 444
 		};
... ...
@@ -450,10 +454,6 @@
450 454
 			isa = PBXSourcesBuildPhase;
451 455
 			buildActionMask = 2147483647;
452 456
 			files = (
453
-				41C74E8D16C99A48005FA265 /* NSDictionary+PListOldSkool.m in Sources */,
454
-				41C74E8E16C99A48005FA265 /* NSObject+PListOldSkool.m in Sources */,
455
-				41C74E8F16C99A48005FA265 /* NSPropertyListSerialization+MullePlistReader.m in Sources */,
456
-				41C74E9016C99A48005FA265 /* NSPropertyListSerialization+MullePlistWriter.m in Sources */,
457 457
 				41C74E9316C99A60005FA265 /* main.m in Sources */,
458 458
 			);
459 459
 			runOnlyForDeploymentPostprocessing = 0;
... ...
@@ -680,6 +680,7 @@
680 680
 				41C74E6F16C99569005FA265 /* Release */,
681 681
 			);
682 682
 			defaultConfigurationIsVisible = 0;
683
+			defaultConfigurationName = Release;
683 684
 		};
684 685
 		41C74E7D16C99A2B005FA265 /* Build configuration list for PBXNativeTarget "mulle-plist-hack" */ = {
685 686
 			isa = XCConfigurationList;
... ...
@@ -688,6 +689,7 @@
688 689
 				41C74E7F16C99A2B005FA265 /* Release */,
689 690
 			);
690 691
 			defaultConfigurationIsVisible = 0;
692
+			defaultConfigurationName = Release;
691 693
 		};
692 694
 		41C74E9516C9A14C005FA265 /* Build configuration list for PBXAggregateTarget "mulle-plist-utilities" */ = {
693 695
 			isa = XCConfigurationList;
... ...
@@ -696,6 +698,7 @@
696 698
 				41C74E9716C9A14C005FA265 /* Release */,
697 699
 			);
698 700
 			defaultConfigurationIsVisible = 0;
701
+			defaultConfigurationName = Release;
699 702
 		};
700 703
 /* End XCConfigurationList section */
701 704
 	};
... ...
@@ -57,6 +57,12 @@
57 57
             ReferencedContainer = "container:mulle-plist-utilities.xcodeproj">
58 58
          </BuildableReference>
59