-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathicalBuddy64.patch
More file actions
93 lines (89 loc) · 4.75 KB
/
icalBuddy64.patch
File metadata and controls
93 lines (89 loc) · 4.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
diff --git a/HGCLIAutoUpdater.m b/HGCLIAutoUpdater.m
index f4247be..7aceb4b 100644
--- a/HGCLIAutoUpdater.m
+++ b/HGCLIAutoUpdater.m
@@ -149,7 +149,7 @@ - (NSString *) latestUpdateVersionOnServerWithError:(NSError **)error
if (error != NULL)
*error = NS_ERROR(0, ([NSString
stringWithFormat:@"HTTP connection failed. Status code %d: \"%@\"",
- statusCode,
+ (int)statusCode,
[NSHTTPURLResponse localizedStringForStatusCode:statusCode]]));
return nil;
}
diff --git a/HGDateFunctions.m b/HGDateFunctions.m
index 0889022..42aa3ed 100644
--- a/HGDateFunctions.m
+++ b/HGDateFunctions.m
@@ -171,13 +171,13 @@ NSInteger getWeekDiff(NSDate *date1, NSDate *date2)
// of the last days in a year is often week #1 of the next
// year) -- if so, they are directly comparable
if ((year1 == year2) ||
- (abs(year1-year2)==1 && earlierDateWeek==1))
- return abs(week2-week1);
+ (labs(year1-year2)==1 && earlierDateWeek==1))
+ return labs(week2-week1);
// if there is more than one year between the dates, get the
// total number of weeks in the years between
NSInteger numWeeksInYearsBetween = 0;
- if (abs(year1-year2) > 1)
+ if (labs(year1-year2) > 1)
{
NSInteger i;
for (i = earlierDateYear+1; i < laterDateYear; i++)
@@ -255,7 +255,7 @@ BOOL naturalLanguageDateSpecifiesTime(NSString *input, NSDate *resultDate)
// way.
NSUInteger occurrencesOf12InDate = 0;
occurrencesOf12InDate = countOccurrences([NSString stringWithFormat:@"%i-%i-%i",
- [resultComps year], [resultComps month], [resultComps day]],
+ (int)[resultComps year], (int)[resultComps month], (int)[resultComps day]],
@"12", NSLiteralSearch);
if (countOccurrences(input, @"12", NSLiteralSearch) > occurrencesOf12InDate)
return YES;
diff --git a/icalBuddyArgs.m b/icalBuddyArgs.m
index dfd09a4..0dfb3aa 100644
--- a/icalBuddyArgs.m
+++ b/icalBuddyArgs.m
@@ -131,11 +131,11 @@ void handleArgument(NSString *shortName, NSString *longName, id value,
if ([value respondsToSelector:@selector(integerValue)])
{
if ([shortName isEqualToString:@"li"] || [longName isEqualToString:@"limitItems"])
- prettyPrintOptions->maxNumPrintedItems = abs([value integerValue]);
+ prettyPrintOptions->maxNumPrintedItems = labs([value integerValue]);
else if ([shortName isEqualToString:@"na"] || [longName isEqualToString:@"maxNumAttendees"])
- opts->maxNumPrintedAttendees = abs([value integerValue]);
+ opts->maxNumPrintedAttendees = labs([value integerValue]);
else if ([shortName isEqualToString:@"nnc"] || [longName isEqualToString:@"maxNumNoteChars"])
- opts->maxNumNoteCharacters = abs([value integerValue]);
+ opts->maxNumNoteCharacters = labs([value integerValue]);
}
}
}
diff --git a/icalBuddyPrettyPrint.m b/icalBuddyPrettyPrint.m
index 76415ae..223b18f 100644
--- a/icalBuddyPrettyPrint.m
+++ b/icalBuddyPrettyPrint.m
@@ -169,7 +169,7 @@ BOOL shouldPrintProperty(NSString *propertyName, NSSet *inclusionsSet, NSSet *ex
NSString *weekDiffStr = nil;
if (weekDiff < -1)
- weekDiffStr = [NSString stringWithFormat:localizedStr(kL10nKeyXWeeksAgo), abs(weekDiff)];
+ weekDiffStr = [NSString stringWithFormat:localizedStr(kL10nKeyXWeeksAgo), labs(weekDiff)];
else if (weekDiff == -1)
weekDiffStr = localizedStr(kL10nKeyLastWeek);
else if (weekDiff == 0)
@@ -194,7 +194,7 @@ BOOL shouldPrintProperty(NSString *propertyName, NSSet *inclusionsSet, NSSet *ex
NSString *dayDiffStr = nil;
if (dayDiff < -1)
- dayDiffStr = [NSString stringWithFormat:localizedStr(kL10nKeyXDaysAgo), abs(dayDiff)];
+ dayDiffStr = [NSString stringWithFormat:localizedStr(kL10nKeyXDaysAgo), labs(dayDiff)];
else if (dayDiff == -1)
dayDiffStr = localizedStr(kL10nKeyYesterday);
else if (dayDiff == 0)
@@ -830,7 +830,7 @@ void printCalEvent(CalEvent *event, CalItemPrintOption printOptions, NSDate *con
return localizedStr(kL10nKeyPriorityNone);
break;
}
- return [NSString stringWithFormat:@"%d", priority];
+ return [NSString stringWithFormat:@"%d", (int)priority];
}
NSString *localizedPriorityTitle(CalPriority priority)