Patch from Richard.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2623 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 1997-11-07 18:46:30 +00:00
parent 6f3706e107
commit f345d5670d
5 changed files with 34 additions and 14 deletions

View file

@ -1,3 +1,19 @@
Thu Nov 6 19:00:00 1997 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* 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 <fedor@doc.com> Thu Nov 6 10:14:39 1997 Adam Fedor <fedor@doc.com>
* src/GNUmakefile (DEFS): Remove PLATFORM_OS. * src/GNUmakefile (DEFS): Remove PLATFORM_OS.

View file

@ -230,7 +230,8 @@
id object; id object;
string = [key description]; 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]]; [desc appendFormat: @"%*s%s = ", level, "", [string quotedCString]];
else else
[desc appendFormat: @"%*s%s = ", level, "", [string cStringNoCopy]]; [desc appendFormat: @"%*s%s = ", level, "", [string cStringNoCopy]];
@ -246,7 +247,8 @@
/* This should be a string or number, so decide if we need to /* This should be a string or number, so decide if we need to
quote it */ quote it */
string = [object description]; string = [object description];
if ([string rangeOfCharacterFromSet: quotables].length > 0) if ([string length] == 0
|| [string rangeOfCharacterFromSet: quotables].length > 0)
[desc appendFormat: @"%s;\n", [string quotedCString]]; [desc appendFormat: @"%s;\n", [string quotedCString]];
else else
[desc appendFormat: @"%s;\n", [string cStringNoCopy]]; [desc appendFormat: @"%s;\n", [string cStringNoCopy]];

View file

@ -389,6 +389,11 @@ static Class NSMutableArray_concrete_class;
} }
- (NSString*) description - (NSString*) description
{
return [self descriptionWithIndent: 0];
}
- (NSString*) descriptionWithIndent: (int)level
{ {
id string; id string;
id desc; id desc;
@ -415,7 +420,8 @@ static Class NSMutableArray_concrete_class;
/* This should be a string or number, so decide if we need to /* This should be a string or number, so decide if we need to
quote it */ quote it */
string = [object description]; string = [object description];
if ([string rangeOfCharacterFromSet: quotables].length > 0) if ([string length] == 0
|| [string rangeOfCharacterFromSet: quotables].length > 0)
[desc appendFormat: @"%s", [string quotedCString]]; [desc appendFormat: @"%s", [string quotedCString]];
else else
[desc appendString: string]; [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 /* This should be a string or number, so decide if we need to
quote it */ quote it */
string = [object description]; string = [object description];
if ([string rangeOfCharacterFromSet: quotables].length > 0) if ([string length] == 0
|| [string rangeOfCharacterFromSet: quotables].length > 0)
[desc appendString: [NSString stringWithCString: [desc appendString: [NSString stringWithCString:
[string quotedCString]]]; [string quotedCString]]];
else else
@ -448,11 +455,6 @@ static Class NSMutableArray_concrete_class;
return desc; return desc;
} }
- (NSString*) descriptionWithIndent: (unsigned)level
{
return [self description];
}
/* The NSCopying Protocol */ /* The NSCopying Protocol */
- (id) copy - (id) copy

View file

@ -64,8 +64,8 @@
#define GDOMAP 1 /* 1 = Use name server. */ #define GDOMAP 1 /* 1 = Use name server. */
#define stringify_it(X) #X #define stringify_it(X) #X
#define make_gdomap_cmd(X) stringify_it(X) "/Tools/gdomap &" #define make_gdomap_cmd(X) stringify_it(X) "/Tools/"GNUSTEP_TARGET_DIR"/gdomap &"
#define make_gdomap_err(X) "check that " stringify_it(X) "/Tools/gdomap is running and owned by root." #define make_gdomap_err(X) "check that " stringify_it(X) "/Tools/"GNUSTEP_TARGET_DIR"/gdomap is running and owned by root."
#endif /* !__WIN32__ */ #endif /* !__WIN32__ */
#include <string.h> /* for memset() and strchr() */ #include <string.h> /* for memset() and strchr() */

View file

@ -15,11 +15,11 @@
# after-all:: # after-all::
# Things to do before installing # Things to do before installing
before-install:: # before-install::
$(INSTALL) -m 05755 gdomap $(GNUSTEP_SYSTEM_ROOT)/Tools
# Things to do after installing # 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 # Things to do before uninstalling
# before-uninstall:: # before-uninstall::