change lu zu llu

bugfix
Jan Wild 2024-12-14 22:11:47 +01:00
parent b027a12354
commit 7f6a2c865b
No known key found for this signature in database
GPG Key ID: 0BCB2E053F2192BB
1 changed files with 5 additions and 5 deletions

View File

@ -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