blob: cf3e2282caf5c2b247b00132de09d5e5f3ea3662 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#import <Cocoa/Cocoa.h>
#include <u.h>
#include <libc.h>
AUTOFRAMEWORK(Cocoa)
@interface appdelegate : NSObject @end
void
main(void)
{
if(OSX_VERSION < 100700)
[NSAutoreleasePool new];
[NSApplication sharedApplication];
[NSApp setDelegate:[appdelegate new]];
[NSApp run];
}
@implementation appdelegate
- (void)application:(id)arg openFiles:(NSArray*)file
{
int i,n;
NSString *s;
n = [file count];
for(i=0; i<n; i++){
s = [file objectAtIndex:i];
print("%s\n", [s UTF8String]);
}
[NSApp terminate:self];
}
@end
|