Index: unk/aux/cocotron/win32/cocotron/cocotron-r640.patch
===================================================================
--- /trunk/aux/cocotron/win32/cocotron/cocotron-r640.patch	(revision 13009)
+++ 	(revision )
@@ -1,120 +1,0 @@
-Index: Foundation/NSUserDefaults/NSUserDefaults.m
-===================================================================
---- Foundation/NSUserDefaults/NSUserDefaults.m	(revision 640)
-+++ Foundation/NSUserDefaults/NSUserDefaults.m	(working copy)
-@@ -341,11 +341,11 @@
- }
- 
- -(void)setInteger:(NSInteger)value forKey:(NSString *)defaultName {
--   [self setObject:[NSNumber numberWithInteger:value] forKey:defaultName];
-+  [self setObject:[NSString stringWithFormat: @"%d",value] forKey:defaultName];
- }
- 
- -(void)setFloat:(float)value forKey:(NSString *)defaultName {
--   [self setObject:[NSNumber numberWithFloat:value] forKey:defaultName];
-+  [self setObject:[NSString stringWithFormat: @"%f",value] forKey:defaultName];
- }
- 
- -(void)removeObjectForKey:(NSString *)key {
-Index: AppKit/NSApplication.h
-===================================================================
---- AppKit/NSApplication.h	(revision 640)
-+++ AppKit/NSApplication.h	(working copy)
-@@ -9,8 +9,9 @@
- #import <AppKit/NSResponder.h>
- #import <AppKit/AppKitExport.h>
- #import <AppKit/NSGraphics.h>
-+#import <AppKit/NSWindow.h>
- 
--@class NSWindow,NSImage,NSMenu, NSPasteboard, NSDisplay;
-+@class NSWindow,NSImage,NSMenu, NSPasteboard, NSDisplay, NSWindowController, NSDocument;
- 
- APPKIT_EXPORT NSString *NSModalPanelRunLoopMode;
- APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
-@@ -209,6 +210,7 @@
- @end
- 
- @interface NSObject(NSApplication_serviceRequest)
-+
- -(BOOL)writeSelectionToPasteboard:(NSPasteboard *)pasteboard types:(NSArray *)types;
- @end
- 
-Index: AppKit/NSApplication.m
-===================================================================
---- AppKit/NSApplication.m	(revision 640)
-+++ AppKit/NSApplication.m	(working copy)
-@@ -29,6 +29,7 @@
- #import <AppKit/CGWindow.h>
- #import <AppKit/NSRaise.h>
- #import <objc/message.h>
-+#import <AppKit/NSWindow.h>
- 
- NSString *NSModalPanelRunLoopMode=@"NSModalPanelRunLoopMode";
- NSString *NSEventTrackingRunLoopMode=@"NSEventTrackingRunLoopMode";
-@@ -413,6 +414,11 @@
-        needsUntitled = [_delegate applicationShouldOpenUntitledFile: self];
-    }
- 
-+   if(needsUntitled && _delegate && [_delegate respondsToSelector: @selector(applicationOpenUntitledFile:)]) {
-+     needsUntitled = ![_delegate applicationOpenUntitledFile: self];
-+   }
-+                                                 
-+
-    if(needsUntitled && controller && ![controller documentClassForType:[controller defaultType]]) {
-        needsUntitled = NO;
-    }
-@@ -466,12 +472,18 @@
- }
- 
- -(void)run {
--    
--   NSAutoreleasePool *pool=[NSAutoreleasePool new];
--   [self finishLaunching];
--   [pool release];
-+  static BOOL didlaunch = NO;
-+  NSAutoreleasePool *pool;
-+
-+  _isRunning=YES;
-+
-+  if (!didlaunch) {
-+    didlaunch = YES;
-+    pool=[NSAutoreleasePool new];
-+    [self finishLaunching];
-+    [pool release];
-+  }
-    
--   _isRunning=YES;
-    
-    do {
-        pool = [NSAutoreleasePool new];
-Index: AppKit/NSDocument.m
-===================================================================
---- AppKit/NSDocument.m	(revision 640)
-+++ AppKit/NSDocument.m	(working copy)
-@@ -21,6 +21,8 @@
- 
- @implementation NSDocument
- 
-+static int untitled_document_number = 0;
-+
- +(NSArray *)readableTypes {
-    int             i;
-    NSArray        *knownDocTypes = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDocumentTypes"];
-@@ -98,7 +100,7 @@
-       _fileURL=nil;
-       _fileType=nil;
-       _changeCount=0;
--      _untitledNumber=0;
-+      _untitledNumber=untitled_document_number++;
-       _hasUndoManager=YES;
-       _activeEditors=[NSMutableArray new];
-     }
-@@ -344,7 +346,7 @@
- {
-   if(_fileURL==nil) 
-     {
--      if(_untitledNumber > 1)
-+      if(_untitledNumber != 0)
-         return [NSString stringWithFormat:@"Untitled %d", _untitledNumber];
-       else
-         return @"Untitled";
Index: /trunk/aux/cocotron/win32/cocotron/cocotron-r645.patch
===================================================================
--- /trunk/aux/cocotron/win32/cocotron/cocotron-r645.patch	(revision 13010)
+++ /trunk/aux/cocotron/win32/cocotron/cocotron-r645.patch	(revision 13010)
@@ -0,0 +1,102 @@
+Index: AppKit/NSApplication.h
+===================================================================
+--- AppKit/NSApplication.h	(revision 645)
++++ AppKit/NSApplication.h	(working copy)
+@@ -9,8 +9,9 @@
+ #import <AppKit/NSResponder.h>
+ #import <AppKit/AppKitExport.h>
+ #import <AppKit/NSGraphics.h>
++#import <AppKit/NSWindow.h>
+ 
+-@class NSWindow,NSImage,NSMenu, NSPasteboard, NSDisplay;
++@class NSWindow,NSImage,NSMenu, NSPasteboard, NSDisplay, NSWindowController, NSDocument;
+ 
+ APPKIT_EXPORT NSString *NSModalPanelRunLoopMode;
+ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
+@@ -209,6 +210,7 @@
+ @end
+ 
+ @interface NSObject(NSApplication_serviceRequest)
++
+ -(BOOL)writeSelectionToPasteboard:(NSPasteboard *)pasteboard types:(NSArray *)types;
+ @end
+ 
+Index: AppKit/NSApplication.m
+===================================================================
+--- AppKit/NSApplication.m	(revision 645)
++++ AppKit/NSApplication.m	(working copy)
+@@ -29,6 +29,7 @@
+ #import <AppKit/CGWindow.h>
+ #import <AppKit/NSRaise.h>
+ #import <objc/message.h>
++#import <AppKit/NSWindow.h>
+ 
+ NSString *NSModalPanelRunLoopMode=@"NSModalPanelRunLoopMode";
+ NSString *NSEventTrackingRunLoopMode=@"NSEventTrackingRunLoopMode";
+@@ -413,6 +414,11 @@
+        needsUntitled = [_delegate applicationShouldOpenUntitledFile: self];
+    }
+ 
++   if(needsUntitled && _delegate && [_delegate respondsToSelector: @selector(applicationOpenUntitledFile:)]) {
++     needsUntitled = ![_delegate applicationOpenUntitledFile: self];
++   }
++                                                 
++
+    if(needsUntitled && controller && ![controller documentClassForType:[controller defaultType]]) {
+        needsUntitled = NO;
+    }
+@@ -466,12 +472,18 @@
+ }
+ 
+ -(void)run {
+-    
+-   NSAutoreleasePool *pool=[NSAutoreleasePool new];
+-   [self finishLaunching];
+-   [pool release];
++  static BOOL didlaunch = NO;
++  NSAutoreleasePool *pool;
++
++  _isRunning=YES;
++
++  if (!didlaunch) {
++    didlaunch = YES;
++    pool=[NSAutoreleasePool new];
++    [self finishLaunching];
++    [pool release];
++  }
+    
+-   _isRunning=YES;
+    
+    do {
+        pool = [NSAutoreleasePool new];
+Index: AppKit/NSDocument.m
+===================================================================
+--- AppKit/NSDocument.m	(revision 645)
++++ AppKit/NSDocument.m	(working copy)
+@@ -21,6 +21,8 @@
+ 
+ @implementation NSDocument
+ 
++static int untitled_document_number = 0;
++
+ +(NSArray *)readableTypes {
+    int             i;
+    NSArray        *knownDocTypes = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDocumentTypes"];
+@@ -98,7 +100,7 @@
+       _fileURL=nil;
+       _fileType=nil;
+       _changeCount=0;
+-      _untitledNumber=0;
++      _untitledNumber=untitled_document_number++;
+       _hasUndoManager=YES;
+       _activeEditors=[NSMutableArray new];
+     }
+@@ -344,7 +346,7 @@
+ {
+   if(_fileURL==nil) 
+     {
+-      if(_untitledNumber > 1)
++      if(_untitledNumber != 0)
+         return [NSString stringWithFormat:@"Untitled %d", _untitledNumber];
+       else
+         return @"Untitled";
