an iCal processing library

Files at this revision

API Documentation at this revision

Comitter:
WiredHome
Date:
Thu Aug 06 11:12:48 2015 +0000
Parent:
8:87549cc99d5e
Child:
10:deeaec151283
Commit message:
Code changes based on running through a stricter compiler.

Changed in this revision

iCal.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/iCal.cpp	Sat Oct 11 17:26:20 2014 +0000
+++ b/iCal.cpp	Thu Aug 06 11:12:48 2015 +0000
@@ -148,11 +148,11 @@
     printf("          Location: %s" LF, Event.Location);
     printf("          Category: %s" LF, Event.Category);
     printf("          Priority: %d" LF, Event.Priority);
-    sprintf(scratch, "%d ", Event.Start);
+    sprintf(scratch, "%lu ", Event.Start);
     sprintf(scratch + strlen(scratch), "%s", (Event.Start == 0) ? "" : ctime(&Event.Start));
     scratch[strlen(scratch)-1] = '\0';
     printf("             Start: %s" LF, scratch);
-    sprintf(scratch, "%d ", Event.End);
+    sprintf(scratch, "%lu ", Event.End);
     sprintf(scratch + strlen(scratch), "%s", (Event.End == 0) ? "" : ctime(&Event.End));
     scratch[strlen(scratch)-1] = '\0';
     printf("               End: %s" LF, scratch);
@@ -163,7 +163,7 @@
     printf("    RepeatMonthDay: %08X" LF,  Event.RepeatMonthDay);
     printf(" RepeatMonthDayRev: %08X" LF, Event.RepeatMonthDayRev);
     printf("       RepeatMonth: %04X" LF,  Event.RepeatMonths);
-    sprintf(scratch, "%d ", Event.Until);
+    sprintf(scratch, "%lu ", Event.Until);
     sprintf(scratch + strlen(scratch), "%s", (Event.Until == 0) ? "" : ctime(&Event.Until));
     scratch[strlen(scratch)-1] = '\0';
     printf("             Until: %s" LF, scratch);
@@ -479,8 +479,8 @@
                     int num = atoi(p1);
                     if (num >= 0)
                         Event->RepeatMonths |= (1 << num);
-                    else
-                        ; // Event->RepeatMonthsRev |= (1 << -num);
+                    //else
+                    //    ; // Event->RepeatMonthsRev |= (1 << -num);
                     p1 = px;
                 }
                 INFO("  RepeatMonths: %04X", Event->RepeatMonths);                
@@ -603,11 +603,13 @@
                         // Process it
                         if (showEvents)
                             ShowEventInfo(Event);
-                        if (1 || Event.Start >= gridStartTime && Event.Start < gridEndTime
-                                || Event.End >= gridStartTime && Event.End < gridEndTime) {
+                        // Force to ALWAYS
+                        if (1 || (Event.Start >= gridStartTime && Event.Start < gridEndTime)
+                                || (Event.End >= gridStartTime && Event.End < gridEndTime)) {
                             EventList[EventCount++] = Event;
-                            if (showEvents)
+                            if (showEvents) {
                                 INFO(" +++++ Added Event %d: %s", EventCount, Event.Summary);
+                            }
                         }
                         seeking = idle;
                     } else {