4 static int number = 0; // number of created tasks
6 Task * Task_Append(Task * p, char * message, int bufsiz, int repetitions, char * outfile)
8 Task * t = (Task*)(calloc(1, sizeof(Task)));
12 t->output = (char*)(calloc(t->outsiz, sizeof(char)));
17 t->repetitions = repetitions;
18 if (outfile == NULL || outfile[0] == '\0')
21 t->outfile = strdup(outfile);
37 Task * Task_Prepend(Task * n, char * message, int bufsiz, int repetitions, char * outfile)
39 Task * t = (Task*)(calloc(1, sizeof(Task)));
43 t->output = (char*)(calloc(t->outsiz, sizeof(char)));
48 t->repetitions = repetitions;
49 if (outfile == NULL || outfile[0] == '\0')
52 t->outfile = strdup(outfile);
66 void Task_Extract(Task * t)
77 void Task_Destroy(Task * t)
87 void Task_DebugPrint(Task * t)
90 log_print(3, "Task_DebugPrint", "no tasks");
95 log_print(3, "Task_DebugPrint", "%d %p <- %p -> %p: %s", count,(void*)(t->prev), (void*)t, (void*)(t->next), t->message);