2024-12-10 22:06:49 +01:00
|
|
|
#include "config.h"
|
|
|
|
#include "db.h"
|
|
|
|
#include "iCal.h"
|
2024-12-11 11:27:00 +01:00
|
|
|
#include "llist.h"
|
2024-12-10 22:06:49 +01:00
|
|
|
#include "planner.h" // for subject and event structs
|
|
|
|
#include "ui.h"
|
|
|
|
#include <stdio.h>
|
2024-12-11 01:08:31 +01:00
|
|
|
#include <stdlib.h>
|
2024-12-10 22:06:49 +01:00
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
|
|
|
time_t now = time(NULL);
|
|
|
|
|
2024-12-11 01:08:31 +01:00
|
|
|
Task *t1 = newTask("LinAlg", now, now + days(5), 3, 0);
|
2024-12-10 22:06:49 +01:00
|
|
|
|
2024-12-11 01:08:31 +01:00
|
|
|
Task t2 = {
|
2024-12-10 22:06:49 +01:00
|
|
|
.name = "Phys", .created = now, .deadline = now + days(2), .priority = 7};
|
|
|
|
|
|
|
|
// create plan
|
|
|
|
// planner([t1,t2])
|
|
|
|
//
|
|
|
|
printf("%s\n", ctime(&now));
|
|
|
|
|
2024-12-11 11:27:00 +01:00
|
|
|
llist *list1 = llistNew(t1, cmpTask);
|
|
|
|
|
|
|
|
llistAppend(list1, &t2);
|
|
|
|
|
|
|
|
llist *found = llistGet(list1, &t2);
|
|
|
|
|
2024-12-11 01:08:31 +01:00
|
|
|
serialize(t1);
|
2024-12-10 22:06:49 +01:00
|
|
|
serialize(&t2);
|
2024-12-11 11:27:00 +01:00
|
|
|
serialize(found->data);
|
2024-12-11 01:08:31 +01:00
|
|
|
free(t1);
|
2024-12-10 22:06:49 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|