| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | #ifndef _CB_IMPL_H_
 | 
					
						
							|  |  |  | #define _CB_IMPL_H_
 | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | #include <hcl.h>
 | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +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
 | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | #	define HCL_IS_PATH_SEP(c) ((c) == '/')
 | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | /* 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
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | #if defined(__cplusplus)
 | 
					
						
							|  |  |  | extern "C" { | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-14 04:21:35 +00:00
										 |  |  | HCL_EXPORT hcl_errnum_t hcl_vmprim_syserrstrb ( | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | 	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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-14 04:21:35 +00:00
										 |  |  | HCL_EXPORT void hcl_vmprim_assertfail ( | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | 	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
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-14 04:21:35 +00:00
										 |  |  | HCL_EXPORT void* hcl_vmprim_alloc_heap ( | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | 	hcl_t*             hcl, | 
					
						
							|  |  |  | 	hcl_oow_t          size | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-14 04:21:35 +00:00
										 |  |  | HCL_EXPORT void hcl_vmprim_free_heap ( | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | 	hcl_t*             hcl, | 
					
						
							|  |  |  | 	void*              ptr | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-15 12:57:05 +00:00
										 |  |  | HCL_EXPORT void hcl_vmprim_vm_gettime ( | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | 	hcl_t*             hcl, | 
					
						
							|  |  |  | 	hcl_ntime_t*       now | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-15 12:57:05 +00:00
										 |  |  | HCL_EXPORT int hcl_vmprim_vm_sleep ( | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | 	hcl_t*             hcl, | 
					
						
							|  |  |  | 	const hcl_ntime_t* dur | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-14 04:21:35 +00:00
										 |  |  | HCL_EXPORT void hcl_vmprim_dl_startup ( | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | 	hcl_t*             hcl | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-14 04:21:35 +00:00
										 |  |  | HCL_EXPORT void hcl_vmprim_dl_cleanup ( | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | 	hcl_t*             hcl | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-14 04:21:35 +00:00
										 |  |  | HCL_EXPORT void* hcl_vmprim_dl_open ( | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | 	hcl_t*             hcl,  | 
					
						
							|  |  |  | 	const hcl_ooch_t*  name, | 
					
						
							|  |  |  | 	int                flags | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-14 04:21:35 +00:00
										 |  |  | HCL_EXPORT void hcl_vmprim_dl_close ( | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | 	hcl_t*             hcl, | 
					
						
							|  |  |  | 	void*              handle | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-14 04:21:35 +00:00
										 |  |  | HCL_EXPORT void* hcl_vmprim_dl_getsym ( | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | 	hcl_t*             hcl, | 
					
						
							|  |  |  | 	void*              handle, | 
					
						
							|  |  |  | 	const hcl_ooch_t*  name | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-03 15:57:14 +00:00
										 |  |  | #if defined(__cplusplus)
 | 
					
						
							| 
									
										
										
										
											2018-11-02 14:15:28 +00:00
										 |  |  | } | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 |