mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
Fixes from Jeremy Bettis
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21535 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
299b6fc807
commit
bec8a74a6e
5 changed files with 22 additions and 22 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2005-07-24 Jeremy Bettis
|
||||||
|
|
||||||
|
* Source/NSCalendarDate.m: Fix bug adding interval to date.
|
||||||
|
* Source/NSDebug.m: Implemented _NSNewStringFromCString() for gdb.
|
||||||
|
* Source/GSFormat.m: Fix %S format.
|
||||||
|
* Source/NSObject.m: ([conformsToProtocol:]) return NO if passed nul.
|
||||||
|
|
||||||
2005-07-24 Richard Frith-Macdonald <rfm@gnu.org>
|
2005-07-24 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSPathUtilities.m: Fix to avoid duplicate paths.
|
* Source/NSPathUtilities.m: Fix to avoid duplicate paths.
|
||||||
|
|
|
@ -1787,31 +1787,14 @@ NSDictionary *locale)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* This is complicated. We have to transform the wide
|
/* This is simple. Wide string == unicode string. */
|
||||||
string into a unicode string. */
|
|
||||||
int prc;
|
int prc;
|
||||||
unichar *sp;
|
unichar *wsp;
|
||||||
wchar_t *wsp;
|
|
||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
prc = prec;
|
prc = prec;
|
||||||
wsp = (wchar_t *)string;
|
wsp = (unichar *)string;
|
||||||
while (prc-- && *wsp++) len++;
|
while (prc-- && *wsp++) len++;
|
||||||
|
|
||||||
wsp = (wchar_t *)string;
|
|
||||||
|
|
||||||
/* Allocate dynamically an array which definitely is long
|
|
||||||
enough for the wide character version. */
|
|
||||||
if (len < 8192
|
|
||||||
|| ((string = (unichar *) NSZoneMalloc(s->_zone, len * sizeof (unichar)))
|
|
||||||
== NULL))
|
|
||||||
string = (unichar *) alloca (len * sizeof (unichar));
|
|
||||||
else
|
|
||||||
string_malloced = 1;
|
|
||||||
|
|
||||||
prc = len;
|
|
||||||
sp = string;
|
|
||||||
while (prc--) *sp = *wsp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((width -= len) <= 0)
|
if ((width -= len) <= 0)
|
||||||
|
|
|
@ -2558,7 +2558,7 @@ static void Grow(DescriptionInfo *info, unsigned size)
|
||||||
eday += 31;
|
eday += 31;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (emonth < smonth)
|
if (emonth < smonth || (emonth == smonth && eday < sday))
|
||||||
{
|
{
|
||||||
eyear -= 1;
|
eyear -= 1;
|
||||||
emonth += 12;
|
emonth += 12;
|
||||||
|
@ -2585,7 +2585,7 @@ static void Grow(DescriptionInfo *info, unsigned size)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (diff--)
|
while (diff-- > 0)
|
||||||
{
|
{
|
||||||
int tmpmonth = emonth - diff - 1;
|
int tmpmonth = emonth - diff - 1;
|
||||||
int tmpyear = eyear;
|
int tmpyear = eyear;
|
||||||
|
|
|
@ -954,3 +954,9 @@ const char *_NSPrintForDebugger(id object)
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NSString *_NSNewStringFromCString(const char *cstring)
|
||||||
|
{
|
||||||
|
return [NSString stringWithCString: cstring];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1299,6 +1299,10 @@ GSDescriptionForClassMethod(pcl self, SEL aSel)
|
||||||
{
|
{
|
||||||
struct objc_protocol_list* proto_list;
|
struct objc_protocol_list* proto_list;
|
||||||
|
|
||||||
|
if (aProtocol == 0)
|
||||||
|
{
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
for (proto_list = ((struct objc_class*)self)->protocols;
|
for (proto_list = ((struct objc_class*)self)->protocols;
|
||||||
proto_list; proto_list = proto_list->next)
|
proto_list; proto_list = proto_list->next)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue