Monotone-Parent: 27abf27ddc019acbc13325c08121a103bf035716

Monotone-Revision: 7cced8aec79bd2e835d318154c57fb61273a4b35

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-04-05T13:33:48
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2011-04-05 13:33:48 +00:00
parent 0e4a4f522d
commit e1f2ba7b7a
4 changed files with 11 additions and 21 deletions

View File

@ -75,16 +75,13 @@ static NGCardsSaxHandler *sax = nil;
if (source)
{
cardParser = [self cardParser];
[sax setTopElementClass: [self class]];
if (parser)
{
[parser parseFromSource: source];
cardParser = [self cardParser];
[cardParser parseFromSource: source];
cardGroups = [sax cards];
[sax reset];
}
cardGroups = [sax cards];
[sax reset];
}
return cardGroups;

View File

@ -189,7 +189,7 @@
*/
unsigned i, len;
NSTimeInterval ti;
BOOL isNegative, isTime;
BOOL isNegative;
int val;
unichar c;
@ -213,14 +213,12 @@
val = 0;
len = [self length];
isTime = NO;
for (i++; i < len; i++)
{
c = [self characterAtIndex: i];
if (c == 't' || c == 'T')
{
isTime = YES;
val = 0;
}
else if (isdigit (c))

View File

@ -135,19 +135,15 @@
- (NSString *) _xmlRenderParameters
{
NSArray *keys;
NSMutableArray *renderedValues;
NSMutableString *rendering;
NSString *currentValue;
int count, max;
BOOL displayed;
keys = [attributes allKeys];
max = [keys count];
if (max > 0)
{
rendering = [NSMutableString stringWithCapacity: 64];
renderedValues = [NSMutableArray arrayWithCapacity: max];
displayed = NO;
for (count = 0; count < max; count++)
{
currentValue

View File

@ -126,10 +126,6 @@
// The interval must be ignored as well since it refers to the years.
[rrule setRepeatCount: 0];
[rrule setInterval: @"1"];
monthlyCalc = [[iCalMonthlyRecurrenceCalculator alloc]
initWithRecurrenceRule: rrule
firstInstanceCalendarDateRange: firstRange];
[monthlyCalc autorelease];
// There's a bug in GNUstep in [NSCalendarDate dateByAddingYears:months:days:]
// that causes errors when adding subsequently a month. For this reason,
@ -161,15 +157,18 @@
currentMonth = [referenceDate monthOfYear];
for (yearIdxInRange = 0 ; yearIdxInRange < numberOfYearsInRange; yearIdxInRange++)
{
int k, test, year;
int k, test;
test = diff + yearIdxInRange;
if ((test >= 0) && (test % interval) == 0)
{
year = yearIdxInRange + [referenceDate yearOfCommonEra];
if (byMonth)
{
monthlyCalc = [[iCalMonthlyRecurrenceCalculator alloc]
initWithRecurrenceRule: rrule
firstInstanceCalendarDateRange: firstRange];
[monthlyCalc autorelease];
// When there's a BYMONTH constraint, evaluate each month of the constraint using
// the monthly calculator.
for (j = 0; currentMonth < 13 && j <= 12; j++, currentMonth++, monthDiff++)