if ([s rangeOfString:@"T"].length == 0 && [s length] == 8) {
/* hm, maybe a date without a time? like an allday event! */
int year, month, day;
- unsigned char buf[16];
+ char buf[16];
[s getCString:&(buf[0])];
buf[9] = '\0';
}
else if ([s length] == 15) {
int year, month, day, hour, minute, second;
- unsigned char buf[24];
+ char buf[24];
[s getCString:&(buf[0])];
second = atoi(&(buf[13])); buf[13] = '\0';
/* description */
+- (void)appendAttributesToDescription:(NSMutableString *)ms {
+ if (self->tag) [ms appendFormat:@" %@", self->tag];
+ if (self->string) [ms appendFormat:@" '%@'", self->string];
+ if (self->tzid) [ms appendFormat:@" tz=%@", self->tzid];
+}
+
- (NSString *)description {
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:128];
[ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
-
- if (self->tag) [ms appendFormat:@" %@", self->tag];
- if (self->string) [ms appendFormat:@" '%@'", self->string];
- if (self->tzid) [ms appendFormat:@" tz=%@", self->tzid];
-
+ [self appendAttributesToDescription:ms];
[ms appendString:@">"];
return ms;
}