From f345d5670d3a2621b139122e115659effa45b9ce Mon Sep 17 00:00:00 2001 From: fedor Date: Fri, 7 Nov 1997 18:46:30 +0000 Subject: [PATCH] Patch from Richard. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2623 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 16 ++++++++++++++++ Source/Dictionary.m | 6 ++++-- Source/NSArray.m | 16 +++++++++------- Source/TcpPort.m | 4 ++-- Tools/Makefile.postamble | 6 +++--- 5 files changed, 34 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73f1c7b74..a4829c9a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +Thu Nov 6 19:00:00 1997 Richard Frith-Macdonald + + * Tools/Makefile.postamble: Modified to install gdomap in cpu/os + specific location. + + * src/Dictionary.m: ([-descriptionWithIndent:]) Modified to encode + empty strings as "" so that ascii property lists work when a + dictionary entry is empty. + + * src/NSArray.m: ([-descriptionWithIndent:]) Modified to encode empty + strings as "" so that ascii property lists work when a string in the + array is empty. + + * src/TcpPort.m: Modified in various places so that we look in the + correct location for gdomap. + Thu Nov 6 10:14:39 1997 Adam Fedor * src/GNUmakefile (DEFS): Remove PLATFORM_OS. diff --git a/Source/Dictionary.m b/Source/Dictionary.m index fe6e02daf..d380a48bc 100644 --- a/Source/Dictionary.m +++ b/Source/Dictionary.m @@ -230,7 +230,8 @@ id object; string = [key description]; - if ([string rangeOfCharacterFromSet: quotables].length > 0) + if ([string length] == 0 + || [string rangeOfCharacterFromSet: quotables].length > 0) [desc appendFormat: @"%*s%s = ", level, "", [string quotedCString]]; else [desc appendFormat: @"%*s%s = ", level, "", [string cStringNoCopy]]; @@ -246,7 +247,8 @@ /* This should be a string or number, so decide if we need to quote it */ string = [object description]; - if ([string rangeOfCharacterFromSet: quotables].length > 0) + if ([string length] == 0 + || [string rangeOfCharacterFromSet: quotables].length > 0) [desc appendFormat: @"%s;\n", [string quotedCString]]; else [desc appendFormat: @"%s;\n", [string cStringNoCopy]]; diff --git a/Source/NSArray.m b/Source/NSArray.m index 0fe2eb2f4..3272dd970 100644 --- a/Source/NSArray.m +++ b/Source/NSArray.m @@ -389,6 +389,11 @@ static Class NSMutableArray_concrete_class; } - (NSString*) description +{ + return [self descriptionWithIndent: 0]; +} + +- (NSString*) descriptionWithIndent: (int)level { id string; id desc; @@ -415,7 +420,8 @@ static Class NSMutableArray_concrete_class; /* This should be a string or number, so decide if we need to quote it */ string = [object description]; - if ([string rangeOfCharacterFromSet: quotables].length > 0) + if ([string length] == 0 + || [string rangeOfCharacterFromSet: quotables].length > 0) [desc appendFormat: @"%s", [string quotedCString]]; else [desc appendString: string]; @@ -437,7 +443,8 @@ static Class NSMutableArray_concrete_class; /* This should be a string or number, so decide if we need to quote it */ string = [object description]; - if ([string rangeOfCharacterFromSet: quotables].length > 0) + if ([string length] == 0 + || [string rangeOfCharacterFromSet: quotables].length > 0) [desc appendString: [NSString stringWithCString: [string quotedCString]]]; else @@ -448,11 +455,6 @@ static Class NSMutableArray_concrete_class; return desc; } -- (NSString*) descriptionWithIndent: (unsigned)level -{ - return [self description]; -} - /* The NSCopying Protocol */ - (id) copy diff --git a/Source/TcpPort.m b/Source/TcpPort.m index 5ed27c4de..711d5d5ef 100644 --- a/Source/TcpPort.m +++ b/Source/TcpPort.m @@ -64,8 +64,8 @@ #define GDOMAP 1 /* 1 = Use name server. */ #define stringify_it(X) #X -#define make_gdomap_cmd(X) stringify_it(X) "/Tools/gdomap &" -#define make_gdomap_err(X) "check that " stringify_it(X) "/Tools/gdomap is running and owned by root." +#define make_gdomap_cmd(X) stringify_it(X) "/Tools/"GNUSTEP_TARGET_DIR"/gdomap &" +#define make_gdomap_err(X) "check that " stringify_it(X) "/Tools/"GNUSTEP_TARGET_DIR"/gdomap is running and owned by root." #endif /* !__WIN32__ */ #include /* for memset() and strchr() */ diff --git a/Tools/Makefile.postamble b/Tools/Makefile.postamble index dc1915a5c..b1d952c9c 100644 --- a/Tools/Makefile.postamble +++ b/Tools/Makefile.postamble @@ -15,11 +15,11 @@ # after-all:: # Things to do before installing -before-install:: - $(INSTALL) -m 05755 gdomap $(GNUSTEP_SYSTEM_ROOT)/Tools +# before-install:: # Things to do after installing -# after-install:: +after-install:: + $(INSTALL) -m 05755 gdomap $(GNUSTEP_INSTALLATION_DIR)/Tools/$(GNUSTEP_TARGET_DIR) # Things to do before uninstalling # before-uninstall::