parent
a4f31f9414
commit
3c0f48a28d
13
src/config.h
13
src/config.h
|
@ -12,4 +12,17 @@
|
||||||
static const time_t pauseLenght = minutes(10);
|
static const time_t pauseLenght = minutes(10);
|
||||||
static const time_t minIntervalLen = minutes(30);
|
static const time_t minIntervalLen = minutes(30);
|
||||||
|
|
||||||
|
static const char *iCalHeader = "BEGIN:VCALENDAR"
|
||||||
|
"VERSION:2.0"
|
||||||
|
"PRODID:-//hacksw/handcal//NONSGML v1.0//EN";
|
||||||
|
|
||||||
|
static const char *iCalEvent =
|
||||||
|
"BEGIN:VEVENT"
|
||||||
|
"UID:uid1@example.com"
|
||||||
|
"ORGANIZER:CN=John Doe : MAILTO: john.doe@example.com"
|
||||||
|
"DTSTART:19970714T170000Z"
|
||||||
|
"DTEND:19970715T040000Z"
|
||||||
|
"SUMMARY:Bastille Day Party"
|
||||||
|
"END:VEVENT ";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -38,7 +38,7 @@ void printEvent(Event *s) {
|
||||||
ctime_r(&s->plannedStartTime, st);
|
ctime_r(&s->plannedStartTime, st);
|
||||||
ctime_r(&s->plannedEndTime, e);
|
ctime_r(&s->plannedEndTime, e);
|
||||||
printf(eventFormat, s->task->name, st, e, s->spare);
|
printf(eventFormat, s->task->name, st, e, s->spare);
|
||||||
printTask(s->task);
|
// printTask(s->task);
|
||||||
}
|
}
|
||||||
void llistPrintE(llist *head) {
|
void llistPrintE(llist *head) {
|
||||||
llist *c = head;
|
llist *c = head;
|
||||||
|
|
|
@ -39,7 +39,7 @@ int main() {
|
||||||
|
|
||||||
// gnerate plan from task list in time
|
// gnerate plan from task list in time
|
||||||
struct tm *lc = localtime(&now);
|
struct tm *lc = localtime(&now);
|
||||||
lc->tm_hour += 12; // add available time;
|
lc->tm_hour += 4; // add available time;
|
||||||
time_t maxTime = mktime(lc); // create timestamp
|
time_t maxTime = mktime(lc); // create timestamp
|
||||||
llist *l1 = genPlan(list1, maxTime); // return inked list of event;
|
llist *l1 = genPlan(list1, maxTime); // return inked list of event;
|
||||||
llistPrintE(l1);
|
llistPrintE(l1);
|
||||||
|
|
Loading…
Reference in New Issue