diff --git a/ChangeLog b/ChangeLog index b452e5b0c..77208f077 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2000-06-29 Adam Fedor + + * Source/NSText.m (-setFont:): Return if font==nil. + * Source/NSTextView.m (setAllowsUndo:, allowsUndo): Stub + implementation. + + * Source/Functions.m (NSApplicationMain): Call NSProcessInfo + initialization if GS_PASS_ARGUMENTS. + * Tools/example.m: Likewise. + * Tools/gpbs.m: Likewise. + * Tools/make_services.m: Likewise. + * Tools/set_show_services.m: Likewise. + Tue Jun 27 19:35:54 2000 Nicola Pero * Source/NSButton.m ([-allowsMixedState]): Implemented. diff --git a/Source/Functions.m b/Source/Functions.m index 6ca31213d..ef858bda4 100644 --- a/Source/Functions.m +++ b/Source/Functions.m @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -46,7 +47,7 @@ NSApplicationMain(int argc, const char **argv) NSString *className; Class appClass; CREATE_AUTORELEASE_POOL(pool); -#if LIB_FOUNDATION_LIBRARY +#if defined(LIB_FOUNDATION_LIBRARY) || defined(GS_PASS_ARGUMENTS) extern char **environ; [NSProcessInfo initializeWithArguments: (char**)argv diff --git a/Source/NSText.m b/Source/NSText.m index 69affaec2..32bf480a9 100644 --- a/Source/NSText.m +++ b/Source/NSText.m @@ -1747,6 +1747,9 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet) { NSRange fullRange = NSMakeRange(0, [_textStorage length]); + if (font == nil) + return; + [self setFont: font ofRange: fullRange]; [_typingAttributes setObject: font forKey: NSFontAttributeName]; } diff --git a/Source/NSTextView.m b/Source/NSTextView.m index aedccd667..8bc53044c 100644 --- a/Source/NSTextView.m +++ b/Source/NSTextView.m @@ -167,6 +167,15 @@ return _background_color; } +- (void) setAllowsUndo: (BOOL)flag +{ +} + +- (BOOL) allowsUndo +{ + return NO; +} + - (void) setDrawsBackground: (BOOL)flag { _tf.draws_background = flag; diff --git a/Tools/example.m b/Tools/example.m index 43286316f..84cd8a02e 100644 --- a/Tools/example.m +++ b/Tools/example.m @@ -227,11 +227,16 @@ init(int argc, char** argv) } int -main(int argc, char** argv) +main(int argc, char** argv, char **env) { - NSAutoreleasePool *pool = [NSAutoreleasePool new]; - ExampleServices *server = [ExampleServices new]; + NSAutoreleasePool *pool; + ExampleServices *server; +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; +#endif + pool = [NSAutoreleasePool new]; + server = [ExampleServices new]; init(argc, argv); // [NSObject enableDoubleReleaseCheck: YES]; diff --git a/Tools/gpbs.m b/Tools/gpbs.m index aa51d2d25..beb3497c9 100644 --- a/Tools/gpbs.m +++ b/Tools/gpbs.m @@ -1030,10 +1030,14 @@ init(int argc, char** argv) int -main(int argc, char** argv) +main(int argc, char** argv, char **env) { - NSAutoreleasePool *pool = [NSAutoreleasePool new]; + NSAutoreleasePool *pool; +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; +#endif + pool = [NSAutoreleasePool new]; init(argc, argv); // [NSObject enableDoubleReleaseCheck: YES]; diff --git a/Tools/make_services.m b/Tools/make_services.m index 0f778988e..0a45b5ec2 100644 --- a/Tools/make_services.m +++ b/Tools/make_services.m @@ -55,7 +55,7 @@ static Class dClass; static Class sClass; int -main(int argc, char** argv) +main(int argc, char** argv, char **env_c) { NSAutoreleasePool *pool; NSData *data; @@ -74,6 +74,9 @@ main(int argc, char** argv) NSMutableDictionary *fullMap; NSDictionary *oldMap; +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments:argv count:argc environment:env_c]; +#endif pool = [NSAutoreleasePool new]; aClass = [NSArray class]; diff --git a/Tools/set_show_service.m b/Tools/set_show_service.m index fa95bf51f..5e1e785e3 100644 --- a/Tools/set_show_service.m +++ b/Tools/set_show_service.m @@ -30,7 +30,7 @@ int -main(int argc, char** argv) +main(int argc, char** argv, char **env) { NSAutoreleasePool *pool; NSProcessInfo *proc; @@ -38,6 +38,9 @@ main(int argc, char** argv) unsigned index; // [NSObject enableDoubleReleaseCheck: YES]; +#ifdef GS_PASS_ARGUMENTS + [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; +#endif pool = [NSAutoreleasePool new];