Fix up method args

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7903 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2000-10-25 03:19:12 +00:00
parent dec9cb1e22
commit e9f8468afe
3 changed files with 23 additions and 14 deletions

View file

@ -1,3 +1,9 @@
2000-10-24 Adam Fedor <fedor@gnu.org>
* Source/NSCalendarDate.m (-initWithString:calendarFormat:locale:):
Set format if nil.
(-addYear:month:day:hour:minute:second:): Use signed ints.
2000-10-24 Richard Frith-Macdonald <rfm@gnu.org> 2000-10-24 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSString.m: Implement ([-substringWithRange:]) and * Source/GSString.m: Implement ([-substringWithRange:]) and

View file

@ -203,11 +203,11 @@ NSTimeInterval GSTime(int day, int mon, int year, int hour, int min, int sec);
// Providing Adjusted Dates // Providing Adjusted Dates
- (NSCalendarDate*) addYear: (int)year - (NSCalendarDate*) addYear: (int)year
month: (unsigned int)month month: (int)month
day: (unsigned int)day day: (int)day
hour: (unsigned int)hour hour: (int)hour
minute: (unsigned int)minute minute: (int)minute
second: (unsigned int)second; second: (int)second;
// Getting String Descriptions of Dates // Getting String Descriptions of Dates
- (NSString*) description; - (NSString*) description;

View file

@ -285,8 +285,8 @@ static inline int getDigits(const char *from, char *to, int limit)
int julianWeeks = -1, weekStartsMonday = 0, dayOfWeek = -1; int julianWeeks = -1, weekStartsMonday = 0, dayOfWeek = -1;
const char *source = [description cString]; const char *source = [description cString];
int sourceLen = strlen(source); int sourceLen = strlen(source);
const char *format = [fmt cString]; const char *format;
int formatLen = strlen(format); int formatLen;
int formatIdx = 0; int formatIdx = 0;
int sourceIdx = 0; int sourceIdx = 0;
char tmpStr[20]; char tmpStr[20];
@ -299,9 +299,12 @@ static inline int getDigits(const char *from, char *to, int limit)
} }
if (fmt == nil) if (fmt == nil)
{ {
format = [[locale objectForKey: NSTimeDateFormatString] cString]; fmt = [locale objectForKey: NSTimeDateFormatString];
formatLen = strlen(format); if (fmt == nil)
fmt = @"";
} }
format = [fmt cString];
formatLen = strlen(format);
// //
// WARNING: // WARNING:
@ -982,11 +985,11 @@ static inline int getDigits(const char *from, char *to, int limit)
// Providing Adjusted Dates // Providing Adjusted Dates
- (NSCalendarDate*) addYear: (int)year - (NSCalendarDate*) addYear: (int)year
month: (unsigned int)month month: (int)month
day: (unsigned int)day day: (int)day
hour: (unsigned int)hour hour: (int)hour
minute: (unsigned int)minute minute: (int)minute
second: (unsigned int)second second: (int)second
{ {
return [self dateByAddingYears: year return [self dateByAddingYears: year
months: month months: month