#include <stdio.h>
#include <locale.h>
#import <Cocoa/Cocoa.h>

@interface Delegate : NSObject
@end

@implementation Delegate

- (void) applicationDidFinishLaunching: (NSNotification *)not
{
	NSLocale *current = [NSLocale currentLocale];

	NSLog(@"Launched. current locale: %@", [current localeIdentifier]);
	NSLog(@"NSLog Decimal test: %g", 1.23);
	printf("printf decimal test: %g\n", 1.23);

	NSLog(@"Calling setlocale(LC_ALL, \"\")...");
	
	setlocale(LC_ALL, "");
	
	NSLog(@"NSLog bonjour! %g\n", 1.23);
	printf("printf bonjour! %g\n", 1.23);
	NSLog(@"-[NSString stringWithFormat:]: %@", [NSString stringWithFormat: @"%g", 1.23]);
}

@end

int main(int argc, char **argv)
{
	[NSAutoreleasePool new];
	
	NSApplication *app = [NSApplication sharedApplication];
	[app setDelegate: [Delegate new]];
	[app run];

	return 0;
}

