change lu zu llu
parent
b027a12354
commit
7f6a2c865b
10
src/db.c
10
src/db.c
|
@ -36,7 +36,7 @@ void write_linkedlist_to_csv(llist *head, const char *filename) {
|
|||
while (current != NULL) {
|
||||
// Write the task data to the CSV file
|
||||
Task *task = (Task *) (current->data);
|
||||
fprintf(file, "%s, %lu, %lu, %d, %lu\n",
|
||||
fprintf(file, "%s, %llu, %llu, %d, %lu\n",
|
||||
task->name,
|
||||
task->created,
|
||||
task->deadline,
|
||||
|
@ -79,10 +79,10 @@ llist *write_csv_to_llist(const char *filename) {
|
|||
|
||||
|
||||
// convert char in integer and date
|
||||
unsigned long int task_creation_date = strtoul(task_creation_dateSTR,NULL, 10);
|
||||
unsigned long int task_deadline_date = strtoul(task_deadline_dateSTR,NULL, 10);
|
||||
unsigned long int task_spare = strtoul(task_spareSTR,NULL, 10);
|
||||
int task_priority = (int) strtol(task_prioritySTR, NULL, 10);
|
||||
unsigned long long int task_creation_date = (unsigned long long int)strtoul(task_creation_dateSTR, NULL, 10);
|
||||
unsigned long long int task_deadline_date = (unsigned long long int)strtoul(task_deadline_dateSTR,NULL, 10);
|
||||
unsigned long int task_spare = (unsigned long int)strtoul(task_spareSTR,NULL, 10);
|
||||
int task_priority = (int)strtol(task_prioritySTR, NULL, 10);
|
||||
|
||||
|
||||
//create Task
|
||||
|
|
Loading…
Reference in New Issue