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
|
|
|
|
|
|
|
moo_oow_t memsize;
|
|
|
|
int large_pages;
|
2018-11-14 04:25:27 +00:00
|
|
|
moo_cmgr_t* cmgr;
|
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;
|
|
|
|
};
|
|
|
|
typedef struct moo_iostd_t moo_iostd_t;
|
|
|
|
|
2018-11-07 15:26:30 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
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
|
|
|
);
|
|
|
|
|
|
|
|
MOO_EXPORT void* moo_getxtnstd (
|
|
|
|
moo_t* moo
|
|
|
|
);
|
|
|
|
|
2018-11-15 08:40:22 +00:00
|
|
|
MOO_EXPORT void moo_abortstd (
|
|
|
|
moo_t* moo
|
|
|
|
);
|
|
|
|
|
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
|
|
|
|
);
|
2018-11-07 15:26:30 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|