Differences From Artifact [52b96796ce]:
- File
src/OFApplication.m
— part of check-in
[f282aaa672]
at
2010-10-10 12:01:52
on branch trunk
— Better storing of argc and argv.
This makes it possible to pass argc and argv to third party libs
requiring those. (user: js, size: 3672) [annotate] [blame] [check-ins using]
To Artifact [b4963086e3]:
- File src/OFApplication.m — part of check-in [cd677a3484] at 2010-10-10 21:09:43 on branch trunk — Better storing of argc and argv for real now. (user: js, size: 3672) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
35 36 37 38 39 40 41 | { id <OFApplicationDelegate> delegate = [app delegate]; [delegate applicationWillTerminate]; } int | | | | | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | { id <OFApplicationDelegate> delegate = [app delegate]; [delegate applicationWillTerminate]; } int of_application_main(int *argc, char **argv[], Class cls) { OFApplication *app = [OFApplication sharedApplication]; id <OFApplicationDelegate> delegate = [[cls alloc] init]; [app setArgumentCount: argc andArgumentValues: argv]; [app setDelegate: delegate]; [(id)delegate release]; [app run]; return 0; |
︙ | ︙ | |||
142 143 144 145 146 147 148 | argc = argc_; argv = argv_; programName = [[OFString alloc] initWithCString: (*argv)[0]]; arguments = [[OFMutableArray alloc] init]; for (i = 1; i < *argc; i++) | | | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | argc = argc_; argv = argv_; programName = [[OFString alloc] initWithCString: (*argv)[0]]; arguments = [[OFMutableArray alloc] init]; for (i = 1; i < *argc; i++) [arguments addObject: [OFString stringWithCString: (*argv)[i]]]; [pool release]; } - (void)getArgumentCount: (int**)argc_ andArgumentValues: (char****)argv_ { |
︙ | ︙ |