//
//  main.m
//  matchempoker
//
//  Created by jarnoh on 3/30/11.
//  Copyright 2011 peekpoke. All rights reserved.
//

#import <UIKit/UIKit.h>

void bundleDir()
{
    NSLog(@"bundleDir");
    char parentdir[PATH_MAX];
    CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
    if (CFURLGetFileSystemRepresentation(url, true, (UInt8 *)parentdir, PATH_MAX))
    {
        printf("cd %s\n", parentdir);
        int err = chdir (parentdir);
    }
    CFRelease(url);
}


int main(int argc, char *argv[])
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

    sranddev();
    bundleDir();
    
    int retVal = UIApplicationMain(argc, argv, nil, nil);
    [pool release];
    return retVal;
}
