mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
([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:
parent
cf5278b6d9
commit
a7aa62d7db
1 changed files with 11 additions and 4 deletions
|
@ -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) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue