thread.h (628B)
1 #ifndef THREAD_H 2 #define THREAD_H 3 4 #define MAX_DEPTH 10 5 6 #include <stdio.h> 7 8 struct thread { 9 int id; /* unique id */ 10 int pid; /* parent id */ 11 int lastid; 12 int time[6]; 13 char user[32]; 14 char *msg; 15 int msgcap; 16 int msglen; 17 FILE *stream; 18 int lineno; 19 int depth; 20 int depth_array[MAX_DEPTH]; 21 }; 22 23 int thread_open(struct thread *, char *); 24 void thread_reset(struct thread *); 25 int thread_close(struct thread *); 26 int thread_next(struct thread *); 27 int thread_add(struct thread *, int, char *); 28 int thread_write_plain(struct thread *, FILE *); 29 int thread_write_html(struct thread *, FILE *, int); 30 31 #endif /* THREAD_H */