hcl/lib/cb-impl.h

90 lines
1.5 KiB
C
Raw Normal View History

2018-11-02 14:15:28 +00:00
#ifndef _CB_IMPL_H_
#define _CB_IMPL_H_
2018-11-02 14:15:28 +00:00
#include <hcl.h>
2018-11-02 14:15:28 +00:00
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
# define HCL_IS_PATH_SEP(c) ((c) == '/' || (c) == '\\')
2018-11-02 14:15:28 +00:00
#else
# define HCL_IS_PATH_SEP(c) ((c) == '/')
2018-11-02 14:15:28 +00:00
#endif
/* TODO: handle path with a drive letter or in the UNC notation */
#define HCL_IS_PATH_ABSOLUTE(x) HCL_IS_PATH_SEP(x[0])
2018-11-02 14:15:28 +00:00
#if defined(__cplusplus)
extern "C" {
2018-11-02 14:15:28 +00:00
#endif
hcl_errnum_t hcl_vmprim_syserrstrb (
hcl_t* hcl,
int syserr_type,
int syserr_code,
hcl_bch_t* buf,
hcl_oow_t len
);
2018-11-02 14:15:28 +00:00
void hcl_vmprim_assertfail (
hcl_t* hcl,
const hcl_bch_t* expr,
const hcl_bch_t* file,
hcl_oow_t line
);
2018-11-02 14:15:28 +00:00
void* hcl_vmprim_alloc_heap (
hcl_t* hcl,
hcl_oow_t size
);
2018-11-02 14:15:28 +00:00
void hcl_vmprim_free_heap (
hcl_t* hcl,
void* ptr
);
2018-11-02 14:15:28 +00:00
void hcl_vmprim_gettime (
hcl_t* hcl,
hcl_ntime_t* now
);
2018-11-02 14:15:28 +00:00
void hcl_vmprim_sleep (
hcl_t* hcl,
const hcl_ntime_t* dur
);
2018-11-02 14:15:28 +00:00
void hcl_vmprim_dl_startup (
hcl_t* hcl
);
2018-11-02 14:15:28 +00:00
void hcl_vmprim_dl_cleanup (
hcl_t* hcl
);
2018-11-02 14:15:28 +00:00
void* hcl_vmprim_dl_open (
hcl_t* hcl,
const hcl_ooch_t* name,
int flags
);
2018-11-02 14:15:28 +00:00
void hcl_vmprim_dl_close (
hcl_t* hcl,
void* handle
);
2018-11-02 14:15:28 +00:00
void* hcl_vmprim_dl_getsym (
hcl_t* hcl,
void* handle,
const hcl_ooch_t* name
);
2018-11-02 14:15:28 +00:00
#if defined(__cplusplus)
2018-11-02 14:15:28 +00:00
}
#endif
#endif