mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
tweak foirmat of debug output to match MacOS-X
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24352 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4e07eaedbd
commit
d38e116a81
1 changed files with 14 additions and 2 deletions
|
@ -247,14 +247,26 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
unsigned c = (_array == 0) ? 0 : GSIArrayCount(_array);
|
||||
unsigned i;
|
||||
|
||||
if (c == 0)
|
||||
{
|
||||
return [NSString stringWithFormat: @"%@(no indexes)",
|
||||
[super description]];
|
||||
}
|
||||
m = [NSMutableString stringWithFormat:
|
||||
@"%@[number of indexes: %u (in %u ranges), indexes: ",
|
||||
@"%@[number of indexes: %u (in %u ranges), indexes:",
|
||||
[super description], [self count], c];
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
NSRange r = GSIArrayItemAtIndex(_array, i).ext;
|
||||
|
||||
[m appendFormat: @"(%u-%u) ", r.location, NSMaxRange(r) - 1];
|
||||
if (r.length > 1)
|
||||
{
|
||||
[m appendFormat: @" (%u-%u)", r.location, NSMaxRange(r) - 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
[m appendFormat: @" (%u)", r.location];
|
||||
}
|
||||
}
|
||||
[m appendString: @"]"];
|
||||
return m;
|
||||
|
|
Loading…
Reference in a new issue