([TextCStream -encodeValueOfCType:at:withName:]): If name is nil or

zero-length, make it "Anonymous".


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1485 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1996-04-19 23:16:59 +00:00
parent cf5278b6d9
commit a7aa62d7db

View file

@ -58,8 +58,8 @@ static BOOL debug_textcoder = NO;
assert(*type != '^');
assert(*type != ':');
if (!name)
name = @"";
if (!name || [name length] == 0)
name = @"Anonymous";
switch (*type)
{
case _C_LNG:
@ -164,8 +164,15 @@ static BOOL debug_textcoder = NO;
#define DECODER_FORMAT(TYPE, CONVERSION) \
@" <%a[^>]> (" ATXSTR(TYPE) @") = %" ATXSTR(CONVERSION) @" \n"
#define DECODE_ERROR(TYPE) [NSException raise: NSGenericException \
format: @"bad format decoding " ATXSTR(TYPE)]
#define DECODE_ERROR(TYPE) \
{ \
id line = [stream readLine]; \
[NSException raise: NSGenericException \
format: @"bad format decoding " ATXSTR(TYPE) @".\n" \
@"Looking at %s\n.", \
[line cStringNoCopy]]; \
}
#define DECODE_DEBUG(TYPE, CONVERSION) \
if (debug_textcoder) \