2020-03-20 15:01:36 +00:00
|
|
|
#ifndef __qwaq_h
|
|
|
|
#define __qwaq_h
|
|
|
|
|
2021-03-27 11:09:37 +00:00
|
|
|
#include <pthread.h>
|
|
|
|
|
2020-03-20 15:01:36 +00:00
|
|
|
#include "QF/darray.h"
|
2020-03-21 16:00:05 +00:00
|
|
|
#include "QF/progs.h"
|
2020-03-22 11:51:55 +00:00
|
|
|
#include "QF/sys.h"
|
2020-03-20 15:01:36 +00:00
|
|
|
|
2020-04-01 15:11:47 +00:00
|
|
|
typedef void (*progsinit_f) (progs_t *pr);
|
|
|
|
|
2020-03-20 15:01:36 +00:00
|
|
|
typedef struct qwaq_thread_s {
|
|
|
|
pthread_t thread_id;
|
|
|
|
int return_code;
|
|
|
|
struct DARRAY_TYPE (const char *) args;
|
|
|
|
sys_printf_t sys_printf;
|
2020-04-01 15:11:47 +00:00
|
|
|
progsinit_f*progsinit;
|
2020-03-20 15:01:36 +00:00
|
|
|
progs_t *pr;
|
2020-04-01 15:11:47 +00:00
|
|
|
struct hashlink_s *hashlink_freelist;
|
2020-03-20 15:01:36 +00:00
|
|
|
func_t main_func;
|
2020-03-20 15:14:33 +00:00
|
|
|
void *data;
|
2020-03-20 15:01:36 +00:00
|
|
|
} qwaq_thread_t;
|
|
|
|
|
2021-07-06 02:55:29 +00:00
|
|
|
typedef struct qwaq_thread_set_s DARRAY_TYPE(qwaq_thread_t *) qwaq_thread_set_t;
|
|
|
|
|
2021-12-13 00:13:39 +00:00
|
|
|
struct memhunk_s;
|
|
|
|
void BI_Init (struct memhunk_s *hunk, progs_t *pr);
|
2021-09-22 07:22:11 +00:00
|
|
|
void BI_Curses_Init (progs_t *pr);
|
|
|
|
void BI_Input_Init (progs_t *pr);
|
2020-03-22 11:51:55 +00:00
|
|
|
void QWAQ_EditBuffer_Init (progs_t *pr);
|
2012-07-14 00:06:04 +00:00
|
|
|
extern struct cbuf_s *qwaq_cbuf;
|
2020-03-20 15:14:33 +00:00
|
|
|
qwaq_thread_t *create_thread (void *(*thread_func) (qwaq_thread_t *), void *);
|
2020-03-20 15:01:36 +00:00
|
|
|
|
2021-07-06 02:55:29 +00:00
|
|
|
int qwaq_init_threads (qwaq_thread_set_t *thread_data);
|
|
|
|
|
2020-03-20 15:01:36 +00:00
|
|
|
#endif//__qwaq_h
|