2018-11-07 15:26:30 +00:00
|
|
|
#ifndef _MOO_STD_H_
|
|
|
|
#define _MOO_STD_H_
|
|
|
|
|
|
|
|
#include <moo.h>
|
|
|
|
|
2018-11-13 09:53:48 +00:00
|
|
|
enum moo_cfgstd_type_t
|
2018-11-11 16:53:21 +00:00
|
|
|
{
|
2018-11-13 09:53:48 +00:00
|
|
|
MOO_CFGSTD_OPT,
|
|
|
|
MOO_CFGSTD_OPTB,
|
|
|
|
MOO_CFGSTD_OPTU
|
2018-11-11 16:53:21 +00:00
|
|
|
};
|
2018-11-13 09:53:48 +00:00
|
|
|
typedef enum moo_cfgstd_type_t moo_cfgstd_type_t;
|
2018-11-11 16:53:21 +00:00
|
|
|
|
2018-11-13 09:53:48 +00:00
|
|
|
struct moo_cfgstd_t
|
2018-11-11 16:53:21 +00:00
|
|
|
{
|
2018-11-13 09:53:48 +00:00
|
|
|
moo_cfgstd_type_t type;
|
2018-11-11 16:53:21 +00:00
|
|
|
|
2019-10-16 09:04:09 +00:00
|
|
|
moo_oow_t proc_stk_size;
|
2018-11-11 16:53:21 +00:00
|
|
|
int large_pages;
|
2018-11-14 04:25:27 +00:00
|
|
|
moo_cmgr_t* cmgr;
|
2019-05-18 18:01:02 +00:00
|
|
|
moo_cmgr_t* input_cmgr;
|
|
|
|
moo_cmgr_t* log_cmgr;
|
2019-05-22 08:49:27 +00:00
|
|
|
moo_log_write_t log_write;
|
2018-11-11 16:53:21 +00:00
|
|
|
|
2018-11-13 09:53:48 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
const moo_ooch_t* log;
|
|
|
|
const moo_ooch_t* dbg;
|
|
|
|
} opt;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
const moo_bch_t* log;
|
|
|
|
const moo_bch_t* dbg;
|
|
|
|
} optb;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
const moo_uch_t* log;
|
|
|
|
const moo_uch_t* dbg;
|
|
|
|
} optu;
|
|
|
|
} u;
|
2018-11-11 16:53:21 +00:00
|
|
|
};
|
2018-11-13 09:53:48 +00:00
|
|
|
typedef struct moo_cfgstd_t moo_cfgstd_t;
|
2018-11-11 16:53:21 +00:00
|
|
|
|
2018-11-12 09:19:35 +00:00
|
|
|
|
|
|
|
enum moo_iostd_type_t
|
|
|
|
{
|
|
|
|
MOO_IOSTD_FILE,
|
|
|
|
MOO_IOSTD_FILEB,
|
|
|
|
MOO_IOSTD_FILEU
|
|
|
|
};
|
|
|
|
typedef enum moo_iostd_type_t moo_iostd_type_t;
|
|
|
|
|
|
|
|
struct moo_iostd_t
|
|
|
|
{
|
|
|
|
moo_iostd_type_t type;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
const moo_ooch_t* path;
|
|
|
|
} file;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
const moo_bch_t* path;
|
|
|
|
} fileb;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
const moo_uch_t* path;
|
|
|
|
} fileu;
|
|
|
|
} u;
|
2019-05-18 18:01:02 +00:00
|
|
|
moo_cmgr_t* cmgr;
|
2018-11-12 09:19:35 +00:00
|
|
|
};
|
|
|
|
typedef struct moo_iostd_t moo_iostd_t;
|
|
|
|
|
2018-11-07 15:26:30 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2018-11-19 15:52:26 +00:00
|
|
|
MOO_EXPORT void moo_start_ticker (
|
|
|
|
void
|
|
|
|
);
|
|
|
|
|
|
|
|
MOO_EXPORT void moo_stop_ticker (
|
|
|
|
void
|
|
|
|
);
|
|
|
|
|
2018-11-26 09:49:03 +00:00
|
|
|
MOO_EXPORT void moo_catch_termreq (
|
|
|
|
void
|
|
|
|
);
|
|
|
|
|
|
|
|
MOO_EXPORT void moo_uncatch_termreq (
|
|
|
|
void
|
|
|
|
);
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------- */
|
2018-11-07 15:26:30 +00:00
|
|
|
MOO_EXPORT moo_t* moo_openstd (
|
2018-11-13 06:54:30 +00:00
|
|
|
moo_oow_t xtnsize,
|
2018-11-13 09:53:48 +00:00
|
|
|
const moo_cfgstd_t* cfg,
|
2018-11-13 06:54:30 +00:00
|
|
|
moo_errinf_t* errinfo
|
2018-11-07 15:26:30 +00:00
|
|
|
);
|
|
|
|
|
2018-11-15 08:40:22 +00:00
|
|
|
MOO_EXPORT void moo_abortstd (
|
|
|
|
moo_t* moo
|
|
|
|
);
|
|
|
|
|
2019-07-10 09:19:38 +00:00
|
|
|
#if defined(MOO_INCLUDE_COMPILER)
|
2018-11-12 09:19:35 +00:00
|
|
|
MOO_EXPORT int moo_compilestd(
|
|
|
|
moo_t* moo,
|
2018-11-13 06:54:30 +00:00
|
|
|
const moo_iostd_t* in,
|
2018-11-12 09:19:35 +00:00
|
|
|
moo_oow_t count
|
|
|
|
);
|
2019-07-10 09:19:38 +00:00
|
|
|
#endif
|
2018-11-19 15:52:26 +00:00
|
|
|
|
|
|
|
MOO_EXPORT void moo_rcvtickstd (
|
|
|
|
moo_t* moo,
|
|
|
|
int v
|
|
|
|
);
|
|
|
|
|
2018-11-26 09:49:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-07 15:26:30 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|