
#import <Foundation/Foundation.h>

int main (int argc, const char *argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    NSString *dictPath;
    NSDictionary *dict;
    
    if (argc != 2) {
        fprintf(stderr, "usage: %s dictionaryPath\n", argv[0]);
        exit(1);
    }

    dictPath = [NSString stringWithCString: argv[1]];
    if (!(dict = [[NSDictionary alloc] initWithContentsOfFile: dictPath])) {
        fprintf(stderr, "Couldn't open or parse dictionary at '%s'\n", argv[1]);
        exit(1);
    }

    /* -description doesn't append a newline by default */
    fprintf(stdout, "%s\n", [[dict description] cString]);
    
    [pool release];
    exit(0);       // insure the process exit status is 0
    return 0;      // ...and make main fit the ANSI spec.
}
