2000-09-22 13:45:58 +00:00
|
|
|
#include <Foundation/Foundation.h>
|
1996-05-28 18:33:00 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2000-09-22 13:45:58 +00:00
|
|
|
#define _(X) \
|
|
|
|
[[NSBundle mainBundle] localizedStringForKey: @#X value: nil table: nil]
|
|
|
|
#define $(X) \
|
|
|
|
[[NSBundle mainBundle] localizedStringForKey: X value: nil table: nil]
|
|
|
|
|
|
|
|
|
2000-09-20 13:48:49 +00:00
|
|
|
#if 0
|
1996-05-28 18:33:00 +00:00
|
|
|
int main ()
|
|
|
|
{
|
|
|
|
id o = [NSObject new];
|
|
|
|
printf ("Hello from object at 0x%x\n", (unsigned)[o self]);
|
|
|
|
exit (0);
|
|
|
|
}
|
2000-09-20 13:48:49 +00:00
|
|
|
#else
|
|
|
|
int main (int argc, char **argv)
|
|
|
|
{
|
2000-09-22 13:45:58 +00:00
|
|
|
NSString *string;
|
|
|
|
id pool = [NSAutoreleasePool new];
|
|
|
|
NSURL *url = [NSURL fileURLWithPath: @"/tmp/a"];
|
|
|
|
NSData *data = [url resourceDataUsingCache: YES];
|
|
|
|
|
|
|
|
NSLog(@"%@", data);
|
2000-09-22 18:55:21 +00:00
|
|
|
url = [NSURL fileURLWithPath: @"/tmp/z"];
|
|
|
|
[url setResourceData: data];
|
2000-09-22 13:45:58 +00:00
|
|
|
|
|
|
|
NSLog(@"%@", _(Testing));
|
|
|
|
NSLog(@"%@", $(@"Testing"));
|
2000-09-20 13:48:49 +00:00
|
|
|
|
2000-09-22 13:45:58 +00:00
|
|
|
string = [NSString stringWithCString:argv[1]];
|
2000-09-20 13:48:49 +00:00
|
|
|
|
2000-09-22 13:45:58 +00:00
|
|
|
return 0;
|
2000-09-20 13:48:49 +00:00
|
|
|
}
|
|
|
|
#endif
|