~ubuntu-branches/ubuntu/breezy/gnustep-base/breezy

« back to all changes in this revision

Viewing changes to Tools/pldes.m

  • Committer: Bazaar Package Importer
  • Author(s): Eric Heintzmann
  • Date: 2005-04-17 00:14:38 UTC
  • mfrom: (1.2.1 upstream) (4 hoary)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20050417001438-enf0y07c9tku85z1
Tags: 1.10.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* This tool converts a serialised proerty list to a text representation.
 
1
/** This tool converts a serialised property list to a text representation.
2
2
   Copyright (C) 1999 Free Software Foundation, Inc.
3
3
 
4
4
   Written by:  Richard Frith-Macdonald <richard@brainstorm.co.uk>
10
10
   modify it under the terms of the GNU General Public License
11
11
   as published by the Free Software Foundation; either version 2
12
12
   of the License, or (at your option) any later version.
13
 
    
14
 
   You should have received a copy of the GNU General Public  
 
13
 
 
14
   You should have received a copy of the GNU General Public
15
15
   License along with this library; see the file COPYING.LIB.
16
16
   If not, write to the Free Software Foundation,
17
17
   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31
31
#include        <Foundation/NSAutoreleasePool.h>
32
32
 
33
33
 
 
34
/** <p>This tool converts a binary serialised property list to a text
 
35
    representation.
 
36
</p> */
34
37
int
35
38
main(int argc, char** argv, char **env)
36
39
{
46
49
  proc = [NSProcessInfo processInfo];
47
50
  if (proc == nil)
48
51
    {
49
 
      NSLog(@"defaults: unable to get process information!\n");
 
52
      NSLog(@"pldes: unable to get process information!\n");
50
53
      [pool release];
51
 
      exit(0);
 
54
      exit(EXIT_SUCCESS);
52
55
    }
53
56
 
54
57
  args = [proc arguments];
55
58
 
56
59
  if ([args count] <= 1)
57
60
    {
58
 
      NSLog(@"No file names given to deserialize.");
 
61
      GSPrintf(stderr, @"No file names given to deserialize.\n");
59
62
    }
60
63
  else
61
64
    {
76
79
              result = [NSDeserializer deserializePropertyListFromData: myData
77
80
                                                     mutableContainers: NO];
78
81
              if (result == nil)
79
 
                NSLog(@"Loading '%@' - nil property list", file);
 
82
                GSPrintf(stderr, @"Loading '%@' - nil property list\n", file);
80
83
              else
81
84
                {
82
85
                  NSFileHandle  *out;
90
93
            }
91
94
          NS_HANDLER
92
95
            {
93
 
              NSLog(@"Loading '%@' - %@", file, [localException reason]);
 
96
              GSPrintf(stderr, @"Loading '%@' - %@\n", file,
 
97
                [localException reason]);
94
98
            }
95
99
          NS_ENDHANDLER
96
100
        }