diff --git a/inc/Collections-C/cc_array.bi b/inc/Collections-C/cc_array.bi
new file mode 100644
index 00000000..5a1f39ff
--- /dev/null
+++ b/inc/Collections-C/cc_array.bi
@@ -0,0 +1,123 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_ARRAY_H
+
+#define COLLECTIONS_C_ARRAY_H
+#include once "cc_common.bi"
+
+extern "C"
+
+type CC_Array as cc_array_s
+
+type cc_array_conf_s
+ capacity as uinteger
+ exp_factor as single
+ mem_alloc as function(byval size as uinteger) as any ptr
+ mem_calloc as function(byval blocks as uinteger, byval size as uinteger) as any ptr
+ mem_free as sub(byval block as any ptr)
+end type
+
+type CC_ArrayConf as cc_array_conf_s
+
+type cc_array_iter_s
+ ar as CC_Array ptr
+ index as uinteger
+ last_removed as bool
+end type
+
+type CC_ArrayIter as cc_array_iter_s
+
+type array_zip_iter_s
+ ar1 as CC_Array ptr
+ ar2 as CC_Array ptr
+ index as uinteger
+ last_removed as bool
+end type
+
+type CC_ArrayZipIter as array_zip_iter_s
+declare function cc_array_new(byval out_ as CC_Array ptr ptr) as cc_stat
+declare function cc_array_new_conf(byval conf as const CC_ArrayConf const ptr, byval out_ as CC_Array ptr ptr) as cc_stat
+declare sub cc_array_conf_init(byval conf as CC_ArrayConf ptr)
+declare function cc_array_struct_size() as uinteger
+Declare Sub cc_array_destroy(ByVal ar As CC_Array Ptr)
+declare sub cc_array_destroy_cb(byval ar as CC_Array ptr, byval cb as sub(byval as any ptr))
+declare function cc_array_add(byval ar as CC_Array ptr, byval element as any ptr) as cc_stat
+declare function cc_array_add_at(byval ar as CC_Array ptr, byval element as any ptr, byval index as uinteger) as cc_stat
+declare function cc_array_replace_at(byval ar as CC_Array ptr, byval element as any ptr, byval index as uinteger, byval out_ as any ptr ptr) as cc_stat
+declare function cc_array_swap_at(byval ar as CC_Array ptr, byval index1 as uinteger, byval index2 as uinteger) as cc_stat
+declare function cc_array_remove(byval ar as CC_Array ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_array_remove_at(byval ar as CC_Array ptr, byval index as uinteger, byval out_ as any ptr ptr) as cc_stat
+Declare Function cc_array_remove_last(ByVal ar As CC_Array Ptr, ByVal out_ As Any Ptr Ptr) As cc_stat
+declare sub cc_array_remove_all(byval ar as CC_Array ptr)
+declare sub cc_array_remove_all_free(byval ar as CC_Array ptr)
+declare function cc_array_get_at(byval ar as CC_Array ptr, byval index as uinteger, byval out_ as any ptr ptr) as cc_stat
+declare function cc_array_get_last(byval ar as CC_Array ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_array_subarray(byval ar as CC_Array ptr, byval from as uinteger, byval to as uinteger, byval out_ as CC_Array ptr ptr) as cc_stat
+declare function cc_array_copy_shallow(byval ar as CC_Array ptr, byval out_ as CC_Array ptr ptr) as cc_stat
+declare function cc_array_copy_deep(byval ar as CC_Array ptr, byval cp as function(byval as any ptr) as any ptr, byval out_ as CC_Array ptr ptr) as cc_stat
+declare sub cc_array_reverse(byval ar as CC_Array ptr)
+declare function cc_array_trim_capacity(byval ar as CC_Array ptr) as cc_stat
+declare function cc_array_contains(byval ar as CC_Array ptr, byval element as any ptr) as uinteger
+declare function cc_array_contains_value(byval ar as CC_Array ptr, byval element as any ptr, byval cmp as function(byval as const any ptr, byval as const any ptr) as long) as uinteger
+declare function cc_array_size(byval ar as CC_Array ptr) as uinteger
+declare function cc_array_capacity(byval ar as CC_Array ptr) as uinteger
+declare function cc_array_index_of(byval ar as CC_Array ptr, byval element as any ptr, byval index as uinteger ptr) as cc_stat
+declare sub cc_array_sort(byval ar as CC_Array ptr, byval cmp as function(byval as const any ptr, byval as const any ptr) as long)
+declare sub cc_array_map(byval ar as CC_Array ptr, byval fn as sub(byval as any ptr))
+declare sub cc_array_reduce(byval ar as CC_Array ptr, byval fn as sub(byval as any ptr, byval as any ptr, byval as any ptr), byval result as any ptr)
+declare function cc_array_filter_mut(byval ar as CC_Array ptr, byval predicate as function(byval as const any ptr) as bool) as cc_stat
+declare function cc_array_filter(byval ar as CC_Array ptr, byval predicate as function(byval as const any ptr) as bool, byval out_ as CC_Array ptr ptr) as cc_stat
+declare sub cc_array_iter_init(byval iter as CC_ArrayIter ptr, byval ar as CC_Array ptr)
+declare function cc_array_iter_next(byval iter as CC_ArrayIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_array_iter_remove(byval iter as CC_ArrayIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_array_iter_add(byval iter as CC_ArrayIter ptr, byval element as any ptr) as cc_stat
+declare function cc_array_iter_replace(byval iter as CC_ArrayIter ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_array_iter_index(byval iter as CC_ArrayIter ptr) as uinteger
+declare sub cc_array_zip_iter_init(byval iter as CC_ArrayZipIter ptr, byval a1 as CC_Array ptr, byval a2 as CC_Array ptr)
+declare function cc_array_zip_iter_next(byval iter as CC_ArrayZipIter ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_array_zip_iter_add(byval iter as CC_ArrayZipIter ptr, byval e1 as any ptr, byval e2 as any ptr) as cc_stat
+declare function cc_array_zip_iter_remove(byval iter as CC_ArrayZipIter ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_array_zip_iter_replace(byval iter as CC_ArrayZipIter ptr, byval e1 as any ptr, byval e2 as any ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_array_zip_iter_index(byval iter as CC_ArrayZipIter ptr) as uinteger
+declare function cc_array_get_buffer(byval ar as CC_Array ptr) as const any const ptr ptr
+#macro CC_ARRAY_FOREACH(val, array, body)
+ scope
+ dim cc_array_iter_53d46d2a04458e7b as CC_ArrayIter
+ cc_array_iter_init(@cc_array_iter_53d46d2a04458e7b, array)
+ dim val as any ptr
+ while (cc_array_iter_next(&cc_array_iter_53d46d2a04458e7b, &val) != CC_ITER_END)
+ body
+ wend
+ end scope
+#endmacro
+#macro CC_ARRAY_FOREACH_ZIP(val1, val2, array1, array2, body)
+ scope
+ dim cc_array_zip_iter_ea08d3e52f25883b3 as CC_ArrayZipIter
+ cc_array_zip_iter_init(@cc_array_zip_iter_ea08d3e52f25883b3, array1, array2)
+ dim val1 as any ptr
+ dim val2 as any ptr
+ while (cc_array_zip_iter_next(@cc_array_zip_iter_ea08d3e52f25883b3, @val1, @val2)<>CC_ITER_END)
+ body
+ wend
+ end scope
+#endmacro
+
+end extern
+#endif
diff --git a/inc/Collections-C/cc_common.bi b/inc/Collections-C/cc_common.bi
new file mode 100644
index 00000000..4f7d41f1
--- /dev/null
+++ b/inc/Collections-C/cc_common.bi
@@ -0,0 +1,48 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+#pragma once
+#ifndef COLLECTIONS_C_COMMON_H
+
+#define COLLECTIONS_C_COMMON_H
+#include once "crt/stdlib.bi"
+#include once "crt/stdint.bi"
+#include once "crt/string.bi"
+
+extern "C"
+
+const MAX_POW_TWO = cuint(1) shl 31
+
+type bool as long
+type cc_stat as long
+enum
+ CC_OK = 0
+ CC_ERR_ALLOC = 1
+ CC_ERR_INVALID_CAPACITY = 2
+ CC_ERR_INVALID_RANGE = 3
+ CC_ERR_MAX_CAPACITY = 4
+ CC_ERR_KEY_NOT_FOUND = 6
+ CC_ERR_VALUE_NOT_FOUND = 7
+ CC_ERR_OUT_OF_RANGE = 8
+ CC_ITER_END = 9
+end enum
+
+const CC_MAX_ELEMENTS = cuint(-2)
+declare function cc_common_cmp_str(byval key1 as const any ptr, byval key2 as const any ptr) as long
+declare function CC_CMP_STRING alias "cc_common_cmp_str"(byval key1 as const any ptr, byval key2 as const any ptr) as long
+End Extern
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/cc_deque.bi b/inc/Collections-C/cc_deque.bi
new file mode 100644
index 00000000..786c6f12
--- /dev/null
+++ b/inc/Collections-C/cc_deque.bi
@@ -0,0 +1,116 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_CC_DEQUE_H
+
+#define COLLECTIONS_C_CC_DEQUE_H
+#include once "crt/stdlib.bi"
+#include once "crt/stdint.bi"
+#include once "crt/string.bi"
+#include once "cc_common.bi"
+
+extern "C"
+
+Type CC_Deque As cc_deque_s
+
+type cc_deque_conf_s
+ capacity as uinteger
+ mem_alloc as function(byval size as uinteger) as any ptr
+ mem_calloc as function(byval blocks as uinteger, byval size as uinteger) as any ptr
+ mem_free as sub(byval block as any ptr)
+end type
+
+type CC_DequeConf as cc_deque_conf_s
+
+type cc_deque_iter_s
+ deque as CC_Deque ptr
+ index as uinteger
+ last_removed as bool
+end type
+
+type CC_DequeIter as cc_deque_iter_s
+
+type cc_deque_zip_iter_s
+ d1 as CC_Deque ptr
+ d2 as CC_Deque ptr
+ index as uinteger
+ last_removed as bool
+end type
+
+type CC_DequeZipIter as cc_deque_zip_iter_s
+declare function cc_deque_new(byval deque as CC_Deque ptr ptr) as cc_stat
+declare function cc_deque_new_conf(byval conf as const CC_DequeConf const ptr, byval deque as CC_Deque ptr ptr) as cc_stat
+declare sub cc_deque_conf_init(byval conf as CC_DequeConf ptr)
+declare function cc_deque_struct_size() as uinteger
+declare sub cc_deque_destroy(byval deque as CC_Deque ptr)
+declare sub cc_deque_destroy_cb(byval deque as CC_Deque ptr, byval cb as sub(byval as any ptr))
+declare function cc_deque_add(byval deque as CC_Deque ptr, byval element as any ptr) as cc_stat
+declare function cc_deque_add_first(byval deque as CC_Deque ptr, byval element as any ptr) as cc_stat
+declare function cc_deque_add_last(byval deque as CC_Deque ptr, byval element as any ptr) as cc_stat
+declare function cc_deque_add_at(byval deque as CC_Deque ptr, byval element as any ptr, byval index as uinteger) as cc_stat
+declare function cc_deque_replace_at(byval deque as CC_Deque ptr, byval element as any ptr, byval index as uinteger, byval out_ as any ptr ptr) as cc_stat
+declare function cc_deque_remove(byval deque as CC_Deque ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_deque_remove_at(byval deque as CC_Deque ptr, byval index as uinteger, byval out_ as any ptr ptr) as cc_stat
+declare function cc_deque_remove_first(byval deque as CC_Deque ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_deque_remove_last(byval deque as CC_Deque ptr, byval out_ as any ptr ptr) as cc_stat
+declare sub cc_deque_remove_all(byval deque as CC_Deque ptr)
+declare sub cc_deque_remove_all_cb(byval deque as CC_Deque ptr, byval cb as sub(byval as any ptr))
+declare function cc_deque_get_at(byval deque as const CC_Deque const ptr, byval index as uinteger, byval out_ as any ptr ptr) as cc_stat
+declare function cc_deque_get_first(byval deque as const CC_Deque const ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_deque_get_last(byval deque as const CC_Deque const ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_deque_copy_shallow(byval deque as const CC_Deque const ptr, byval out_ as CC_Deque ptr ptr) as cc_stat
+declare function cc_deque_copy_deep(byval deque as const CC_Deque const ptr, byval cp as function(byval as any ptr) as any ptr, byval out_ as CC_Deque ptr ptr) as cc_stat
+declare sub cc_deque_reverse(byval deque as CC_Deque ptr)
+declare function cc_deque_trim_capacity(byval deque as CC_Deque ptr) as cc_stat
+declare function cc_deque_contains(byval deque as const CC_Deque const ptr, byval element as const any ptr) as uinteger
+declare function cc_deque_contains_value(byval deque as const CC_Deque const ptr, byval element as const any ptr, byval cmp as function(byval as const any ptr, byval as const any ptr) as long) as uinteger
+declare function cc_deque_size(byval deque as const CC_Deque const ptr) as uinteger
+declare function cc_deque_capacity(byval deque as const CC_Deque const ptr) as uinteger
+declare function cc_deque_index_of(byval deque as const CC_Deque const ptr, byval element as const any ptr, byval i as uinteger ptr) as cc_stat
+declare sub cc_deque_foreach(byval deque as CC_Deque ptr, byval fn as sub(byval as any ptr))
+declare function cc_deque_filter_mut(byval deque as CC_Deque ptr, byval predicate as function(byval as const any ptr) as bool) as cc_stat
+declare function cc_deque_filter(byval deque as CC_Deque ptr, byval predicate as function(byval as const any ptr) as bool, byval out_ as CC_Deque ptr ptr) as cc_stat
+declare sub cc_deque_iter_init(byval iter as CC_DequeIter ptr, byval deque as CC_Deque ptr)
+declare function cc_deque_iter_next(byval iter as CC_DequeIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_deque_iter_remove(byval iter as CC_DequeIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_deque_iter_add(byval iter as CC_DequeIter ptr, byval element as any ptr) as cc_stat
+declare function cc_deque_iter_replace(byval iter as CC_DequeIter ptr, byval replacement as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_deque_iter_index(byval iter as CC_DequeIter ptr) as uinteger
+declare sub cc_deque_zip_iter_init(byval iter as CC_DequeZipIter ptr, byval d1 as CC_Deque ptr, byval d2 as CC_Deque ptr)
+declare function cc_deque_zip_iter_next(byval iter as CC_DequeZipIter ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_deque_zip_iter_add(byval iter as CC_DequeZipIter ptr, byval e1 as any ptr, byval e2 as any ptr) as cc_stat
+declare function cc_deque_zip_iter_remove(byval iter as CC_DequeZipIter ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_deque_zip_iter_replace(byval iter as CC_DequeZipIter ptr, byval e1 as any ptr, byval e2 as any ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_deque_zip_iter_index(byval iter as CC_DequeZipIter ptr) as uinteger
+declare function cc_deque_get_buffer(byval deque as const CC_Deque const ptr) as const any const ptr ptr
+
+#macro CC_DEQUE_FOREACH_ZIP(val1, val2, deque1, deque2, body)
+ scope
+ dim cc_deque_zip_iter_ea08d3e52f25883b3 as CC_DequeZipIter
+ cc_deque_zip_iter_init(@cc_deque_zip_iter_ea08d3e52f25883b, deque1, deque2)
+ dim val1 as any ptr
+ dim val2 as any ptr
+ while (cc_deque_zip_iter_next(@cc_deque_zip_iter_ea08d3e52f25883b3, @val1, @val2) <> CC_ITER_END)
+ body
+ Wend
+ end scope
+#endmacro
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/cc_hashset.bi b/inc/Collections-C/cc_hashset.bi
new file mode 100644
index 00000000..ab0343fa
--- /dev/null
+++ b/inc/Collections-C/cc_hashset.bi
@@ -0,0 +1,63 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_CC_HASHSET_H
+
+#define COLLECTIONS_C_CC_HASHSET_H
+#include once "cc_hashtable.bi"
+#include once "cc_common.bi"
+extern "C"
+
+type BOOL As long
+Type CC_HashSet As cc_hashset_s
+type CC_HashSetConf as CC_HashTableConf
+
+type cc_hashset_iter_s
+ iter as CC_HashTableIter
+end type
+
+type CC_HashSetIter as cc_hashset_iter_s
+declare sub cc_hashset_conf_init(byval conf as CC_HashSetConf ptr)
+declare function cc_hashset_new(byval hs as CC_HashSet ptr ptr) as cc_stat
+declare function cc_hashset_new_conf(byval conf as const CC_HashSetConf const ptr, byval hs as CC_HashSet ptr ptr) as cc_stat
+declare sub cc_hashset_destroy(byval set as CC_HashSet ptr)
+declare function cc_hashset_struct_size() as uinteger
+declare function cc_hashset_add(byval set as CC_HashSet ptr, byval element as any ptr) as cc_stat
+declare function cc_hashset_remove(byval set as CC_HashSet ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare sub cc_hashset_remove_all(byval set as CC_HashSet ptr)
+Declare Function cc_hashset_contains(ByVal set As CC_HashSet Ptr, ByVal element As Any Ptr) As BOOL
+declare function cc_hashset_size(byval set as CC_HashSet ptr) as uinteger
+declare function cc_hashset_capacity(byval set as CC_HashSet ptr) as uinteger
+declare sub cc_hashset_foreach(byval set as CC_HashSet ptr, byval op as sub(byval as const any ptr))
+declare sub cc_hashset_iter_init(byval iter as CC_HashSetIter ptr, byval set as CC_HashSet ptr)
+declare function cc_hashset_iter_next(byval iter as CC_HashSetIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_hashset_iter_remove(byval iter as CC_HashSetIter ptr, byval out_ as any ptr ptr) as cc_stat
+'#macro CC_HASHSET_FOREACH(val_, hashset_, body)
+' scope
+' dim cc_hashset_iter_53d46d2a04458e7b as CC_HashSetIter
+' cc_hashset_iter_init(@cc_hashset_iter_53d46d2a04458e7b, hashset_)
+' dim val_ as any ptr
+' while (cc_hashset_iter_next(@cc_hashset_iter_53d46d2a04458e7b, @val) <> CC_ITER_END)
+' body
+' wend
+' End Scope
+'#endmacro
+
+end extern
+#endif
diff --git a/inc/Collections-C/cc_hashtable.bi b/inc/Collections-C/cc_hashtable.bi
new file mode 100644
index 00000000..3d42c820
--- /dev/null
+++ b/inc/Collections-C/cc_hashtable.bi
@@ -0,0 +1,102 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_CC_HASHTABLE_H
+
+#define COLLECTIONS_C_CC_HASHTABLE_H
+#include "cc_array.bi"
+#include "cc_common.bi"
+
+Extern "C"
+
+const KEY_LENGTH_VARIABLE = -1
+#define KEY_LENGTH_POINTER sizeof(any ptr)
+Type CC_HashTable As cc_hashtable_s
+
+type table_entry_s
+ key as any ptr
+ value as any ptr
+ hash as uinteger
+ next_ as table_entry_s ptr
+end type
+
+type TableEntry as table_entry_s
+
+type cc_hashtable_iter
+ table as CC_HashTable ptr
+ bucket_index as uinteger
+ prev_entry as TableEntry ptr
+ next_entry as TableEntry ptr
+end type
+
+type CC_HashTableIter as cc_hashtable_iter
+
+type cc_hashtable_conf_s
+ load_factor as single
+ initial_capacity as uinteger
+ key_length as long
+ hash_seed as ulong
+ hash as function(byval key as const any ptr, byval l as long, byval seed as ulong) as uinteger
+ key_compare as function(byval key1 as const any ptr, byval key2 as const any ptr) as long
+ mem_alloc as function(byval size as uinteger) as any ptr
+ mem_calloc as function(byval blocks as uinteger, byval size as uinteger) as any ptr
+ mem_free as sub(byval block as any ptr)
+end type
+
+type CC_HashTableConf as cc_hashtable_conf_s
+declare sub cc_hashtable_conf_init(byval conf as CC_HashTableConf ptr)
+declare function cc_hashtable_new(byval out_ as CC_HashTable ptr ptr) as cc_stat
+declare function cc_hashtable_new_conf(byval conf as const CC_HashTableConf const ptr, byval out_ as CC_HashTable ptr ptr) as cc_stat
+declare function cc_hashtable_struct_size() as uinteger
+declare sub cc_hashtable_destroy(byval table as CC_HashTable ptr)
+declare function cc_hashtable_add(byval table as CC_HashTable ptr, byval key as any ptr, byval val as any ptr) as cc_stat
+Declare Function cc_hashtable_get(ByVal table As CC_HashTable Ptr, ByVal key As Any Ptr, ByVal out_ As Any Ptr Ptr) As cc_stat
+declare function cc_hashtable_remove(byval table as CC_HashTable ptr, byval key as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare sub cc_hashtable_remove_all(byval table as CC_HashTable ptr)
+declare function cc_hashtable_contains_key(byval table as CC_HashTable ptr, byval key as any ptr) as bool
+Declare Function cc_hashtable_size(ByVal table As CC_HashTable Ptr) As UInteger
+declare function cc_hashtable_capacity(byval table as CC_HashTable ptr) as uinteger
+declare function cc_hashtable_get_keys(byval table as CC_HashTable ptr, byval out_ as CC_Array ptr ptr) as cc_stat
+declare function cc_hashtable_get_values(byval table as CC_HashTable ptr, byval out_ as CC_Array ptr ptr) as cc_stat
+declare function cc_hashtable_hash_string(byval key as const any ptr, byval len as long, byval seed as ulong) as uinteger
+declare function cc_hashtable_hash(byval key as const any ptr, byval len as long, byval seed as ulong) as uinteger
+declare function cc_hashtable_hash_ptr(byval key as const any ptr, byval len as long, byval seed as ulong) as uinteger
+declare sub cc_hashtable_foreach_key(byval table as CC_HashTable ptr, byval op as sub(byval as const any ptr))
+declare sub cc_hashtable_foreach_value(byval table as CC_HashTable ptr, byval op as sub(byval as any ptr))
+declare sub cc_hashtable_iter_init(byval iter as CC_HashTableIter ptr, byval table as CC_HashTable ptr)
+declare function cc_hashtable_iter_next(byval iter as CC_HashTableIter ptr, byval out_ as TableEntry ptr ptr) as cc_stat
+declare function cc_hashtable_iter_remove(byval iter as CC_HashTableIter ptr, byval out_ as any ptr ptr) as cc_stat
+#macro CC_HASHTABLE_FOREACH(hashtable, key_53d46d2a04458e7b, value_53d46d2a04458e7b, body)
+ scope
+ dim cc_hashtable_iter_53d46d2a04458e7b as CC_HashTableIter
+ cc_hashtable_iter_init(@cc_hashtable_iter_53d46d2a04458e7b, hashtable)
+ dim entry_53d46d2a04458e7b as TableEntry ptr
+ while cc_hashtable_iter_next(@cc_hashtable_iter_53d46d2a04458e7b, @entry_53d46d2a04458e7b) <> CC_ITER_END
+ key_53d46d2a04458e7b = entry_53d46d2a04458e7b->key
+ value_53d46d2a04458e7b = entry_53d46d2a04458e7b->value
+ body
+ wend
+ end scope
+#endmacro
+declare function GENERAL_HASH alias "cc_hashtable_hash"(byval key as const any ptr, byval len as long, byval seed as ulong) as uinteger
+declare function STRING_HASH alias "cc_hashtable_hash_string"(byval key as const any ptr, byval len as long, byval seed as ulong) as uinteger
+declare function POINTER_HASH alias "cc_hashtable_hash_ptr"(byval key as const any ptr, byval len as long, byval seed as ulong) as uinteger
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/cc_list.bi b/inc/Collections-C/cc_list.bi
new file mode 100644
index 00000000..97a77491
--- /dev/null
+++ b/inc/Collections-C/cc_list.bi
@@ -0,0 +1,147 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_CC_LIST_H
+
+#define COLLECTIONS_C_CC_LIST_H
+#include once "crt/stdlib.bi"
+#include once "crt/stdint.bi"
+#include once "crt/string.bi"
+#include once "cc_common.bi"
+extern "C"
+
+Type CC_List As cc_list_s
+
+type node_s
+ data_ as any ptr
+ next_ As node_s Ptr
+ prev as node_s ptr
+end type
+
+Type Node As node_s
+
+type cc_list_iter_s
+ index as uinteger
+ list as CC_List ptr
+ last as Node ptr
+ next_ as Node ptr
+end type
+
+type CC_ListIter as cc_list_iter_s
+
+type cc_list_zip_iter_s
+ l1 as CC_List ptr
+ l2 as CC_List ptr
+ l1_last as Node ptr
+ l2_last as Node ptr
+ l1_next as Node ptr
+ l2_next as Node ptr
+ index as uinteger
+end type
+
+type CC_ListZipIter as cc_list_zip_iter_s
+
+type cc_list_conf_s
+ mem_alloc as function(byval size as uinteger) as any ptr
+ mem_calloc as function(byval blocks as uinteger, byval size as uinteger) as any ptr
+ mem_free as sub(byval block as any ptr)
+end type
+
+type CC_ListConf as cc_list_conf_s
+declare sub cc_list_conf_init(byval conf as CC_ListConf ptr)
+declare function cc_list_new(byval list as CC_List ptr ptr) as cc_stat
+declare function cc_list_new_conf(byval conf as const CC_ListConf const ptr, byval list as CC_List ptr ptr) as cc_stat
+Declare Sub cc_list_destroy(ByVal list As CC_List Ptr)
+declare sub cc_list_destroy_cb(byval list as CC_List ptr, byval cb as sub(byval as any ptr))
+declare function cc_list_struct_size() as uinteger
+declare function cc_list_splice(byval list1 as CC_List ptr, byval list2 as CC_List ptr) as cc_stat
+declare function cc_list_splice_at(byval list as CC_List ptr, byval list2 as CC_List ptr, byval index as uinteger) as cc_stat
+Declare Function cc_list_add(ByVal list As CC_List Ptr, ByVal element As Any Ptr) As cc_stat
+declare function cc_list_add_at(byval list as CC_List ptr, byval element as any ptr, byval index as uinteger) as cc_stat
+declare function cc_list_add_all(byval list1 as CC_List ptr, byval list2 as CC_List ptr) as cc_stat
+declare function cc_list_add_all_at(byval list as CC_List ptr, byval list2 as CC_List ptr, byval index as uinteger) as cc_stat
+declare function cc_list_add_first(byval list as CC_List ptr, byval element as any ptr) as cc_stat
+declare function cc_list_add_last(byval list as CC_List ptr, byval element as any ptr) as cc_stat
+declare function cc_list_remove(byval list as CC_List ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_list_remove_first(byval list as CC_List ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_list_remove_last(byval list as CC_List ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_list_remove_at(byval list as CC_List ptr, byval index as uinteger, byval out_ as any ptr ptr) as cc_stat
+declare function cc_list_remove_all(byval list as CC_List ptr) as cc_stat
+declare function cc_list_remove_all_cb(byval list as CC_List ptr, byval cb as sub(byval as any ptr)) as cc_stat
+Declare Function cc_list_get_at(ByVal list As CC_List Ptr, ByVal index As UInteger, ByVal out_ As Any Ptr Ptr) As cc_stat
+Declare Function cc_list_get_first(ByVal list As CC_List Ptr, ByVal out_ As Any Ptr Ptr) As cc_stat
+declare function cc_list_get_last(byval list as CC_List ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_list_sublist(byval list as CC_List ptr, byval from as uinteger, byval to as uinteger, byval out_ as CC_List ptr ptr) as cc_stat
+Declare Function cc_list_copy_shallow(ByVal list As CC_List Ptr, ByVal out_ As CC_List Ptr Ptr) As cc_stat
+declare function cc_list_copy_deep(byval list as CC_List ptr, byval cp as function(byval as any ptr) as any ptr, byval out_ as CC_List ptr ptr) as cc_stat
+declare function cc_list_replace_at(byval list as CC_List ptr, byval element as any ptr, byval index as uinteger, byval out_ as any ptr ptr) as cc_stat
+declare function cc_list_contains(byval list as CC_List ptr, byval element as any ptr) as uinteger
+declare function cc_list_contains_value(byval list as CC_List ptr, byval element as any ptr, byval cmp as function(byval as const any ptr, byval as const any ptr) as long) as uinteger
+declare function cc_list_index_of(byval list as CC_List ptr, byval element as any ptr, byval cmp as function(byval as const any ptr, byval as const any ptr) as long, byval index as uinteger ptr) as cc_stat
+declare function cc_list_to_array(byval list as CC_List ptr, byval out_ as any ptr ptr ptr) as cc_stat
+declare sub cc_list_reverse(byval list as CC_List ptr)
+declare function cc_list_sort(byval list as CC_List ptr, byval cmp as function(byval as const any ptr, byval as const any ptr) as long) as cc_stat
+declare sub cc_list_sort_in_place(byval list as CC_List ptr, byval cmp as function(byval as const any ptr, byval as const any ptr) as long)
+declare function cc_list_size(byval list as CC_List ptr) as uinteger
+declare sub cc_list_foreach(byval list as CC_List ptr, byval op as sub(byval as any ptr))
+declare function cc_list_reduce(byval list as CC_List ptr, byval fn as sub(byval as any ptr, byval as any ptr, byval as any ptr), byval result as any ptr) as cc_stat
+declare function cc_list_filter_mut(byval list as CC_List ptr, byval predicate as function(byval as const any ptr) as bool) as cc_stat
+declare function cc_list_filter(byval list as CC_List ptr, byval predicate as function(byval as const any ptr) as bool, byval out_ as CC_List ptr ptr) as cc_stat
+declare sub cc_list_iter_init(byval iter as CC_ListIter ptr, byval list as CC_List ptr)
+declare function cc_list_iter_remove(byval iter as CC_ListIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_list_iter_add(byval iter as CC_ListIter ptr, byval element as any ptr) as cc_stat
+declare function cc_list_iter_replace(byval iter as CC_ListIter ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_list_iter_index(byval iter as CC_ListIter ptr) as uinteger
+declare function cc_list_iter_next(byval iter as CC_ListIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare sub cc_list_diter_init(byval iter as CC_ListIter ptr, byval list as CC_List ptr)
+declare function cc_list_diter_remove(byval iter as CC_ListIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_list_diter_add(byval iter as CC_ListIter ptr, byval element as any ptr) as cc_stat
+declare function cc_list_diter_replace(byval iter as CC_ListIter ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_list_diter_index(byval iter as CC_ListIter ptr) as uinteger
+declare function cc_list_diter_next(byval iter as CC_ListIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare sub cc_list_zip_iter_init(byval iter as CC_ListZipIter ptr, byval l1 as CC_List ptr, byval l2 as CC_List ptr)
+declare function cc_list_zip_iter_next(byval iter as CC_ListZipIter ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_list_zip_iter_add(byval iter as CC_ListZipIter ptr, byval e1 as any ptr, byval e2 as any ptr) as cc_stat
+declare function cc_list_zip_iter_remove(byval iter as CC_ListZipIter ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_list_zip_iter_replace(byval iter as CC_ListZipIter ptr, byval e1 as any ptr, byval e2 as any ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_list_zip_iter_index(byval iter as CC_ListZipIter ptr) as uinteger
+'#macro CC_LIST_FOREACH(val_, list_, body)
+' Scope
+' Dim cc_list_iter_53d46d2a04458e7b As CC_ListIter
+' cc_list_iter_init(@cc_list_iter_53d46d2a04458e7b, list_)
+' dim val_ as any ptr
+' while (cc_list_iter_next(@cc_list_iter_53d46d2a04458e7b, @val) != CC_ITER_END)
+' body
+' wend
+' End Scope
+'#endmacro
+#macro CC_LIST_FOREACH_ZIP(val1, val2, list1, list2, body)
+ scope
+ dim cc_list_zip_iter_ea08d3e52f25883b3 as CC_ListZipIter
+ cc_list_zip_iter_init(@cc_list_zip_iter_ea08d3e52f25883b, list1, list2)
+ dim val1 as any ptr
+ dim val2 as any ptr
+ while (cc_list_zip_iter_next(@cc_list_zip_iter_ea08d3e52f25883b3, @val1, @val2) <> CC_ITER_END)
+ body
+ wend
+ end scope
+#endmacro
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/cc_pqueue.bi b/inc/Collections-C/cc_pqueue.bi
new file mode 100644
index 00000000..6dd6257d
--- /dev/null
+++ b/inc/Collections-C/cc_pqueue.bi
@@ -0,0 +1,51 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_CC_PQUEUE_H
+
+#define COLLECTIONS_C_CC_PQUEUE_H
+#include once "cc_common.bi"
+#include once "cc_array.bi"
+
+extern "C"
+
+Type CC_PQueue As cc_pqueue_s
+
+type cc_pqueue_conf_s
+ capacity as uinteger
+ exp_factor as single
+ cmp as function(byval a as const any ptr, byval b as const any ptr) as long
+ mem_alloc as function(byval size as uinteger) as any ptr
+ mem_calloc as function(byval blocks as uinteger, byval size as uinteger) as any ptr
+ mem_free as sub(byval block as any ptr)
+end type
+
+type CC_PQueueConf as cc_pqueue_conf_s
+declare sub cc_pqueue_conf_init(byval conf as CC_PQueueConf ptr, byval as function(byval as const any ptr, byval as const any ptr) as long)
+declare function cc_pqueue_new(byval out_ as CC_PQueue ptr ptr, byval as function(byval as const any ptr, byval as const any ptr) as long) as cc_stat
+declare function cc_pqueue_new_conf(byval conf as const CC_PQueueConf const ptr, byval out_ as CC_PQueue ptr ptr) as cc_stat
+declare sub cc_pqueue_destroy(byval pqueue as CC_PQueue ptr)
+declare sub cc_pqueue_destroy_cb(byval pqueue as CC_PQueue ptr, byval cb as sub(byval as any ptr))
+declare function cc_pqueue_struct_size() as uinteger
+declare function cc_pqueue_push(byval pqueue as CC_PQueue ptr, byval element as any ptr) as cc_stat
+declare function cc_pqueue_top(byval pqueue as CC_PQueue ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_pqueue_pop(byval pqueue as CC_PQueue ptr, byval out_ as any ptr ptr) as cc_stat
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/cc_queue.bi b/inc/Collections-C/cc_queue.bi
new file mode 100644
index 00000000..ab1afea2
--- /dev/null
+++ b/inc/Collections-C/cc_queue.bi
@@ -0,0 +1,61 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_QUEUE_H
+
+#define COLLECTIONS_C_QUEUE_H
+#include once "cc_common.bi"
+#include once "cc_deque.bi"
+
+extern "C"
+
+Type CC_Queue As cc_queue_s
+type CC_QueueConf as CC_DequeConf
+
+type cc_queue_iter_s
+ i as CC_DequeIter
+end type
+
+type CC_QueueIter as cc_queue_iter_s
+
+type queue_zip_iter_s
+ i as CC_DequeZipIter
+end type
+
+type QueueZipIter as queue_zip_iter_s
+declare sub cc_queue_conf_init(byval conf as CC_QueueConf ptr)
+declare function cc_queue_new(byval q as CC_Queue ptr ptr) as cc_stat
+declare function cc_queue_new_conf(byval conf as const CC_QueueConf const ptr, byval q as CC_Queue ptr ptr) as cc_stat
+declare sub cc_queue_destroy(byval queue as CC_Queue ptr)
+declare sub cc_queue_destroy_cb(byval queue as CC_Queue ptr, byval cb as sub(byval as any ptr))
+declare function cc_queue_struct_size() as uinteger
+declare function cc_queue_peek(byval queue as const CC_Queue const ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_queue_poll(byval queue as CC_Queue ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_queue_enqueue(byval queue as CC_Queue ptr, byval element as any ptr) as cc_stat
+declare function cc_queue_size(byval queue as const CC_Queue const ptr) as uinteger
+declare sub cc_queue_foreach(byval queue as CC_Queue ptr, byval op as sub(byval as any ptr))
+declare sub cc_queue_iter_init(byval iter as CC_QueueIter ptr, byval queue as CC_Queue ptr)
+declare function cc_queue_iter_next(byval iter as CC_QueueIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_queue_iter_replace(byval iter as CC_QueueIter ptr, byval replacement as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare sub cc_queue_zip_iter_init(byval iter as QueueZipIter ptr, byval q1 as CC_Queue ptr, byval q2 as CC_Queue ptr)
+declare function cc_queue_zip_iter_next(byval iter as QueueZipIter ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_queue_zip_iter_replace(byval iter as QueueZipIter ptr, byval e1 as any ptr, byval e2 as any ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/cc_ring_buffer.bi b/inc/Collections-C/cc_ring_buffer.bi
new file mode 100644
index 00000000..c6578bd3
--- /dev/null
+++ b/inc/Collections-C/cc_ring_buffer.bi
@@ -0,0 +1,65 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_CC_RBUF_H
+
+#define COLLECTIONS_C_CC_RBUF_H
+#include once "crt/stdlib.bi"
+#include once "crt/stdint.bi"
+#include once "crt/string.bi"
+#include once "cc_common.bi"
+Extern "C"
+#ifndef DEFAULT_CC_RBUF_CAPACITY
+#define DEFAULT_CC_RBUF_CAPACITY 5
+#endif
+Type CC_RbufConf As ring_buffer_conf
+
+Type ring_buffer_conf
+ capacity As size_t
+ mem_alloc As Function(ByVal Size_ As size_t) As Any Ptr
+ mem_calloc As Function(ByVal blocks As size_t, ByVal size As size_t) As Any Ptr
+ MEM_FREE As Sub(block As Any Ptr)
+End Type
+
+Type CC_Rbuf As ring_buffer
+
+Type ring_buffer
+ As size_t SIZE
+ As size_t capacity
+ As size_t head
+ As size_t tail
+ buf As uint64_t Ptr
+ mem_alloc As Function(ByVal SIZE As size_t) As Any Ptr
+ mem_calloc As Function(ByVal blocks As size_t, ByVal SIZE As size_t) As Any Ptr
+ MEM_FREE As Sub(block As Any Ptr)
+End Type
+
+Declare Function cc_rbuf_new(ByVal rbuf As CC_Rbuf Ptr Ptr) As cc_stat
+Declare Sub cc_rbuf_conf_init(ByVal rconf As CC_RbufConf Ptr)
+Declare Function cc_rbuf_conf_new(ByVal rconf As CC_RbufConf Ptr, ByVal rbuf As CC_Rbuf Ptr Ptr) As cc_stat
+Declare Function cc_rbuf_struct_size() As UInteger
+Declare Sub cc_rbuf_enqueue(ByVal rbuf As CC_Rbuf Ptr, ByVal item As ULongInt)
+Declare Function cc_rbuf_dequeue(ByVal rbuf As CC_Rbuf Ptr, ByVal out_ As ULongInt Ptr) As cc_stat
+Declare Function cc_rbuf_is_empty(ByVal rbuf As CC_Rbuf Ptr) As bool
+Declare Function cc_rbuf_size(ByVal rbuf As CC_Rbuf Ptr) As UInteger
+Declare Sub cc_rbuf_destroy(ByVal rbuf As CC_Rbuf Ptr)
+Declare Function cc_rbuf_peek(ByVal rbuf As CC_Rbuf Ptr, ByVal index As Long) As ULongInt
+
+End Extern
+#endif
diff --git a/inc/Collections-C/cc_slist.bi b/inc/Collections-C/cc_slist.bi
new file mode 100644
index 00000000..d5ea42a9
--- /dev/null
+++ b/inc/Collections-C/cc_slist.bi
@@ -0,0 +1,118 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_CC_SLIST_H
+
+#define COLLECTIONS_C_CC_SLIST_H
+#include once "cc_common.bi"
+
+extern "C"
+
+type CC_SList as cc_slist_s
+
+type snode_s
+ data_ as any ptr
+ next_ as snode_s ptr
+end type
+
+type SNode as snode_s
+
+type cc_slist_iter_s
+ index as uinteger
+ list as CC_SList ptr
+ next_ as SNode ptr
+ current as SNode ptr
+ prev as SNode ptr
+end type
+
+type CC_SListIter as cc_slist_iter_s
+
+type cc_slist_zip_iter_s
+ index as uinteger
+ l1 As CC_SList Ptr
+ l2 as CC_SList ptr
+ l1_next as SNode ptr
+ l2_next as SNode ptr
+ l1_current as SNode ptr
+ l2_current as SNode ptr
+ l1_prev as SNode ptr
+ l2_prev as SNode ptr
+end type
+
+type CC_SListZipIter as cc_slist_zip_iter_s
+
+type cc_slist_conf_s
+ mem_alloc as function(byval size as uinteger) as any ptr
+ mem_calloc as function(byval blocks as uinteger, byval size as uinteger) as any ptr
+ mem_free as sub(byval block as any ptr)
+end type
+
+type CC_SListConf as cc_slist_conf_s
+declare sub cc_slist_conf_init(byval conf as CC_SListConf ptr)
+declare function cc_slist_new(byval list as CC_SList ptr ptr) as cc_stat
+declare function cc_slist_new_conf(byval conf as const CC_SListConf const ptr, byval list as CC_SList ptr ptr) as cc_stat
+declare sub cc_slist_destroy(byval list as CC_SList ptr)
+declare sub cc_slist_destroy_cb(byval list as CC_SList ptr, byval cb as sub(byval as any ptr))
+declare function cc_slist_struct_size() as uinteger
+declare function cc_slist_splice(byval list1 as CC_SList ptr, byval list2 as CC_SList ptr) as cc_stat
+declare function cc_slist_splice_at(byval list1 as CC_SList ptr, byval list2 as CC_SList ptr, byval index as uinteger) as cc_stat
+declare function cc_slist_add(byval list as CC_SList ptr, byval element as any ptr) as cc_stat
+declare function cc_slist_add_at(byval list as CC_SList ptr, byval element as any ptr, byval index as uinteger) as cc_stat
+declare function cc_slist_add_all(byval list1 as CC_SList ptr, byval list2 as CC_SList ptr) as cc_stat
+declare function cc_slist_add_all_at(byval list1 as CC_SList ptr, byval list2 as CC_SList ptr, byval index as uinteger) as cc_stat
+declare function cc_slist_add_first(byval list as CC_SList ptr, byval element as any ptr) as cc_stat
+declare function cc_slist_add_last(byval list as CC_SList ptr, byval element as any ptr) as cc_stat
+declare function cc_slist_remove(byval list as CC_SList ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_slist_remove_first(byval list as CC_SList ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_slist_remove_last(byval list as CC_SList ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_slist_remove_at(byval list as CC_SList ptr, byval index as uinteger, byval out_ as any ptr ptr) as cc_stat
+declare function cc_slist_remove_all(byval list as CC_SList ptr) as cc_stat
+declare function cc_slist_remove_all_cb(byval list as CC_SList ptr, byval cb as sub(byval as any ptr)) as cc_stat
+declare function cc_slist_get_at(byval list as CC_SList ptr, byval index as uinteger, byval out_ as any ptr ptr) as cc_stat
+declare function cc_slist_get_first(byval list as CC_SList ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_slist_get_last(byval list as CC_SList ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_slist_sublist(byval list as CC_SList ptr, byval from as uinteger, byval to as uinteger, byval out_ as CC_SList ptr ptr) as cc_stat
+declare function cc_slist_copy_shallow(byval list as CC_SList ptr, byval out_ as CC_SList ptr ptr) as cc_stat
+declare function cc_slist_copy_deep(byval list as CC_SList ptr, byval cp as function(byval as any ptr) as any ptr, byval out_ as CC_SList ptr ptr) as cc_stat
+declare function cc_slist_replace_at(byval list as CC_SList ptr, byval element as any ptr, byval index as uinteger, byval out_ as any ptr ptr) as cc_stat
+declare function cc_slist_contains(byval list as CC_SList ptr, byval element as any ptr) as uinteger
+declare function cc_slist_contains_value(byval list as CC_SList ptr, byval element as any ptr, byval cmp as function(byval as const any ptr, byval as const any ptr) as long) as uinteger
+declare function cc_slist_index_of(byval list as CC_SList ptr, byval element as any ptr, byval index as uinteger ptr) as cc_stat
+declare function cc_slist_to_array(byval list as CC_SList ptr, byval out_ as any ptr ptr ptr) as cc_stat
+declare sub cc_slist_reverse(byval list as CC_SList ptr)
+declare function cc_slist_sort(byval list as CC_SList ptr, byval cmp as function(byval as const any ptr, byval as const any ptr) as long) as cc_stat
+declare function cc_slist_size(byval list as CC_SList ptr) as uinteger
+declare sub cc_slist_foreach(byval list as CC_SList ptr, byval op as sub(byval as any ptr))
+declare function cc_slist_filter(byval list as CC_SList ptr, byval predicate as function(byval as const any ptr) as bool, byval out_ as CC_SList ptr ptr) as cc_stat
+declare function cc_slist_filter_mut(byval list as CC_SList ptr, byval predicate as function(byval as const any ptr) as bool) as cc_stat
+declare sub cc_slist_iter_init(byval iter as CC_SListIter ptr, byval list as CC_SList ptr)
+declare function cc_slist_iter_remove(byval iter as CC_SListIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_slist_iter_add(byval iter as CC_SListIter ptr, byval element as any ptr) as cc_stat
+declare function cc_slist_iter_replace(byval iter as CC_SListIter ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_slist_iter_next(byval iter as CC_SListIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_slist_iter_index(byval iter as CC_SListIter ptr) as uinteger
+declare sub cc_slist_zip_iter_init(byval iter as CC_SListZipIter ptr, byval l1 as CC_SList ptr, byval l2 as CC_SList ptr)
+declare function cc_slist_zip_iter_next(byval iter as CC_SListZipIter ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_slist_zip_iter_add(byval iter as CC_SListZipIter ptr, byval e1 as any ptr, byval e2 as any ptr) as cc_stat
+declare function cc_slist_zip_iter_remove(byval iter as CC_SListZipIter ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_slist_zip_iter_replace(byval iter as CC_SListZipIter ptr, byval e1 as any ptr, byval e2 as any ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_slist_zip_iter_index(byval iter as CC_SListZipIter ptr) as uinteger
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/cc_stack.bi b/inc/Collections-C/cc_stack.bi
new file mode 100644
index 00000000..c4e6554a
--- /dev/null
+++ b/inc/Collections-C/cc_stack.bi
@@ -0,0 +1,86 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_STACK_H
+
+#define COLLECTIONS_C_STACK_H
+#include once "cc_common.bi"
+#include once "cc_array.bi"
+
+
+extern "C"
+
+
+type CC_Stack as cc_stack_s
+type CC_StackConf as CC_ArrayConf
+
+type cc_stack_iter_s
+ i as CC_ArrayIter
+end type
+
+type CC_StackIter as cc_stack_iter_s
+
+type cc_stack_zip_iter_s
+ i as CC_ArrayZipIter
+end type
+
+type CC_StackZipIter as cc_stack_zip_iter_s
+declare sub cc_stack_conf_init(byval conf as CC_StackConf ptr)
+declare function cc_stack_new(byval out_ as CC_Stack ptr ptr) as cc_stat
+declare function cc_stack_new_conf(byval conf as const CC_StackConf const ptr, byval out_ as CC_Stack ptr ptr) as cc_stat
+declare sub cc_stack_destroy(byval stack as CC_Stack ptr)
+declare sub cc_stack_destroy_cb(byval stack as CC_Stack ptr, byval cb as sub(byval as any ptr))
+declare function cc_stack_struct_size() as uinteger
+declare function cc_stack_push(byval stack as CC_Stack ptr, byval element as any ptr) as cc_stat
+declare function cc_stack_peek(byval stack as CC_Stack ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_stack_pop(byval stack as CC_Stack ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_stack_size(byval stack as CC_Stack ptr) as uinteger
+declare sub cc_stack_map(byval stack as CC_Stack ptr, byval fn as sub(byval as any ptr))
+declare function cc_stack_filter_mut(byval stack as CC_Stack ptr, byval predicate as function(byval as const any ptr) as bool) as cc_stat
+declare function cc_stack_filter(byval stack as CC_Stack ptr, byval predicate as function(byval as const any ptr) as bool, byval out_ as CC_Stack ptr ptr) as cc_stat
+declare sub cc_stack_iter_init(byval iter as CC_StackIter ptr, byval s as CC_Stack ptr)
+declare function cc_stack_iter_next(byval iter as CC_StackIter ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_stack_iter_replace(byval iter as CC_StackIter ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare sub cc_stack_zip_iter_init(byval iter as CC_StackZipIter ptr, byval a1 as CC_Stack ptr, byval a2 as CC_Stack ptr)
+declare function cc_stack_zip_iter_next(byval iter as CC_StackZipIter ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+declare function cc_stack_zip_iter_replace(byval iter as CC_StackZipIter ptr, byval e1 as any ptr, byval e2 as any ptr, byval out1 as any ptr ptr, byval out2 as any ptr ptr) as cc_stat
+#macro CC_STACK_FOREACH(val, stack, body)
+ scope
+ dim stack_iter_53d46d2a04458e7b as CC_StackIter
+ cc_stack_iter_init(@stack_iter_53d46d2a04458e7b, stack)
+ dim val as any ptr
+ while (cc_stack_iter_next(&stack_iter_53d46d2a04458e7b, &val) <> CC_ITER_END)
+ body
+ wend
+ end scope
+#endmacro
+#macro CC_STACK_FOREACH_ZIP(val1, val2, stack1, stack2, body)
+ scope
+ dim stack_zip_iter_ea08d3e52f25883b3 as CC_StackZipIter
+ cc_stack_zip_iter_init(@stack_zip_iter_ea08d3e52f25883b, stack1, stack2)
+ dim val1 as any ptr
+ dim val2 as any ptr
+ while (cc_stack_zip_iter_next(&stack_zip_iter_ea08d3e52f25883b3, &val1, &val2) <> CC_ITER_END)
+ body
+ wend
+ end scope
+#endmacro
+
+end extern
+#endif
diff --git a/inc/Collections-C/cc_treeset.bi b/inc/Collections-C/cc_treeset.bi
new file mode 100644
index 00000000..473a4ad5
--- /dev/null
+++ b/inc/Collections-C/cc_treeset.bi
@@ -0,0 +1,56 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_CC_TREESET_H
+
+#define COLLECTIONS_C_CC_TREESET_H
+#include once "cc_common.bi"
+#include once "cc_treetable.bi"
+
+extern "C"
+
+Type CC_TreeSet As cc_treeset_s
+type CC_TreeSetConf as CC_TreeTableConf
+
+type cc_treeset_iter_s
+ i as CC_TreeTableIter
+end type
+
+type CC_TreeSetIter as cc_treeset_iter_s
+declare sub cc_treeset_conf_init(byval conf as CC_TreeSetConf ptr)
+declare function cc_treeset_new(byval cmp as function(byval as const any ptr, byval as const any ptr) as long, byval set as CC_TreeSet ptr ptr) as cc_stat
+declare function cc_treeset_new_conf(byval conf as const CC_TreeSetConf const ptr, byval set as CC_TreeSet ptr ptr) as cc_stat
+declare function cc_treeset_struct_size() as uinteger
+declare sub cc_treeset_destroy(byval set as CC_TreeSet ptr)
+declare function cc_treeset_add(byval set as CC_TreeSet ptr, byval element as any ptr) as cc_stat
+declare function cc_treeset_remove(byval set as CC_TreeSet ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare sub cc_treeset_remove_all(byval set as CC_TreeSet ptr)
+declare function cc_treeset_get_first(byval set as CC_TreeSet ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treeset_get_last(byval set as CC_TreeSet ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treeset_get_greater_than(byval set as CC_TreeSet ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treeset_get_lesser_than(byval set as CC_TreeSet ptr, byval element as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treeset_contains(byval set as CC_TreeSet ptr, byval element as any ptr) as bool
+declare function cc_treeset_size(byval set as CC_TreeSet ptr) as uinteger
+declare sub cc_treeset_foreach(byval set as CC_TreeSet ptr, byval op as sub(byval as const any ptr))
+declare sub cc_treeset_iter_init(byval iter as CC_TreeSetIter ptr, byval set as CC_TreeSet ptr)
+declare function cc_treeset_iter_next(byval iter as CC_TreeSetIter ptr, byval element as any ptr ptr) as cc_stat
+declare function cc_treeset_iter_remove(byval iter as CC_TreeSetIter ptr, byval out_ as any ptr ptr) as cc_stat
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/cc_treetable.bi b/inc/Collections-C/cc_treetable.bi
new file mode 100644
index 00000000..c9c71aee
--- /dev/null
+++ b/inc/Collections-C/cc_treetable.bi
@@ -0,0 +1,100 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_CC_TREETABLE_H
+
+#define COLLECTIONS_C_CC_TREETABLE_H
+#include once "cc_common.bi"
+
+extern "C"
+
+Type CC_TreeTable As cc_treetable_s
+
+type rbnode_s
+ key as any ptr
+ value as any ptr
+ color as byte
+ parent as rbnode_s ptr
+ left_ as rbnode_s ptr
+ right_ as rbnode_s ptr
+end type
+
+type RBNode as rbnode_s
+
+type tree_table_entry_s
+ key as any ptr
+ value as any ptr
+end type
+
+type CC_TreeTableEntry as tree_table_entry_s
+
+type tree_table_iter_s
+ table As CC_TreeTable Ptr
+ current as RBNode ptr
+ next_ as RBNode ptr
+end type
+
+type CC_TreeTableIter as tree_table_iter_s
+
+type cc_treetable_conf_s
+ cmp as function(byval k1 as const any ptr, byval k2 as const any ptr) as long
+ mem_alloc as function(byval size as uinteger) as any ptr
+ mem_calloc as function(byval blocks as uinteger, byval size as uinteger) as any ptr
+ mem_free as sub(byval block as any ptr)
+end type
+
+type CC_TreeTableConf as cc_treetable_conf_s
+declare sub cc_treetable_conf_init(byval conf as CC_TreeTableConf ptr)
+declare function cc_treetable_new(byval cmp as function(byval as const any ptr, byval as const any ptr) as long, byval tt as CC_TreeTable ptr ptr) as cc_stat
+declare function cc_treetable_new_conf(byval conf as const CC_TreeTableConf const ptr, byval tt as CC_TreeTable ptr ptr) as cc_stat
+declare function cc_treetable_struct_size() as uinteger
+declare sub cc_treetable_destroy(byval table as CC_TreeTable ptr)
+declare function cc_treetable_add(byval table as CC_TreeTable ptr, byval key as any ptr, byval val as any ptr) as cc_stat
+declare function cc_treetable_remove(byval table as CC_TreeTable ptr, byval key as any ptr, byval out_ as any ptr ptr) as cc_stat
+declare sub cc_treetable_remove_all(byval table as CC_TreeTable ptr)
+declare function cc_treetable_remove_first(byval table as CC_TreeTable ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treetable_remove_last(byval table as CC_TreeTable ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treetable_get(byval table as const CC_TreeTable const ptr, byval key as const any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treetable_get_first_value(byval table as const CC_TreeTable const ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treetable_get_first_key(byval table as const CC_TreeTable const ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treetable_get_last_value(byval table as const CC_TreeTable const ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treetable_get_last_key(byval table as const CC_TreeTable const ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treetable_get_greater_than(byval table as const CC_TreeTable const ptr, byval key as const any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treetable_get_lesser_than(byval table as const CC_TreeTable const ptr, byval key as const any ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_treetable_size(byval table as const CC_TreeTable const ptr) as uinteger
+declare function cc_treetable_contains_key(byval table as const CC_TreeTable const ptr, byval key as const any ptr) as bool
+declare function cc_treetable_contains_value(byval table as const CC_TreeTable const ptr, byval value as const any ptr) as uinteger
+declare sub cc_treetable_foreach_key(byval table as CC_TreeTable ptr, byval op as sub(byval as const any ptr))
+declare sub cc_treetable_foreach_value(byval table as CC_TreeTable ptr, byval op as sub(byval as any ptr))
+declare sub cc_treetable_iter_init(byval iter as CC_TreeTableIter ptr, byval table as CC_TreeTable ptr)
+declare function cc_treetable_iter_next(byval iter as CC_TreeTableIter ptr, byval entry as CC_TreeTableEntry ptr) as cc_stat
+declare function cc_treetable_iter_remove(byval iter as CC_TreeTableIter ptr, byval out_ as any ptr ptr) as cc_stat
+#macro CC_TREETABLE_FOREACH(entry, treetable, body)
+ scope
+ dim as TreetableIter cc_treetable_iter_53d46d2a04458e7b
+ cc_treetable_iter_init(@cc_treetable_iter_53d46d2a04458e7b, treetable)
+ dim val_ as CC_TreeTableEntry ptr
+ while (cc_treetable_iter_next(@cc_treetable_iter_53d46d2a04458e7b, @entry)<>CC_ITER_END)
+ body
+ wend
+ end scope
+#endmacro
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/cc_tsttable.bi b/inc/Collections-C/cc_tsttable.bi
new file mode 100644
index 00000000..b187773b
--- /dev/null
+++ b/inc/Collections-C/cc_tsttable.bi
@@ -0,0 +1,86 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef COLLECTIONS_C_CC_TSTTABLE_H
+#define COLLECTIONS_C_CC_TSTTABLE_H
+#include once "crt/stdlib.bi"
+#include once "crt/stdint.bi"
+#include once "crt/string.bi"
+#include once "cc_common.bi"
+extern "C"
+
+type CC_TSTTable as cc_tsttable_s
+
+type cc_tsttable_conf_s
+ char_cmp as function(byval c1 as byte, byval c2 as byte) as long
+ mem_alloc as function(byval size as uinteger) as any ptr
+ mem_calloc as function(byval blocks as uinteger, byval size as uinteger) as any ptr
+ mem_free as sub(byval block as any ptr)
+end type
+
+type CC_TSTTableConf as cc_tsttable_conf_s
+
+type cc_tsttable_data_s
+ key as zstring ptr
+ value as any ptr
+end type
+
+type CC_TSTTableEntry as cc_tsttable_data_s
+
+type cc_tsttable_iter_s
+ table as CC_TSTTable ptr
+ previous_node as any ptr
+ current_node as any ptr
+ next_node as any ptr
+ advanced_on_remove as bool
+ next_stat as cc_stat
+end type
+
+type CC_TSTTableIter as cc_tsttable_iter_s
+declare sub cc_tsttable_conf_init(byval conf as CC_TSTTableConf ptr)
+Declare Function cc_tsttable_new(ByVal out_ As CC_TSTTable Ptr Ptr) As cc_stat
+declare function cc_tsttable_new_conf(byval conf as const CC_TSTTableConf const ptr, byval out_ as CC_TSTTable ptr ptr) as cc_stat
+Declare Function cc_tsttable_struct_size() As UInteger
+declare sub cc_tsttable_destroy(byval table as CC_TSTTable ptr)
+Declare Function cc_tsttable_add(ByVal table As CC_TSTTable Ptr, ByVal key As ZString Ptr, ByVal val_ As Any Ptr) As cc_stat
+declare function cc_tsttable_get(byval table as CC_TSTTable ptr, byval key as zstring ptr, byval out_ as any ptr ptr) as cc_stat
+declare function cc_tsttable_remove(byval table as CC_TSTTable ptr, byval key as zstring ptr, byval out_ as any ptr ptr) as cc_stat
+Declare Sub cc_tsttable_remove_all(ByVal table As CC_TSTTable Ptr)
+declare function cc_tsttable_contains_key(byval table as CC_TSTTable ptr, byval key as zstring ptr) as bool
+declare function cc_tsttable_size(byval table as CC_TSTTable ptr) as uinteger
+declare sub cc_tsttable_foreach_key(byval table as CC_TSTTable ptr, byval op as sub(byval as const any ptr))
+declare sub cc_tsttable_foreach_value(byval table as CC_TSTTable ptr, byval op as sub(byval as any ptr))
+declare sub cc_tsttable_iter_init(byval iter as CC_TSTTableIter ptr, byval table as CC_TSTTable ptr)
+declare function cc_tsttable_iter_next(byval iter as CC_TSTTableIter ptr, byval out_ as CC_TSTTableEntry ptr ptr) as cc_stat
+declare function cc_tsttable_iter_remove(byval iter as CC_TSTTableIter ptr, byval out_ as any ptr ptr) as cc_stat
+#macro CC_TSTTABLE_FOREACH(tsttable, key_53d46d2a04458e7b, value_53d46d2a04458e7b, body)
+ scope
+ dim cc_tsttable_iter_53d46d2a04458e7b as CC_TSTTableIter
+ cc_tsttable_iter_init(@cc_tsttable_iter_53d46d2a04458e7b, tsttable)
+ dim entry_53d46d2a04458e7b as CC_TSTTableEntry ptr
+ while cc_tsttable_iter_next(@cc_tsttable_iter_53d46d2a04458e7b, @entry_53d46d2a04458e7b) <> CC_ITER_END
+ key_53d46d2a04458e7b = entry_53d46d2a04458e7b->key
+ value_53d46d2a04458e7b = entry_53d46d2a04458e7b->value
+ body
+ wend
+ end scope
+#endmacro
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/collectc.bi b/inc/Collections-C/collectc.bi
new file mode 100644
index 00000000..b6c93cd5
--- /dev/null
+++ b/inc/Collections-C/collectc.bi
@@ -0,0 +1,37 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#ifndef COLLECTIONS_C_H
+
+#define COLLECTIONS_C_H
+#include once "cc_array.bi"
+#include once "cc_common.bi"
+#include once "cc_deque.bi"
+#include once "cc_hashset.bi"
+#include once "cc_hashtable.bi"
+#include once "cc_list.bi"
+#include once "cc_pqueue.bi"
+#include once "cc_queue.bi"
+#include once "cc_ring_buffer.bi"
+#include once "cc_slist.bi"
+#include once "cc_stack.bi"
+#include once "cc_treeset.bi"
+#include once "cc_treetable.bi"
+#include once "cc_tsttable.bi"
+#inclib "collectc"
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/memory/cc_dynamic_pool.bi b/inc/Collections-C/memory/cc_dynamic_pool.bi
new file mode 100644
index 00000000..85616bcc
--- /dev/null
+++ b/inc/Collections-C/memory/cc_dynamic_pool.bi
@@ -0,0 +1,54 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef _CC_DYNAMIC_POOL_H_
+
+#define _CC_DYNAMIC_POOL_H_
+#include once "cc_common.bi"
+
+extern "C"
+
+type CC_DynamicPool as cc_dynamic_pool_s
+
+
+type cc_dynamic_pool_conf_s
+ exp_factor as single
+ is_fixed as bool
+ is_packed as bool
+ alignment_boundary as uinteger
+ mem_alloc as function(byval size as uinteger) as any ptr
+ mem_calloc as function(byval blocks as uinteger, byval size as uinteger) as any ptr
+ mem_free as sub(byval block as any ptr)
+end type
+
+type CC_DynamicPoolConf as cc_dynamic_pool_conf_s
+declare function cc_dynamic_pool_new(byval initial_size as uinteger, byval out_ as CC_DynamicPool ptr ptr) as cc_stat
+declare function cc_dynamic_pool_new_conf(byval initial_size as uinteger, byval conf as const CC_DynamicPoolConf const ptr, byval out_ as CC_DynamicPool ptr ptr) as cc_stat
+declare sub cc_dynamic_pool_conf_init(byval conf as CC_DynamicPoolConf ptr)
+declare sub cc_dynamic_pool_destroy(byval pool as CC_DynamicPool ptr)
+declare sub cc_dynamic_pool_reset(byval pool as CC_DynamicPool ptr)
+declare function cc_dynamic_pool_used_bytes(byval pool as CC_DynamicPool ptr) as uinteger
+declare function cc_dynamic_pool_free_bytes(byval pool as CC_DynamicPool ptr) as uinteger
+declare function cc_dynamic_pool_malloc(byval size as uinteger, byval pool as CC_DynamicPool ptr) as any ptr
+declare function cc_dynamic_pool_calloc(byval count as uinteger, byval size as uinteger, byval pool as CC_DynamicPool ptr) as any ptr
+declare sub cc_dynamic_pool_free(byval ptr as any ptr, byval pool as CC_DynamicPool ptr)
+declare function cc_dynamic_pool_struct_size() as uinteger
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/memory/cc_static_pool.bi b/inc/Collections-C/memory/cc_static_pool.bi
new file mode 100644
index 00000000..6c3372a4
--- /dev/null
+++ b/inc/Collections-C/memory/cc_static_pool.bi
@@ -0,0 +1,38 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef _CC_BLOCK_POOL_H_
+#define _CC_BLOCK_POOL_H_
+#include once "../cc_common.bi"
+
+extern "C"
+
+type CC_StaticPool as cc_static_pool_s
+#define _CC_BLOCK_POOL_H_
+declare function cc_static_pool_new(byval size as uinteger, byval offset as uinteger, byval buf as ubyte ptr, byval pool_alloc as ubyte ptr, byval out_ as CC_StaticPool ptr ptr) as cc_stat
+declare function cc_static_pool_struct_size() as uinteger
+declare sub cc_static_pool_reset(byval pool as CC_StaticPool ptr)
+declare function cc_static_pool_used_bytes(byval pool as CC_StaticPool ptr) as uinteger
+declare function cc_static_pool_free_bytes(byval pool as CC_StaticPool ptr) as uinteger
+declare function cc_static_pool_malloc(byval size as uinteger, byval pool as CC_StaticPool ptr) as any ptr
+declare function cc_static_pool_calloc(byval count as uinteger, byval size as uinteger, byval pool as CC_StaticPool ptr) as any ptr
+Declare Sub cc_static_pool_free(ByVal Ptr_ As Any Ptr, ByVal pool As CC_StaticPool Ptr)
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/Collections-C/sized/cc_array_sized.bi b/inc/Collections-C/sized/cc_array_sized.bi
new file mode 100644
index 00000000..31f97391
--- /dev/null
+++ b/inc/Collections-C/sized/cc_array_sized.bi
@@ -0,0 +1,122 @@
+'freebasic bindings for Collections-C library.
+'Collections-C is a library of generic data structures for the C language.
+'GNU LESSER GENERAL PUBLIC LICENSE
+' Version 3, 29 June 2007
+'
+' Copyright (C) 2007 free Software Foundation, Inc.
+' Everyone is permitted to copy and distribute verbatim copies
+' of this license document, but changing it is not allowed.
+'
+' This version of the GNU Lesser General Public License incorporates
+'the terms and conditions of version 3 of the GNU General Public
+'License, supplemented by the additional permissions listed.
+' As used herein, "this License" refers to version 3 of the GNU Lesser
+'General Public License, and the "GNU GPL" refers to version 3 of the GNU
+'General Public License.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef _COLLECTIONS_C_ARRAY_SIZED_H_
+#define _COLLECTIONS_C_ARRAY_SIZED_H_
+
+#include once "cc_common.bi"
+
+extern "C"
+
+#define _COLLECTIONS_C_ARRAY_SIZED_H_
+type CC_ArraySized as cc_array_sized_s
+
+type cc_array_sized_conf_s
+ capacity as uinteger
+ exp_factor as single
+ mem_alloc as function(byval size as uinteger) as any ptr
+ mem_calloc as function(byval blocks as uinteger, byval size as uinteger) as any ptr
+ mem_free as sub(byval block as any ptr)
+end type
+
+type CC_ArraySizedConf as cc_array_sized_conf_s
+
+type cc_array_sized_iter_s
+ ar as CC_ArraySized ptr
+ index as uinteger
+ last_removed as bool
+end type
+
+type CC_ArraySizedIter as cc_array_sized_iter_s
+
+type array_sized_zip_iter_s
+ ar1 as CC_ArraySized ptr
+ ar2 as CC_ArraySized ptr
+ index as uinteger
+ last_removed as bool
+end type
+
+type CC_ArraySizedZipIter as array_sized_zip_iter_s
+declare function cc_array_sized_new(byval element_size as uinteger, byval out_ as CC_ArraySized ptr ptr) as cc_stat
+declare function cc_array_sized_new_reserved(byval element_size as uinteger, byval n_reserved as uinteger, byval out_ as CC_ArraySized ptr ptr) as cc_stat
+declare function cc_array_sized_new_conf(byval element_size as uinteger, byval conf as const CC_ArraySizedConf const ptr, byval out_ as CC_ArraySized ptr ptr) as cc_stat
+declare sub cc_array_sized_conf_init(byval conf as CC_ArraySizedConf ptr)
+declare function cc_array_sized_struct_size() as uinteger
+declare sub cc_array_sized_destroy(byval ar as CC_ArraySized ptr)
+declare function cc_array_sized_add(byval ar as CC_ArraySized ptr, byval element as ubyte ptr) as cc_stat
+declare function cc_array_sized_add_at(byval ar as CC_ArraySized ptr, byval element as ubyte ptr, byval index as uinteger) as cc_stat
+declare function cc_array_sized_replace_at(byval ar as CC_ArraySized ptr, byval element as ubyte ptr, byval index as uinteger, byval out_ as ubyte ptr) as cc_stat
+declare function cc_array_sized_swap_at(byval ar as CC_ArraySized ptr, byval index1 as uinteger, byval index2 as uinteger) as cc_stat
+declare function cc_array_sized_remove(byval ar as CC_ArraySized ptr, byval element as ubyte ptr) as cc_stat
+declare function cc_array_sized_remove_at(byval ar as CC_ArraySized ptr, byval index as uinteger, byval out_ as ubyte ptr) as cc_stat
+declare function cc_array_sized_remove_last(byval ar as CC_ArraySized ptr, byval out_ as ubyte ptr) as cc_stat
+declare sub cc_array_sized_remove_all(byval ar as CC_ArraySized ptr)
+declare function cc_array_sized_peek(byval ar as CC_ArraySized ptr, byval index as uinteger, byval out_ as ubyte ptr ptr) as cc_stat
+declare function cc_array_sized_get_at(byval ar as CC_ArraySized ptr, byval index as uinteger, byval out_ as ubyte ptr) as cc_stat
+declare function cc_array_sized_get_last(byval ar as CC_ArraySized ptr, byval out_ as ubyte ptr) as cc_stat
+declare function cc_array_sized_subarray(byval ar as CC_ArraySized ptr, byval from as uinteger, byval to as uinteger, byval out_ as CC_ArraySized ptr ptr) as cc_stat
+declare function cc_array_sized_copy(byval ar as CC_ArraySized ptr, byval out_ as CC_ArraySized ptr ptr) as cc_stat
+declare sub cc_array_sized_reverse(byval ar as CC_ArraySized ptr, byval tmp as ubyte ptr)
+declare function cc_array_sized_trim_capacity(byval ar as CC_ArraySized ptr) as cc_stat
+declare function cc_array_sized_contains(byval ar as CC_ArraySized ptr, byval element as ubyte ptr) as uinteger
+declare function cc_array_sized_size(byval ar as CC_ArraySized ptr) as uinteger
+declare function cc_array_sized_capacity(byval ar as CC_ArraySized ptr) as uinteger
+declare function cc_array_sized_index_of(byval ar as CC_ArraySized ptr, byval element as ubyte ptr, byval index as uinteger ptr) as cc_stat
+declare sub cc_array_sized_sort(byval ar as CC_ArraySized ptr, byval cmp as function(byval as const any ptr, byval as const any ptr) as long)
+declare sub cc_array_sized_map(byval ar as CC_ArraySized ptr, byval fn as sub(byval as ubyte ptr))
+declare sub cc_array_sized_reduce(byval ar as CC_ArraySized ptr, byval fn as sub(byval as ubyte ptr, byval as ubyte ptr, byval as ubyte ptr), byval result as ubyte ptr)
+declare function cc_array_sized_filter_mut(byval ar as CC_ArraySized ptr, byval predicate as function(byval as const ubyte ptr) as bool) as cc_stat
+declare function cc_array_sized_filter(byval ar as CC_ArraySized ptr, byval predicate as function(byval as const ubyte ptr) as bool, byval out_ as CC_ArraySized ptr ptr) as cc_stat
+declare sub cc_array_sized_iter_init(byval iter as CC_ArraySizedIter ptr, byval ar as CC_ArraySized ptr)
+declare function cc_array_sized_iter_next(byval iter as CC_ArraySizedIter ptr, byval out_ as ubyte ptr ptr) as cc_stat
+declare function cc_array_sized_iter_remove(byval iter as CC_ArraySizedIter ptr, byval out_ as ubyte ptr) as cc_stat
+declare function cc_array_sized_iter_add(byval iter as CC_ArraySizedIter ptr, byval element as ubyte ptr) as cc_stat
+declare function cc_array_sized_iter_replace(byval iter as CC_ArraySizedIter ptr, byval element as ubyte ptr, byval out_ as ubyte ptr) as cc_stat
+declare function cc_array_sized_iter_index(byval iter as CC_ArraySizedIter ptr) as uinteger
+declare sub cc_array_sized_zip_iter_init(byval iter as CC_ArraySizedZipIter ptr, byval a1 as CC_ArraySized ptr, byval a2 as CC_ArraySized ptr)
+declare function cc_array_sized_zip_iter_next(byval iter as CC_ArraySizedZipIter ptr, byval out1 as ubyte ptr ptr, byval out2 as ubyte ptr ptr) as cc_stat
+declare function cc_array_sized_zip_iter_add(byval iter as CC_ArraySizedZipIter ptr, byval e1 as ubyte ptr, byval e2 as ubyte ptr) as cc_stat
+declare function cc_array_sized_zip_iter_remove(byval iter as CC_ArraySizedZipIter ptr, byval out1 as ubyte ptr, byval out2 as ubyte ptr) as cc_stat
+declare function cc_array_sized_zip_iter_replace(byval iter as CC_ArraySizedZipIter ptr, byval e1 as ubyte ptr, byval e2 as ubyte ptr, byval out1 as ubyte ptr, byval out2 as ubyte ptr) as cc_stat
+declare function cc_array_sized_zip_iter_index(byval iter as CC_ArraySizedZipIter ptr) as uinteger
+declare function cc_array_sized_get_buffer(byval ar as CC_ArraySized ptr) as const ubyte const ptr ptr
+#macro CC_ARRAY_SIZED_FOREACH(val_, array_, body)
+ scope
+ dim cc_array_sized_iter_53d46d2a04458e7b as CC_ArraySizedIter
+ cc_array_sized_iter_init(@cc_array_sized_iter_53d46d2a04458e7b, array_)
+ dim val_ as ubyte ptr
+ while (cc_array_sized_iter_next(@cc_array_sized_iter_53d46d2a04458e7b, @val_) <> CC_ITER_END)
+ body
+ wend
+ end scope
+#endmacro
+#macro CC_ARRAY_SIZED_FOREACH_ZIP(val1, val2, array1, array2, body)
+ scope
+ dim cc_array_sized_zip_iter_ea08d3e52f25883b3 as CC_ArraySizedZipIter
+ cc_array_sized_zip_iter_init(@cc_array_sized_zip_iter_ea08d3e52f25883b3, array1, array2)
+ dim val1 as ubyte ptr
+ dim val2 as ubyte ptr
+ while (cc_array_sized_zip_iter_next(@cc_array_sized_zip_iter_ea08d3e52f25883b3, @val1, @val2)<> CC_ITER_END)
+ body
+ wend
+ end scope
+#endmacro
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/cJSON.bi b/inc/cJSON.bi
new file mode 100644
index 00000000..ec2e0cd0
--- /dev/null
+++ b/inc/cJSON.bi
@@ -0,0 +1,185 @@
+'' FreeBASIC binding for cjson-1.7.18
+''
+'' based on the C header files:
+'' Ultralightweight JSON parser in ANSI C.
+'Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
+ 'Permission Is hereby granted, free of charge, To Any person obtaining a copy
+ 'of this software and associated documentation files (the "Software"), to deal
+ 'in the Software without restriction, including without limitation the rights
+ 'to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ 'copies of the Software, and to permit persons to whom the Software is
+ 'furnished to do so, subject to the following conditions:
+ 'The above copyright notice and this permission notice shall be included in
+ 'all copies or substantial portions of the Software.
+ 'THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ 'IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ 'FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ 'AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ 'LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ 'OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ 'THE SOFTWARE.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+
+#ifndef cJSON__h
+#define cJSON__h
+#include once "crt/stddef.bi"
+#inclib "cjson"
+#ifdef __FB_WIN32__
+ extern "Windows"
+#else
+ extern "C"
+#endif
+
+#define cJSON__h
+
+#ifdef __FB_WIN32__
+ #define __WINDOWS__
+ #define CJSON_CDECL __cdecl
+ #define CJSON_STDCALL __stdcall
+ #define CJSON_EXPORT_SYMBOLS
+ #define CJSON_PUBLIC(type) type __attribute__((visibility("default"))) __attribute__((stdcall))
+#else
+ #define CJSON_CDECL
+ #define CJSON_STDCALL
+ #define CJSON_PUBLIC(type) type
+#endif
+
+const CJSON_VERSION_MAJOR = 1
+const CJSON_VERSION_MINOR = 7
+const CJSON_VERSION_PATCH = 18
+const cJSON_Invalid = 0
+const cJSON_False = 1 shl 0
+const cJSON_True = 1 shl 1
+const cJSON_NULL = 1 shl 2
+const cJSON_Number = 1 shl 3
+const cJSON_String = 1 shl 4
+const cJSON_Array = 1 shl 5
+const cJSON_Object = 1 shl 6
+const cJSON_Raw = 1 shl 7
+const cJSON_IsReference = 256
+const cJSON_StringIsConst = 512
+
+type cJSON
+ Next As cJSON Ptr
+ prev as cJSON ptr
+ child as cJSON ptr
+ as long type
+ valuestring As ZString Ptr
+ valueint As Long
+ valuedouble As Double
+ String As ZString Ptr
+end type
+
+type cJSON_Hooks
+ malloc_fn as function cdecl(byval sz as uinteger) as any ptr
+ free_fn As Sub cdecl(ByVal Ptr As Any Ptr)
+End Type
+
+type cJSON_bool as long
+const CJSON_NESTING_LIMIT = 1000
+const CJSON_CIRCULAR_LIMIT = 10000
+declare function cJSON_Version() as const zstring ptr
+declare sub cJSON_InitHooks(byval hooks as cJSON_Hooks ptr)
+declare function cJSON_Parse(byval value as const zstring ptr) as cJSON ptr
+declare function cJSON_ParseWithLength(byval value as const zstring ptr, byval buffer_length as uinteger) as cJSON ptr
+declare function cJSON_ParseWithOpts(byval value as const zstring ptr, byval return_parse_end as const zstring ptr ptr, byval require_null_terminated as cJSON_bool) as cJSON ptr
+declare function cJSON_ParseWithLengthOpts(byval value as const zstring ptr, byval buffer_length as uinteger, byval return_parse_end as const zstring ptr ptr, byval require_null_terminated as cJSON_bool) as cJSON ptr
+Declare Function cJSON_Print(ByVal item As Const cJSON Ptr) As ZString Ptr
+declare function cJSON_PrintUnformatted(byval item as const cJSON ptr) as zstring ptr
+declare function cJSON_PrintBuffered(byval item as const cJSON ptr, byval prebuffer as long, byval fmt as cJSON_bool) as zstring ptr
+declare function cJSON_PrintPreallocated(byval item as cJSON ptr, byval buffer as zstring ptr, byval length as const long, byval format as const cJSON_bool) as cJSON_bool
+Declare Sub cJSON_Delete(ByVal item As cJSON Ptr)
+Declare Function cJSON_GetArraySize(ByVal array As Const cJSON Ptr) As Long
+Declare Function cJSON_GetArrayItem(ByVal array As Const cJSON Ptr, ByVal index As Long) As cJSON Ptr
+declare function cJSON_GetObjectItem(byval object as const cJSON const ptr, byval string as const zstring const ptr) as cJSON ptr
+declare function cJSON_GetObjectItemCaseSensitive(byval object as const cJSON const ptr, byval string as const zstring const ptr) as cJSON ptr
+declare function cJSON_HasObjectItem(byval object as const cJSON ptr, byval string as const zstring ptr) as cJSON_bool
+declare function cJSON_GetErrorPtr() as const zstring ptr
+declare function cJSON_GetStringValue(byval item as const cJSON const ptr) as zstring ptr
+declare function cJSON_GetNumberValue(byval item as const cJSON const ptr) as double
+Declare Function cJSON_IsInvalid(ByVal item As Const cJSON Const Ptr) As cJSON_bool
+Declare Function cJSON_IsFalse(ByVal item As Const cJSON Const Ptr) As cJSON_bool
+Declare Function cJSON_IsTrue(ByVal item As Const cJSON Const Ptr) As cJSON_bool
+Declare Function cJSON_IsBool(ByVal item As Const cJSON Const Ptr) As cJSON_bool
+Declare Function cJSON_IsNull(ByVal item As Const cJSON Const Ptr) As cJSON_bool
+Declare Function cJSON_IsNumber(ByVal item As Const cJSON Const Ptr) As cJSON_bool
+declare function cJSON_IsString(byval item as const cJSON const ptr) as cJSON_bool
+declare function cJSON_IsArray(byval item as const cJSON const ptr) as cJSON_bool
+declare function cJSON_IsObject(byval item as const cJSON const ptr) as cJSON_bool
+declare function cJSON_IsRaw(byval item as const cJSON const ptr) as cJSON_bool
+Declare Function cJSON_CreateNull() As cJSON Ptr
+Declare Function cJSON_CreateTrue() As cJSON Ptr
+declare function cJSON_CreateFalse() as cJSON ptr
+Declare Function cJSON_CreateBool(ByVal BOOLEAN As cJSON_bool) As cJSON Ptr
+Declare Function cJSON_CreateNumber(ByVal num As Double) As cJSON Ptr
+Declare Function cJSON_CreateString(ByVal String As Const ZString Ptr) As cJSON Ptr
+Declare Function cJSON_CreateRaw(ByVal raw As Const ZString Ptr) As cJSON Ptr
+Declare Function cJSON_CreateArray() As cJSON Ptr
+Declare Function cJSON_CreateObject() As cJSON Ptr
+Declare Function cJSON_CreateStringReference(ByVal String As Const ZString Ptr) As cJSON Ptr
+declare function cJSON_CreateObjectReference(byval child as const cJSON ptr) as cJSON ptr
+declare function cJSON_CreateArrayReference(byval child as const cJSON ptr) as cJSON ptr
+Declare Function cJSON_CreateIntArray(ByVal numbers As Const Long Ptr, ByVal count As Long) As cJSON Ptr
+Declare Function cJSON_CreateFloatArray(ByVal numbers As Const Single Ptr, ByVal count As Long) As cJSON Ptr
+Declare Function cJSON_CreateDoubleArray(ByVal numbers As Const Double Ptr, ByVal count As Long) As cJSON Ptr
+Declare Function cJSON_CreateStringArray(ByVal strings As Const ZString Const Ptr Ptr, ByVal count As Long) As cJSON Ptr
+Declare Function cJSON_AddItemToArray(ByVal array As cJSON Ptr, ByVal item As cJSON Ptr) As cJSON_bool
+Declare Function cJSON_AddItemToObject(ByVal Object As cJSON Ptr, ByVal String As Const ZString Ptr, ByVal item As cJSON Ptr) As cJSON_bool
+Declare Function cJSON_AddItemToObjectCS(ByVal Object As cJSON Ptr, ByVal String As Const ZString Ptr, ByVal item As cJSON Ptr) As cJSON_bool
+declare function cJSON_AddItemReferenceToArray(byval array as cJSON ptr, byval item as cJSON ptr) as cJSON_bool
+declare function cJSON_AddItemReferenceToObject(byval object as cJSON ptr, byval string as const zstring ptr, byval item as cJSON ptr) as cJSON_bool
+Declare Function cJSON_DetachItemViaPointer(ByVal parent As cJSON Ptr, ByVal item As cJSON Const Ptr) As cJSON Ptr
+Declare Function cJSON_DetachItemFromArray(ByVal array As cJSON Ptr, ByVal which As Long) As cJSON Ptr
+Declare Sub cJSON_DeleteItemFromArray(ByVal array As cJSON Ptr, ByVal which As Long)
+Declare Function cJSON_DetachItemFromObject(ByVal Object As cJSON Ptr, ByVal String As Const ZString Ptr) As cJSON Ptr
+Declare Function cJSON_DetachItemFromObjectCaseSensitive(ByVal Object As cJSON Ptr, ByVal String As Const ZString Ptr) As cJSON Ptr
+Declare Sub cJSON_DeleteItemFromObject(ByVal Object As cJSON Ptr, ByVal String As Const ZString Ptr)
+Declare Sub cJSON_DeleteItemFromObjectCaseSensitive(ByVal Object As cJSON Ptr, ByVal String As Const ZString Ptr)
+declare function cJSON_InsertItemInArray(byval array as cJSON ptr, byval which as long, byval newitem as cJSON ptr) as cJSON_bool
+declare function cJSON_ReplaceItemViaPointer(byval parent as cJSON const ptr, byval item as cJSON const ptr, byval replacement as cJSON ptr) as cJSON_bool
+Declare Function cJSON_ReplaceItemInArray(ByVal array As cJSON Ptr, ByVal which As Long, ByVal newitem As cJSON Ptr) As cJSON_bool
+Declare Function cJSON_ReplaceItemInObject(ByVal Object As cJSON Ptr, ByVal String As Const ZString Ptr, ByVal newitem As cJSON Ptr) As cJSON_bool
+declare function cJSON_ReplaceItemInObjectCaseSensitive(byval object as cJSON ptr, byval string as const zstring ptr, byval newitem as cJSON ptr) as cJSON_bool
+declare function cJSON_Duplicate(byval item as const cJSON ptr, byval recurse as cJSON_bool) as cJSON ptr
+declare function cJSON_Compare(byval a as const cJSON const ptr, byval b as const cJSON const ptr, byval case_sensitive as const cJSON_bool) as cJSON_bool
+declare sub cJSON_Minify(byval json as zstring ptr)
+declare function cJSON_AddNullToObject(byval object as cJSON const ptr, byval name as const zstring const ptr) as cJSON ptr
+declare function cJSON_AddTrueToObject(byval object as cJSON const ptr, byval name as const zstring const ptr) as cJSON ptr
+Declare Function cJSON_AddFalseToObject(ByVal Object As cJSON Const Ptr, ByVal Name As Const ZString Const Ptr) As cJSON Ptr
+Declare Function cJSON_AddBoolToObject(ByVal Object As cJSON Const Ptr, ByVal Name As Const ZString Const Ptr, ByVal BOOLEAN As Const cJSON_bool) As cJSON Ptr
+declare function cJSON_AddNumberToObject(byval object as cJSON const ptr, byval name as const zstring const ptr, byval number as const double) as cJSON ptr
+Declare Function cJSON_AddStringToObject(ByVal Object As cJSON Const Ptr, ByVal Name As Const ZString Const Ptr, ByVal String As Const ZString Const Ptr) As cJSON Ptr
+declare function cJSON_AddRawToObject(byval object as cJSON const ptr, byval name as const zstring const ptr, byval raw as const zstring const ptr) as cJSON ptr
+Declare Function cJSON_AddObjectToObject(ByVal Object As cJSON Const Ptr, ByVal Name As Const ZString Const Ptr) As cJSON Ptr
+Declare Function cJSON_AddArrayToObject(ByVal Object As cJSON Const Ptr, ByVal Name As Const ZString Const Ptr) As cJSON Ptr
+
+#Macro cJSON_SetIntValue(object, number)
+ If object Then
+ object->valueint = number
+ object->valuedouble = number
+ EndIf
+#EndMacro
+
+declare function cJSON_SetNumberHelper(byval object as cJSON ptr, byval number as double) as double
+#define cJSON_SetNumberValue(object, number) iif(object <> NULL, cJSON_SetNumberHelper(object, cdbl(number)), (number))
+declare function cJSON_SetValuestring(byval object as cJSON ptr, byval valuestring as const zstring ptr) as zstring ptr
+
+#Macro cJSON_SetBoolValue(object, boolValue)
+ If object <> NULL AndAlso (object->type And (cJSON_False Or cJSON_True)) Then
+ object->type = (object->type And Not (cJSON_False Or cJSON_True)) Or IIf(boolValue, cJSON_True, cJSON_False)
+ EndIf
+#EndMacro
+
+#Macro cJSON_ArrayForEach(element, array)
+ #define cJSON_NextForEach element = element->next:loop
+ element = IIf(array <> NULL, array->child, NULL)
+ Do While element <> NULL
+#EndMacro
+declare function cJSON_malloc(byval size as uinteger) as any ptr
+Declare Sub cJSON_free(ByVal Object As Any Ptr)
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/duckdb.bi b/inc/duckdb.bi
new file mode 100644
index 00000000..59b81d2b
--- /dev/null
+++ b/inc/duckdb.bi
@@ -0,0 +1,872 @@
+'freebasic bindings for duckdb-1.13
+' based on the C header files:
+'DuckDB is a high-performance analytical database system. It is designed to be fast, reliable, portable, and easy to use. DuckDB provides a rich SQL dialect,
+' with support far beyond basic SQL. DuckDB supports arbitrary and nested correlated subqueries, window functions, collations, complex types
+'(arrays, structs, maps), and several extensions designed to make SQL easier to use.
+'Copyright 2018-2025 Stichting DuckDB Foundation
+'Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
+'to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+'and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+'The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+'THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+'INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+'IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+''TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+#pragma once
+#ifndef DUCKDB_API
+#define DUCKDB_API
+#include once "crt/stdint.bi"
+#include once "crt/stddef.bi"
+#inclib "duckdb"
+extern "C"
+
+Type duckdb_type As Long
+
+#ifndef bool
+type bool as long
+#endif
+enum
+ DUCKDB_TYPE_INVALID = 0
+ DUCKDB_TYPE_BOOLEAN = 1
+ DUCKDB_TYPE_TINYINT = 2
+ DUCKDB_TYPE_SMALLINT = 3
+ DUCKDB_TYPE_INTEGER = 4
+ DUCKDB_TYPE_BIGINT = 5
+ DUCKDB_TYPE_UTINYINT = 6
+ DUCKDB_TYPE_USMALLINT = 7
+ DUCKDB_TYPE_UINTEGER = 8
+ DUCKDB_TYPE_UBIGINT = 9
+ DUCKDB_TYPE_FLOAT = 10
+ DUCKDB_TYPE_DOUBLE = 11
+ DUCKDB_TYPE_TIMESTAMP = 12
+ DUCKDB_TYPE_DATE = 13
+ DUCKDB_TYPE_TIME = 14
+ DUCKDB_TYPE_INTERVAL = 15
+ DUCKDB_TYPE_HUGEINT = 16
+ DUCKDB_TYPE_UHUGEINT = 32
+ DUCKDB_TYPE_VARCHAR = 17
+ DUCKDB_TYPE_BLOB = 18
+ DUCKDB_TYPE_DECIMAL = 19
+ DUCKDB_TYPE_TIMESTAMP_S = 20
+ DUCKDB_TYPE_TIMESTAMP_MS = 21
+ DUCKDB_TYPE_TIMESTAMP_NS = 22
+ DUCKDB_TYPE_ENUM = 23
+ DUCKDB_TYPE_LIST = 24
+ DUCKDB_TYPE_STRUCT = 25
+ DUCKDB_TYPE_MAP = 26
+ DUCKDB_TYPE_ARRAY = 33
+ DUCKDB_TYPE_UUID = 27
+ DUCKDB_TYPE_UNION = 28
+ DUCKDB_TYPE_BIT = 29
+ DUCKDB_TYPE_TIME_TZ = 30
+ DUCKDB_TYPE_TIMESTAMP_TZ = 31
+ DUCKDB_TYPE_ANY = 34
+ DUCKDB_TYPE_VARINT = 35
+ DUCKDB_TYPE_SQLNULL = 36
+end enum
+
+type duckdb_state as long
+enum
+ DuckDBSuccess = 0
+ DuckDBError = 1
+end enum
+
+type duckdb_pending_state as long
+enum
+ DUCKDB_PENDING_RESULT_READY = 0
+ DUCKDB_PENDING_RESULT_NOT_READY = 1
+ DUCKDB_PENDING_ERROR = 2
+ DUCKDB_PENDING_NO_TASKS_AVAILABLE = 3
+end enum
+
+type duckdb_result_type as long
+enum
+ DUCKDB_RESULT_TYPE_INVALID = 0
+ DUCKDB_RESULT_TYPE_CHANGED_ROWS = 1
+ DUCKDB_RESULT_TYPE_NOTHING = 2
+ DUCKDB_RESULT_TYPE_QUERY_RESULT = 3
+end enum
+
+type duckdb_statement_type as long
+enum
+ DUCKDB_STATEMENT_TYPE_INVALID = 0
+ DUCKDB_STATEMENT_TYPE_SELECT = 1
+ DUCKDB_STATEMENT_TYPE_INSERT = 2
+ DUCKDB_STATEMENT_TYPE_UPDATE = 3
+ DUCKDB_STATEMENT_TYPE_EXPLAIN = 4
+ DUCKDB_STATEMENT_TYPE_DELETE = 5
+ DUCKDB_STATEMENT_TYPE_PREPARE = 6
+ DUCKDB_STATEMENT_TYPE_CREATE = 7
+ DUCKDB_STATEMENT_TYPE_EXECUTE = 8
+ DUCKDB_STATEMENT_TYPE_ALTER = 9
+ DUCKDB_STATEMENT_TYPE_TRANSACTION = 10
+ DUCKDB_STATEMENT_TYPE_COPY = 11
+ DUCKDB_STATEMENT_TYPE_ANALYZE = 12
+ DUCKDB_STATEMENT_TYPE_VARIABLE_SET = 13
+ DUCKDB_STATEMENT_TYPE_CREATE_FUNC = 14
+ DUCKDB_STATEMENT_TYPE_DROP = 15
+ DUCKDB_STATEMENT_TYPE_EXPORT = 16
+ DUCKDB_STATEMENT_TYPE_PRAGMA = 17
+ DUCKDB_STATEMENT_TYPE_VACUUM = 18
+ DUCKDB_STATEMENT_TYPE_CALL = 19
+ DUCKDB_STATEMENT_TYPE_SET = 20
+ DUCKDB_STATEMENT_TYPE_LOAD = 21
+ DUCKDB_STATEMENT_TYPE_RELATION = 22
+ DUCKDB_STATEMENT_TYPE_EXTENSION = 23
+ DUCKDB_STATEMENT_TYPE_LOGICAL_PLAN = 24
+ DUCKDB_STATEMENT_TYPE_ATTACH = 25
+ DUCKDB_STATEMENT_TYPE_DETACH = 26
+ DUCKDB_STATEMENT_TYPE_MULTI = 27
+end enum
+
+type duckdb_error_type as long
+enum
+ DUCKDB_ERROR_INVALID = 0
+ DUCKDB_ERROR_OUT_OF_RANGE = 1
+ DUCKDB_ERROR_CONVERSION = 2
+ DUCKDB_ERROR_UNKNOWN_TYPE = 3
+ DUCKDB_ERROR_DECIMAL = 4
+ DUCKDB_ERROR_MISMATCH_TYPE = 5
+ DUCKDB_ERROR_DIVIDE_BY_ZERO = 6
+ DUCKDB_ERROR_OBJECT_SIZE = 7
+ DUCKDB_ERROR_INVALID_TYPE = 8
+ DUCKDB_ERROR_SERIALIZATION = 9
+ DUCKDB_ERROR_TRANSACTION = 10
+ DUCKDB_ERROR_NOT_IMPLEMENTED = 11
+ DUCKDB_ERROR_EXPRESSION = 12
+ DUCKDB_ERROR_CATALOG = 13
+ DUCKDB_ERROR_PARSER = 14
+ DUCKDB_ERROR_PLANNER = 15
+ DUCKDB_ERROR_SCHEDULER = 16
+ DUCKDB_ERROR_EXECUTOR = 17
+ DUCKDB_ERROR_CONSTRAINT = 18
+ DUCKDB_ERROR_INDEX = 19
+ DUCKDB_ERROR_STAT = 20
+ DUCKDB_ERROR_CONNECTION = 21
+ DUCKDB_ERROR_SYNTAX = 22
+ DUCKDB_ERROR_SETTINGS = 23
+ DUCKDB_ERROR_BINDER = 24
+ DUCKDB_ERROR_NETWORK = 25
+ DUCKDB_ERROR_OPTIMIZER = 26
+ DUCKDB_ERROR_NULL_POINTER = 27
+ DUCKDB_ERROR_IO = 28
+ DUCKDB_ERROR_INTERRUPT = 29
+ DUCKDB_ERROR_FATAL = 30
+ DUCKDB_ERROR_INTERNAL = 31
+ DUCKDB_ERROR_INVALID_INPUT = 32
+ DUCKDB_ERROR_OUT_OF_MEMORY = 33
+ DUCKDB_ERROR_PERMISSION = 34
+ DUCKDB_ERROR_PARAMETER_NOT_RESOLVED = 35
+ DUCKDB_ERROR_PARAMETER_NOT_ALLOWED = 36
+ DUCKDB_ERROR_DEPENDENCY = 37
+ DUCKDB_ERROR_HTTP = 38
+ DUCKDB_ERROR_MISSING_EXTENSION = 39
+ DUCKDB_ERROR_AUTOLOAD = 40
+ DUCKDB_ERROR_SEQUENCE = 41
+ DUCKDB_INVALID_CONFIGURATION = 42
+end enum
+
+type duckdb_cast_mode as long
+enum
+ DUCKDB_CAST_NORMAL = 0
+ DUCKDB_CAST_TRY = 1
+end enum
+
+type idx_t as ulongint
+type duckdb_delete_callback_t as sub(byval data_ as any ptr)
+type duckdb_task_state as any ptr
+
+type duckdb_date
+ days as long
+end type
+
+type duckdb_date_struct
+ year as long
+ month as byte
+ day as byte
+end type
+
+type duckdb_time
+ micros as longint
+end type
+
+type duckdb_time_struct
+ hour as byte
+ min as byte
+ sec as byte
+ micros as long
+end type
+
+type duckdb_time_tz
+ bits as ulongint
+end type
+
+type duckdb_time_tz_struct
+ time as duckdb_time_struct
+ offset as long
+end type
+
+type duckdb_timestamp
+ micros as longint
+end type
+
+type duckdb_timestamp_struct
+ date as duckdb_date_struct
+ time as duckdb_time_struct
+end type
+
+type duckdb_interval
+ months as long
+ days as long
+ micros as longint
+end type
+
+type duckdb_hugeint
+ lower as ulongint
+ upper as longint
+end type
+
+type duckdb_uhugeint
+ lower as ulongint
+ upper as ulongint
+end type
+
+type duckdb_decimal
+ width as ubyte
+ scale as ubyte
+ value as duckdb_hugeint
+end type
+
+type duckdb_query_progress_type
+ percentage as double
+ rows_processed as ulongint
+ total_rows_to_process as ulongint
+end type
+
+type duckdb_string_t_value_pointer
+ length as ulong
+ prefix as zstring * 4
+ ptr_ as zstring ptr
+end type
+
+type duckdb_string_t_value_inlined
+ length as ulong
+ inlined as zstring * 12
+end type
+
+union duckdb_string_t_value
+ pointer as duckdb_string_t_value_pointer
+ inlined as duckdb_string_t_value_inlined
+end union
+
+type duckdb_string_t
+ value as duckdb_string_t_value
+end type
+
+type duckdb_list_entry
+ offset as ulongint
+ length as ulongint
+end type
+
+type duckdb_column
+ deprecated_data as any ptr
+ deprecated_nullmask as bool ptr
+ deprecated_type as duckdb_type
+ deprecated_name as zstring ptr
+ internal_data as any ptr
+end type
+
+type _duckdb_vector
+ internal_ptr as any ptr
+end type
+
+type duckdb_vector as _duckdb_vector ptr
+
+type duckdb_string
+ data_ as zstring ptr
+ size as idx_t
+end type
+
+type duckdb_blob
+ data_ as any ptr
+ size as idx_t
+end type
+
+type duckdb_result
+ deprecated_column_count as idx_t
+ deprecated_row_count as idx_t
+ deprecated_rows_changed as idx_t
+ deprecated_columns as duckdb_column ptr
+ deprecated_error_message as zstring ptr
+ internal_data as any ptr
+end type
+
+type _duckdb_database
+ internal_ptr as any ptr
+end type
+
+type duckdb_database as _duckdb_database ptr
+
+type _duckdb_connection
+ internal_ptr as any ptr
+end type
+
+type duckdb_connection as _duckdb_connection ptr
+
+type _duckdb_prepared_statement
+ internal_ptr as any ptr
+end type
+
+type duckdb_prepared_statement as _duckdb_prepared_statement ptr
+
+type _duckdb_extracted_statements
+ internal_ptr as any ptr
+end type
+
+type duckdb_extracted_statements as _duckdb_extracted_statements ptr
+
+type _duckdb_pending_result
+ internal_ptr as any ptr
+end type
+
+type duckdb_pending_result as _duckdb_pending_result ptr
+
+type _duckdb_appender
+ internal_ptr as any ptr
+end type
+
+type duckdb_appender as _duckdb_appender ptr
+
+type _duckdb_table_description
+ internal_ptr as any ptr
+end type
+
+type duckdb_table_description as _duckdb_table_description ptr
+
+type _duckdb_config
+ internal_ptr as any ptr
+end type
+
+type duckdb_config as _duckdb_config ptr
+
+type _duckdb_logical_type
+ internal_ptr as any ptr
+end type
+
+type duckdb_logical_type as _duckdb_logical_type ptr
+
+type _duckdb_create_type_info
+ internal_ptr as any ptr
+end type
+
+type duckdb_create_type_info as _duckdb_create_type_info ptr
+
+type _duckdb_data_chunk
+ internal_ptr as any ptr
+end type
+
+type duckdb_data_chunk as _duckdb_data_chunk ptr
+
+type _duckdb_value
+ internal_ptr as any ptr
+end type
+
+type duckdb_value as _duckdb_value ptr
+
+type _duckdb_profiling_info
+ internal_ptr as any ptr
+end type
+
+type duckdb_profiling_info as _duckdb_profiling_info ptr
+
+type _duckdb_extension_info
+ internal_ptr as any ptr
+end type
+
+type duckdb_extension_info as _duckdb_extension_info ptr
+
+type _duckdb_function_info
+ internal_ptr as any ptr
+end type
+
+type duckdb_function_info as _duckdb_function_info ptr
+
+type _duckdb_scalar_function
+ internal_ptr as any ptr
+end type
+
+type duckdb_scalar_function as _duckdb_scalar_function ptr
+
+type _duckdb_scalar_function_set
+ internal_ptr as any ptr
+end type
+
+type duckdb_scalar_function_set as _duckdb_scalar_function_set ptr
+type duckdb_scalar_function_t as sub(byval info as duckdb_function_info, byval input as duckdb_data_chunk, byval output as duckdb_vector)
+
+type _duckdb_aggregate_function
+ internal_ptr as any ptr
+end type
+
+type duckdb_aggregate_function as _duckdb_aggregate_function ptr
+
+type _duckdb_aggregate_function_set
+ internal_ptr as any ptr
+end type
+
+type duckdb_aggregate_function_set as _duckdb_aggregate_function_set ptr
+
+type _duckdb_aggregate_state
+ internal_ptr as any ptr
+end type
+
+type duckdb_aggregate_state as _duckdb_aggregate_state ptr
+type duckdb_aggregate_state_size as function(byval info as duckdb_function_info) as idx_t
+type duckdb_aggregate_init_t as sub(byval info as duckdb_function_info, byval state as duckdb_aggregate_state)
+type duckdb_aggregate_destroy_t as sub(byval states as duckdb_aggregate_state ptr, byval count as idx_t)
+type duckdb_aggregate_update_t as sub(byval info as duckdb_function_info, byval input as duckdb_data_chunk, byval states as duckdb_aggregate_state ptr)
+type duckdb_aggregate_combine_t as sub(byval info as duckdb_function_info, byval source as duckdb_aggregate_state ptr, byval target as duckdb_aggregate_state ptr, byval count as idx_t)
+type duckdb_aggregate_finalize_t as sub(byval info as duckdb_function_info, byval source as duckdb_aggregate_state ptr, byval result as duckdb_vector, byval count as idx_t, byval offset as idx_t)
+
+type _duckdb_table_function
+ internal_ptr as any ptr
+end type
+
+type duckdb_table_function as _duckdb_table_function ptr
+
+type _duckdb_bind_info
+ internal_ptr as any ptr
+end type
+
+type duckdb_bind_info as _duckdb_bind_info ptr
+
+type _duckdb_init_info
+ internal_ptr as any ptr
+end type
+
+type duckdb_init_info as _duckdb_init_info ptr
+type duckdb_table_function_bind_t as sub(byval info as duckdb_bind_info)
+type duckdb_table_function_init_t as sub(byval info as duckdb_init_info)
+type duckdb_table_function_t as sub(byval info as duckdb_function_info, byval output as duckdb_data_chunk)
+
+type _duckdb_cast_function
+ internal_ptr as any ptr
+end type
+
+type duckdb_cast_function as _duckdb_cast_function ptr
+type duckdb_cast_function_t as function(byval info as duckdb_function_info, byval count as idx_t, byval input as duckdb_vector, byval output as duckdb_vector) as bool
+
+type _duckdb_replacement_scan_info
+ internal_ptr as any ptr
+end type
+
+type duckdb_replacement_scan_info as _duckdb_replacement_scan_info ptr
+type duckdb_replacement_callback_t as sub(byval info as duckdb_replacement_scan_info, byval table_name as const zstring ptr, byval data_ as any ptr)
+
+type _duckdb_arrow
+ internal_ptr as any ptr
+end type
+
+type duckdb_arrow as _duckdb_arrow ptr
+
+type _duckdb_arrow_stream
+ internal_ptr as any ptr
+end type
+
+type duckdb_arrow_stream as _duckdb_arrow_stream ptr
+
+type _duckdb_arrow_schema
+ internal_ptr as any ptr
+end type
+
+type duckdb_arrow_schema as _duckdb_arrow_schema ptr
+
+type _duckdb_arrow_array
+ internal_ptr as any ptr
+end type
+
+type duckdb_arrow_array as _duckdb_arrow_array ptr
+
+type duckdb_extension_access
+ set_error as sub(byval info as duckdb_extension_info, byval error_ as const zstring ptr)
+ get_database as function(byval info as duckdb_extension_info) as duckdb_database ptr
+ get_api as function(byval info as duckdb_extension_info, byval version as const zstring ptr) as const any ptr
+end type
+
+declare function duckdb_open(byval path as const zstring ptr, byval out_database as duckdb_database ptr) as duckdb_state
+declare function duckdb_open_ext(byval path as const zstring ptr, byval out_database as duckdb_database ptr, byval config as duckdb_config, byval out_error as zstring ptr ptr) as duckdb_state
+declare sub duckdb_close(byval database as duckdb_database ptr)
+declare function duckdb_connect(byval database as duckdb_database, byval out_connection as duckdb_connection ptr) as duckdb_state
+declare sub duckdb_interrupt(byval connection as duckdb_connection)
+declare function duckdb_query_progress(byval connection as duckdb_connection) as duckdb_query_progress_type
+declare sub duckdb_disconnect(byval connection as duckdb_connection ptr)
+declare function duckdb_library_version() as const zstring ptr
+declare function duckdb_create_config(byval out_config as duckdb_config ptr) as duckdb_state
+declare function duckdb_config_count() as uinteger
+declare function duckdb_get_config_flag(byval index as uinteger, byval out_name as const zstring ptr ptr, byval out_description as const zstring ptr ptr) as duckdb_state
+declare function duckdb_set_config(byval config as duckdb_config, byval name_ as const zstring ptr, byval option as const zstring ptr) as duckdb_state
+declare sub duckdb_destroy_config(byval config as duckdb_config ptr)
+declare function duckdb_query(byval connection as duckdb_connection, byval query as const zstring ptr, byval out_result as duckdb_result ptr) as duckdb_state
+declare sub duckdb_destroy_result(byval result as duckdb_result ptr)
+declare function duckdb_column_name(byval result as duckdb_result ptr, byval col as idx_t) as const zstring ptr
+declare function duckdb_column_type(byval result as duckdb_result ptr, byval col as idx_t) as duckdb_type
+declare function duckdb_result_statement_type(byval result as duckdb_result) as duckdb_statement_type
+declare function duckdb_column_logical_type(byval result as duckdb_result ptr, byval col as idx_t) as duckdb_logical_type
+declare function duckdb_column_count(byval result as duckdb_result ptr) as idx_t
+declare function duckdb_row_count(byval result as duckdb_result ptr) as idx_t
+declare function duckdb_rows_changed(byval result as duckdb_result ptr) as idx_t
+declare function duckdb_column_data(byval result as duckdb_result ptr, byval col as idx_t) as any ptr
+declare function duckdb_nullmask_data(byval result as duckdb_result ptr, byval col as idx_t) as bool ptr
+declare function duckdb_result_error(byval result as duckdb_result ptr) as const zstring ptr
+declare function duckdb_result_error_type(byval result as duckdb_result ptr) as duckdb_error_type
+declare function duckdb_result_get_chunk(byval result as duckdb_result, byval chunk_index as idx_t) as duckdb_data_chunk
+declare function duckdb_result_is_streaming(byval result as duckdb_result) as bool
+declare function duckdb_result_chunk_count(byval result as duckdb_result) as idx_t
+declare function duckdb_result_return_type(byval result as duckdb_result) as duckdb_result_type
+declare function duckdb_value_boolean(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as bool
+declare function duckdb_value_int8(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as byte
+declare function duckdb_value_int16(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as short
+declare function duckdb_value_int32(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as long
+declare function duckdb_value_int64(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as longint
+declare function duckdb_value_hugeint(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as duckdb_hugeint
+declare function duckdb_value_uhugeint(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as duckdb_uhugeint
+declare function duckdb_value_decimal(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as duckdb_decimal
+declare function duckdb_value_uint8(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as ubyte
+declare function duckdb_value_uint16(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as ushort
+declare function duckdb_value_uint32(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as ulong
+declare function duckdb_value_uint64(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as ulongint
+declare function duckdb_value_float(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as single
+declare function duckdb_value_double(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as double
+declare function duckdb_value_date(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as duckdb_date
+declare function duckdb_value_time(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as duckdb_time
+declare function duckdb_value_timestamp(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as duckdb_timestamp
+declare function duckdb_value_interval(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as duckdb_interval
+declare function duckdb_value_varchar(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as zstring ptr
+declare function duckdb_value_string(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as duckdb_string
+declare function duckdb_value_varchar_internal(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as zstring ptr
+declare function duckdb_value_string_internal(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as duckdb_string
+declare function duckdb_value_blob(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as duckdb_blob
+declare function duckdb_value_is_null(byval result as duckdb_result ptr, byval col as idx_t, byval row as idx_t) as bool
+declare function duckdb_malloc(byval size as uinteger) as any ptr
+declare sub duckdb_free(byval ptr_ as any ptr)
+declare function duckdb_vector_size() as idx_t
+declare function duckdb_string_is_inlined(byval string as duckdb_string_t) as bool
+declare function duckdb_string_t_length(byval string as duckdb_string_t) as ulong
+declare function duckdb_string_t_data(byval string as duckdb_string_t ptr) as const zstring ptr
+declare function duckdb_from_date(byval date as duckdb_date) as duckdb_date_struct
+declare function duckdb_to_date(byval date as duckdb_date_struct) as duckdb_date
+declare function duckdb_is_finite_date(byval date as duckdb_date) as bool
+declare function duckdb_from_time(byval time as duckdb_time) as duckdb_time_struct
+declare function duckdb_create_time_tz(byval micros as longint, byval offset as long) as duckdb_time_tz
+declare function duckdb_from_time_tz(byval micros as duckdb_time_tz) as duckdb_time_tz_struct
+declare function duckdb_to_time(byval time as duckdb_time_struct) as duckdb_time
+declare function duckdb_from_timestamp(byval ts as duckdb_timestamp) as duckdb_timestamp_struct
+declare function duckdb_to_timestamp(byval ts as duckdb_timestamp_struct) as duckdb_timestamp
+declare function duckdb_is_finite_timestamp(byval ts as duckdb_timestamp) as bool
+declare function duckdb_hugeint_to_double(byval val_ as duckdb_hugeint) as double
+declare function duckdb_double_to_hugeint(byval val_ as double) as duckdb_hugeint
+declare function duckdb_uhugeint_to_double(byval val_ as duckdb_uhugeint) as double
+declare function duckdb_double_to_uhugeint(byval val_ as double) as duckdb_uhugeint
+declare function duckdb_double_to_decimal(byval val_ as double, byval width as ubyte, byval scale as ubyte) as duckdb_decimal
+declare function duckdb_decimal_to_double(byval val_ as duckdb_decimal) as double
+declare function duckdb_prepare(byval connection as duckdb_connection, byval query as const zstring ptr, byval out_prepared_statement as duckdb_prepared_statement ptr) as duckdb_state
+declare sub duckdb_destroy_prepare(byval prepared_statement as duckdb_prepared_statement ptr)
+declare function duckdb_prepare_error(byval prepared_statement as duckdb_prepared_statement) as const zstring ptr
+declare function duckdb_nparams(byval prepared_statement as duckdb_prepared_statement) as idx_t
+declare function duckdb_parameter_name(byval prepared_statement as duckdb_prepared_statement, byval index as idx_t) as const zstring ptr
+declare function duckdb_param_type(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t) as duckdb_type
+declare function duckdb_clear_bindings(byval prepared_statement as duckdb_prepared_statement) as duckdb_state
+declare function duckdb_prepared_statement_type(byval statement as duckdb_prepared_statement) as duckdb_statement_type
+declare function duckdb_bind_value(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as duckdb_value) as duckdb_state
+declare function duckdb_bind_parameter_index(byval prepared_statement as duckdb_prepared_statement, byval param_idx_out as idx_t ptr, byval name_ as const zstring ptr) as duckdb_state
+declare function duckdb_bind_boolean(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as bool) as duckdb_state
+declare function duckdb_bind_int8(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as byte) as duckdb_state
+declare function duckdb_bind_int16(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as short) as duckdb_state
+declare function duckdb_bind_int32(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as long) as duckdb_state
+declare function duckdb_bind_int64(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as longint) as duckdb_state
+declare function duckdb_bind_hugeint(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as duckdb_hugeint) as duckdb_state
+declare function duckdb_bind_uhugeint(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as duckdb_uhugeint) as duckdb_state
+declare function duckdb_bind_decimal(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as duckdb_decimal) as duckdb_state
+declare function duckdb_bind_uint8(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as ubyte) as duckdb_state
+declare function duckdb_bind_uint16(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as ushort) as duckdb_state
+declare function duckdb_bind_uint32(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as ulong) as duckdb_state
+declare function duckdb_bind_uint64(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as ulongint) as duckdb_state
+declare function duckdb_bind_float(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as single) as duckdb_state
+declare function duckdb_bind_double(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as double) as duckdb_state
+declare function duckdb_bind_date(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as duckdb_date) as duckdb_state
+declare function duckdb_bind_time(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as duckdb_time) as duckdb_state
+declare function duckdb_bind_timestamp(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as duckdb_timestamp) as duckdb_state
+declare function duckdb_bind_timestamp_tz(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as duckdb_timestamp) as duckdb_state
+declare function duckdb_bind_interval(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as duckdb_interval) as duckdb_state
+declare function duckdb_bind_varchar(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as const zstring ptr) as duckdb_state
+declare function duckdb_bind_varchar_length(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval val_ as const zstring ptr, byval length as idx_t) as duckdb_state
+declare function duckdb_bind_blob(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t, byval data_ as const any ptr, byval length as idx_t) as duckdb_state
+declare function duckdb_bind_null(byval prepared_statement as duckdb_prepared_statement, byval param_idx as idx_t) as duckdb_state
+declare function duckdb_execute_prepared(byval prepared_statement as duckdb_prepared_statement, byval out_result as duckdb_result ptr) as duckdb_state
+declare function duckdb_execute_prepared_streaming(byval prepared_statement as duckdb_prepared_statement, byval out_result as duckdb_result ptr) as duckdb_state
+declare function duckdb_extract_statements(byval connection as duckdb_connection, byval query as const zstring ptr, byval out_extracted_statements as duckdb_extracted_statements ptr) as idx_t
+declare function duckdb_prepare_extracted_statement(byval connection as duckdb_connection, byval extracted_statements as duckdb_extracted_statements, byval index as idx_t, byval out_prepared_statement as duckdb_prepared_statement ptr) as duckdb_state
+declare function duckdb_extract_statements_error(byval extracted_statements as duckdb_extracted_statements) as const zstring ptr
+declare sub duckdb_destroy_extracted(byval extracted_statements as duckdb_extracted_statements ptr)
+declare function duckdb_pending_prepared(byval prepared_statement as duckdb_prepared_statement, byval out_result as duckdb_pending_result ptr) as duckdb_state
+declare function duckdb_pending_prepared_streaming(byval prepared_statement as duckdb_prepared_statement, byval out_result as duckdb_pending_result ptr) as duckdb_state
+declare sub duckdb_destroy_pending(byval pending_result as duckdb_pending_result ptr)
+
+declare function duckdb_pending_execute_task(byval pending_result as duckdb_pending_result) as duckdb_pending_state
+declare function duckdb_pending_execute_check_state(byval pending_result as duckdb_pending_result) as duckdb_pending_state
+declare function duckdb_execute_pending(byval pending_result as duckdb_pending_result, byval out_result as duckdb_result ptr) as duckdb_state
+declare function duckdb_pending_execution_is_finished(byval pending_state as duckdb_pending_state) as bool
+declare sub duckdb_destroy_value(byval value as duckdb_value ptr)
+declare function duckdb_create_varchar(byval text as const zstring ptr) as duckdb_value
+declare function duckdb_create_varchar_length(byval text as const zstring ptr, byval length as idx_t) as duckdb_value
+declare function duckdb_create_bool(byval input as bool) as duckdb_value
+declare function duckdb_create_int8(byval input as byte) as duckdb_value
+declare function duckdb_create_uint8(byval input as ubyte) as duckdb_value
+declare function duckdb_create_int16(byval input as short) as duckdb_value
+declare function duckdb_create_uint16(byval input as ushort) as duckdb_value
+declare function duckdb_create_int32(byval input as long) as duckdb_value
+declare function duckdb_create_uint32(byval input as ulong) as duckdb_value
+declare function duckdb_create_uint64(byval input as ulongint) as duckdb_value
+declare function duckdb_create_int64(byval val_ as longint) as duckdb_value
+declare function duckdb_create_hugeint(byval input as duckdb_hugeint) as duckdb_value
+declare function duckdb_create_uhugeint(byval input as duckdb_uhugeint) as duckdb_value
+declare function duckdb_create_float(byval input as single) as duckdb_value
+declare function duckdb_create_double(byval input as double) as duckdb_value
+declare function duckdb_create_date(byval input as duckdb_date) as duckdb_value
+declare function duckdb_create_time(byval input as duckdb_time) as duckdb_value
+declare function duckdb_create_time_tz_value(byval value as duckdb_time_tz) as duckdb_value
+declare function duckdb_create_timestamp(byval input as duckdb_timestamp) as duckdb_value
+declare function duckdb_create_interval(byval input as duckdb_interval) as duckdb_value
+declare function duckdb_create_blob(byval data_ as const ubyte ptr, byval length as idx_t) as duckdb_value
+declare function duckdb_get_bool(byval val_ as duckdb_value) as bool
+declare function duckdb_get_int8(byval val_ as duckdb_value) as byte
+declare function duckdb_get_uint8(byval val_ as duckdb_value) as ubyte
+declare function duckdb_get_int16(byval val_ as duckdb_value) as short
+declare function duckdb_get_uint16(byval val_ as duckdb_value) as ushort
+declare function duckdb_get_int32(byval val_ as duckdb_value) as long
+declare function duckdb_get_uint32(byval val_ as duckdb_value) as ulong
+declare function duckdb_get_int64(byval val_ as duckdb_value) as longint
+declare function duckdb_get_uint64(byval val_ as duckdb_value) as ulongint
+declare function duckdb_get_hugeint(byval val_ as duckdb_value) as duckdb_hugeint
+declare function duckdb_get_uhugeint(byval val_ as duckdb_value) as duckdb_uhugeint
+declare function duckdb_get_float(byval val_ as duckdb_value) as single
+declare function duckdb_get_double(byval val_ as duckdb_value) as double
+declare function duckdb_get_date(byval val_ as duckdb_value) as duckdb_date
+declare function duckdb_get_time(byval val_ as duckdb_value) as duckdb_time
+declare function duckdb_get_time_tz(byval val_ as duckdb_value) as duckdb_time_tz
+declare function duckdb_get_timestamp(byval val_ as duckdb_value) as duckdb_timestamp
+declare function duckdb_get_interval(byval val_ as duckdb_value) as duckdb_interval
+declare function duckdb_get_value_type(byval val_ as duckdb_value) as duckdb_logical_type
+declare function duckdb_get_blob(byval val_ as duckdb_value) as duckdb_blob
+declare function duckdb_get_varchar(byval value as duckdb_value) as zstring ptr
+declare function duckdb_create_struct_value(byval type_ as duckdb_logical_type, byval values as duckdb_value ptr) as duckdb_value
+declare function duckdb_create_list_value(byval type_ as duckdb_logical_type, byval values as duckdb_value ptr, byval value_count as idx_t) as duckdb_value
+declare function duckdb_create_array_value(byval type_ as duckdb_logical_type, byval values as duckdb_value ptr, byval value_count as idx_t) as duckdb_value
+declare function duckdb_get_map_size(byval value as duckdb_value) as idx_t
+declare function duckdb_get_map_key(byval value as duckdb_value, byval index as idx_t) as duckdb_value
+declare function duckdb_get_map_value(byval value as duckdb_value, byval index as idx_t) as duckdb_value
+declare function duckdb_create_logical_type(byval type_ as duckdb_type) as duckdb_logical_type
+declare function duckdb_logical_type_get_alias(byval type_ as duckdb_logical_type) as zstring ptr
+declare sub duckdb_logical_type_set_alias(byval type_ as duckdb_logical_type, byval alias as const zstring ptr)
+declare function duckdb_create_list_type(byval type_ as duckdb_logical_type) as duckdb_logical_type
+declare function duckdb_create_array_type(byval type_ as duckdb_logical_type, byval array_size as idx_t) as duckdb_logical_type
+declare function duckdb_create_map_type(byval key_type as duckdb_logical_type, byval value_type as duckdb_logical_type) as duckdb_logical_type
+declare function duckdb_create_union_type(byval member_types as duckdb_logical_type ptr, byval member_names as const zstring ptr ptr, byval member_count as idx_t) as duckdb_logical_type
+declare function duckdb_create_struct_type(byval member_types as duckdb_logical_type ptr, byval member_names as const zstring ptr ptr, byval member_count as idx_t) as duckdb_logical_type
+declare function duckdb_create_enum_type(byval member_names as const zstring ptr ptr, byval member_count as idx_t) as duckdb_logical_type
+declare function duckdb_create_decimal_type(byval width as ubyte, byval scale as ubyte) as duckdb_logical_type
+declare function duckdb_get_type_id(byval type_ as duckdb_logical_type) as duckdb_type
+declare function duckdb_decimal_width(byval type_ as duckdb_logical_type) as ubyte
+declare function duckdb_decimal_scale(byval type_ as duckdb_logical_type) as ubyte
+declare function duckdb_decimal_internal_type(byval type_ as duckdb_logical_type) as duckdb_type
+declare function duckdb_enum_internal_type(byval type_ as duckdb_logical_type) as duckdb_type
+declare function duckdb_enum_dictionary_size(byval type_ as duckdb_logical_type) as ulong
+declare function duckdb_enum_dictionary_value(byval type_ as duckdb_logical_type, byval index as idx_t) as zstring ptr
+declare function duckdb_list_type_child_type(byval type_ as duckdb_logical_type) as duckdb_logical_type
+declare function duckdb_array_type_child_type(byval type_ as duckdb_logical_type) as duckdb_logical_type
+declare function duckdb_array_type_array_size(byval type_ as duckdb_logical_type) as idx_t
+declare function duckdb_map_type_key_type(byval type_ as duckdb_logical_type) as duckdb_logical_type
+declare function duckdb_map_type_value_type(byval type_ as duckdb_logical_type) as duckdb_logical_type
+declare function duckdb_struct_type_child_count(byval type_ as duckdb_logical_type) as idx_t
+declare function duckdb_struct_type_child_name(byval type_ as duckdb_logical_type, byval index as idx_t) as zstring ptr
+declare function duckdb_struct_type_child_type(byval type_ as duckdb_logical_type, byval index as idx_t) as duckdb_logical_type
+declare function duckdb_union_type_member_count(byval type_ as duckdb_logical_type) as idx_t
+declare function duckdb_union_type_member_name(byval type_ as duckdb_logical_type, byval index as idx_t) as zstring ptr
+declare function duckdb_union_type_member_type(byval type_ as duckdb_logical_type, byval index as idx_t) as duckdb_logical_type
+declare sub duckdb_destroy_logical_type(byval type_ as duckdb_logical_type ptr)
+declare function duckdb_register_logical_type(byval con as duckdb_connection, byval type_ as duckdb_logical_type, byval info as duckdb_create_type_info) as duckdb_state
+declare function duckdb_create_data_chunk(byval types as duckdb_logical_type ptr, byval column_count as idx_t) as duckdb_data_chunk
+declare sub duckdb_destroy_data_chunk(byval chunk as duckdb_data_chunk ptr)
+declare sub duckdb_data_chunk_reset(byval chunk as duckdb_data_chunk)
+declare function duckdb_data_chunk_get_column_count(byval chunk as duckdb_data_chunk) as idx_t
+declare function duckdb_data_chunk_get_vector(byval chunk as duckdb_data_chunk, byval col_idx as idx_t) as duckdb_vector
+declare function duckdb_data_chunk_get_size(byval chunk as duckdb_data_chunk) as idx_t
+declare sub duckdb_data_chunk_set_size(byval chunk as duckdb_data_chunk, byval size as idx_t)
+declare function duckdb_vector_get_column_type(byval vector as duckdb_vector) as duckdb_logical_type
+declare function duckdb_vector_get_data(byval vector as duckdb_vector) as any ptr
+declare function duckdb_vector_get_validity(byval vector as duckdb_vector) as ulongint ptr
+declare sub duckdb_vector_ensure_validity_writable(byval vector as duckdb_vector)
+declare sub duckdb_vector_assign_string_element(byval vector as duckdb_vector, byval index as idx_t, byval str_ as const zstring ptr)
+declare sub duckdb_vector_assign_string_element_len(byval vector as duckdb_vector, byval index as idx_t, byval str_ as const zstring ptr, byval str_len as idx_t)
+declare function duckdb_list_vector_get_child(byval vector as duckdb_vector) as duckdb_vector
+declare function duckdb_list_vector_get_size(byval vector as duckdb_vector) as idx_t
+declare function duckdb_list_vector_set_size(byval vector as duckdb_vector, byval size as idx_t) as duckdb_state
+declare function duckdb_list_vector_reserve(byval vector as duckdb_vector, byval required_capacity as idx_t) as duckdb_state
+declare function duckdb_struct_vector_get_child(byval vector as duckdb_vector, byval index as idx_t) as duckdb_vector
+declare function duckdb_array_vector_get_child(byval vector as duckdb_vector) as duckdb_vector
+declare function duckdb_validity_row_is_valid(byval validity as ulongint ptr, byval row as idx_t) as bool
+declare sub duckdb_validity_set_row_validity(byval validity as ulongint ptr, byval row as idx_t, byval valid as bool)
+declare sub duckdb_validity_set_row_invalid(byval validity as ulongint ptr, byval row as idx_t)
+declare sub duckdb_validity_set_row_valid(byval validity as ulongint ptr, byval row as idx_t)
+declare function duckdb_create_scalar_function() as duckdb_scalar_function
+declare sub duckdb_destroy_scalar_function(byval scalar_function as duckdb_scalar_function ptr)
+declare sub duckdb_scalar_function_set_name(byval scalar_function as duckdb_scalar_function, byval name_ as const zstring ptr)
+declare sub duckdb_scalar_function_set_varargs(byval scalar_function as duckdb_scalar_function, byval type_ as duckdb_logical_type)
+declare sub duckdb_scalar_function_set_special_handling(byval scalar_function as duckdb_scalar_function)
+declare sub duckdb_scalar_function_set_volatile(byval scalar_function as duckdb_scalar_function)
+declare sub duckdb_scalar_function_add_parameter(byval scalar_function as duckdb_scalar_function, byval type_ as duckdb_logical_type)
+declare sub duckdb_scalar_function_set_return_type(byval scalar_function as duckdb_scalar_function, byval type_ as duckdb_logical_type)
+declare sub duckdb_scalar_function_set_extra_info(byval scalar_function as duckdb_scalar_function, byval extra_info as any ptr, byval destroy as duckdb_delete_callback_t)
+declare sub duckdb_scalar_function_set_function(byval scalar_function as duckdb_scalar_function, byval function as duckdb_scalar_function_t)
+declare function duckdb_register_scalar_function(byval con as duckdb_connection, byval scalar_function as duckdb_scalar_function) as duckdb_state
+declare function duckdb_scalar_function_get_extra_info(byval info as duckdb_function_info) as any ptr
+declare sub duckdb_scalar_function_set_error(byval info as duckdb_function_info, byval error_ as const zstring ptr)
+declare function duckdb_create_scalar_function_set(byval name_ as const zstring ptr) as duckdb_scalar_function_set
+declare sub duckdb_destroy_scalar_function_set(byval scalar_function_set as duckdb_scalar_function_set ptr)
+declare function duckdb_add_scalar_function_to_set(byval set as duckdb_scalar_function_set, byval function as duckdb_scalar_function) as duckdb_state
+declare function duckdb_register_scalar_function_set(byval con as duckdb_connection, byval set as duckdb_scalar_function_set) as duckdb_state
+declare function duckdb_create_aggregate_function() as duckdb_aggregate_function
+declare sub duckdb_destroy_aggregate_function(byval aggregate_function as duckdb_aggregate_function ptr)
+declare sub duckdb_aggregate_function_set_name(byval aggregate_function as duckdb_aggregate_function, byval name_ as const zstring ptr)
+declare sub duckdb_aggregate_function_add_parameter(byval aggregate_function as duckdb_aggregate_function, byval type_ as duckdb_logical_type)
+declare sub duckdb_aggregate_function_set_return_type(byval aggregate_function as duckdb_aggregate_function, byval type_ as duckdb_logical_type)
+declare sub duckdb_aggregate_function_set_functions(byval aggregate_function as duckdb_aggregate_function, byval state_size as duckdb_aggregate_state_size, byval state_init as duckdb_aggregate_init_t, byval update as duckdb_aggregate_update_t, byval combine as duckdb_aggregate_combine_t, byval finalize as duckdb_aggregate_finalize_t)
+declare sub duckdb_aggregate_function_set_destructor(byval aggregate_function as duckdb_aggregate_function, byval destroy as duckdb_aggregate_destroy_t)
+declare function duckdb_register_aggregate_function(byval con as duckdb_connection, byval aggregate_function as duckdb_aggregate_function) as duckdb_state
+declare sub duckdb_aggregate_function_set_special_handling(byval aggregate_function as duckdb_aggregate_function)
+declare sub duckdb_aggregate_function_set_extra_info(byval aggregate_function as duckdb_aggregate_function, byval extra_info as any ptr, byval destroy as duckdb_delete_callback_t)
+declare function duckdb_aggregate_function_get_extra_info(byval info as duckdb_function_info) as any ptr
+declare sub duckdb_aggregate_function_set_error(byval info as duckdb_function_info, byval error_ as const zstring ptr)
+declare function duckdb_create_aggregate_function_set(byval name_ as const zstring ptr) as duckdb_aggregate_function_set
+declare sub duckdb_destroy_aggregate_function_set(byval aggregate_function_set as duckdb_aggregate_function_set ptr)
+declare function duckdb_add_aggregate_function_to_set(byval set as duckdb_aggregate_function_set, byval function as duckdb_aggregate_function) as duckdb_state
+declare function duckdb_register_aggregate_function_set(byval con as duckdb_connection, byval set as duckdb_aggregate_function_set) as duckdb_state
+declare function duckdb_create_table_function() as duckdb_table_function
+declare sub duckdb_destroy_table_function(byval table_function as duckdb_table_function ptr)
+declare sub duckdb_table_function_set_name(byval table_function as duckdb_table_function, byval name_ as const zstring ptr)
+declare sub duckdb_table_function_add_parameter(byval table_function as duckdb_table_function, byval type_ as duckdb_logical_type)
+declare sub duckdb_table_function_add_named_parameter(byval table_function as duckdb_table_function, byval name_ as const zstring ptr, byval type_ as duckdb_logical_type)
+declare sub duckdb_table_function_set_extra_info(byval table_function as duckdb_table_function, byval extra_info as any ptr, byval destroy as duckdb_delete_callback_t)
+declare sub duckdb_table_function_set_bind(byval table_function as duckdb_table_function, byval bind as duckdb_table_function_bind_t)
+declare sub duckdb_table_function_set_init(byval table_function as duckdb_table_function, byval init as duckdb_table_function_init_t)
+declare sub duckdb_table_function_set_local_init(byval table_function as duckdb_table_function, byval init as duckdb_table_function_init_t)
+declare sub duckdb_table_function_set_function(byval table_function as duckdb_table_function, byval function as duckdb_table_function_t)
+declare sub duckdb_table_function_supports_projection_pushdown(byval table_function as duckdb_table_function, byval pushdown as bool)
+declare function duckdb_register_table_function(byval con as duckdb_connection, byval function as duckdb_table_function) as duckdb_state
+declare function duckdb_bind_get_extra_info(byval info as duckdb_bind_info) as any ptr
+declare sub duckdb_bind_add_result_column(byval info as duckdb_bind_info, byval name_ as const zstring ptr, byval type_ as duckdb_logical_type)
+declare function duckdb_bind_get_parameter_count(byval info as duckdb_bind_info) as idx_t
+declare function duckdb_bind_get_parameter(byval info as duckdb_bind_info, byval index as idx_t) as duckdb_value
+declare function duckdb_bind_get_named_parameter(byval info as duckdb_bind_info, byval name_ as const zstring ptr) as duckdb_value
+declare sub duckdb_bind_set_bind_data(byval info as duckdb_bind_info, byval bind_data as any ptr, byval destroy as duckdb_delete_callback_t)
+declare sub duckdb_bind_set_cardinality(byval info as duckdb_bind_info, byval cardinality as idx_t, byval is_exact as bool)
+declare sub duckdb_bind_set_error(byval info as duckdb_bind_info, byval error_ as const zstring ptr)
+declare function duckdb_init_get_extra_info(byval info as duckdb_init_info) as any ptr
+declare function duckdb_init_get_bind_data(byval info as duckdb_init_info) as any ptr
+declare sub duckdb_init_set_init_data(byval info as duckdb_init_info, byval init_data as any ptr, byval destroy as duckdb_delete_callback_t)
+declare function duckdb_init_get_column_count(byval info as duckdb_init_info) as idx_t
+declare function duckdb_init_get_column_index(byval info as duckdb_init_info, byval column_index as idx_t) as idx_t
+declare sub duckdb_init_set_max_threads(byval info as duckdb_init_info, byval max_threads as idx_t)
+declare sub duckdb_init_set_error(byval info as duckdb_init_info, byval error_ as const zstring ptr)
+declare function duckdb_function_get_extra_info(byval info as duckdb_function_info) as any ptr
+declare function duckdb_function_get_bind_data(byval info as duckdb_function_info) as any ptr
+declare function duckdb_function_get_init_data(byval info as duckdb_function_info) as any ptr
+declare function duckdb_function_get_local_init_data(byval info as duckdb_function_info) as any ptr
+declare sub duckdb_function_set_error(byval info as duckdb_function_info, byval error_ as const zstring ptr)
+declare sub duckdb_add_replacement_scan(byval db as duckdb_database, byval replacement as duckdb_replacement_callback_t, byval extra_data as any ptr, byval delete_callback as duckdb_delete_callback_t)
+declare sub duckdb_replacement_scan_set_function_name(byval info as duckdb_replacement_scan_info, byval function_name as const zstring ptr)
+declare sub duckdb_replacement_scan_add_parameter(byval info as duckdb_replacement_scan_info, byval parameter as duckdb_value)
+declare sub duckdb_replacement_scan_set_error(byval info as duckdb_replacement_scan_info, byval error_ as const zstring ptr)
+declare function duckdb_get_profiling_info(byval connection as duckdb_connection) as duckdb_profiling_info
+declare function duckdb_profiling_info_get_value(byval info as duckdb_profiling_info, byval key as const zstring ptr) as duckdb_value
+declare function duckdb_profiling_info_get_metrics(byval info as duckdb_profiling_info) as duckdb_value
+declare function duckdb_profiling_info_get_child_count(byval info as duckdb_profiling_info) as idx_t
+declare function duckdb_profiling_info_get_child(byval info as duckdb_profiling_info, byval index as idx_t) as duckdb_profiling_info
+declare function duckdb_appender_create(byval connection as duckdb_connection, byval schema as const zstring ptr, byval table as const zstring ptr, byval out_appender as duckdb_appender ptr) as duckdb_state
+declare function duckdb_appender_column_count(byval appender as duckdb_appender) as idx_t
+declare function duckdb_appender_column_type(byval appender as duckdb_appender, byval col_idx as idx_t) as duckdb_logical_type
+declare function duckdb_appender_error(byval appender as duckdb_appender) as const zstring ptr
+declare function duckdb_appender_flush(byval appender as duckdb_appender) as duckdb_state
+declare function duckdb_appender_close(byval appender as duckdb_appender) as duckdb_state
+declare function duckdb_appender_destroy(byval appender as duckdb_appender ptr) as duckdb_state
+declare function duckdb_appender_begin_row(byval appender as duckdb_appender) as duckdb_state
+declare function duckdb_appender_end_row(byval appender as duckdb_appender) as duckdb_state
+declare function duckdb_append_default(byval appender as duckdb_appender) as duckdb_state
+declare function duckdb_append_bool(byval appender as duckdb_appender, byval value as bool) as duckdb_state
+declare function duckdb_append_int8(byval appender as duckdb_appender, byval value as byte) as duckdb_state
+declare function duckdb_append_int16(byval appender as duckdb_appender, byval value as short) as duckdb_state
+declare function duckdb_append_int32(byval appender as duckdb_appender, byval value as long) as duckdb_state
+declare function duckdb_append_int64(byval appender as duckdb_appender, byval value as longint) as duckdb_state
+declare function duckdb_append_hugeint(byval appender as duckdb_appender, byval value as duckdb_hugeint) as duckdb_state
+declare function duckdb_append_uint8(byval appender as duckdb_appender, byval value as ubyte) as duckdb_state
+declare function duckdb_append_uint16(byval appender as duckdb_appender, byval value as ushort) as duckdb_state
+declare function duckdb_append_uint32(byval appender as duckdb_appender, byval value as ulong) as duckdb_state
+declare function duckdb_append_uint64(byval appender as duckdb_appender, byval value as ulongint) as duckdb_state
+declare function duckdb_append_uhugeint(byval appender as duckdb_appender, byval value as duckdb_uhugeint) as duckdb_state
+declare function duckdb_append_float(byval appender as duckdb_appender, byval value as single) as duckdb_state
+declare function duckdb_append_double(byval appender as duckdb_appender, byval value as double) as duckdb_state
+declare function duckdb_append_date(byval appender as duckdb_appender, byval value as duckdb_date) as duckdb_state
+declare function duckdb_append_time(byval appender as duckdb_appender, byval value as duckdb_time) as duckdb_state
+declare function duckdb_append_timestamp(byval appender as duckdb_appender, byval value as duckdb_timestamp) as duckdb_state
+declare function duckdb_append_interval(byval appender as duckdb_appender, byval value as duckdb_interval) as duckdb_state
+declare function duckdb_append_varchar(byval appender as duckdb_appender, byval val_ as const zstring ptr) as duckdb_state
+declare function duckdb_append_varchar_length(byval appender as duckdb_appender, byval val_ as const zstring ptr, byval length as idx_t) as duckdb_state
+declare function duckdb_append_blob(byval appender as duckdb_appender, byval data_ as const any ptr, byval length as idx_t) as duckdb_state
+declare function duckdb_append_null(byval appender as duckdb_appender) as duckdb_state
+declare function duckdb_append_data_chunk(byval appender as duckdb_appender, byval chunk as duckdb_data_chunk) as duckdb_state
+declare function duckdb_table_description_create(byval connection as duckdb_connection, byval schema as const zstring ptr, byval table as const zstring ptr, byval out_ as duckdb_table_description ptr) as duckdb_state
+declare sub duckdb_table_description_destroy(byval table_description as duckdb_table_description ptr)
+declare function duckdb_table_description_error(byval table_description as duckdb_table_description) as const zstring ptr
+declare function duckdb_column_has_default(byval table_description as duckdb_table_description, byval index as idx_t, byval out_ as bool ptr) as duckdb_state
+declare function duckdb_query_arrow(byval connection as duckdb_connection, byval query as const zstring ptr, byval out_result as duckdb_arrow ptr) as duckdb_state
+declare function duckdb_query_arrow_schema(byval result as duckdb_arrow, byval out_schema as duckdb_arrow_schema ptr) as duckdb_state
+declare function duckdb_prepared_arrow_schema(byval prepared as duckdb_prepared_statement, byval out_schema as duckdb_arrow_schema ptr) as duckdb_state
+declare sub duckdb_result_arrow_array(byval result as duckdb_result, byval chunk as duckdb_data_chunk, byval out_array as duckdb_arrow_array ptr)
+declare function duckdb_query_arrow_array(byval result as duckdb_arrow, byval out_array as duckdb_arrow_array ptr) as duckdb_state
+declare function duckdb_arrow_column_count(byval result as duckdb_arrow) as idx_t
+declare function duckdb_arrow_row_count(byval result as duckdb_arrow) as idx_t
+declare function duckdb_arrow_rows_changed(byval result as duckdb_arrow) as idx_t
+declare function duckdb_query_arrow_error(byval result as duckdb_arrow) as const zstring ptr
+declare sub duckdb_destroy_arrow(byval result as duckdb_arrow ptr)
+declare sub duckdb_destroy_arrow_stream(byval stream_p as duckdb_arrow_stream ptr)
+declare function duckdb_execute_prepared_arrow(byval prepared_statement as duckdb_prepared_statement, byval out_result as duckdb_arrow ptr) as duckdb_state
+declare function duckdb_arrow_scan(byval connection as duckdb_connection, byval table_name as const zstring ptr, byval arrow as duckdb_arrow_stream) as duckdb_state
+declare function duckdb_arrow_array_scan(byval connection as duckdb_connection, byval table_name as const zstring ptr, byval arrow_schema as duckdb_arrow_schema, byval arrow_array as duckdb_arrow_array, byval out_stream as duckdb_arrow_stream ptr) as duckdb_state
+declare sub duckdb_execute_tasks(byval database as duckdb_database, byval max_tasks as idx_t)
+declare function duckdb_create_task_state(byval database as duckdb_database) as duckdb_task_state
+declare sub duckdb_execute_tasks_state(byval state as duckdb_task_state)
+declare function duckdb_execute_n_tasks_state(byval state as duckdb_task_state, byval max_tasks as idx_t) as idx_t
+declare sub duckdb_finish_execution(byval state as duckdb_task_state)
+declare function duckdb_task_state_is_finished(byval state as duckdb_task_state) as bool
+declare sub duckdb_destroy_task_state(byval state as duckdb_task_state)
+declare function duckdb_execution_is_finished(byval con as duckdb_connection) as bool
+declare function duckdb_stream_fetch_chunk(byval result as duckdb_result) as duckdb_data_chunk
+declare function duckdb_fetch_chunk(byval result as duckdb_result) as duckdb_data_chunk
+declare function duckdb_create_cast_function() as duckdb_cast_function
+declare sub duckdb_cast_function_set_source_type(byval cast_function as duckdb_cast_function, byval source_type as duckdb_logical_type)
+declare sub duckdb_cast_function_set_target_type(byval cast_function as duckdb_cast_function, byval target_type as duckdb_logical_type)
+declare sub duckdb_cast_function_set_implicit_cast_cost(byval cast_function as duckdb_cast_function, byval cost as longint)
+declare sub duckdb_cast_function_set_function(byval cast_function as duckdb_cast_function, byval function as duckdb_cast_function_t)
+declare sub duckdb_cast_function_set_extra_info(byval cast_function as duckdb_cast_function, byval extra_info as any ptr, byval destroy as duckdb_delete_callback_t)
+declare function duckdb_cast_function_get_extra_info(byval info as duckdb_function_info) as any ptr
+declare function duckdb_cast_function_get_cast_mode(byval info as duckdb_function_info) as duckdb_cast_mode
+declare sub duckdb_cast_function_set_error(byval info as duckdb_function_info, byval error_ as const zstring ptr)
+declare sub duckdb_cast_function_set_row_error(byval info as duckdb_function_info, byval error_ as const zstring ptr, byval row as idx_t, byval output as duckdb_vector)
+declare function duckdb_register_cast_function(byval con as duckdb_connection, byval cast_function as duckdb_cast_function) as duckdb_state
+declare sub duckdb_destroy_cast_function(byval cast_function as duckdb_cast_function ptr)
+
+end extern
+#endif
diff --git a/inc/iniparser.bi b/inc/iniparser.bi
new file mode 100644
index 00000000..9d7b788d
--- /dev/null
+++ b/inc/iniparser.bi
@@ -0,0 +1,76 @@
+'' FreeBASIC binding for iniparser-4.2.5
+''
+'' based on the C header files:
+''Copyright (c) 2000-2024 by Nicolas Devillard And many contributors
+''MIT License
+''
+''Permission Is hereby granted, free of charge, To Any person obtaining a
+''copy of This software And associated documentation files (the "Software"),
+''To deal in the Software without restriction, including without limitation
+''the rights To use, copy, modify, merge, publish, distribute, sublicense,
+''And/Or sell copies of the Software, And To permit persons To whom the
+''Software Is furnished To Do so, subject To the following conditions:
+''The above copyright notice And This permission notice shall be included in
+''all copies Or substantial portions of the Software.
+''
+''THE SOFTWARE Is PROVIDED "AS IS", WITHOUT WARRANTY OF Any KIND, EXPRESS Or
+''IMPLIED, INCLUDING BUT Not LIMITED To THE WARRANTIES OF MERCHANTABILITY,
+''FITNESS For A PARTICULAR PURPOSE And NONINFRINGEMENT. IN NO Event SHALL THE
+''AUTHORS Or COPYRIGHT HOLDERS BE LIABLE For Any CLAIM, DAMAGES Or OTHER
+''LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT Or OTHERWISE, ARISING
+''FROM, Out OF Or IN CONNECTION With THE SOFTWARE Or THE USE Or OTHER
+''DEALINGS IN THE SOFTWARE.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef _INIPARSER_H_
+
+#define _INIPARSER_H_
+#include once "crt/long.bi"
+#include once "crt/stdio.bi"
+#include once "crt/stdint.bi"
+#inclib "iniparser"
+extern "C"
+
+
+type _dictionary_
+ n as ulong
+ size as uinteger
+ val_ as zstring ptr ptr
+ key as zstring ptr ptr
+ hash as ulong ptr
+end type
+
+type dictionary as _dictionary_
+declare function dictionary_hash(byval key as const zstring ptr) as ulong
+declare function dictionary_new(byval size as uinteger) as dictionary ptr
+declare sub dictionary_del(byval vd as dictionary ptr)
+declare function dictionary_get(byval d as const dictionary ptr, byval key as const zstring ptr, byval def as const zstring ptr) as const zstring ptr
+declare function dictionary_set(byval vd as dictionary ptr, byval key as const zstring ptr, byval val_ as const zstring ptr) as long
+declare sub dictionary_unset(byval d as dictionary ptr, byval key as const zstring ptr)
+declare sub dictionary_dump(byval d as const dictionary ptr, byval out_ as FILE ptr)
+declare sub iniparser_set_error_callback(byval errback as function(byval as const zstring ptr, ...) as long)
+declare function iniparser_getnsec(byval d as const dictionary ptr) as long
+declare function iniparser_getsecname(byval d as const dictionary ptr, byval n as long) as const zstring ptr
+declare sub iniparser_dump_ini(byval d as const dictionary ptr, byval f as FILE ptr)
+declare sub iniparser_dumpsection_ini(byval d as const dictionary ptr, byval s as const zstring ptr, byval f as FILE ptr)
+declare sub iniparser_dump(byval d as const dictionary ptr, byval f as FILE ptr)
+declare function iniparser_getsecnkeys(byval d as const dictionary ptr, byval s as const zstring ptr) as long
+declare function iniparser_getseckeys(byval d as const dictionary ptr, byval s as const zstring ptr, byval keys as const zstring ptr ptr) as const zstring ptr ptr
+declare function iniparser_getstring(byval d as const dictionary ptr, byval key as const zstring ptr, byval def as const zstring ptr) as const zstring ptr
+declare function iniparser_getint(byval d as const dictionary ptr, byval key as const zstring ptr, byval notfound as long) as long
+declare function iniparser_getlongint(byval d as const dictionary ptr, byval key as const zstring ptr, byval notfound as clong) as clong
+declare function iniparser_getint64(byval d as const dictionary ptr, byval key as const zstring ptr, byval notfound as longint) as longint
+declare function iniparser_getuint64(byval d as const dictionary ptr, byval key as const zstring ptr, byval notfound as ulongint) as ulongint
+declare function iniparser_getdouble(byval d as const dictionary ptr, byval key as const zstring ptr, byval notfound as double) as double
+declare function iniparser_getboolean(byval d as const dictionary ptr, byval key as const zstring ptr, byval notfound as long) as long
+declare function iniparser_set(byval ini as dictionary ptr, byval entry as const zstring ptr, byval val_ as const zstring ptr) as long
+declare sub iniparser_unset(byval ini as dictionary ptr, byval entry as const zstring ptr)
+declare function iniparser_find_entry(byval ini as const dictionary ptr, byval entry as const zstring ptr) as long
+declare function iniparser_load(byval ininame as const zstring ptr) as dictionary ptr
+declare function iniparser_load_file(byval in as FILE ptr, byval ininame as const zstring ptr) as dictionary ptr
+declare sub iniparser_freedict(byval d as dictionary ptr)
+
+end extern
+#endif
diff --git a/inc/libcalg.bi b/inc/libcalg.bi
new file mode 100644
index 00000000..eeecdf56
--- /dev/null
+++ b/inc/libcalg.bi
@@ -0,0 +1,359 @@
+'' FreeBASIC binding for C Algorithms v1.2.0(master 2025-01-17)
+'' This is a collection of common computer science data structures and algorithms which may be used in C projects.
+'' based on the C header files:
+'The C Algorithms library is made available under the ISC license,
+'a permissive license that is functionally identical to the simplified BSD or MIT licenses.
+'Copyright (c) 2005-2008, Simon Howard
+'
+'Permission to use, copy, modify, and/or distribute this software
+'for any purpose with or without fee is hereby granted, provided
+'that the above copyright notice and this permission notice appear
+'in all copies.
+'THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+'WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+'WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+'AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
+'CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+'LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+'NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+'CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+#pragma once
+
+#ifndef LIBCALG_H
+#define LIBCALG_H
+#inclib "calg"
+
+extern "C"
+
+Type ArrayListValue As Any Ptr
+type ArrayList as _ArrayList
+
+Type _ArrayList
+ data_ as ArrayListValue ptr
+ length as ulong
+ _alloced as ulong
+end type
+
+Type ArrayListEqualFunc As Function(ByVal value1 As ArrayListValue, ByVal value2 As ArrayListValue) As Long
+type ArrayListCompareFunc as function(byval value1 as ArrayListValue, byval value2 as ArrayListValue) as long
+declare function arraylist_new(byval length as ulong) as ArrayList ptr
+declare sub arraylist_free(byval arraylist as ArrayList ptr)
+declare function arraylist_append(byval arraylist as ArrayList ptr, byval data_ as ArrayListValue) as long
+declare function arraylist_prepend(byval arraylist as ArrayList ptr, byval data_ as ArrayListValue) as long
+declare sub arraylist_remove(byval arraylist as ArrayList ptr, byval index as ulong)
+declare sub arraylist_remove_range(byval arraylist as ArrayList ptr, byval index as ulong, byval length as ulong)
+declare function arraylist_insert(byval arraylist as ArrayList ptr, byval index as ulong, byval data_ as ArrayListValue) as long
+declare function arraylist_index_of(byval arraylist as ArrayList ptr, byval callback as ArrayListEqualFunc, byval data_ as ArrayListValue) as long
+declare sub arraylist_clear(byval arraylist as ArrayList ptr)
+Declare Sub arraylist_sort(ByVal ArrayList As ArrayList Ptr, ByVal compare_func As ArrayListCompareFunc)
+
+
+type AVLTree as _AVLTree
+type AVLTreeKey as any ptr
+type AVLTreeValue as any ptr
+const AVL_TREE_NULL = cptr(any ptr, 0)
+type AVLTreeNode as _AVLTreeNode
+
+type AVLTreeNodeSide as long
+enum
+ AVL_TREE_NODE_LEFT = 0
+ AVL_TREE_NODE_RIGHT = 1
+end enum
+
+type AVLTreeCompareFunc as function(byval value1 as AVLTreeKey, byval value2 as AVLTreeKey) as long
+declare function avl_tree_new(byval compare_func as AVLTreeCompareFunc) as AVLTree ptr
+declare sub avl_tree_free(byval tree as AVLTree ptr)
+declare function avl_tree_insert(byval tree as AVLTree ptr, byval key as AVLTreeKey, byval value as AVLTreeValue) as AVLTreeNode ptr
+declare sub avl_tree_remove_node(byval tree as AVLTree ptr, byval node as AVLTreeNode ptr)
+declare function avl_tree_remove(byval tree as AVLTree ptr, byval key as AVLTreeKey) as long
+declare function avl_tree_lookup_node(byval tree as AVLTree ptr, byval key as AVLTreeKey) as AVLTreeNode ptr
+declare function avl_tree_lookup(byval tree as AVLTree ptr, byval key as AVLTreeKey) as AVLTreeValue
+declare function avl_tree_root_node(byval tree as AVLTree ptr) as AVLTreeNode ptr
+declare function avl_tree_node_key(byval node as AVLTreeNode ptr) as AVLTreeKey
+declare function avl_tree_node_value(byval node as AVLTreeNode ptr) as AVLTreeValue
+declare function avl_tree_node_child(byval node as AVLTreeNode ptr, byval side as AVLTreeNodeSide) as AVLTreeNode ptr
+declare function avl_tree_node_parent(byval node as AVLTreeNode ptr) as AVLTreeNode ptr
+declare function avl_tree_subtree_height(byval node as AVLTreeNode ptr) as long
+declare function avl_tree_to_array(byval tree as AVLTree ptr) as AVLTreeKey ptr
+declare function avl_tree_num_entries(byval tree as AVLTree ptr) as ulong
+
+
+type BinaryHeapType as long
+enum
+ BINARY_HEAP_TYPE_MIN
+ BINARY_HEAP_TYPE_MAX
+end enum
+
+type BinaryHeapValue as any ptr
+const BINARY_HEAP_NULL = cptr(any ptr, 0)
+type BinaryHeapCompareFunc as function(byval value1 as BinaryHeapValue, byval value2 as BinaryHeapValue) as long
+type BinaryHeap as _BinaryHeap
+declare function binary_heap_new(byval heap_type as BinaryHeapType, byval compare_func as BinaryHeapCompareFunc) as BinaryHeap ptr
+declare sub binary_heap_free(byval heap as BinaryHeap ptr)
+declare function binary_heap_insert(byval heap as BinaryHeap ptr, byval value as BinaryHeapValue) as long
+declare function binary_heap_pop(byval heap as BinaryHeap ptr) as BinaryHeapValue
+declare function binary_heap_num_entries(byval heap as BinaryHeap ptr) as ulong
+
+
+type BinomialHeapType as long
+enum
+ BINOMIAL_HEAP_TYPE_MIN
+ BINOMIAL_HEAP_TYPE_MAX
+end enum
+
+type BinomialHeapValue as any ptr
+const BINOMIAL_HEAP_NULL = cptr(any ptr, 0)
+type BinomialHeapCompareFunc as function(byval value1 as BinomialHeapValue, byval value2 as BinomialHeapValue) as long
+type BinomialHeap as _BinomialHeap
+declare function binomial_heap_new(byval heap_type as BinomialHeapType, byval compare_func as BinomialHeapCompareFunc) as BinomialHeap ptr
+declare sub binomial_heap_free(byval heap as BinomialHeap ptr)
+declare function binomial_heap_insert(byval heap as BinomialHeap ptr, byval value as BinomialHeapValue) as long
+declare function binomial_heap_pop(byval heap as BinomialHeap ptr) as BinomialHeapValue
+declare function binomial_heap_num_entries(byval heap as BinomialHeap ptr) as ulong
+
+
+type BloomFilter as _BloomFilter
+type BloomFilterValue as any ptr
+type BloomFilterHashFunc as function(byval data_ as BloomFilterValue) as ulong
+
+declare function bloom_filter_new(byval table_size as ulong, byval hash_func as BloomFilterHashFunc, byval num_functions as ulong) as BloomFilter ptr
+declare sub bloom_filter_free(byval bloomfilter as BloomFilter ptr)
+declare sub bloom_filter_insert(byval bloomfilter as BloomFilter ptr, byval value as BloomFilterValue)
+declare function bloom_filter_query(byval bloomfilter as BloomFilter ptr, byval value as BloomFilterValue) as long
+declare sub bloom_filter_read(byval bloomfilter as BloomFilter ptr, byval array as ubyte ptr)
+declare sub bloom_filter_load(byval bloomfilter as BloomFilter ptr, byval array as ubyte ptr)
+declare function bloom_filter_union(byval filter1 as BloomFilter ptr, byval filter2 as BloomFilter ptr) as BloomFilter ptr
+declare function bloom_filter_intersection(byval filter1 as BloomFilter ptr, byval filter2 as BloomFilter ptr) as BloomFilter ptr
+
+declare function int_equal(byval location1 as any ptr, byval location2 as any ptr) as long
+declare function int_compare(byval location1 as any ptr, byval location2 as any ptr) as long
+
+declare function pointer_equal(byval location1 as any ptr, byval location2 as any ptr) as long
+declare function pointer_compare(byval location1 as any ptr, byval location2 as any ptr) as long
+
+declare function string_equal(byval string1 as any ptr, byval string2 as any ptr) as long
+declare function string_compare(byval string1 as any ptr, byval string2 as any ptr) as long
+declare function string_nocase_equal(byval string1 as any ptr, byval string2 as any ptr) as long
+declare function string_nocase_compare(byval string1 as any ptr, byval string2 as any ptr) as long
+
+declare function int_hash(byval location as any ptr) as ulong
+
+declare function pointer_hash(byval location as any ptr) as ulong
+
+Declare Function string_hash(ByVal String As Any Ptr) As ULong
+declare function string_nocase_hash(byval string as any ptr) as ulong
+
+
+type HashTable as _HashTable
+type HashTableIterator as _HashTableIterator
+type HashTableEntry as _HashTableEntry
+type HashTableKey as any ptr
+type HashTableValue as any ptr
+const HASH_TABLE_KEY_NULL = cptr(any ptr, 0)
+const HASH_TABLE_NULL = cptr(any ptr, 0)
+
+type _HashTablePair
+ key as HashTableKey
+ value as HashTableValue
+end type
+
+type HashTablePair as _HashTablePair
+
+type _HashTableIterator
+ hash_table as HashTable ptr
+ next_entry as HashTableEntry ptr
+ next_chain as ulong
+end type
+
+type HashTableHashFunc as function(byval value as HashTableKey) as ulong
+type HashTableEqualFunc as function(byval value1 as HashTableKey, byval value2 as HashTableKey) as long
+type HashTableKeyFreeFunc as sub(byval value as HashTableKey)
+type HashTableValueFreeFunc as sub(byval value as HashTableValue)
+
+declare function hash_table_new(byval hash_func as HashTableHashFunc, byval equal_func as HashTableEqualFunc) as HashTable ptr
+declare sub hash_table_free(byval hash_table as HashTable ptr)
+declare sub hash_table_register_free_functions(byval hash_table as HashTable ptr, byval key_free_func as HashTableKeyFreeFunc, byval value_free_func as HashTableValueFreeFunc)
+declare function hash_table_insert(byval hash_table as HashTable ptr, byval key as HashTableKey, byval value as HashTableValue) as long
+declare function hash_table_lookup(byval hash_table as HashTable ptr, byval key as HashTableKey) as HashTableValue
+declare function hash_table_remove(byval hash_table as HashTable ptr, byval key as HashTableKey) as long
+declare function hash_table_num_entries(byval hash_table as HashTable ptr) as ulong
+declare sub hash_table_iterate(byval hash_table as HashTable ptr, byval iter as HashTableIterator ptr)
+declare function hash_table_iter_has_more(byval iterator as HashTableIterator ptr) as long
+declare function hash_table_iter_next(byval iterator as HashTableIterator ptr) as HashTablePair
+
+
+type ListEntry as _ListEntry
+type ListIterator as _ListIterator
+type ListValue as any ptr
+const LIST_NULL = cptr(any ptr, 0)
+
+type _ListIterator
+ prev_next as ListEntry ptr ptr
+ current as ListEntry ptr
+end type
+
+type ListCompareFunc as function(byval value1 as ListValue, byval value2 as ListValue) as long
+type ListEqualFunc as function(byval value1 as ListValue, byval value2 as ListValue) as long
+declare sub list_free(byval list as ListEntry ptr)
+declare function list_prepend(byval list as ListEntry ptr ptr, byval data_ as ListValue) as ListEntry ptr
+declare function list_append(byval list as ListEntry ptr ptr, byval data_ as ListValue) as ListEntry ptr
+declare function list_prev(byval listentry as ListEntry ptr) as ListEntry ptr
+declare function list_next(byval listentry as ListEntry ptr) as ListEntry ptr
+declare function list_data(byval listentry as ListEntry ptr) as ListValue
+declare sub list_set_data(byval listentry as ListEntry ptr, byval value as ListValue)
+declare function list_nth_entry(byval list as ListEntry ptr, byval n as ulong) as ListEntry ptr
+declare function list_nth_data(byval list as ListEntry ptr, byval n as ulong) as ListValue
+declare function list_length(byval list as ListEntry ptr) as ulong
+declare function list_to_array(byval list as ListEntry ptr) as ListValue ptr
+declare function list_remove_entry(byval list as ListEntry ptr ptr, byval entry as ListEntry ptr) as long
+declare function list_remove_data(byval list as ListEntry ptr ptr, byval callback as ListEqualFunc, byval data_ as ListValue) as ulong
+declare sub list_sort(byval list as ListEntry ptr ptr, byval compare_func as ListCompareFunc)
+declare function list_find_data(byval list as ListEntry ptr, byval callback as ListEqualFunc, byval data_ as ListValue) as ListEntry ptr
+declare sub list_iterate(byval list as ListEntry ptr ptr, byval iter as ListIterator ptr)
+declare function list_iter_has_more(byval iterator as ListIterator ptr) as long
+declare function list_iter_next(byval iterator as ListIterator ptr) as ListValue
+declare sub list_iter_remove(byval iterator as ListIterator ptr)
+
+type Queue as _Queue
+type QueueValue as any ptr
+const QUEUE_NULL = cptr(any ptr, 0)
+declare function queue_new() as Queue ptr
+declare sub queue_free(byval queue as Queue ptr)
+declare function queue_push_head(byval queue as Queue ptr, byval data_ as QueueValue) as long
+declare function queue_pop_head(byval queue as Queue ptr) as QueueValue
+declare function queue_peek_head(byval queue as Queue ptr) as QueueValue
+declare function queue_push_tail(byval queue as Queue ptr, byval data_ as QueueValue) as long
+declare function queue_pop_tail(byval queue as Queue ptr) as QueueValue
+declare function queue_peek_tail(byval queue as Queue ptr) as QueueValue
+declare function queue_is_empty(byval queue as Queue ptr) as long
+
+
+type RBTree as _RBTree
+type RBTreeKey as any ptr
+type RBTreeValue as any ptr
+const RB_TREE_NULL = cptr(any ptr, 0)
+type RBTreeNode as _RBTreeNode
+type RBTreeCompareFunc as function(byval data1 as RBTreeKey, byval data2 as RBTreeKey) as long
+
+type RBTreeNodeColor as long
+enum
+ RB_TREE_NODE_RED
+ RB_TREE_NODE_BLACK
+end enum
+
+type RBTreeNodeSide as long
+enum
+ RB_TREE_NODE_LEFT = 0
+ RB_TREE_NODE_RIGHT = 1
+end enum
+
+declare function rb_tree_new(byval compare_func as RBTreeCompareFunc) as RBTree ptr
+declare sub rb_tree_free(byval tree as RBTree ptr)
+declare function rb_tree_insert(byval tree as RBTree ptr, byval key as RBTreeKey, byval value as RBTreeValue) as RBTreeNode ptr
+declare sub rb_tree_remove_node(byval tree as RBTree ptr, byval node as RBTreeNode ptr)
+declare function rb_tree_remove(byval tree as RBTree ptr, byval key as RBTreeKey) as long
+declare function rb_tree_lookup_node(byval tree as RBTree ptr, byval key as RBTreeKey) as RBTreeNode ptr
+declare function rb_tree_lookup(byval tree as RBTree ptr, byval key as RBTreeKey) as RBTreeValue
+declare function rb_tree_root_node(byval tree as RBTree ptr) as RBTreeNode ptr
+declare function rb_tree_node_key(byval node as RBTreeNode ptr) as RBTreeKey
+declare function rb_tree_node_value(byval node as RBTreeNode ptr) as RBTreeValue
+declare function rb_tree_node_child(byval node as RBTreeNode ptr, byval side as RBTreeNodeSide) as RBTreeNode ptr
+declare function rb_tree_node_parent(byval node as RBTreeNode ptr) as RBTreeNode ptr
+declare function rb_tree_subtree_height(byval node as RBTreeNode ptr) as long
+declare function rb_tree_to_array(byval tree as RBTree ptr) as RBTreeKey ptr
+declare function rb_tree_num_entries(byval tree as RBTree ptr) as long
+
+
+type Set as _Set
+type SetIterator as _SetIterator
+type SetEntry as _SetEntry
+type SetValue as any ptr
+const SET_NULL = cptr(any ptr, 0)
+
+type _SetIterator
+ set as Set ptr
+ next_entry as SetEntry ptr
+ next_chain as ulong
+end type
+
+type SetHashFunc as function(byval value as SetValue) as ulong
+type SetEqualFunc as function(byval value1 as SetValue, byval value2 as SetValue) as long
+type SetFreeFunc as sub(byval value as SetValue)
+
+Declare Function set_new(ByVal hash_func As SetHashFunc, ByVal equal_func As SetEqualFunc) As Set Ptr
+declare sub set_free(byval set as Set ptr)
+declare sub set_register_free_function(byval set as Set ptr, byval free_func as SetFreeFunc)
+declare function set_insert(byval set as Set ptr, byval data_ as SetValue) as long
+Declare Function set_remove(ByVal Set As Set Ptr, ByVal data_ As SetValue) As Long
+declare function set_query(byval set as Set ptr, byval data_ as SetValue) as long
+Declare Function set_num_entries(ByVal Set As Set Ptr) As ULong
+declare function set_to_array(byval set as Set ptr) as SetValue ptr
+declare function set_union(byval set1 as Set ptr, byval set2 as Set ptr) as Set ptr
+declare function set_intersection(byval set1 as Set ptr, byval set2 as Set ptr) as Set ptr
+declare sub set_iterate(byval set as Set ptr, byval iter as SetIterator ptr)
+declare function set_iter_has_more(byval iterator as SetIterator ptr) as long
+Declare Function set_iter_next(ByVal iterator As SetIterator Ptr) As SetValue
+
+
+type SListEntry as _SListEntry
+type SListIterator as _SListIterator
+type SListValue as any ptr
+const SLIST_NULL = cptr(any ptr, 0)
+
+type _SListIterator
+ prev_next as SListEntry ptr ptr
+ current as SListEntry ptr
+end type
+
+type SListCompareFunc as function(byval value1 as SListValue, byval value2 as SListValue) as long
+type SListEqualFunc as function(byval value1 as SListValue, byval value2 as SListValue) as long
+declare sub slist_free(byval list as SListEntry ptr)
+declare function slist_prepend(byval list as SListEntry ptr ptr, byval data_ as SListValue) as SListEntry ptr
+declare function slist_append(byval list as SListEntry ptr ptr, byval data_ as SListValue) as SListEntry ptr
+declare function slist_next(byval listentry as SListEntry ptr) as SListEntry ptr
+declare function slist_data(byval listentry as SListEntry ptr) as SListValue
+declare sub slist_set_data(byval listentry as SListEntry ptr, byval value as SListValue)
+declare function slist_nth_entry(byval list as SListEntry ptr, byval n as ulong) as SListEntry ptr
+declare function slist_nth_data(byval list as SListEntry ptr, byval n as ulong) as SListValue
+declare function slist_length(byval list as SListEntry ptr) as ulong
+declare function slist_to_array(byval list as SListEntry ptr) as SListValue ptr
+declare function slist_remove_entry(byval list as SListEntry ptr ptr, byval entry as SListEntry ptr) as long
+declare function slist_remove_data(byval list as SListEntry ptr ptr, byval callback as SListEqualFunc, byval data_ as SListValue) as ulong
+declare sub slist_sort(byval list as SListEntry ptr ptr, byval compare_func as SListCompareFunc)
+declare function slist_find_data(byval list as SListEntry ptr, byval callback as SListEqualFunc, byval data_ as SListValue) as SListEntry ptr
+declare sub slist_iterate(byval list as SListEntry ptr ptr, byval iter as SListIterator ptr)
+declare function slist_iter_has_more(byval iterator as SListIterator ptr) as long
+declare function slist_iter_next(byval iterator as SListIterator ptr) as SListValue
+declare sub slist_iter_remove(byval iterator as SListIterator ptr)
+
+type SortedArrayValue as any ptr
+const SORTED_ARRAY_NULL = cptr(any ptr, 0)
+type SortedArray as _SortedArray
+type SortedArrayCompareFunc as function(byval value1 as SortedArrayValue, byval value2 as SortedArrayValue) as long
+declare function sortedarray_get(byval array as SortedArray ptr, byval i as ulong) as SortedArrayValue
+declare function sortedarray_length(byval array as SortedArray ptr) as ulong
+declare function sortedarray_new(byval length as ulong, byval cmp_func as SortedArrayCompareFunc) as SortedArray ptr
+declare sub sortedarray_free(byval sortedarray as SortedArray ptr)
+declare function sortedarray_remove(byval sortedarray as SortedArray ptr, byval index as ulong) as long
+declare function sortedarray_remove_range(byval sortedarray as SortedArray ptr, byval index as ulong, byval length as ulong) as long
+declare function sortedarray_insert(byval sortedarray as SortedArray ptr, byval data_ as SortedArrayValue) as long
+declare function sortedarray_index_of(byval sortedarray as SortedArray ptr, byval data_ as SortedArrayValue) as long
+declare sub sortedarray_clear(byval sortedarray as SortedArray ptr)
+
+type Trie as _Trie
+type TrieValue as any ptr
+const TRIE_NULL = cptr(any ptr, 0)
+declare function trie_new() as Trie ptr
+declare sub trie_free(byval trie as Trie ptr)
+declare function trie_insert(byval trie as Trie ptr, byval key as zstring ptr, byval value as TrieValue) as long
+declare function trie_insert_binary(byval trie as Trie ptr, byval key as ubyte ptr, byval key_length as long, byval value as TrieValue) as long
+declare function trie_lookup(byval trie as Trie ptr, byval key as zstring ptr) as TrieValue
+declare function trie_lookup_binary(byval trie as Trie ptr, byval key as ubyte ptr, byval key_length as long) as TrieValue
+declare function trie_remove(byval trie as Trie ptr, byval key as zstring ptr) as long
+declare function trie_remove_binary(byval trie as Trie ptr, byval key as ubyte ptr, byval key_length as long) as long
+declare function trie_num_entries(byval trie as Trie ptr) as ulong
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/llhttp.bi b/inc/llhttp.bi
new file mode 100644
index 00000000..35026683
--- /dev/null
+++ b/inc/llhttp.bi
@@ -0,0 +1,407 @@
+'freebasic bindings for llhttp library-9.2.1
+'based on c header files:
+'Port of http_parser to llparse.
+'This software is licensed under the MIT License.
+'Copyright Fedor Indutny, 2018.
+'Permission is hereby granted, free of charge, to any
+'person obtaining a copy of this software and associated
+'documentation files (the "Software"), to deal in the Software
+'without restriction, including without limitation the rights
+'to use, copy, modify, merge, publish, distribute, sublicense,
+'and/or sell copies of the Software, and to permit persons to
+'whom the Software is furnished to do so, subject to the following conditions:
+'The above copyright notice and this permission notice shall be included
+'in all copies or substantial portions of the Software.
+'THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+'EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+'MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+'IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+'DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+'ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+''DEALINGS IN THE SOFTWARE.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef INCLUDE_LLHTTP_H_
+
+#define INCLUDE_LLHTTP_H_
+#include once "crt/stdint.bi"
+#include once "crt/stddef.bi"
+#inclib "llhttp"
+
+extern "C"
+
+const LLHTTP_VERSION_MAJOR = 9
+const LLHTTP_VERSION_MINOR = 2
+const LLHTTP_VERSION_PATCH = 1
+
+#define INCLUDE_LLHTTP_ITSELF_H_
+
+Type llhttp__internal_t As llhttp__internal_s
+
+type llhttp__internal_s
+ _index as long
+ _span_pos0 as any ptr
+ _span_cb0 as any ptr
+ error_ as long
+ reason As Const ZString Ptr
+ error_pos as const zstring ptr
+ data_ As Any Ptr
+ _current as any ptr
+ content_length as ulongint
+ type_ as ubyte
+ method as ubyte
+ http_major as ubyte
+ http_minor as ubyte
+ header_state as ubyte
+ lenient_flags as ushort
+ upgrade as ubyte
+ finish As UByte
+ FLAGS As UShort
+ status_code as ushort
+ initial_message_completed as ubyte
+ settings As Any Ptr
+End Type
+
+declare function llhttp__internal_init(byval s as llhttp__internal_t ptr) as long
+declare function llhttp__internal_execute(byval s as llhttp__internal_t ptr, byval p as const zstring ptr, byval endp as const zstring ptr) as long
+
+#define LLLLHTTP_C_HEADERS_
+
+Type llhttp_errno As Long
+enum
+ HPE_OK = 0
+ HPE_INTERNAL = 1
+ HPE_STRICT = 2
+ HPE_CR_EXPECTED = 25
+ HPE_LF_EXPECTED = 3
+ HPE_UNEXPECTED_CONTENT_LENGTH = 4
+ HPE_UNEXPECTED_SPACE = 30
+ HPE_CLOSED_CONNECTION = 5
+ HPE_INVALID_METHOD = 6
+ HPE_INVALID_URL = 7
+ HPE_INVALID_CONSTANT = 8
+ HPE_INVALID_VERSION = 9
+ HPE_INVALID_HEADER_TOKEN = 10
+ HPE_INVALID_CONTENT_LENGTH = 11
+ HPE_INVALID_CHUNK_SIZE = 12
+ HPE_INVALID_STATUS = 13
+ HPE_INVALID_EOF_STATE = 14
+ HPE_INVALID_TRANSFER_ENCODING = 15
+ HPE_CB_MESSAGE_BEGIN = 16
+ HPE_CB_HEADERS_COMPLETE = 17
+ HPE_CB_MESSAGE_COMPLETE = 18
+ HPE_CB_CHUNK_HEADER = 19
+ HPE_CB_CHUNK_COMPLETE = 20
+ HPE_PAUSED = 21
+ HPE_PAUSED_UPGRADE = 22
+ HPE_PAUSED_H2_UPGRADE = 23
+ HPE_USER = 24
+ HPE_CB_URL_COMPLETE = 26
+ HPE_CB_STATUS_COMPLETE = 27
+ HPE_CB_METHOD_COMPLETE = 32
+ HPE_CB_VERSION_COMPLETE = 33
+ HPE_CB_HEADER_FIELD_COMPLETE = 28
+ HPE_CB_HEADER_VALUE_COMPLETE = 29
+ HPE_CB_CHUNK_EXTENSION_NAME_COMPLETE = 34
+ HPE_CB_CHUNK_EXTENSION_VALUE_COMPLETE = 35
+ HPE_CB_RESET = 31
+end enum
+
+Type llhttp_errno_t As llhttp_errno
+
+type llhttp_flags as long
+enum
+ F_CONNECTION_KEEP_ALIVE = &h1
+ F_CONNECTION_CLOSE = &h2
+ F_CONNECTION_UPGRADE = &h4
+ F_CHUNKED = &h8
+ F_UPGRADE = &h10
+ F_CONTENT_LENGTH = &h20
+ F_SKIPBODY = &h40
+ F_TRAILING = &h80
+ F_TRANSFER_ENCODING = &h200
+end enum
+
+Type llhttp_flags_t As llhttp_flags
+
+type llhttp_lenient_flags as long
+enum
+ LENIENT_HEADERS = &h1
+ LENIENT_CHUNKED_LENGTH = &h2
+ LENIENT_KEEP_ALIVE = &h4
+ LENIENT_TRANSFER_ENCODING = &h8
+ LENIENT_VERSION = &h10
+ LENIENT_DATA_AFTER_CLOSE = &h20
+ LENIENT_OPTIONAL_LF_AFTER_CR = &h40
+ LENIENT_OPTIONAL_CRLF_AFTER_CHUNK = &h80
+ LENIENT_OPTIONAL_CR_BEFORE_LF = &h100
+ LENIENT_SPACES_AFTER_CHUNK_SIZE = &h200
+end enum
+
+Type llhttp_lenient_flags_t As llhttp_lenient_flags
+
+Type llhttp_type As Long
+enum
+ HTTP_BOTH = 0
+ HTTP_REQUEST = 1
+ HTTP_RESPONSE = 2
+end enum
+
+Type llhttp_type_t As llhttp_type
+
+type llhttp_finish as long
+enum
+ HTTP_FINISH_SAFE = 0
+ HTTP_FINISH_SAFE_WITH_CB = 1
+ HTTP_FINISH_UNSAFE = 2
+end enum
+
+type llhttp_finish_t as llhttp_finish
+
+type llhttp_method as long
+enum
+ HTTP_DELETE = 0
+ _Http_Get = 1
+ HTTP_HEAD = 2
+ _Http_Post = 3
+ HTTP_PUT = 4
+ HTTP_CONNECT = 5
+ HTTP_OPTIONS = 6
+ HTTP_TRACE = 7
+ HTTP_COPY = 8
+ HTTP_LOCK = 9
+ HTTP_MKCOL = 10
+ HTTP_MOVE = 11
+ HTTP_PROPFIND = 12
+ HTTP_PROPPATCH = 13
+ HTTP_SEARCH = 14
+ HTTP_UNLOCK = 15
+ HTTP_BIND = 16
+ HTTP_REBIND = 17
+ HTTP_UNBIND = 18
+ HTTP_ACL = 19
+ HTTP_REPORT = 20
+ HTTP_MKACTIVITY = 21
+ HTTP_CHECKOUT = 22
+ HTTP_MERGE = 23
+ HTTP_MSEARCH = 24
+ HTTP_NOTIFY = 25
+ HTTP_SUBSCRIBE = 26
+ HTTP_UNSUBSCRIBE = 27
+ HTTP_PATCH = 28
+ HTTP_PURGE = 29
+ HTTP_MKCALENDAR = 30
+ HTTP_LINK = 31
+ HTTP_UNLINK = 32
+ HTTP_SOURCE = 33
+ HTTP_PRI = 34
+ HTTP_DESCRIBE = 35
+ HTTP_ANNOUNCE = 36
+ HTTP_SETUP = 37
+ HTTP_PLAY = 38
+ HTTP_PAUSE = 39
+ HTTP_TEARDOWN = 40
+ HTTP_GET_PARAMETER = 41
+ HTTP_SET_PARAMETER = 42
+ HTTP_REDIRECT = 43
+ HTTP_RECORD = 44
+ HTTP_FLUSH = 45
+ HTTP_QUERY = 46
+end enum
+
+Type llhttp_method_t As llhttp_method
+
+type llhttp_status as long
+enum
+ HTTP_STATUS_CONTINUE = 100
+ HTTP_STATUS_SWITCHING_PROTOCOLS = 101
+ HTTP_STATUS_PROCESSING = 102
+ HTTP_STATUS_EARLY_HINTS = 103
+ HTTP_STATUS_RESPONSE_IS_STALE = 110
+ HTTP_STATUS_REVALIDATION_FAILED = 111
+ HTTP_STATUS_DISCONNECTED_OPERATION = 112
+ HTTP_STATUS_HEURISTIC_EXPIRATION = 113
+ HTTP_STATUS_MISCELLANEOUS_WARNING = 199
+ HTTP_STATUS_OK = 200
+ HTTP_STATUS_CREATED = 201
+ HTTP_STATUS_ACCEPTED = 202
+ HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 203
+ HTTP_STATUS_NO_CONTENT = 204
+ HTTP_STATUS_RESET_CONTENT = 205
+ HTTP_STATUS_PARTIAL_CONTENT = 206
+ HTTP_STATUS_MULTI_STATUS = 207
+ HTTP_STATUS_ALREADY_REPORTED = 208
+ HTTP_STATUS_TRANSFORMATION_APPLIED = 214
+ HTTP_STATUS_IM_USED = 226
+ HTTP_STATUS_MISCELLANEOUS_PERSISTENT_WARNING = 299
+ HTTP_STATUS_MULTIPLE_CHOICES = 300
+ HTTP_STATUS_MOVED_PERMANENTLY = 301
+ HTTP_STATUS_FOUND = 302
+ HTTP_STATUS_SEE_OTHER = 303
+ HTTP_STATUS_NOT_MODIFIED = 304
+ HTTP_STATUS_USE_PROXY = 305
+ HTTP_STATUS_SWITCH_PROXY = 306
+ HTTP_STATUS_TEMPORARY_REDIRECT = 307
+ HTTP_STATUS_PERMANENT_REDIRECT = 308
+ HTTP_STATUS_BAD_REQUEST = 400
+ HTTP_STATUS_UNAUTHORIZED = 401
+ HTTP_STATUS_PAYMENT_REQUIRED = 402
+ HTTP_STATUS_FORBIDDEN = 403
+ HTTP_STATUS_NOT_FOUND = 404
+ HTTP_STATUS_METHOD_NOT_ALLOWED = 405
+ HTTP_STATUS_NOT_ACCEPTABLE = 406
+ HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 407
+ HTTP_STATUS_REQUEST_TIMEOUT = 408
+ HTTP_STATUS_CONFLICT = 409
+ HTTP_STATUS_GONE = 410
+ HTTP_STATUS_LENGTH_REQUIRED = 411
+ HTTP_STATUS_PRECONDITION_FAILED = 412
+ HTTP_STATUS_PAYLOAD_TOO_LARGE = 413
+ HTTP_STATUS_URI_TOO_LONG = 414
+ HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 415
+ HTTP_STATUS_RANGE_NOT_SATISFIABLE = 416
+ HTTP_STATUS_EXPECTATION_FAILED = 417
+ HTTP_STATUS_IM_A_TEAPOT = 418
+ HTTP_STATUS_PAGE_EXPIRED = 419
+ HTTP_STATUS_ENHANCE_YOUR_CALM = 420
+ HTTP_STATUS_MISDIRECTED_REQUEST = 421
+ HTTP_STATUS_UNPROCESSABLE_ENTITY = 422
+ HTTP_STATUS_LOCKED = 423
+ HTTP_STATUS_FAILED_DEPENDENCY = 424
+ HTTP_STATUS_TOO_EARLY = 425
+ HTTP_STATUS_UPGRADE_REQUIRED = 426
+ HTTP_STATUS_PRECONDITION_REQUIRED = 428
+ HTTP_STATUS_TOO_MANY_REQUESTS = 429
+ HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL = 430
+ HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431
+ HTTP_STATUS_LOGIN_TIMEOUT = 440
+ HTTP_STATUS_NO_RESPONSE = 444
+ HTTP_STATUS_RETRY_WITH = 449
+ HTTP_STATUS_BLOCKED_BY_PARENTAL_CONTROL = 450
+ HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 451
+ HTTP_STATUS_CLIENT_CLOSED_LOAD_BALANCED_REQUEST = 460
+ HTTP_STATUS_INVALID_X_FORWARDED_FOR = 463
+ HTTP_STATUS_REQUEST_HEADER_TOO_LARGE = 494
+ HTTP_STATUS_SSL_CERTIFICATE_ERROR = 495
+ HTTP_STATUS_SSL_CERTIFICATE_REQUIRED = 496
+ HTTP_STATUS_HTTP_REQUEST_SENT_TO_HTTPS_PORT = 497
+ HTTP_STATUS_INVALID_TOKEN = 498
+ HTTP_STATUS_CLIENT_CLOSED_REQUEST = 499
+ HTTP_STATUS_INTERNAL_SERVER_ERROR = 500
+ HTTP_STATUS_NOT_IMPLEMENTED = 501
+ HTTP_STATUS_BAD_GATEWAY = 502
+ HTTP_STATUS_SERVICE_UNAVAILABLE = 503
+ HTTP_STATUS_GATEWAY_TIMEOUT = 504
+ HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 505
+ HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 506
+ HTTP_STATUS_INSUFFICIENT_STORAGE = 507
+ HTTP_STATUS_LOOP_DETECTED = 508
+ HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509
+ HTTP_STATUS_NOT_EXTENDED = 510
+ HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511
+ HTTP_STATUS_WEB_SERVER_UNKNOWN_ERROR = 520
+ HTTP_STATUS_WEB_SERVER_IS_DOWN = 521
+ HTTP_STATUS_CONNECTION_TIMEOUT = 522
+ HTTP_STATUS_ORIGIN_IS_UNREACHABLE = 523
+ HTTP_STATUS_TIMEOUT_OCCURED = 524
+ HTTP_STATUS_SSL_HANDSHAKE_FAILED = 525
+ HTTP_STATUS_INVALID_SSL_CERTIFICATE = 526
+ HTTP_STATUS_RAILGUN_ERROR = 527
+ HTTP_STATUS_SITE_IS_OVERLOADED = 529
+ HTTP_STATUS_SITE_IS_FROZEN = 530
+ HTTP_STATUS_IDENTITY_PROVIDER_AUTHENTICATION_ERROR = 561
+ HTTP_STATUS_NETWORK_READ_TIMEOUT = 598
+ HTTP_STATUS_NETWORK_CONNECT_TIMEOUT = 599
+end enum
+
+Type llhttp_status_t As llhttp_status
+
+Enum
+ RTSP_METHOD_GET = 1
+ RTSP_METHOD_POST = 3
+ RTSP_METHOD_OPTIONS = 6
+ RTSP_METHOD_DESCRIBE = 35
+ RTSP_METHOD_ANNOUNCE = 36
+ RTSP_METHOD_SETUP = 37
+ RTSP_METHOD_PLAY = 38
+ RTSP_METHOD_PAUSE = 39
+ RTSP_METHOD_TEARDOWN = 40
+ RTSP_METHOD_GET_PARAMETER = 41
+ RTSP_METHOD_SET_PARAMETER = 42
+ RTSP_METHOD_REDIRECT = 43
+ RTSP_METHOD_RECORD = 44
+ RTSP_METHOD_FLUSH = 45
+End Enum
+
+
+Type llhttp_t As llhttp__internal_t
+Type llhttp_settings_t As llhttp_settings_s
+Type llhttp_data_cb As Function(ByVal As llhttp_t Ptr, ByVal at As Const ZString Ptr, ByVal length As UInteger) As Long
+type llhttp_cb as function(byval as llhttp_t ptr) as long
+
+type llhttp_settings_s
+ on_message_begin as llhttp_cb
+ on_url as llhttp_data_cb
+ on_status as llhttp_data_cb
+ on_method as llhttp_data_cb
+ on_version as llhttp_data_cb
+ on_header_field as llhttp_data_cb
+ on_header_value as llhttp_data_cb
+ on_chunk_extension_name as llhttp_data_cb
+ on_chunk_extension_value as llhttp_data_cb
+ on_headers_complete as llhttp_cb
+ on_body as llhttp_data_cb
+ on_message_complete as llhttp_cb
+ on_url_complete as llhttp_cb
+ on_status_complete as llhttp_cb
+ on_method_complete as llhttp_cb
+ on_version_complete as llhttp_cb
+ on_header_field_complete as llhttp_cb
+ on_header_value_complete as llhttp_cb
+ on_chunk_extension_name_complete As llhttp_cb
+ on_chunk_extension_value_complete as llhttp_cb
+ on_chunk_header As llhttp_cb
+ on_chunk_complete As llhttp_cb
+ on_reset As llhttp_cb
+end type
+
+declare sub llhttp_init(byval parser as llhttp_t ptr, byval type_ as llhttp_type_t, byval settings as const llhttp_settings_t ptr)
+declare function llhttp_alloc(byval type_ as llhttp_type_t) as llhttp_t ptr
+declare sub llhttp_free(byval parser as llhttp_t ptr)
+declare function llhttp_get_type(byval parser as llhttp_t ptr) as ubyte
+declare function llhttp_get_http_major(byval parser as llhttp_t ptr) as ubyte
+Declare Function llhttp_get_http_minor(ByVal parser As llhttp_t Ptr) As UByte
+declare function llhttp_get_method(byval parser as llhttp_t ptr) as ubyte
+declare function llhttp_get_status_code(byval parser as llhttp_t ptr) as long
+declare function llhttp_get_upgrade(byval parser as llhttp_t ptr) as ubyte
+declare sub llhttp_reset(byval parser as llhttp_t ptr)
+declare sub llhttp_settings_init(byval settings as llhttp_settings_t ptr)
+Declare Function llhttp_execute(ByVal parser As llhttp_t Ptr, ByVal data_ As Const ZString Ptr, ByVal len_ As UInteger) As llhttp_errno_t
+Declare Function llhttp_finish(ByVal parser As llhttp_t Ptr) As llhttp_errno_t
+declare function llhttp_message_needs_eof(byval parser as const llhttp_t ptr) as long
+declare function llhttp_should_keep_alive(byval parser as const llhttp_t ptr) as long
+declare sub llhttp_pause(byval parser as llhttp_t ptr)
+declare sub llhttp_resume(byval parser as llhttp_t ptr)
+declare sub llhttp_resume_after_upgrade(byval parser as llhttp_t ptr)
+declare function llhttp_get_errno(byval parser as const llhttp_t ptr) as llhttp_errno_t
+Declare Function llhttp_get_error_reason(ByVal parser As Const llhttp_t Ptr) As Const ZString Ptr
+Declare Sub llhttp_set_error_reason(ByVal parser As llhttp_t Ptr, ByVal reason As Const ZString Ptr)
+declare function llhttp_get_error_pos(byval parser as const llhttp_t ptr) as const zstring ptr
+Declare Function llhttp_errno_name(ByVal err_ As llhttp_errno_t) As Const ZString Ptr
+declare function llhttp_method_name(byval method as llhttp_method_t) as const zstring ptr
+declare function llhttp_status_name(byval status as llhttp_status_t) as const zstring ptr
+declare sub llhttp_set_lenient_headers(byval parser as llhttp_t ptr, byval enabled as long)
+declare sub llhttp_set_lenient_chunked_length(byval parser as llhttp_t ptr, byval enabled as long)
+declare sub llhttp_set_lenient_keep_alive(byval parser as llhttp_t ptr, byval enabled as long)
+declare sub llhttp_set_lenient_transfer_encoding(byval parser as llhttp_t ptr, byval enabled as long)
+declare sub llhttp_set_lenient_version(byval parser as llhttp_t ptr, byval enabled as long)
+declare sub llhttp_set_lenient_data_after_close(byval parser as llhttp_t ptr, byval enabled as long)
+declare sub llhttp_set_lenient_optional_lf_after_cr(byval parser as llhttp_t ptr, byval enabled as long)
+declare sub llhttp_set_lenient_optional_cr_before_lf(byval parser as llhttp_t ptr, byval enabled as long)
+declare sub llhttp_set_lenient_optional_crlf_after_chunk(byval parser as llhttp_t ptr, byval enabled as long)
+declare sub llhttp_set_lenient_spaces_after_chunk_size(byval parser as llhttp_t ptr, byval enabled as long)
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/lodepng.bi b/inc/lodepng.bi
new file mode 100644
index 00000000..75aebf74
--- /dev/null
+++ b/inc/lodepng.bi
@@ -0,0 +1,316 @@
+''freebasic bindings for LodePNG version 20241228
+''LodePNG library is a PNG encoder and decoder in C and C++, without dependencies
+''and is released under zlib license.
+''Copyright (c) 2005-2024 Lode Vandevenne
+''
+''This software is provided 'as-is', without any express or implied
+''warranty. In no event will the authors be held liable for any damages
+''arising from the use of this software.
+''
+''Permission is granted to anyone to use this software for any purpose,
+''including commercial applications, and to alter it and redistribute it
+''freely, subject to the following restrictions:
+''
+'' 1. The origin of this software must not be misrepresented; you must not
+'' claim that you wrote the original software. If you use this software
+'' in a product, an acknowledgment in the product documentation would be
+'' appreciated but is not required.
+''
+'' 2. Altered source versions must be plainly marked as such, and must not be
+'' misrepresented as being the original software.
+''
+'' 3. This notice may not be removed or altered from any source
+'' distribution.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+#pragma once
+#ifndef LODEPNG_H
+
+#define LODEPNG_H
+#include once "crt/string.bi"
+#inclib "lodepng"
+
+extern "C"
+
+extern LODEPNG_VERSION_STRING as const zstring ptr
+#define LODEPNG_COMPILE_ZLIB
+#define LODEPNG_COMPILE_PNG
+#define LODEPNG_COMPILE_DECODER
+#define LODEPNG_COMPILE_ENCODER
+#define LODEPNG_COMPILE_DISK
+#define LODEPNG_COMPILE_ANCILLARY_CHUNKS
+#define LODEPNG_COMPILE_ERROR_TEXT
+#define LODEPNG_COMPILE_ALLOCATORS
+#define LODEPNG_COMPILE_CRC
+
+type LodePNGColorType as long
+enum
+ LCT_GREY = 0
+ LCT_RGB = 2
+ LCT_PALETTE = 3
+ LCT_GREY_ALPHA = 4
+ LCT_RGBA = 6
+ LCT_MAX_OCTET_VALUE = 255
+end enum
+
+declare function lodepng_decode_memory(byval out_ as ubyte ptr ptr, byval w as ulong ptr, byval h as ulong ptr, byval in as const ubyte ptr, byval insize as uinteger, byval colortype as LodePNGColorType, byval bitdepth as ulong) as ulong
+declare function lodepng_decode32(byval out_ as ubyte ptr ptr, byval w as ulong ptr, byval h as ulong ptr, byval in as const ubyte ptr, byval insize as uinteger) as ulong
+declare function lodepng_decode24(byval out_ as ubyte ptr ptr, byval w as ulong ptr, byval h as ulong ptr, byval in as const ubyte ptr, byval insize as uinteger) as ulong
+declare function lodepng_decode_file(byval out_ as ubyte ptr ptr, byval w as ulong ptr, byval h as ulong ptr, byval filename as const zstring ptr, byval colortype as LodePNGColorType, byval bitdepth as ulong) as ulong
+declare function lodepng_decode32_file(byval out_ as ubyte ptr ptr, byval w as ulong ptr, byval h as ulong ptr, byval filename as const zstring ptr) as ulong
+declare function lodepng_decode24_file(byval out_ as ubyte ptr ptr, byval w as ulong ptr, byval h as ulong ptr, byval filename as const zstring ptr) as ulong
+declare function lodepng_encode_memory(byval out_ as ubyte ptr ptr, byval outsize as uinteger ptr, byval image as const ubyte ptr, byval w as ulong, byval h as ulong, byval colortype as LodePNGColorType, byval bitdepth as ulong) as ulong
+declare function lodepng_encode32(byval out_ as ubyte ptr ptr, byval outsize as uinteger ptr, byval image as const ubyte ptr, byval w as ulong, byval h as ulong) as ulong
+declare function lodepng_encode24(byval out_ as ubyte ptr ptr, byval outsize as uinteger ptr, byval image as const ubyte ptr, byval w as ulong, byval h as ulong) as ulong
+declare function lodepng_encode_file(byval filename as const zstring ptr, byval image as const ubyte ptr, byval w as ulong, byval h as ulong, byval colortype as LodePNGColorType, byval bitdepth as ulong) as ulong
+declare function lodepng_encode32_file(byval filename as const zstring ptr, byval image as const ubyte ptr, byval w as ulong, byval h as ulong) as ulong
+declare function lodepng_encode24_file(byval filename as const zstring ptr, byval image as const ubyte ptr, byval w as ulong, byval h as ulong) as ulong
+declare function lodepng_error_text(byval code as ulong) as const zstring ptr
+
+type LodePNGDecompressSettings
+ ignore_adler32 as ulong
+ ignore_nlen as ulong
+ max_output_size as uinteger
+ custom_zlib as function(byval as ubyte ptr ptr, byval as uinteger ptr, byval as const ubyte ptr, byval as uinteger, byval as const LodePNGDecompressSettings ptr) as ulong
+ custom_inflate as function(byval as ubyte ptr ptr, byval as uinteger ptr, byval as const ubyte ptr, byval as uinteger, byval as const LodePNGDecompressSettings ptr) as ulong
+ custom_context as const any ptr
+end type
+
+extern lodepng_default_decompress_settings as const LodePNGDecompressSettings
+declare sub lodepng_decompress_settings_init(byval settings as LodePNGDecompressSettings ptr)
+
+type LodePNGCompressSettings
+ btype as ulong
+ use_lz77 as ulong
+ windowsize as ulong
+ minmatch as ulong
+ nicematch as ulong
+ lazymatching as ulong
+ custom_zlib as function(byval as ubyte ptr ptr, byval as uinteger ptr, byval as const ubyte ptr, byval as uinteger, byval as const LodePNGCompressSettings ptr) as ulong
+ custom_deflate as function(byval as ubyte ptr ptr, byval as uinteger ptr, byval as const ubyte ptr, byval as uinteger, byval as const LodePNGCompressSettings ptr) as ulong
+ custom_context as const any ptr
+end type
+
+extern lodepng_default_compress_settings as const LodePNGCompressSettings
+declare sub lodepng_compress_settings_init(byval settings as LodePNGCompressSettings ptr)
+
+type LodePNGColorMode
+ colortype as LodePNGColorType
+ bitdepth as ulong
+ palette as ubyte ptr
+ palettesize as uinteger
+ key_defined as ulong
+ key_r as ulong
+ key_g as ulong
+ key_b as ulong
+end type
+
+declare sub lodepng_color_mode_init(byval info as LodePNGColorMode ptr)
+declare sub lodepng_color_mode_cleanup(byval info as LodePNGColorMode ptr)
+declare function lodepng_color_mode_copy(byval dest as LodePNGColorMode ptr, byval source as const LodePNGColorMode ptr) as ulong
+declare function lodepng_color_mode_make(byval colortype as LodePNGColorType, byval bitdepth as ulong) as LodePNGColorMode
+declare sub lodepng_palette_clear(byval info as LodePNGColorMode ptr)
+declare function lodepng_palette_add(byval info as LodePNGColorMode ptr, byval r as ubyte, byval g as ubyte, byval b as ubyte, byval a as ubyte) as ulong
+declare function lodepng_get_bpp(byval info as const LodePNGColorMode ptr) as ulong
+declare function lodepng_get_channels(byval info as const LodePNGColorMode ptr) as ulong
+declare function lodepng_is_greyscale_type(byval info as const LodePNGColorMode ptr) as ulong
+declare function lodepng_is_alpha_type(byval info as const LodePNGColorMode ptr) as ulong
+declare function lodepng_is_palette_type(byval info as const LodePNGColorMode ptr) as ulong
+declare function lodepng_has_palette_alpha(byval info as const LodePNGColorMode ptr) as ulong
+declare function lodepng_can_have_alpha(byval info as const LodePNGColorMode ptr) as ulong
+declare function lodepng_get_raw_size(byval w as ulong, byval h as ulong, byval color as const LodePNGColorMode ptr) as uinteger
+
+type LodePNGTime
+ year as ulong
+ month as ulong
+ day as ulong
+ hour as ulong
+ minute as ulong
+ second as ulong
+end type
+
+type LodePNGInfo
+ compression_method as ulong
+ filter_method as ulong
+ interlace_method as ulong
+ color as LodePNGColorMode
+ background_defined as ulong
+ background_r as ulong
+ background_g as ulong
+ background_b as ulong
+ text_num as uinteger
+ text_keys as zstring ptr ptr
+ text_strings as zstring ptr ptr
+ itext_num as uinteger
+ itext_keys as zstring ptr ptr
+ itext_langtags as zstring ptr ptr
+ itext_transkeys as zstring ptr ptr
+ itext_strings as zstring ptr ptr
+ exif_defined as ulong
+ exif as ubyte ptr
+ exif_size as ulong
+ time_defined as ulong
+ time as LodePNGTime
+ phys_defined as ulong
+ phys_x as ulong
+ phys_y as ulong
+ phys_unit as ulong
+ gama_defined as ulong
+ gama_gamma as ulong
+ chrm_defined as ulong
+ chrm_white_x as ulong
+ chrm_white_y as ulong
+ chrm_red_x as ulong
+ chrm_red_y as ulong
+ chrm_green_x as ulong
+ chrm_green_y as ulong
+ chrm_blue_x as ulong
+ chrm_blue_y as ulong
+ srgb_defined as ulong
+ srgb_intent as ulong
+ iccp_defined as ulong
+ iccp_name as zstring ptr
+ iccp_profile as ubyte ptr
+ iccp_profile_size as ulong
+ cicp_defined as ulong
+ cicp_color_primaries as ulong
+ cicp_transfer_function as ulong
+ cicp_matrix_coefficients as ulong
+ cicp_video_full_range_flag as ulong
+ mdcv_defined as ulong
+ mdcv_red_x as ulong
+ mdcv_red_y as ulong
+ mdcv_green_x as ulong
+ mdcv_green_y as ulong
+ mdcv_blue_x as ulong
+ mdcv_blue_y as ulong
+ mdcv_white_x as ulong
+ mdcv_white_y as ulong
+ mdcv_max_luminance as ulong
+ mdcv_min_luminance as ulong
+ clli_defined as ulong
+ clli_max_cll as ulong
+ clli_max_fall as ulong
+ sbit_defined as ulong
+ sbit_r as ulong
+ sbit_g as ulong
+ sbit_b as ulong
+ sbit_a as ulong
+ unknown_chunks_data(0 to 2) as ubyte ptr
+ unknown_chunks_size(0 to 2) as uinteger
+end type
+
+declare sub lodepng_info_init(byval info as LodePNGInfo ptr)
+declare sub lodepng_info_cleanup(byval info as LodePNGInfo ptr)
+declare function lodepng_info_copy(byval dest as LodePNGInfo ptr, byval source as const LodePNGInfo ptr) as ulong
+declare function lodepng_add_text(byval info as LodePNGInfo ptr, byval key as const zstring ptr, byval str_ as const zstring ptr) as ulong
+declare sub lodepng_clear_text(byval info as LodePNGInfo ptr)
+declare function lodepng_add_itext(byval info as LodePNGInfo ptr, byval key as const zstring ptr, byval langtag as const zstring ptr, byval transkey as const zstring ptr, byval str_ as const zstring ptr) as ulong
+declare sub lodepng_clear_itext(byval info as LodePNGInfo ptr)
+declare function lodepng_set_icc(byval info as LodePNGInfo ptr, byval name_ as const zstring ptr, byval profile as const ubyte ptr, byval profile_size as ulong) as ulong
+declare sub lodepng_clear_icc(byval info as LodePNGInfo ptr)
+declare function lodepng_set_exif(byval info as LodePNGInfo ptr, byval exif as const ubyte ptr, byval exif_size as ulong) as ulong
+declare sub lodepng_clear_exif(byval info as LodePNGInfo ptr)
+declare function lodepng_convert(byval out_ as ubyte ptr, byval in as const ubyte ptr, byval mode_out as const LodePNGColorMode ptr, byval mode_in as const LodePNGColorMode ptr, byval w as ulong, byval h as ulong) as ulong
+
+type LodePNGDecoderSettings
+ zlibsettings as LodePNGDecompressSettings
+ ignore_crc as ulong
+ ignore_critical as ulong
+ ignore_end as ulong
+ color_convert as ulong
+ read_text_chunks as ulong
+ remember_unknown_chunks as ulong
+ max_text_size as uinteger
+ max_icc_size as uinteger
+end type
+
+declare sub lodepng_decoder_settings_init(byval settings as LodePNGDecoderSettings ptr)
+
+type LodePNGFilterStrategy as long
+enum
+ LFS_ZERO = 0
+ LFS_ONE = 1
+ LFS_TWO = 2
+ LFS_THREE = 3
+ LFS_FOUR = 4
+ LFS_MINSUM
+ LFS_ENTROPY
+ LFS_BRUTE_FORCE
+ LFS_PREDEFINED
+end enum
+
+type LodePNGColorStats
+ colored as ulong
+ key as ulong
+ key_r as ushort
+ key_g as ushort
+ key_b as ushort
+ alpha as ulong
+ numcolors as ulong
+ palette(0 to 1023) as ubyte
+ bits as ulong
+ numpixels as uinteger
+ allow_palette as ulong
+ allow_greyscale as ulong
+end type
+
+declare sub lodepng_color_stats_init(byval stats as LodePNGColorStats ptr)
+declare function lodepng_compute_color_stats(byval stats as LodePNGColorStats ptr, byval image as const ubyte ptr, byval w as ulong, byval h as ulong, byval mode_in as const LodePNGColorMode ptr) as ulong
+
+type LodePNGEncoderSettings
+ zlibsettings as LodePNGCompressSettings
+ auto_convert as ulong
+ filter_palette_zero as ulong
+ filter_strategy as LodePNGFilterStrategy
+ predefined_filters as const ubyte ptr
+ force_palette as ulong
+ add_id as ulong
+ text_compression as ulong
+end type
+
+declare sub lodepng_encoder_settings_init(byval settings as LodePNGEncoderSettings ptr)
+
+type LodePNGState
+ decoder as LodePNGDecoderSettings
+ encoder as LodePNGEncoderSettings
+ info_raw as LodePNGColorMode
+ info_png as LodePNGInfo
+ error_ as ulong
+end type
+
+declare sub lodepng_state_init(byval state as LodePNGState ptr)
+declare sub lodepng_state_cleanup(byval state as LodePNGState ptr)
+declare sub lodepng_state_copy(byval dest as LodePNGState ptr, byval source as const LodePNGState ptr)
+declare function lodepng_decode(byval out_ as ubyte ptr ptr, byval w as ulong ptr, byval h as ulong ptr, byval state as LodePNGState ptr, byval in as const ubyte ptr, byval insize as uinteger) as ulong
+declare function lodepng_inspect(byval w as ulong ptr, byval h as ulong ptr, byval state as LodePNGState ptr, byval in as const ubyte ptr, byval insize as uinteger) as ulong
+declare function lodepng_inspect_chunk(byval state as LodePNGState ptr, byval pos_ as uinteger, byval in as const ubyte ptr, byval insize as uinteger) as ulong
+declare function lodepng_encode(byval out_ as ubyte ptr ptr, byval outsize as uinteger ptr, byval image as const ubyte ptr, byval w as ulong, byval h as ulong, byval state as LodePNGState ptr) as ulong
+declare function lodepng_chunk_length(byval chunk as const ubyte ptr) as ulong
+declare sub lodepng_chunk_type(byval type_ as zstring ptr, byval chunk as const ubyte ptr)
+declare function lodepng_chunk_type_equals(byval chunk as const ubyte ptr, byval type_ as const zstring ptr) as ubyte
+declare function lodepng_chunk_ancillary(byval chunk as const ubyte ptr) as ubyte
+declare function lodepng_chunk_private(byval chunk as const ubyte ptr) as ubyte
+declare function lodepng_chunk_safetocopy(byval chunk as const ubyte ptr) as ubyte
+declare function lodepng_chunk_data(byval chunk as ubyte ptr) as ubyte ptr
+declare function lodepng_chunk_data_const(byval chunk as const ubyte ptr) as const ubyte ptr
+declare function lodepng_chunk_check_crc(byval chunk as const ubyte ptr) as ulong
+declare sub lodepng_chunk_generate_crc(byval chunk as ubyte ptr)
+declare function lodepng_chunk_next(byval chunk as ubyte ptr, byval end_ as ubyte ptr) as ubyte ptr
+declare function lodepng_chunk_next_const(byval chunk as const ubyte ptr, byval end_ as const ubyte ptr) as const ubyte ptr
+declare function lodepng_chunk_find(byval chunk as ubyte ptr, byval end_ as ubyte ptr, byval type_ as const zstring ptr) as ubyte ptr
+declare function lodepng_chunk_find_const(byval chunk as const ubyte ptr, byval end_ as const ubyte ptr, byval type_ as const zstring ptr) as const ubyte ptr
+declare function lodepng_chunk_append(byval out_ as ubyte ptr ptr, byval outsize as uinteger ptr, byval chunk as const ubyte ptr) as ulong
+declare function lodepng_chunk_create(byval out_ as ubyte ptr ptr, byval outsize as uinteger ptr, byval length as uinteger, byval type_ as const zstring ptr, byval data_ as const ubyte ptr) as ulong
+declare function lodepng_crc32(byval buf as const ubyte ptr, byval len_ as uinteger) as ulong
+declare function lodepng_inflate(byval out_ as ubyte ptr ptr, byval outsize as uinteger ptr, byval in as const ubyte ptr, byval insize as uinteger, byval settings as const LodePNGDecompressSettings ptr) as ulong
+declare function lodepng_zlib_decompress(byval out_ as ubyte ptr ptr, byval outsize as uinteger ptr, byval in as const ubyte ptr, byval insize as uinteger, byval settings as const LodePNGDecompressSettings ptr) as ulong
+declare function lodepng_zlib_compress(byval out_ as ubyte ptr ptr, byval outsize as uinteger ptr, byval in as const ubyte ptr, byval insize as uinteger, byval settings as const LodePNGCompressSettings ptr) as ulong
+declare function lodepng_huffman_code_lengths(byval lengths as ulong ptr, byval frequencies as const ulong ptr, byval numcodes as uinteger, byval maxbitlen as ulong) as ulong
+declare function lodepng_deflate(byval out_ as ubyte ptr ptr, byval outsize as uinteger ptr, byval in as const ubyte ptr, byval insize as uinteger, byval settings as const LodePNGCompressSettings ptr) as ulong
+declare function lodepng_load_file(byval out_ as ubyte ptr ptr, byval outsize as uinteger ptr, byval filename as const zstring ptr) as ulong
+declare function lodepng_save_file(byval buffer as const ubyte ptr, byval buffersize as uinteger, byval filename as const zstring ptr) as ulong
+
+end extern
+#endif
+#endif
\ No newline at end of file
diff --git a/inc/mujs/mujs.bi b/inc/mujs/mujs.bi
new file mode 100644
index 00000000..f13aa332
--- /dev/null
+++ b/inc/mujs/mujs.bi
@@ -0,0 +1,212 @@
+'freebasic bindings for mujs-1.3.5.
+'MuJS Is a lightweight Javascript interpreter designed For embedding in
+'other software To extend them With scripting capabilities.
+'MuJS Is free Open source software distributed under the ISC license.
+'Copyright
+'Permission To use, copy, modify, And/Or distribute This software For
+'Any purpose With Or without fee Is hereby granted, provided that the
+'above copyright notice And This permission notice appear in all copies.
+'THE SOFTWARE Is PROVIDED "AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+'With REGARD To This SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+'MERCHANTABILITY And FITNESS. IN NO Event SHALL THE AUTHOR BE LIABLE For
+'Any SPECIAL, DIRECT, INDIRECT, Or CONSEQUENTIAL DAMAGES Or Any DAMAGES
+'WHATSOEVER RESULTING FROM LOSS OF USE, Data Or PROFITS, WHETHER IN AN
+'ACTION OF CONTRACT, NEGLIGENCE Or OTHER TORTIOUS ACTION, ARISING Out OF
+'Or IN CONNECTION With THE USE Or PERFORMANCE OF This SOFTWARE.
+
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef mujs_h
+#define mujs_h
+#include once "crt/setjmp.bi"
+#include once "regexp.bi"
+#include once "utf.bi"
+#inclib "mujs"
+
+Extern "C"
+
+#define mujs_h
+Const JS_VERSION_MAJOR = 1
+Const JS_VERSION_MINOR = 3
+Const JS_VERSION_PATCH = 5
+Const JS_VERSION = ((JS_VERSION_MAJOR * 10000) + (JS_VERSION_MINOR * 100)) + JS_VERSION_PATCH
+#define JS_CHECKVERSION(x, y, z) (JS_VERSION >= ((((x) * 10000) + ((y) * 100)) + (z)))
+Type js_State As Any Ptr
+Type js_Alloc As Function(ByVal memctx As Any Ptr, ByVal ptr_ As Any Ptr, ByVal size As Long) As Any Ptr
+Type js_Panic As Sub(ByVal J As js_State Ptr)
+Type js_CFunction As Sub(ByVal J As js_State Ptr)
+Type js_Finalize As Sub(ByVal J As js_State Ptr, ByVal p As Any Ptr)
+Type js_HasProperty As Function(ByVal J As js_State Ptr, ByVal p As Any Ptr, ByVal name_ As Const ZString Ptr) As Long
+Type js_Put As Function(ByVal J As js_State Ptr, ByVal p As Any Ptr, ByVal name_ As Const ZString Ptr) As Long
+Type js_Delete As Function(ByVal J As js_State Ptr, ByVal p As Any Ptr, ByVal name_ As Const ZString Ptr) As Long
+Type js_Report As Sub(ByVal J As js_State Ptr, ByVal message As Const ZString Ptr)
+
+Declare Function js_newstate(ByVal alloc As js_Alloc, ByVal actx As Any Ptr, ByVal flags As Long) As js_State Ptr
+Declare Sub js_setcontext(ByVal J As js_State Ptr, ByVal uctx As Any Ptr)
+Declare Function js_getcontext(ByVal J As js_State Ptr) As Any Ptr
+Declare Sub js_setreport(ByVal J As js_State Ptr, ByVal report As js_Report)
+Declare Function js_atpanic(ByVal J As js_State Ptr, ByVal panic As js_Panic) As js_Panic
+Declare Sub js_freestate(ByVal J As js_State Ptr)
+Declare Sub js_gc(ByVal J As js_State Ptr, ByVal report As Long)
+Declare Function js_dostring(ByVal J As js_State Ptr, ByVal source As Const ZString Ptr) As Long
+Declare Function js_dofile(ByVal J As js_State Ptr, ByVal filename As Const ZString Ptr) As Long
+Declare Function js_ploadstring(ByVal J As js_State Ptr, ByVal filename As Const ZString Ptr, ByVal source As Const ZString Ptr) As Long
+Declare Function js_ploadfile(ByVal J As js_State Ptr, ByVal filename As Const ZString Ptr) As Long
+Declare Function js_pcall(ByVal J As js_State Ptr, ByVal n As Long) As Long
+Declare Function js_pconstruct(ByVal J As js_State Ptr, ByVal n As Long) As Long
+Declare Function js_savetry(ByVal J As js_State Ptr) As Any Ptr
+#define js_try(J) setjmp(js_savetry(J))
+Declare Sub js_endtry(ByVal J As js_State Ptr)
+
+Enum
+ JS_STRICT = 1
+End Enum
+
+Enum
+ JS_REGEXP_G = 1
+ JS_REGEXP_I = 2
+ JS_REGEXP_M = 4
+End Enum
+
+Enum
+ JS_READONLY = 1
+ JS_DONTENUM = 2
+ JS_DONTCONF = 4
+End Enum
+
+Enum
+ JS_IS_UNDEFINED
+ JS_IS_NULL
+ JS_IS_BOOLEAN
+ JS_IS_NUMBER
+ JS_IS_STRING
+ JS_IS_FUNCTION
+ JS_IS_OBJECT
+End Enum
+
+Declare Sub js_report(ByVal J As js_State Ptr, ByVal message As Const ZString Ptr)
+Declare Sub js_newerror(ByVal J As js_State Ptr, ByVal message As Const ZString Ptr)
+Declare Sub js_newevalerror(ByVal J As js_State Ptr, ByVal message As Const ZString Ptr)
+Declare Sub js_newrangeerror(ByVal J As js_State Ptr, ByVal message As Const ZString Ptr)
+Declare Sub js_newreferenceerror(ByVal J As js_State Ptr, ByVal message As Const ZString Ptr)
+Declare Sub js_newsyntaxerror(ByVal J As js_State Ptr, ByVal message As Const ZString Ptr)
+Declare Sub js_newtypeerror(ByVal J As js_State Ptr, ByVal message As Const ZString Ptr)
+Declare Sub js_newurierror(ByVal J As js_State Ptr, ByVal message As Const ZString Ptr)
+Declare Sub js_error(ByVal J As js_State Ptr, ByVal fmt As Const ZString Ptr, ...)
+Declare Sub js_evalerror(ByVal J As js_State Ptr, ByVal fmt As Const ZString Ptr, ...)
+Declare Sub js_rangeerror(ByVal J As js_State Ptr, ByVal fmt As Const ZString Ptr, ...)
+Declare Sub js_referenceerror(ByVal J As js_State Ptr, ByVal fmt As Const ZString Ptr, ...)
+Declare Sub js_syntaxerror(ByVal J As js_State Ptr, ByVal fmt As Const ZString Ptr, ...)
+Declare Sub js_typeerror(ByVal J As js_State Ptr, ByVal fmt As Const ZString Ptr, ...)
+Declare Sub js_urierror(ByVal J As js_State Ptr, ByVal fmt As Const ZString Ptr, ...)
+Declare Sub js_throw(ByVal J As js_State Ptr)
+Declare Sub js_loadstring(ByVal J As js_State Ptr, ByVal filename As Const ZString Ptr, ByVal source As Const ZString Ptr)
+Declare Sub js_loadfile(ByVal J As js_State Ptr, ByVal filename As Const ZString Ptr)
+Declare Sub js_eval(ByVal J As js_State Ptr)
+Declare Sub js_call(ByVal J As js_State Ptr, ByVal n As Long)
+Declare Sub js_construct(ByVal J As js_State Ptr, ByVal n As Long)
+Declare Function js_ref(ByVal J As js_State Ptr) As Const ZString Ptr
+Declare Sub js_unref(ByVal J As js_State Ptr, ByVal ref As Const ZString Ptr)
+Declare Sub js_getregistry(ByVal J As js_State Ptr, ByVal name_ As Const ZString Ptr)
+Declare Sub js_setregistry(ByVal J As js_State Ptr, ByVal name_ As Const ZString Ptr)
+Declare Sub js_delregistry(ByVal J As js_State Ptr, ByVal name_ As Const ZString Ptr)
+Declare Sub js_getglobal(ByVal J As js_State Ptr, ByVal name_ As Const ZString Ptr)
+Declare Sub js_setglobal(ByVal J As js_State Ptr, ByVal name_ As Const ZString Ptr)
+Declare Sub js_defglobal(ByVal J As js_State Ptr, ByVal name_ As Const ZString Ptr, ByVal atts As Long)
+Declare Sub js_delglobal(ByVal J As js_State Ptr, ByVal name_ As Const ZString Ptr)
+Declare Function js_hasproperty(ByVal J As js_State Ptr, ByVal idx As Long, ByVal name_ As Const ZString Ptr) As Long
+Declare Sub js_getproperty(ByVal J As js_State Ptr, ByVal idx As Long, ByVal name_ As Const ZString Ptr)
+Declare Sub js_setproperty(ByVal J As js_State Ptr, ByVal idx As Long, ByVal name_ As Const ZString Ptr)
+Declare Sub js_defproperty(ByVal J As js_State Ptr, ByVal idx As Long, ByVal name_ As Const ZString Ptr, ByVal atts As Long)
+Declare Sub js_delproperty(ByVal J As js_State Ptr, ByVal idx As Long, ByVal name_ As Const ZString Ptr)
+Declare Sub js_defaccessor(ByVal J As js_State Ptr, ByVal idx As Long, ByVal name_ As Const ZString Ptr, ByVal atts As Long)
+Declare Function js_getlength(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Sub js_setlength(ByVal J As js_State Ptr, ByVal idx As Long, ByVal len_ As Long)
+Declare Function js_hasindex(ByVal J As js_State Ptr, ByVal idx As Long, ByVal i As Long) As Long
+Declare Sub js_getindex(ByVal J As js_State Ptr, ByVal idx As Long, ByVal i As Long)
+Declare Sub js_setindex(ByVal J As js_State Ptr, ByVal idx As Long, ByVal i As Long)
+Declare Sub js_delindex(ByVal J As js_State Ptr, ByVal idx As Long, ByVal i As Long)
+Declare Sub js_currentfunction(ByVal J As js_State Ptr)
+Declare Function js_currentfunctiondata(ByVal J As js_State Ptr) As Any Ptr
+Declare Sub js_pushglobal(ByVal J As js_State Ptr)
+Declare Sub js_pushundefined(ByVal J As js_State Ptr)
+Declare Sub js_pushnull(ByVal J As js_State Ptr)
+Declare Sub js_pushboolean(ByVal J As js_State Ptr, ByVal v As Long)
+Declare Sub js_pushnumber(ByVal J As js_State Ptr, ByVal v As Double)
+Declare Sub js_pushstring(ByVal J As js_State Ptr, ByVal v As Const ZString Ptr)
+Declare Sub js_pushlstring(ByVal J As js_State Ptr, ByVal v As Const ZString Ptr, ByVal n As Long)
+Declare Sub js_pushliteral(ByVal J As js_State Ptr, ByVal v As Const ZString Ptr)
+Declare Sub js_newobjectx(ByVal J As js_State Ptr)
+Declare Sub js_newobject(ByVal J As js_State Ptr)
+Declare Sub js_newarray(ByVal J As js_State Ptr)
+Declare Sub js_newboolean(ByVal J As js_State Ptr, ByVal v As Long)
+Declare Sub js_newnumber(ByVal J As js_State Ptr, ByVal v As Double)
+Declare Sub js_newstring(ByVal J As js_State Ptr, ByVal v As Const ZString Ptr)
+Declare Sub js_newcfunction(ByVal J As js_State Ptr, ByVal fun As js_CFunction, ByVal name_ As Const ZString Ptr, ByVal length As Long)
+Declare Sub js_newcfunctionx(ByVal J As js_State Ptr, ByVal fun As js_CFunction, ByVal name_ As Const ZString Ptr, ByVal length As Long, ByVal data_ As Any Ptr, ByVal finalize As js_Finalize)
+Declare Sub js_newcconstructor(ByVal J As js_State Ptr, ByVal fun As js_CFunction, ByVal con As js_CFunction, ByVal name_ As Const ZString Ptr, ByVal length As Long)
+Declare Sub js_newuserdata(ByVal J As js_State Ptr, ByVal tag As Const ZString Ptr, ByVal data_ As Any Ptr, ByVal finalize As js_Finalize)
+Declare Sub js_newuserdatax(ByVal J As js_State Ptr, ByVal tag As Const ZString Ptr, ByVal data_ As Any Ptr, ByVal has As js_hasproperty, ByVal put_ As js_Put, ByVal del As js_Delete, ByVal finalize As js_Finalize)
+Declare Sub js_newregexp(ByVal J As js_State Ptr, ByVal pattern As Const ZString Ptr, ByVal flags As Long)
+Declare Sub js_pushiterator(ByVal J As js_State Ptr, ByVal idx As Long, ByVal own As Long)
+Declare Function js_nextiterator(ByVal J As js_State Ptr, ByVal idx As Long) As Const ZString Ptr
+Declare Function js_isdefined(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+declare function js_isundefined(byval J as js_State ptr, byval idx as long) as long
+Declare Function JS_ISNULL(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function JS_ISBOOLEAN(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function JS_ISNUMBER(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function JS_ISSTRING(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function js_isprimitive(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function JS_ISOBJECT(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function js_isarray(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function js_isregexp(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function js_iscoercible(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function js_iscallable(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function js_isuserdata(ByVal J As js_State Ptr, ByVal idx As Long, ByVal tag As Const ZString Ptr) As Long
+Declare Function js_iserror(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function js_isnumberobject(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function js_isstringobject(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+Declare Function js_isbooleanobject(ByVal J As js_State Ptr, ByVal idx As Long) As Long
+declare function js_isdateobject(byval J as js_State ptr, byval idx as long) as long
+declare function js_toboolean(byval J as js_State ptr, byval idx as long) as long
+declare function js_tonumber(byval J as js_State ptr, byval idx as long) as double
+declare function js_tostring(byval J as js_State ptr, byval idx as long) as const zstring ptr
+declare function js_touserdata(byval J as js_State ptr, byval idx as long, byval tag as const zstring ptr) as any ptr
+declare function js_trystring(byval J as js_State ptr, byval idx as long, byval error_ as const zstring ptr) as const zstring ptr
+declare function js_trynumber(byval J as js_State ptr, byval idx as long, byval error_ as double) as double
+declare function js_tryinteger(byval J as js_State ptr, byval idx as long, byval error_ as long) as long
+declare function js_tryboolean(byval J as js_State ptr, byval idx as long, byval error_ as long) as long
+declare function js_tointeger(byval J as js_State ptr, byval idx as long) as long
+declare function js_toint32(byval J as js_State ptr, byval idx as long) as long
+declare function js_touint32(byval J as js_State ptr, byval idx as long) as ulong
+declare function js_toint16(byval J as js_State ptr, byval idx as long) as short
+declare function js_touint16(byval J as js_State ptr, byval idx as long) as ushort
+declare function js_gettop(byval J as js_State ptr) as long
+declare sub js_pop(byval J as js_State ptr, byval n as long)
+declare sub js_rot(byval J as js_State ptr, byval n as long)
+declare sub js_copy(byval J as js_State ptr, byval idx as long)
+declare sub js_remove(byval J as js_State ptr, byval idx as long)
+declare sub js_insert(byval J as js_State ptr, byval idx as long)
+declare sub js_replace(byval J as js_State ptr, byval idx as long)
+declare sub js_dup(byval J as js_State ptr)
+declare sub js_dup2(byval J as js_State ptr)
+declare sub js_rot2(byval J as js_State ptr)
+declare sub js_rot3(byval J as js_State ptr)
+declare sub js_rot4(byval J as js_State ptr)
+declare sub js_rot2pop1(byval J as js_State ptr)
+declare sub js_rot3pop2(byval J as js_State ptr)
+declare sub js_concat(byval J as js_State ptr)
+declare function js_compare(byval J as js_State ptr, byval okay as long ptr) as long
+declare function js_equal(byval J as js_State ptr) as long
+declare function js_strictequal(byval J as js_State ptr) as long
+declare function js_instanceof(byval J as js_State ptr) as long
+declare function js_typeof(byval J as js_State ptr, byval idx as long) as const zstring ptr
+declare function js_type(byval J as js_State ptr, byval idx as long) as long
+declare sub js_repr(byval J as js_State ptr, byval idx as long)
+declare function js_torepr(byval J as js_State ptr, byval idx as long) as const zstring ptr
+declare function js_tryrepr(byval J as js_State ptr, byval idx as long, byval error_ as const zstring ptr) as const zstring ptr
+
+end extern
+#endif
diff --git a/inc/mujs/regexp.bi b/inc/mujs/regexp.bi
new file mode 100644
index 00000000..0a3006aa
--- /dev/null
+++ b/inc/mujs/regexp.bi
@@ -0,0 +1,57 @@
+'freebasic bindings for mujs-1.3.5.
+'MuJS Is a lightweight Javascript interpreter designed For embedding in
+'other software To extend them With scripting capabilities.
+'MuJS Is free Open source software distributed under the ISC license.
+'Copyright
+'Permission To use, copy, modify, And/Or distribute This software For
+'Any purpose With Or without fee Is hereby granted, provided that the
+'above copyright notice And This permission notice appear in all copies.
+'THE SOFTWARE Is PROVIDED "AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+'With REGARD To This SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+'MERCHANTABILITY And FITNESS. IN NO Event SHALL THE AUTHOR BE LIABLE For
+'Any SPECIAL, DIRECT, INDIRECT, Or CONSEQUENTIAL DAMAGES Or Any DAMAGES
+'WHATSOEVER RESULTING FROM LOSS OF USE, Data Or PROFITS, WHETHER IN AN
+'ACTION OF CONTRACT, NEGLIGENCE Or OTHER TORTIOUS ACTION, ARISING Out OF
+'Or IN CONNECTION With THE USE Or PERFORMANCE OF This SOFTWARE.
+
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+#pragma once
+
+#ifndef regexp_h
+#define regexp_h
+extern "C"
+
+type Reprog as any ptr
+declare function js_regcompx(byval alloc as function(byval ctx as any ptr, byval p as any ptr, byval n as long) as any ptr, byval ctx as any ptr, byval pattern as const zstring ptr, byval cflags as long, byval errorp as const zstring ptr ptr) as Reprog ptr
+declare function regcompx alias "js_regcompx"(byval alloc as function(byval ctx as any ptr, byval p as any ptr, byval n as long) as any ptr, byval ctx as any ptr, byval pattern as const zstring ptr, byval cflags as long, byval errorp as const zstring ptr ptr) as Reprog ptr
+declare sub js_regfreex(byval alloc as function(byval ctx as any ptr, byval p as any ptr, byval n as long) as any ptr, byval ctx as any ptr, byval prog as Reprog ptr)
+declare sub regfreex alias "js_regfreex"(byval alloc as function(byval ctx as any ptr, byval p as any ptr, byval n as long) as any ptr, byval ctx as any ptr, byval prog as Reprog ptr)
+declare function js_regcomp(byval pattern as const zstring ptr, byval cflags as long, byval errorp as const zstring ptr ptr) as Reprog ptr
+declare function regcomp alias "js_regcomp"(byval pattern as const zstring ptr, byval cflags as long, byval errorp as const zstring ptr ptr) as Reprog ptr
+type Resub as Resub_
+declare function js_regexec(byval prog as Reprog ptr, byval string as const zstring ptr, byval sub_ as Resub ptr, byval eflags as long) as long
+declare function regexec alias "js_regexec"(byval prog as Reprog ptr, byval string as const zstring ptr, byval sub_ as Resub ptr, byval eflags as long) as long
+declare sub js_regfree(byval prog as Reprog ptr)
+declare sub regfree alias "js_regfree"(byval prog as Reprog ptr)
+
+enum
+ REG_ICASE = 1
+ REG_NEWLINE = 2
+ REG_NOTBOL = 4
+end enum
+
+const REG_MAXSUB = 16
+
+type Resub_sub
+ sp as const zstring ptr
+ ep as const zstring ptr
+end type
+
+type Resub_
+ nsub as long
+ sub_(0 to 15) as Resub_sub
+end type
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/mujs/utf.bi b/inc/mujs/utf.bi
new file mode 100644
index 00000000..9ab16994
--- /dev/null
+++ b/inc/mujs/utf.bi
@@ -0,0 +1,53 @@
+'freebasic bindings for mujs-1.3.5.
+'MuJS Is a lightweight Javascript interpreter designed For embedding in
+'other software To extend them With scripting capabilities.
+'MuJS Is free Open source software distributed under the ISC license.
+'Copyright
+'Permission To use, copy, modify, And/Or distribute This software For
+'Any purpose With Or without fee Is hereby granted, provided that the
+'above copyright notice And This permission notice appear in all copies.
+'THE SOFTWARE Is PROVIDED "AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+'With REGARD To This SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+'MERCHANTABILITY And FITNESS. IN NO Event SHALL THE AUTHOR BE LIABLE For
+'Any SPECIAL, DIRECT, INDIRECT, Or CONSEQUENTIAL DAMAGES Or Any DAMAGES
+'WHATSOEVER RESULTING FROM LOSS OF USE, Data Or PROFITS, WHETHER IN AN
+'ACTION OF CONTRACT, NEGLIGENCE Or OTHER TORTIOUS ACTION, ARISING Out OF
+'Or IN CONNECTION With THE USE Or PERFORMANCE OF This SOFTWARE.
+
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+#pragma once
+#ifndef js_utf_h
+#define js_utf_h
+extern "C"
+
+#define js_utf_h
+type Rune as long
+
+enum
+ UTFmax = 4
+ Runesync = &h80
+ Runeself = &h80
+ Runeerror = &hFFFD
+ Runemax = &h10FFFF
+end enum
+
+declare function jsU_chartorune(byval rune as Rune ptr, byval str_ as const zstring ptr) as long
+declare function chartorune alias "jsU_chartorune"(byval rune as Rune ptr, byval str_ as const zstring ptr) as long
+declare function jsU_runetochar(byval str_ as zstring ptr, byval rune as const Rune ptr) as long
+declare function runetochar alias "jsU_runetochar"(byval str_ as zstring ptr, byval rune as const Rune ptr) as long
+declare function jsU_runelen(byval c as long) as long
+declare function runelen alias "jsU_runelen"(byval c as long) as long
+declare function jsU_isalpharune(byval c as Rune) as long
+declare function isalpharune alias "jsU_isalpharune"(byval c as Rune) as long
+declare function jsU_islowerrune(byval c as Rune) as long
+declare function islowerrune alias "jsU_islowerrune"(byval c as Rune) as long
+declare function jsU_isupperrune(byval c as Rune) as long
+declare function isupperrune alias "jsU_isupperrune"(byval c as Rune) as long
+declare function jsU_tolowerrune(byval c as Rune) as Rune
+declare function tolowerrune alias "jsU_tolowerrune"(byval c as Rune) as Rune
+declare function jsU_toupperrune(byval c as Rune) as Rune
+declare function toupperrune alias "jsU_toupperrune"(byval c as Rune) as Rune
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/my_basic.bi b/inc/my_basic.bi
new file mode 100644
index 00000000..d7cb18ac
--- /dev/null
+++ b/inc/my_basic.bi
@@ -0,0 +1,485 @@
+'freebasic bindings for MY-BASIC
+'my_basic is a lightweight BASIC interpreter written in standard C in dual files.
+'Aims to be embeddable, extendable and portable.
+'** For the latest info, see https://github.com/paladin-t/my_basic/
+'** Copyright (C) 2011 - 2024 Tony Wang
+'** Permission is hereby granted, free of charge, to any person obtaining a copy of
+'** this software and associated documentation files (the "Software"), to deal in
+'** the Software without restriction, including without limitation the rights to
+'** use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+'** the Software, and to permit persons to whom the Software is furnished to do so,
+'** subject to the following conditions:
+'**
+'** The above copyright notice and this permission notice shall be included in all
+'** copies or substantial portions of the Software.
+'**
+'** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+'** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+'** FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+'** COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+'** IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+'** CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+#pragma once
+
+#ifndef __MY_BASIC_H__
+#define __MY_BASIC_H__
+#include once "crt/long.bi"
+#inclib "my_basic"
+extern "C"
+
+#define MB_CP_CLANG
+
+#ifdef __FB_LINUX__
+ #define MB_OS_LINUX
+#elseif defined(__FB_CYGWIN__) or defined(__FB_FREEBSD__) or defined(__FB_OPENBSD__) or defined(__FB_NETBSD__)
+ #define MB_OS_UNIX
+#elseif defined(__FB_WIN32__)
+ #define MB_OS_WIN
+#endif
+
+#if defined(__FB_WIN32__) and (not defined(__FB_64BIT__))
+ #define MB_OS_WIN32
+#elseif defined(__FB_WIN32__) and defined(__FB_64BIT__)
+ #define MB_OS_WIN64
+#elseif defined(__FB_DOS__)
+ #define MB_OS_UNKNOWN
+#endif
+
+#define MBAPI
+#define MBIMPL
+#define MBCONST
+#define MB_SIMPLE_ARRAY
+#define MB_ENABLE_ARRAY_REF
+const MB_MAX_DIMENSION_COUNT = 4
+#define MB_ENABLE_COLLECTION_LIB
+#define MB_ENABLE_USERTYPE_REF
+#define MB_ENABLE_ALIVE_CHECKING_ON_USERTYPE_REF
+#define MB_ENABLE_CLASS
+#define MB_ENABLE_LAMBDA
+#define MB_ENABLE_MODULE
+#define MB_ENABLE_UNICODE
+#define MB_ENABLE_UNICODE_ID
+const MB_UNICODE_NEED_CONVERTING = 0
+#define MB_ENABLE_FORK
+const MB_GC_GARBAGE_THRESHOLD = 16
+#define MB_ENABLE_ALLOC_STAT
+#define MB_ENABLE_SOURCE_TRACE
+#define MB_ENABLE_STACK_TRACE
+#define MB_ENABLE_FULL_ERROR
+const MB_CONVERT_TO_INT_LEVEL_NONE = 0
+const MB_CONVERT_TO_INT_LEVEL_ALL = 1
+const MB_CONVERT_TO_INT_LEVEL = MB_CONVERT_TO_INT_LEVEL_ALL
+const MB_PRINT_INPUT_PROMPT = 1
+const MB_PRINT_INPUT_CONTENT = 0
+#define MB_PREFER_SPEED
+#define MB_COMPACT_MODE
+
+type bool_t as ubyte
+type int_t as long
+Type real_t As Single
+Type mb_interpreter_t As Any Ptr
+#ifndef NULL
+#define NULL 0
+#endif
+#define mb_strtol(__s, __e, __r) strtol((__s), (__e), (__r))
+#define mb_strtod(__s, __e) strtod((__s), (__e))
+#define MB_INT_FMT "%d"
+#define MB_REAL_FMT "%g"
+const MB_FNAN = &h7FC00000
+const MB_FINF = &h7F800000
+#define MB_EOS asc(!"\n")
+#define MB_NIL "NIL"
+#define MB_TRUE "TRUE"
+#define MB_FALSE "FALSE"
+#define MB_NULL_STRING "(EMPTY)"
+#define mb_min(a, b) iif((a) < (b), (a), (b))
+#define mb_max(a, b) iif((a) > (b), (a), (b))
+#define mb_stricmp strcasecmp
+#macro mb_assert(__a)
+ scope
+ cast(any, (__a))
+ assert(__a)
+ end scope
+#endmacro
+
+#define _static_assert_impl(cond, msg) static_assertion_##msg(IIf(cond, 1, 0) * 2 - 2) as ubyte
+#define _compile_time_assert3(x, l) _static_assert_impl(x, static_assertion_at_line_##l)
+#define _compile_time_assert2(x, l) _compile_time_assert3(x, l)
+#define mb_static_assert(x) _compile_time_assert2(x, __LINE__)
+#define mb_unrefvar(__v) (__v)
+type mb_mem_tag_t as ushort
+#define mb_bytes_size mb_max(mb_max(mb_max(sizeof(any ptr), sizeof(culong)), sizeof(int_t)), sizeof(real_t))
+#macro mb_make_nil(__v)
+ scope
+ memset(@(__v).value.bytes, 0, sizeof(ubyte))
+ (__v).type_ = MB_DT_NIL
+ end scope
+#endmacro
+#macro mb_make_type(__v, __d)
+ scope
+ (__v).value.type_ = (__d)
+ (__v).type_ = MB_DT_TYPE
+ end scope
+#endmacro
+#macro mb_make_bool(__v, __d)
+ scope
+ (__v).value.integer = iif(((__d) = 0) = 0, true, false)
+ (__v).type_ = MB_DT_INT
+ end scope
+#endmacro
+#macro mb_make_int(__v, __d)
+ scope
+ (__v).value.integer = (__d)
+ (__v).type_ = MB_DT_INT
+ end scope
+#endmacro
+#macro mb_make_real(__v, __d)
+ scope
+ (__v).value.float_point = (__d)
+ (__v).type_ = MB_DT_REAL
+ end scope
+#endmacro
+#macro mb_make_string(__v, __d)
+ scope
+ (__v).value.string = (__d)
+ (__v).type_ = MB_DT_STRING
+ end scope
+#endmacro
+#macro mb_make_usertype(__v, __d)
+ scope
+ memset(@(__v).value.bytes, 0, sizeof(ubyte))
+ (__v).value.usertype = (__d)
+ (__v).type_ = MB_DT_USERTYPE
+ end scope
+#endmacro
+#macro mb_make_usertype_bytes(__v, __d)
+ scope
+ mb_static_assert(-(sizeof(ubyte) >= sizeof(*__d)))
+ memcpy(@(__v).value.bytes, (__d), mb_min(sizeof(ubyte), sizeof(*__d)))
+ (__v).type_ = MB_DT_USERTYPE
+ end scope
+#endmacro
+#macro mb_make_array(__v, __d)
+ scope
+ (__v).value.array = (__d)
+ (__v).type_ = MB_DT_ARRAY
+ end scope
+#endmacro
+#macro mb_make_list(__v, __d)
+ scope
+ (__v).value.list = (__d)
+ (__v).type_ = MB_DT_LIST
+ end scope
+#endmacro
+#macro mb_make_dict(__v, __d)
+ scope
+ (__v).value.dict = (__d)
+ (__v).type_ = MB_DT_DICT
+ end scope
+#endmacro
+
+#macro mb_int_val(__v, __d)
+do
+ if((__v).type = MB_DT_INT) then
+ (__d) = (__v).value.integer
+ else if((__v).type = MB_DT_REAL) then
+ (__d) = cint((__v).value.float_point)
+else
+ (__d) = not (cint(0))
+end if
+loop while false
+#endmacro
+#define MB_CODES
+const MB_FUNC_OK = 0
+const MB_FUNC_IGNORE = 1
+const MB_FUNC_WARNING = 2
+const MB_FUNC_ERR = 3
+const MB_FUNC_BYE = 4
+const MB_FUNC_SUSPEND = 5
+const MB_FUNC_END = 6
+const MB_LOOP_BREAK = 101
+const MB_LOOP_CONTINUE = 102
+const MB_SUB_RETURN = 103
+const MB_EXTENDED_ABORT = 201
+#macro mb_check(__expr)
+ scope
+ dim __hr as long = (__expr)
+ if __hr <> MB_FUNC_OK then
+ return __hr
+ end if
+ end scope
+#endmacro
+#define mb_reg_fun(__s, __f) mb_register_func(__s, #__f, __f)
+#define mb_rem_fun(__s, __f) mb_remove_func(__s, #__f)
+#define mb_rem_res_fun(__s, __f) mb_remove_reserved_func(__s, #__f)
+
+#macro mb_convert_to_int_if_posible(__v)
+ If (__v).type = MB_DT_REAL AndAlso (Cdbl(Cint((__v).value.float_point)) = (__v).value.float_point) Then
+ (__v).type = MB_DT_INT
+ (__v).value.integer = Cint((__v).value.float_point)
+ End If
+#endmacro
+
+type mb_error_e as long
+enum
+ SE_NO_ERR = 0
+ SE_CM_FUNC_EXISTS
+ SE_CM_FUNC_DOES_NOT_EXIST
+ SE_CM_NOT_SUPPORTED
+ SE_PS_FAILED_TO_OPEN_FILE
+ SE_PS_SYMBOL_TOO_LONG
+ SE_PS_INVALID_CHAR
+ SE_PS_INVALID_MODULE
+ SE_PS_DUPLICATE_IMPORT
+ SE_RN_EMPTY_PROGRAM
+ SE_RN_PROGRAM_TOO_LONG
+ SE_RN_SYNTAX_ERROR
+ SE_RN_OUT_OF_MEMORY
+ SE_RN_OVERFLOW
+ SE_RN_UNEXPECTED_TYPE
+ SE_RN_INVALID_STRING
+ SE_RN_INTEGER_EXPECTED
+ SE_RN_NUMBER_EXPECTED
+ SE_RN_STRING_EXPECTED
+ SE_RN_VAR_EXPECTED
+ SE_RN_INDEX_OUT_OF_BOUND
+ SE_RN_CANNOT_FIND_WITH_THE_SPECIFIC_INDEX
+ SE_RN_TOO_MANY_DIMENSIONS
+ SE_RN_RANK_OUT_OF_BOUND
+ SE_RN_INVALID_ID_USAGE
+ SE_RN_CANNOT_ASSIGN_TO_RESERVED_WORD
+ SE_RN_DUPLICATE_ID
+ SE_RN_INCOMPLETE_STRUCTURE
+ SE_RN_LABEL_DOES_NOT_EXIST
+ SE_RN_NO_RETURN_POINT
+ SE_RN_COLON_EXPECTED
+ SE_RN_COMMA_EXPECTED
+ SE_RN_COMMA_OR_SEMICOLON_EXPECTED
+ SE_RN_OPEN_BRACKET_EXPECTED
+ SE_RN_CLOSE_BRACKET_EXPECTED
+ SE_RN_TOO_MANY_NESTED
+ SE_RN_FAILED_TO_OPERATE
+ SE_RN_OPERATOR_EXPECTED
+ SE_RN_ASSIGN_OPERATOR_EXPECTED
+ SE_RN_THEN_EXPECTED
+ SE_RN_ELSE_EXPECTED
+ SE_RN_ENDIF_EXPECTED
+ SE_RN_TO_EXPECTED
+ SE_RN_NEXT_EXPECTED
+ SE_RN_UNTIL_EXPECTED
+ SE_RN_LOOP_VAR_EXPECTED
+ SE_RN_JUMP_LABEL_EXPECTED
+ SE_RN_CALCULATION_ERROR
+ SE_RN_INVALID_EXPRESSION
+ SE_RN_DIVIDE_BY_ZERO
+ SE_RN_REACHED_TO_WRONG_FUNCTION
+ SE_RN_CANNOT_SUSPEND_HERE
+ SE_RN_CANNOT_MIX_INSTRUCTIONAL_AND_STRUCTURED
+ SE_RN_INVALID_ROUTINE
+ SE_RN_ROUTINE_EXPECTED
+ SE_RN_DUPLICATE_ROUTINE
+ SE_RN_INVALID_CLASS
+ SE_RN_CLASS_EXPECTED
+ SE_RN_DUPLICATE_CLASS
+ SE_RN_HASH_AND_COMPARE_MUST_BE_PROVIDED_TOGETHER
+ SE_RN_INVALID_LAMBDA
+ SE_RN_EMPTY_COLLECTION
+ SE_RN_LIST_EXPECTED
+ SE_RN_INVALID_ITERATOR
+ SE_RN_ITERABLE_EXPECTED
+ SE_RN_COLLECTION_EXPECTED
+ SE_RN_COLLECTION_OR_ITERATOR_EXPECTED
+ SE_RN_REFERENCED_TYPE_EXPECTED
+ SE_EA_EXTENDED_ABORT
+ SE_COUNT
+end enum
+
+type mb_data_e as long
+enum
+ MB_DT_NIL = 0
+ MB_DT_UNKNOWN = 1 shl 0
+ MB_DT_INT = 1 shl 1
+ MB_DT_REAL = 1 shl 2
+ MB_DT_NUM = MB_DT_INT or MB_DT_REAL
+ MB_DT_STRING = 1 shl 3
+ MB_DT_TYPE = 1 shl 4
+ MB_DT_USERTYPE = 1 shl 5
+ MB_DT_USERTYPE_REF = 1 shl 6
+ MB_DT_ARRAY = 1 shl 7
+ MB_DT_LIST = 1 shl 8
+ MB_DT_LIST_IT = 1 shl 9
+ MB_DT_DICT = 1 shl 10
+ MB_DT_DICT_IT = 1 shl 11
+ MB_DT_COLLECTION = MB_DT_LIST or MB_DT_DICT
+ MB_DT_ITERATOR = MB_DT_LIST_IT or MB_DT_DICT_IT
+ MB_DT_CLASS = 1 shl 12
+ MB_DT_ROUTINE = 1 shl 13
+end enum
+
+type mb_meta_func_e as long
+enum
+ MB_MF_IS = 1 shl 0
+ MB_MF_ADD = 1 shl 1
+ MB_MF_SUB = 1 shl 2
+ MB_MF_MUL = 1 shl 3
+ MB_MF_DIV = 1 shl 4
+ MB_MF_NEG = 1 shl 5
+ MB_MF_CALC = ((((MB_MF_IS or MB_MF_ADD) or MB_MF_SUB) or MB_MF_MUL) or MB_MF_DIV) or MB_MF_NEG
+ MB_MF_COLL = 1 shl 6
+ MB_MF_FUNC = 1 shl 7
+end enum
+
+type mb_meta_status_e as long
+enum
+ MB_MS_NONE = 0
+ MB_MS_DONE = 1 shl 0
+ MB_MS_RETURNED = 1 shl 1
+end enum
+
+type mb_routine_type_e as long
+enum
+ MB_RT_NONE
+ MB_RT_SCRIPT
+ MB_RT_LAMBDA
+ MB_RT_NATIVE
+end enum
+
+union mb_value_u field = 1
+ integer as long
+ float_point as single
+ string as zstring ptr
+ type_ as mb_data_e
+ usertype as any ptr
+ usertype_ref as any ptr
+ array as any ptr
+ list as any ptr
+ list_it as any ptr
+ dict as any ptr
+ dict_it as any ptr
+ instance as any ptr
+ routine as any ptr
+ bytes(0 to iif(iif(iif(sizeof(any ptr) > sizeof(culong), sizeof(any ptr), sizeof(culong)) > sizeof(long), iif(sizeof(any ptr) > sizeof(culong), sizeof(any ptr), sizeof(culong)), sizeof(long)) > sizeof(single), iif(iif(sizeof(any ptr) > sizeof(culong), sizeof(any ptr), sizeof(culong)) > sizeof(long), iif(sizeof(any ptr) > sizeof(culong), sizeof(any ptr), sizeof(culong)), sizeof(long)), sizeof(single)) - 1) as ubyte
+end union
+
+type mb_value_t field = 1
+ type_ as mb_data_e
+ value as mb_value_u
+End Type
+
+Type mb_func_t As Function(ByVal As mb_interpreter_t Ptr, ByVal As Any Ptr Ptr) As Long
+type mb_has_routine_arg_func_t as function(byval as mb_interpreter_t ptr, byval as any ptr ptr, byval as mb_value_t ptr, byval as ulong, byval as ulong ptr, byval as any ptr) as long
+type mb_pop_routine_arg_func_t as function(byval as mb_interpreter_t ptr, byval as any ptr ptr, byval as mb_value_t ptr, byval as ulong, byval as ulong ptr, byval as any ptr, byval as mb_value_t ptr) as long
+type mb_routine_func_t as function(byval as mb_interpreter_t ptr, byval as any ptr ptr, byval as mb_value_t ptr, byval as ulong, byval as any ptr, byval as mb_has_routine_arg_func_t, byval as mb_pop_routine_arg_func_t) as long
+type mb_var_retrieving_func_t as sub(byval as mb_interpreter_t ptr, byval as const zstring ptr, byval as mb_value_t)
+type mb_debug_stepped_handler_t as function(byval as mb_interpreter_t ptr, byval as any ptr ptr, byval as const zstring ptr, byval as long, byval as ushort, byval as ushort) as long
+type mb_error_handler_t as sub(byval as mb_interpreter_t ptr, byval as mb_error_e, byval as const zstring ptr, byval as const zstring ptr, byval as long, byval as ushort, byval as ushort, byval as long)
+type mb_print_func_t as function(byval as mb_interpreter_t ptr, byval as const zstring ptr, ...) as long
+type mb_input_func_t as function(byval as mb_interpreter_t ptr, byval as const zstring ptr, byval as zstring ptr, byval as long) as long
+type mb_import_handler_t as function(byval as mb_interpreter_t ptr, byval as const zstring ptr) as long
+type mb_dtor_func_t as sub(byval as mb_interpreter_t ptr, byval as any ptr)
+type mb_clone_func_t as function(byval as mb_interpreter_t ptr, byval as any ptr) as any ptr
+type mb_hash_func_t as function(byval as mb_interpreter_t ptr, byval as any ptr) as ulong
+type mb_cmp_func_t as function(byval as mb_interpreter_t ptr, byval as any ptr, byval as any ptr) as long
+type mb_fmt_func_t as function(byval as mb_interpreter_t ptr, byval as any ptr, byval as zstring ptr, byval as ulong) as long
+type mb_alive_marker_t as sub(byval as mb_interpreter_t ptr, byval as any ptr, byval as mb_value_t)
+type mb_alive_checker_t as sub(byval as mb_interpreter_t ptr, byval as any ptr, byval as mb_alive_marker_t)
+type mb_alive_value_checker_t as sub(byval as mb_interpreter_t ptr, byval as any ptr, byval as mb_value_t, byval as mb_alive_marker_t)
+type mb_meta_operator_t as function(byval as mb_interpreter_t ptr, byval as any ptr ptr, byval as mb_value_t ptr, byval as mb_value_t ptr, byval as mb_value_t ptr) as long
+type mb_meta_func_t as function(byval as mb_interpreter_t ptr, byval as any ptr ptr, byval as mb_value_t ptr, byval as const zstring ptr) as mb_meta_status_e
+type mb_memory_allocate_func_t as function(byval as ulong) as zstring ptr
+type mb_memory_free_func_t as sub(byval as zstring ptr)
+
+declare function mb_ver() as culong
+declare function mb_ver_string() as const zstring ptr
+declare function mb_init() as long
+declare function mb_dispose() as long
+declare function mb_open(byval s as mb_interpreter_t ptr ptr) as long
+declare function mb_close(byval s as mb_interpreter_t ptr ptr) as long
+declare function mb_reset(byval s as mb_interpreter_t ptr ptr, byval clear_funcs as ubyte, byval clear_vars as ubyte) as long
+declare function mb_fork(byval s as mb_interpreter_t ptr ptr, byval r as mb_interpreter_t ptr, byval clear_forked as ubyte) as long
+declare function mb_join(byval s as mb_interpreter_t ptr ptr) as long
+declare function mb_get_forked_from(byval s as mb_interpreter_t ptr, byval src as mb_interpreter_t ptr ptr) as long
+declare function mb_register_func(byval s as mb_interpreter_t ptr, byval n as const zstring ptr, byval f as mb_func_t) as long
+declare function mb_remove_func(byval s as mb_interpreter_t ptr, byval n as const zstring ptr) as long
+declare function mb_remove_reserved_func(byval s as mb_interpreter_t ptr, byval n as const zstring ptr) as long
+declare function mb_begin_module(byval s as mb_interpreter_t ptr, byval n as const zstring ptr) as long
+declare function mb_end_module(byval s as mb_interpreter_t ptr) as long
+declare function mb_attempt_func_begin(byval s as mb_interpreter_t ptr, byval l as any ptr ptr) as long
+declare function mb_attempt_func_end(byval s as mb_interpreter_t ptr, byval l as any ptr ptr) as long
+declare function mb_attempt_open_bracket(byval s as mb_interpreter_t ptr, byval l as any ptr ptr) as long
+declare function mb_attempt_close_bracket(byval s as mb_interpreter_t ptr, byval l as any ptr ptr) as long
+declare function mb_has_arg(byval s as mb_interpreter_t ptr, byval l as any ptr ptr) as long
+declare function mb_pop_int(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as long ptr) as long
+declare function mb_pop_real(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as single ptr) as long
+declare function mb_pop_string(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as zstring ptr ptr) as long
+declare function mb_pop_usertype(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as any ptr ptr) as long
+declare function mb_pop_value(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as mb_value_t ptr) as long
+declare function mb_push_int(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as long) as long
+declare function mb_push_real(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as single) as long
+declare function mb_push_string(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as zstring ptr) as long
+declare function mb_push_usertype(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as any ptr) as long
+declare function mb_push_value(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as mb_value_t) as long
+declare function mb_begin_class(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval n as const zstring ptr, byval meta as mb_value_t ptr ptr, byval c as long, byval out_ as mb_value_t ptr) as long
+declare function mb_end_class(byval s as mb_interpreter_t ptr, byval l as any ptr ptr) as long
+declare function mb_get_class_userdata(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval d as any ptr ptr) as long
+declare function mb_set_class_userdata(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval d as any ptr) as long
+declare function mb_get_value_by_name(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval n as const zstring ptr, byval val_ as mb_value_t ptr) as long
+declare function mb_get_vars(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval r as mb_var_retrieving_func_t, byval stack_offset as long) as long
+declare function mb_add_var(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval n as const zstring ptr, byval val_ as mb_value_t, byval force as ubyte) as long
+declare function mb_get_var(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval v as any ptr ptr, byval redir as ubyte) as long
+declare function mb_get_var_name(byval s as mb_interpreter_t ptr, byval v as any ptr, byval n as zstring ptr ptr) as long
+declare function mb_get_var_value(byval s as mb_interpreter_t ptr, byval v as any ptr, byval val_ as mb_value_t ptr) as long
+declare function mb_set_var_value(byval s as mb_interpreter_t ptr, byval v as any ptr, byval val_ as mb_value_t) as long
+declare function mb_init_array(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval t as mb_data_e, byval d as long ptr, byval c as long, byval a as any ptr ptr) as long
+declare function mb_get_array_len(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval a as any ptr, byval r as long, byval i as long ptr) as long
+declare function mb_get_array_elem(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval a as any ptr, byval d as long ptr, byval c as long, byval val_ as mb_value_t ptr) as long
+declare function mb_set_array_elem(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval a as any ptr, byval d as long ptr, byval c as long, byval val_ as mb_value_t) as long
+declare function mb_init_coll(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval coll as mb_value_t ptr) as long
+declare function mb_get_coll(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval coll as mb_value_t, byval idx as mb_value_t, byval val_ as mb_value_t ptr) as long
+declare function mb_set_coll(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval coll as mb_value_t, byval idx as mb_value_t, byval val_ as mb_value_t) as long
+declare function mb_remove_coll(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval coll as mb_value_t, byval idx as mb_value_t) as long
+declare function mb_count_coll(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval coll as mb_value_t, byval c as long ptr) as long
+declare function mb_keys_of_coll(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval coll as mb_value_t, byval keys as mb_value_t ptr, byval c as long) as long
+declare function mb_make_ref_value(byval s as mb_interpreter_t ptr, byval val_ as any ptr, byval out_ as mb_value_t ptr, byval un as mb_dtor_func_t, byval cl as mb_clone_func_t, byval hs as mb_hash_func_t, byval cp as mb_cmp_func_t, byval ft as mb_fmt_func_t) as long
+declare function mb_get_ref_value(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as mb_value_t, byval out_ as any ptr ptr) as long
+declare function mb_ref_value(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as mb_value_t) as long
+declare function mb_unref_value(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as mb_value_t) as long
+declare function mb_set_alive_checker(byval s as mb_interpreter_t ptr, byval f as mb_alive_checker_t) as long
+declare function mb_set_alive_checker_of_value(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as mb_value_t, byval f as mb_alive_value_checker_t) as long
+declare function mb_override_value(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as mb_value_t, byval m as mb_meta_func_e, byval f as any ptr) as long
+declare function mb_dispose_value(byval s as mb_interpreter_t ptr, byval val_ as mb_value_t) as long
+declare function mb_get_routine(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval n as const zstring ptr, byval val_ as mb_value_t ptr) as long
+declare function mb_set_routine(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval n as const zstring ptr, byval f as mb_routine_func_t, byval force as ubyte) as long
+declare function mb_eval_routine(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval val_ as mb_value_t, byval args as mb_value_t ptr, byval argc as ulong, byval ret as mb_value_t ptr) as long
+declare function mb_get_routine_type(byval s as mb_interpreter_t ptr, byval val_ as mb_value_t, byval y as mb_routine_type_e ptr) as long
+declare function mb_load_string(byval s as mb_interpreter_t ptr, byval l as const zstring ptr, byval reset as ubyte) as long
+declare function mb_load_file(byval s as mb_interpreter_t ptr, byval f as const zstring ptr) as long
+declare function mb_run(byval s as mb_interpreter_t ptr, byval clear_parser as ubyte) as long
+declare function mb_suspend(byval s as mb_interpreter_t ptr, byval l as any ptr ptr) as long
+declare function mb_schedule_suspend(byval s as mb_interpreter_t ptr, byval t as long) as long
+declare function mb_debug_get(byval s as mb_interpreter_t ptr, byval n as const zstring ptr, byval val_ as mb_value_t ptr) as long
+declare function mb_debug_set(byval s as mb_interpreter_t ptr, byval n as const zstring ptr, byval val_ as mb_value_t) as long
+declare function mb_debug_count_stack_frames(byval s as mb_interpreter_t ptr) as long
+declare function mb_debug_get_stack_trace(byval s as mb_interpreter_t ptr, byval fs as zstring ptr ptr, byval fc as ulong) as long
+declare function mb_debug_set_stepped_handler(byval s as mb_interpreter_t ptr, byval prev as mb_debug_stepped_handler_t, byval post as mb_debug_stepped_handler_t) as long
+declare function mb_get_type_string(byval t as mb_data_e) as const zstring ptr
+declare function mb_raise_error(byval s as mb_interpreter_t ptr, byval l as any ptr ptr, byval err_ as mb_error_e, byval ret as long) as long
+declare function mb_get_last_error(byval s as mb_interpreter_t ptr, byval file as const zstring ptr ptr, byval pos_ as long ptr, byval row as ushort ptr, byval col as ushort ptr) as mb_error_e
+declare function mb_get_error_desc(byval err_ as mb_error_e) as const zstring ptr
+declare function mb_set_error_handler(byval s as mb_interpreter_t ptr, byval h as mb_error_handler_t) as long
+declare function mb_set_printer(byval s as mb_interpreter_t ptr, byval p as mb_print_func_t) as long
+declare function mb_set_inputer(byval s as mb_interpreter_t ptr, byval p as mb_input_func_t) as long
+declare function mb_set_import_handler(byval s as mb_interpreter_t ptr, byval h as mb_import_handler_t) as long
+declare function mb_set_memory_manager(byval a as mb_memory_allocate_func_t, byval f as mb_memory_free_func_t) as long
+declare function mb_get_gc_enabled(byval s as mb_interpreter_t ptr) as ubyte
+declare function mb_set_gc_enabled(byval s as mb_interpreter_t ptr, byval gc as ubyte) as long
+declare function mb_gc(byval s as mb_interpreter_t ptr, byval collected as long ptr) as long
+declare function mb_get_userdata(byval s as mb_interpreter_t ptr, byval d as any ptr ptr) as long
+Declare Function mb_set_userdata(ByVal s As mb_interpreter_t Ptr, ByVal d As Any Ptr) As Long
+Declare Function mb_gets(ByVal s As mb_interpreter_t Ptr, ByVal pmt As Const ZString Ptr, ByVal buf As ZString Ptr, ByVal n As Long) As Long
+declare function mb_memdup(byval val_ as const zstring ptr, byval size as ulong) as zstring ptr
+
+end extern
+#endif
diff --git a/inc/oniguruma.bi b/inc/oniguruma.bi
new file mode 100644
index 00000000..08ebcaa3
--- /dev/null
+++ b/inc/oniguruma.bi
@@ -0,0 +1,774 @@
+' FreeBASIC binding for oniguruma-6.9.10
+'
+'based on the C header files:
+'Oniguruma is a modern and flexible regular expressions library.
+'It encompasses features from different regular expression
+'implementations that traditionally exist in different languages.
+'Copyright (c) 2002-2021 K.Kosako
+'All rights reserved.
+'
+'Redistribution and use in source and binary forms, with or without
+'modification, are permitted provided that the following conditions
+'are met:
+'1. Redistributions of source code must retain the above copyright
+' notice, this list of conditions and the following disclaimer.
+'2. Redistributions in binary form must reproduce the above copyright
+' notice, this list of conditions and the following disclaimer in the
+' documentation and/or other materials provided with the distribution.
+'THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+'ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+'IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+'ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+'FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+'DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+'OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+'HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+'LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+'OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+'SUCH DAMAGE.
+'
+'translated to FreeBASIC by:
+' FreeBASIC development team
+
+#pragma once
+#ifndef ONIGURUMA_H
+#define ONIGURUMA_H
+#include once "crt/long.bi"
+#inclib "onig"
+extern "C"
+
+
+#define ONIGURUMA
+const ONIGURUMA_VERSION_MAJOR = 6
+const ONIGURUMA_VERSION_MINOR = 9
+const ONIGURUMA_VERSION_TEENY = 9
+const ONIGURUMA_VERSION_INT = 60909
+#define P_(args) args
+#define PV_(args) args
+#define ONIG_VARIADIC_FUNC_ATTR
+
+type UChar as OnigUChar
+type OnigCodePoint as ulong
+type OnigUChar as ubyte
+type OnigCtype as ulong
+type OnigLen as ulong
+const ONIG_INFINITE_DISTANCE = not cast(OnigLen, 0)
+type OnigCaseFoldType as ulong
+extern OnigDefaultCaseFoldFlag as OnigCaseFoldType
+
+const ONIGENC_CASE_FOLD_ASCII_ONLY = 1
+const ONIGENC_CASE_FOLD_TURKISH_AZERI = 1 shl 20
+const INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR = 1 shl 30
+const ONIGENC_CASE_FOLD_MIN = INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR
+extern ONIGENC_CASE_FOLD_DEFAULT alias "OnigDefaultCaseFoldFlag" as OnigCaseFoldType
+const ONIGENC_MAX_COMP_CASE_FOLD_CODE_LEN = 3
+const ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM = 13
+#define ONIGENC_CODE_RANGE_NUM(range) clng(range[0])
+#define ONIGENC_CODE_RANGE_FROM(range, i) range[(((i) * 2) + 1)]
+#define ONIGENC_CODE_RANGE_TO(range, i) range[(((i) * 2) + 2)]
+
+type OnigCaseFoldCodeItem
+ byte_len as long
+ code_len as long
+ code(0 to 2) as OnigCodePoint
+end type
+
+type OnigMetaCharTableType
+ esc as OnigCodePoint
+ anychar as OnigCodePoint
+ anytime as OnigCodePoint
+ zero_or_one_time as OnigCodePoint
+ one_or_more_time as OnigCodePoint
+ anychar_anytime as OnigCodePoint
+end type
+
+type OnigApplyAllCaseFoldFunc as function(byval from as OnigCodePoint, byval to as OnigCodePoint ptr, byval to_len as long, byval arg as any ptr) as long
+
+Type OnigEncodingTypeST
+ mbc_enc_len as function(byval p as const OnigUChar ptr) as long
+ name_ as const zstring ptr
+ max_enc_len as long
+ min_enc_len as long
+ is_mbc_newline as function(byval p as const OnigUChar ptr, byval end_ as const OnigUChar ptr) as long
+ mbc_to_code as function(byval p as const OnigUChar ptr, byval end_ as const OnigUChar ptr) as OnigCodePoint
+ code_to_mbclen as function(byval code as OnigCodePoint) as long
+ code_to_mbc as function(byval code as OnigCodePoint, byval buf as OnigUChar ptr) as long
+ mbc_case_fold as function(byval flag as OnigCaseFoldType, byval pp as const OnigUChar ptr ptr, byval end_ as const OnigUChar ptr, byval to as OnigUChar ptr) as long
+ apply_all_case_fold as function(byval flag as OnigCaseFoldType, byval f as OnigApplyAllCaseFoldFunc, byval arg as any ptr) as long
+ get_case_fold_codes_by_str as function(byval flag as OnigCaseFoldType, byval p as const OnigUChar ptr, byval end_ as const OnigUChar ptr, byval acs as OnigCaseFoldCodeItem ptr) as long
+ property_name_to_ctype As Function(ByVal enc As OnigEncodingTypeST Ptr, ByVal p As OnigUChar Ptr, ByVal end_ As OnigUChar Ptr) As Long
+ is_code_ctype as function(byval code as OnigCodePoint, byval ctype as OnigCtype) as long
+ get_ctype_code_range as function(byval ctype as OnigCtype, byval sb_out as OnigCodePoint ptr, byval ranges as const OnigCodePoint ptr ptr) as long
+ left_adjust_char_head as function(byval start as const OnigUChar ptr, byval p as const OnigUChar ptr) as OnigUChar ptr
+ is_allowed_reverse_match as function(byval p as const OnigUChar ptr, byval end_ as const OnigUChar ptr) as long
+ init as function() as long
+ is_initialized as function() as long
+ is_valid_mbc_string as function(byval s as const OnigUChar ptr, byval end_ as const OnigUChar ptr) as long
+ flag as ulong
+ sb_range as OnigCodePoint
+ index as long
+end type
+
+Type OnigEncodingType As OnigEncodingTypeST
+Type OnigEncoding As OnigEncodingType Ptr
+extern OnigEncodingASCII as OnigEncodingType
+extern OnigEncodingISO_8859_1 as OnigEncodingType
+extern OnigEncodingISO_8859_2 as OnigEncodingType
+extern OnigEncodingISO_8859_3 as OnigEncodingType
+extern OnigEncodingISO_8859_4 as OnigEncodingType
+extern OnigEncodingISO_8859_5 as OnigEncodingType
+extern OnigEncodingISO_8859_6 as OnigEncodingType
+extern OnigEncodingISO_8859_7 as OnigEncodingType
+extern OnigEncodingISO_8859_8 as OnigEncodingType
+extern OnigEncodingISO_8859_9 as OnigEncodingType
+extern OnigEncodingISO_8859_10 as OnigEncodingType
+extern OnigEncodingISO_8859_11 as OnigEncodingType
+extern OnigEncodingISO_8859_13 as OnigEncodingType
+extern OnigEncodingISO_8859_14 as OnigEncodingType
+extern OnigEncodingISO_8859_15 as OnigEncodingType
+extern OnigEncodingISO_8859_16 as OnigEncodingType
+extern OnigEncodingUTF8 as OnigEncodingType
+extern OnigEncodingUTF16_BE as OnigEncodingType
+extern OnigEncodingUTF16_LE as OnigEncodingType
+extern OnigEncodingUTF32_BE as OnigEncodingType
+extern OnigEncodingUTF32_LE as OnigEncodingType
+extern OnigEncodingEUC_JP as OnigEncodingType
+extern OnigEncodingEUC_TW as OnigEncodingType
+extern OnigEncodingEUC_KR as OnigEncodingType
+extern OnigEncodingEUC_CN as OnigEncodingType
+extern OnigEncodingSJIS as OnigEncodingType
+extern OnigEncodingKOI8 as OnigEncodingType
+extern OnigEncodingKOI8_R as OnigEncodingType
+extern OnigEncodingCP1251 as OnigEncodingType
+extern OnigEncodingBIG5 as OnigEncodingType
+extern OnigEncodingGB18030 as OnigEncodingType
+
+#define ONIG_ENCODING_ASCII (@OnigEncodingASCII)
+#define ONIG_ENCODING_ISO_8859_1 (@OnigEncodingISO_8859_1)
+#define ONIG_ENCODING_ISO_8859_2 (@OnigEncodingISO_8859_2)
+#define ONIG_ENCODING_ISO_8859_3 (@OnigEncodingISO_8859_3)
+#define ONIG_ENCODING_ISO_8859_4 (@OnigEncodingISO_8859_4)
+#define ONIG_ENCODING_ISO_8859_5 (@OnigEncodingISO_8859_5)
+#define ONIG_ENCODING_ISO_8859_6 (@OnigEncodingISO_8859_6)
+#define ONIG_ENCODING_ISO_8859_7 (@OnigEncodingISO_8859_7)
+#define ONIG_ENCODING_ISO_8859_8 (@OnigEncodingISO_8859_8)
+#define ONIG_ENCODING_ISO_8859_9 (@OnigEncodingISO_8859_9)
+#define ONIG_ENCODING_ISO_8859_10 (@OnigEncodingISO_8859_10)
+#define ONIG_ENCODING_ISO_8859_11 (@OnigEncodingISO_8859_11)
+#define ONIG_ENCODING_ISO_8859_13 (@OnigEncodingISO_8859_13)
+#define ONIG_ENCODING_ISO_8859_14 (@OnigEncodingISO_8859_14)
+#define ONIG_ENCODING_ISO_8859_15 (@OnigEncodingISO_8859_15)
+#define ONIG_ENCODING_ISO_8859_16 (@OnigEncodingISO_8859_16)
+#define ONIG_ENCODING_UTF8 (@OnigEncodingUTF8)
+#define ONIG_ENCODING_UTF16_BE (@OnigEncodingUTF16_BE)
+#define ONIG_ENCODING_UTF16_LE (@OnigEncodingUTF16_LE)
+#define ONIG_ENCODING_UTF32_BE (@OnigEncodingUTF32_BE)
+#define ONIG_ENCODING_UTF32_LE (@OnigEncodingUTF32_LE)
+#define ONIG_ENCODING_EUC_JP (@OnigEncodingEUC_JP)
+#define ONIG_ENCODING_EUC_TW (@OnigEncodingEUC_TW)
+#define ONIG_ENCODING_EUC_KR (@OnigEncodingEUC_KR)
+#define ONIG_ENCODING_EUC_CN (@OnigEncodingEUC_CN)
+#define ONIG_ENCODING_SJIS (@OnigEncodingSJIS)
+#define ONIG_ENCODING_KOI8 (@OnigEncodingKOI8)
+#define ONIG_ENCODING_KOI8_R (@OnigEncodingKOI8_R)
+#define ONIG_ENCODING_CP1251 (@OnigEncodingCP1251)
+#define ONIG_ENCODING_BIG5 (@OnigEncodingBIG5)
+#define ONIG_ENCODING_GB18030 (@OnigEncodingGB18030)
+const ONIG_ENCODING_UNDEF = cast(OnigEncoding, 0)
+const ONIGENC_CODE_TO_MBC_MAXLEN = 7
+const ONIGENC_MBC_CASE_FOLD_MAXLEN = 18
+
+type OnigEncCtype as long
+enum
+ ONIGENC_CTYPE_NEWLINE = 0
+ ONIGENC_CTYPE_ALPHA = 1
+ ONIGENC_CTYPE_BLANK = 2
+ ONIGENC_CTYPE_CNTRL = 3
+ ONIGENC_CTYPE_DIGIT = 4
+ ONIGENC_CTYPE_GRAPH = 5
+ ONIGENC_CTYPE_LOWER = 6
+ ONIGENC_CTYPE_PRINT = 7
+ ONIGENC_CTYPE_PUNCT = 8
+ ONIGENC_CTYPE_SPACE = 9
+ ONIGENC_CTYPE_UPPER = 10
+ ONIGENC_CTYPE_XDIGIT = 11
+ ONIGENC_CTYPE_WORD = 12
+ ONIGENC_CTYPE_ALNUM = 13
+ ONIGENC_CTYPE_ASCII = 14
+end enum
+
+const ONIGENC_MAX_STD_CTYPE = ONIGENC_CTYPE_ASCII
+#define onig_enc_len(enc, p, end_) ONIGENC_MBC_ENC_LEN(enc, p)
+#define ONIGENC_IS_UNDEF(enc) ((enc) = ONIG_ENCODING_UNDEF)
+#define ONIGENC_IS_SINGLEBYTE(enc) (ONIGENC_MBC_MAXLEN(enc) = 1)
+#define ONIGENC_IS_MBC_HEAD(enc, p) (ONIGENC_MBC_ENC_LEN(enc, p) <> 1)
+#define ONIGENC_IS_MBC_ASCII(p) ((*(p)) < 128)
+#define ONIGENC_IS_CODE_ASCII(code) ((code) < 128)
+#define ONIGENC_IS_MBC_WORD(enc, s, end_) ONIGENC_IS_CODE_WORD(enc, ONIGENC_MBC_TO_CODE(enc, s, end_))
+#define ONIGENC_IS_MBC_WORD_ASCII(enc, s, end_) onigenc_is_mbc_word_ascii(enc, s, end_)
+#define ONIGENC_NAME(enc) (enc)->name_
+#define ONIGENC_MBC_CASE_FOLD(enc, flag, pp, end_, buf) (enc)->mbc_case_fold(flag, cptr(const OnigUChar ptr ptr, pp), end_, buf)
+#define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc, s, end_) (enc)->is_allowed_reverse_match(s, end_)
+#define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s) (enc)->left_adjust_char_head(start, s)
+#define ONIGENC_IS_VALID_MBC_STRING(enc, s, end_) (enc)->is_valid_mbc_string(s, end_)
+#define ONIGENC_APPLY_ALL_CASE_FOLD(enc, case_fold_flag, f, arg) (enc)->apply_all_case_fold(case_fold_flag, f, arg)
+#define ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc, case_fold_flag, p, end_, acs) (enc)->get_case_fold_codes_by_str(case_fold_flag, p, end_, acs)
+'#define ONIGENC_STEP_BACK(enc, start, s, n) onigenc_step_back((enc), (start), (s), (n))
+#define ONIGENC_MBC_ENC_LEN(enc, p) (enc)->mbc_enc_len(p)
+#define ONIGENC_MBC_MAXLEN(enc) (enc)->max_enc_len
+#define ONIGENC_MBC_MAXLEN_DIST(enc) ONIGENC_MBC_MAXLEN(enc)
+#define ONIGENC_MBC_MINLEN(enc) (enc)->min_enc_len
+#define ONIGENC_IS_MBC_NEWLINE(enc, p, end_) (enc)->is_mbc_newline((p), (end_))
+#define ONIGENC_MBC_TO_CODE(enc, p, end_) (enc)->mbc_to_code((p), (end_))
+#define ONIGENC_CODE_TO_MBCLEN(enc, code) (enc)->code_to_mbclen(code)
+#define ONIGENC_CODE_TO_MBC(enc, code, buf) (enc)->code_to_mbc(code, buf)
+#define ONIGENC_PROPERTY_NAME_TO_CTYPE(enc, p, end_) (enc)->property_name_to_ctype(enc, p, end_)
+#define ONIGENC_IS_CODE_CTYPE(enc, code, ctype) (enc)->is_code_ctype(code, ctype)
+#define ONIGENC_IS_CODE_NEWLINE(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_NEWLINE)
+#define ONIGENC_IS_CODE_GRAPH(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_GRAPH)
+#define ONIGENC_IS_CODE_PRINT(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_PRINT)
+#define ONIGENC_IS_CODE_ALNUM(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_ALNUM)
+#define ONIGENC_IS_CODE_ALPHA(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_ALPHA)
+#define ONIGENC_IS_CODE_LOWER(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_LOWER)
+#define ONIGENC_IS_CODE_UPPER(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_UPPER)
+#define ONIGENC_IS_CODE_CNTRL(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_CNTRL)
+#define ONIGENC_IS_CODE_PUNCT(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_PUNCT)
+#define ONIGENC_IS_CODE_SPACE(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_SPACE)
+#define ONIGENC_IS_CODE_BLANK(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_BLANK)
+#define ONIGENC_IS_CODE_DIGIT(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_DIGIT)
+#define ONIGENC_IS_CODE_XDIGIT(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_XDIGIT)
+#define ONIGENC_IS_CODE_WORD(enc, code) ONIGENC_IS_CODE_CTYPE(enc, code, ONIGENC_CTYPE_WORD)
+#define ONIGENC_GET_CTYPE_CODE_RANGE(enc, ctype, sbout, ranges) (enc)->get_ctype_code_range(ctype, sbout, ranges)
+
+Declare Function onigenc_step_back(ByVal enc As OnigEncoding, ByVal start As Const OnigUChar Ptr, ByVal s As Const OnigUChar Ptr, ByVal n As Long) As OnigUChar Ptr
+declare function onigenc_init() as long
+Declare Function onig_initialize_encoding(ByVal enc As OnigEncoding) As Long
+Declare Function onigenc_set_default_encoding(ByVal enc As OnigEncoding) As Long
+Declare Function onigenc_get_default_encoding() As OnigEncoding
+declare sub onigenc_set_default_caseconv_table(byval table as const OnigUChar ptr)
+declare function onigenc_get_right_adjust_char_head_with_prev(byval enc as OnigEncoding, byval start as const OnigUChar ptr, byval s as const OnigUChar ptr, byval prev as const OnigUChar ptr ptr) as OnigUChar ptr
+declare function onigenc_get_prev_char_head(byval enc as OnigEncoding, byval start as const OnigUChar ptr, byval s as const OnigUChar ptr) as OnigUChar ptr
+declare function onigenc_get_left_adjust_char_head(byval enc as OnigEncoding, byval start as const OnigUChar ptr, byval s as const OnigUChar ptr) as OnigUChar ptr
+Declare Function onigenc_get_right_adjust_char_head(ByVal enc As OnigEncoding, ByVal start As Const OnigUChar Ptr, ByVal s As Const OnigUChar Ptr) As OnigUChar Ptr
+declare function onigenc_strlen(byval enc as OnigEncoding, byval p as const OnigUChar ptr, byval end_ as const OnigUChar ptr) as long
+declare function onigenc_strlen_null(byval enc as OnigEncoding, byval p as const OnigUChar ptr) as long
+Declare Function onigenc_str_bytelen_null(ByVal enc As OnigEncoding, ByVal p As Const OnigUChar Ptr) As Long
+'Declare Function onigenc_is_valid_mbc_string(ByVal enc As OnigEncoding , ByVal s As Const OnigUChar Ptr, ByVal end_ As Const OnigUChar Ptr) As Long
+Declare Function onigenc_strdup(ByVal enc As OnigEncoding, ByVal s As Const OnigUChar Ptr, ByVal end_ As Const OnigUChar Ptr) As OnigUChar Ptr
+
+const ONIG_NREGION = 10
+const ONIG_MAX_CAPTURE_NUM = 2147483647
+const ONIG_MAX_BACKREF_NUM = 1000
+const ONIG_MAX_REPEAT_NUM = 100000
+const ONIG_MAX_MULTI_BYTE_RANGES_NUM = 10000
+const ONIG_MAX_ERROR_MESSAGE_LEN = 90
+Type OnigOptionType As ULong
+const ONIG_OPTION_NONE = 0u
+const ONIG_OPTION_DEFAULT = ONIG_OPTION_NONE
+const ONIG_OPTION_IGNORECASE = 1u
+const ONIG_OPTION_EXTEND = culng(ONIG_OPTION_IGNORECASE shl 1)
+const ONIG_OPTION_MULTILINE = culng(ONIG_OPTION_EXTEND shl 1)
+const ONIG_OPTION_SINGLELINE = culng(ONIG_OPTION_MULTILINE shl 1)
+const ONIG_OPTION_FIND_LONGEST = culng(ONIG_OPTION_SINGLELINE shl 1)
+const ONIG_OPTION_FIND_NOT_EMPTY = culng(ONIG_OPTION_FIND_LONGEST shl 1)
+const ONIG_OPTION_NEGATE_SINGLELINE = culng(ONIG_OPTION_FIND_NOT_EMPTY shl 1)
+const ONIG_OPTION_DONT_CAPTURE_GROUP = culng(ONIG_OPTION_NEGATE_SINGLELINE shl 1)
+const ONIG_OPTION_CAPTURE_GROUP = culng(ONIG_OPTION_DONT_CAPTURE_GROUP shl 1)
+const ONIG_OPTION_NOTBOL = culng(ONIG_OPTION_CAPTURE_GROUP shl 1)
+const ONIG_OPTION_NOTEOL = culng(ONIG_OPTION_NOTBOL shl 1)
+const ONIG_OPTION_POSIX_REGION = culng(ONIG_OPTION_NOTEOL shl 1)
+const ONIG_OPTION_CHECK_VALIDITY_OF_STRING = culng(ONIG_OPTION_POSIX_REGION shl 1)
+const ONIG_OPTION_IGNORECASE_IS_ASCII = culng(ONIG_OPTION_CHECK_VALIDITY_OF_STRING shl 3)
+const ONIG_OPTION_WORD_IS_ASCII = culng(ONIG_OPTION_IGNORECASE_IS_ASCII shl 1)
+const ONIG_OPTION_DIGIT_IS_ASCII = culng(ONIG_OPTION_WORD_IS_ASCII shl 1)
+const ONIG_OPTION_SPACE_IS_ASCII = culng(ONIG_OPTION_DIGIT_IS_ASCII shl 1)
+const ONIG_OPTION_POSIX_IS_ASCII = culng(ONIG_OPTION_SPACE_IS_ASCII shl 1)
+const ONIG_OPTION_TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER = culng(ONIG_OPTION_POSIX_IS_ASCII shl 1)
+const ONIG_OPTION_TEXT_SEGMENT_WORD = culng(ONIG_OPTION_TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER shl 1)
+const ONIG_OPTION_NOT_BEGIN_STRING = culng(ONIG_OPTION_TEXT_SEGMENT_WORD shl 1)
+const ONIG_OPTION_NOT_END_STRING = culng(ONIG_OPTION_NOT_BEGIN_STRING shl 1)
+const ONIG_OPTION_NOT_BEGIN_POSITION = culng(ONIG_OPTION_NOT_END_STRING shl 1)
+const ONIG_OPTION_CALLBACK_EACH_MATCH = culng(ONIG_OPTION_NOT_BEGIN_POSITION shl 1)
+const ONIG_OPTION_MATCH_WHOLE_STRING = culng(ONIG_OPTION_CALLBACK_EACH_MATCH shl 1)
+const ONIG_OPTION_MAXBIT = ONIG_OPTION_MATCH_WHOLE_STRING
+#define ONIG_OPTION_ON(options, regopt) scope : (options) or= (regopt) : end scope
+#define ONIG_OPTION_OFF(options, regopt) scope : (options) and= not (regopt) : end scope
+#define ONIG_IS_OPTION_ON(options, option) ((options) and (option))
+
+type OnigSyntaxType
+ op as ulong
+ op2 as ulong
+ behavior as ulong
+ options As OnigOptionType
+ meta_char_table as OnigMetaCharTableType
+end type
+
+extern OnigSyntaxASIS as OnigSyntaxType
+extern OnigSyntaxPosixBasic as OnigSyntaxType
+extern OnigSyntaxPosixExtended as OnigSyntaxType
+extern OnigSyntaxEmacs as OnigSyntaxType
+extern OnigSyntaxGrep as OnigSyntaxType
+extern OnigSyntaxGnuRegex as OnigSyntaxType
+extern OnigSyntaxJava as OnigSyntaxType
+extern OnigSyntaxPerl as OnigSyntaxType
+extern OnigSyntaxPerl_NG as OnigSyntaxType
+extern OnigSyntaxRuby as OnigSyntaxType
+extern OnigSyntaxPython as OnigSyntaxType
+extern OnigSyntaxOniguruma as OnigSyntaxType
+
+#define ONIG_SYNTAX_ASIS (@OnigSyntaxASIS)
+#define ONIG_SYNTAX_POSIX_BASIC (@OnigSyntaxPosixBasic)
+#define ONIG_SYNTAX_POSIX_EXTENDED (@OnigSyntaxPosixExtended)
+#define ONIG_SYNTAX_EMACS (@OnigSyntaxEmacs)
+#define ONIG_SYNTAX_GREP (@OnigSyntaxGrep)
+#define ONIG_SYNTAX_GNU_REGEX (@OnigSyntaxGnuRegex)
+#define ONIG_SYNTAX_JAVA (@OnigSyntaxJava)
+#define ONIG_SYNTAX_PERL (@OnigSyntaxPerl)
+#define ONIG_SYNTAX_PERL_NG (@OnigSyntaxPerl_NG)
+#define ONIG_SYNTAX_RUBY (@OnigSyntaxRuby)
+#define ONIG_SYNTAX_PYTHON (@OnigSyntaxPython)
+#define ONIG_SYNTAX_ONIGURUMA (@OnigSyntaxOniguruma)
+extern OnigDefaultSyntax as OnigSyntaxType ptr
+extern ONIG_SYNTAX_DEFAULT alias "OnigDefaultSyntax" as OnigSyntaxType ptr
+const ONIG_SYN_OP_VARIABLE_META_CHARACTERS = culng(1u shl 0)
+const ONIG_SYN_OP_DOT_ANYCHAR = culng(1u shl 1)
+const ONIG_SYN_OP_ASTERISK_ZERO_INF = culng(1u shl 2)
+const ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF = culng(1u shl 3)
+const ONIG_SYN_OP_PLUS_ONE_INF = culng(1u shl 4)
+const ONIG_SYN_OP_ESC_PLUS_ONE_INF = culng(1u shl 5)
+const ONIG_SYN_OP_QMARK_ZERO_ONE = culng(1u shl 6)
+const ONIG_SYN_OP_ESC_QMARK_ZERO_ONE = culng(1u shl 7)
+const ONIG_SYN_OP_BRACE_INTERVAL = culng(1u shl 8)
+const ONIG_SYN_OP_ESC_BRACE_INTERVAL = culng(1u shl 9)
+const ONIG_SYN_OP_VBAR_ALT = culng(1u shl 10)
+const ONIG_SYN_OP_ESC_VBAR_ALT = culng(1u shl 11)
+const ONIG_SYN_OP_LPAREN_SUBEXP = culng(1u shl 12)
+const ONIG_SYN_OP_ESC_LPAREN_SUBEXP = culng(1u shl 13)
+const ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR = culng(1u shl 14)
+const ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR = culng(1u shl 15)
+const ONIG_SYN_OP_DECIMAL_BACKREF = culng(1u shl 16)
+const ONIG_SYN_OP_BRACKET_CC = culng(1u shl 17)
+const ONIG_SYN_OP_ESC_W_WORD = culng(1u shl 18)
+const ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END = culng(1u shl 19)
+const ONIG_SYN_OP_ESC_B_WORD_BOUND = culng(1u shl 20)
+const ONIG_SYN_OP_ESC_S_WHITE_SPACE = culng(1u shl 21)
+const ONIG_SYN_OP_ESC_D_DIGIT = culng(1u shl 22)
+const ONIG_SYN_OP_LINE_ANCHOR = culng(1u shl 23)
+const ONIG_SYN_OP_POSIX_BRACKET = culng(1u shl 24)
+const ONIG_SYN_OP_QMARK_NON_GREEDY = culng(1u shl 25)
+const ONIG_SYN_OP_ESC_CONTROL_CHARS = culng(1u shl 26)
+const ONIG_SYN_OP_ESC_C_CONTROL = culng(1u shl 27)
+const ONIG_SYN_OP_ESC_OCTAL3 = culng(1u shl 28)
+const ONIG_SYN_OP_ESC_X_HEX2 = culng(1u shl 29)
+const ONIG_SYN_OP_ESC_X_BRACE_HEX8 = culng(1u shl 30)
+const ONIG_SYN_OP_ESC_O_BRACE_OCTAL = culng(1u shl 31)
+const ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE = culng(1u shl 0)
+const ONIG_SYN_OP2_QMARK_GROUP_EFFECT = culng(1u shl 1)
+const ONIG_SYN_OP2_OPTION_PERL = culng(1u shl 2)
+const ONIG_SYN_OP2_OPTION_RUBY = culng(1u shl 3)
+const ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT = culng(1u shl 4)
+const ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL = culng(1u shl 5)
+const ONIG_SYN_OP2_CCLASS_SET_OP = culng(1u shl 6)
+const ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP = culng(1u shl 7)
+const ONIG_SYN_OP2_ESC_K_NAMED_BACKREF = culng(1u shl 8)
+const ONIG_SYN_OP2_ESC_G_SUBEXP_CALL = culng(1u shl 9)
+const ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY = culng(1u shl 10)
+const ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL = culng(1u shl 11)
+const ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META = culng(1u shl 12)
+const ONIG_SYN_OP2_ESC_V_VTAB = culng(1u shl 13)
+const ONIG_SYN_OP2_ESC_U_HEX4 = culng(1u shl 14)
+const ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR = culng(1u shl 15)
+const ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY = culng(1u shl 16)
+const ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT = culng(1u shl 17)
+const ONIG_SYN_OP2_ESC_H_XDIGIT = culng(1u shl 19)
+const ONIG_SYN_OP2_INEFFECTIVE_ESCAPE = culng(1u shl 20)
+const ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE = culng(1u shl 21)
+const ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP = culng(1u shl 22)
+const ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE = culng(1u shl 23)
+const ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT = culng(1u shl 24)
+const ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP = culng(1u shl 25)
+const ONIG_SYN_OP2_ESC_X_Y_GRAPHEME_CLUSTER = culng(1u shl 26)
+const ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT = culng(1u shl 26)
+const ONIG_SYN_OP2_QMARK_PERL_SUBEXP_CALL = culng(1u shl 27)
+const ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS = culng(1u shl 28)
+const ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME = culng(1u shl 29)
+const ONIG_SYN_OP2_OPTION_ONIGURUMA = culng(1u shl 30)
+const ONIG_SYN_OP2_QMARK_CAPITAL_P_NAME = culng(1u shl 31)
+const ONIG_SYN_CONTEXT_INDEP_ANCHORS = culng(1u shl 31)
+const ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS = culng(1u shl 0)
+const ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS = culng(1u shl 1)
+const ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP = culng(1u shl 2)
+const ONIG_SYN_ALLOW_INVALID_INTERVAL = culng(1u shl 3)
+const ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV = culng(1u shl 4)
+const ONIG_SYN_STRICT_CHECK_BACKREF = culng(1u shl 5)
+const ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND = culng(1u shl 6)
+const ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP = culng(1u shl 7)
+const ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME = culng(1u shl 8)
+const ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY = culng(1u shl 9)
+const ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH = culng(1u shl 10)
+const ONIG_SYN_VARIABLE_LEN_LOOK_BEHIND = culng(1u shl 11)
+const ONIG_SYN_PYTHON = culng(1u shl 12)
+const ONIG_SYN_WHOLE_OPTIONS = culng(1u shl 13)
+const ONIG_SYN_BRE_ANCHOR_AT_EDGE_OF_SUBEXP = culng(1u shl 14)
+const ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC = culng(1u shl 20)
+const ONIG_SYN_BACKSLASH_ESCAPE_IN_CC = culng(1u shl 21)
+const ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC = culng(1u shl 22)
+const ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC = culng(1u shl 23)
+const ONIG_SYN_ALLOW_INVALID_CODE_END_OF_RANGE_IN_CC = culng(1u shl 26)
+const ONIG_SYN_WARN_CC_OP_NOT_ESCAPED = culng(1u shl 24)
+const ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT = culng(1u shl 25)
+const ONIG_META_CHAR_ESCAPE = 0
+const ONIG_META_CHAR_ANYCHAR = 1
+const ONIG_META_CHAR_ANYTIME = 2
+const ONIG_META_CHAR_ZERO_OR_ONE_TIME = 3
+const ONIG_META_CHAR_ONE_OR_MORE_TIME = 4
+const ONIG_META_CHAR_ANYCHAR_ANYTIME = 5
+const ONIG_INEFFECTIVE_META_CHAR = 0
+#define ONIG_IS_PATTERN_ERROR(ecode) (((ecode) <= (-100)) andalso ((ecode) > (-1000)))
+const ONIG_NORMAL = 0
+const ONIG_VALUE_IS_NOT_SET = 1
+const ONIG_MISMATCH = -1
+const ONIG_NO_SUPPORT_CONFIG = -2
+const ONIG_ABORT = -3
+const ONIGERR_MEMORY = -5
+const ONIGERR_TYPE_BUG = -6
+const ONIGERR_PARSER_BUG = -11
+const ONIGERR_STACK_BUG = -12
+const ONIGERR_UNDEFINED_BYTECODE = -13
+const ONIGERR_UNEXPECTED_BYTECODE = -14
+const ONIGERR_MATCH_STACK_LIMIT_OVER = -15
+const ONIGERR_PARSE_DEPTH_LIMIT_OVER = -16
+const ONIGERR_RETRY_LIMIT_IN_MATCH_OVER = -17
+const ONIGERR_RETRY_LIMIT_IN_SEARCH_OVER = -18
+const ONIGERR_SUBEXP_CALL_LIMIT_IN_SEARCH_OVER = -19
+const ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED = -21
+const ONIGERR_DEFAULT_ENCODING_IS_NOT_SET = -21
+const ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR = -22
+const ONIGERR_FAIL_TO_INITIALIZE = -23
+const ONIGERR_INVALID_ARGUMENT = -30
+const ONIGERR_END_PATTERN_AT_LEFT_BRACE = -100
+const ONIGERR_END_PATTERN_AT_LEFT_BRACKET = -101
+const ONIGERR_EMPTY_CHAR_CLASS = -102
+const ONIGERR_PREMATURE_END_OF_CHAR_CLASS = -103
+const ONIGERR_END_PATTERN_AT_ESCAPE = -104
+const ONIGERR_END_PATTERN_AT_META = -105
+const ONIGERR_END_PATTERN_AT_CONTROL = -106
+const ONIGERR_META_CODE_SYNTAX = -108
+const ONIGERR_CONTROL_CODE_SYNTAX = -109
+const ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE = -110
+const ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE = -111
+const ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS = -112
+const ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED = -113
+const ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID = -114
+const ONIGERR_NESTED_REPEAT_OPERATOR = -115
+const ONIGERR_UNMATCHED_CLOSE_PARENTHESIS = -116
+const ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS = -117
+const ONIGERR_END_PATTERN_IN_GROUP = -118
+const ONIGERR_UNDEFINED_GROUP_OPTION = -119
+const ONIGERR_INVALID_GROUP_OPTION = -120
+const ONIGERR_INVALID_POSIX_BRACKET_TYPE = -121
+const ONIGERR_INVALID_LOOK_BEHIND_PATTERN = -122
+const ONIGERR_INVALID_REPEAT_RANGE_PATTERN = -123
+const ONIGERR_TOO_BIG_NUMBER = -200
+const ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE = -201
+const ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE = -202
+const ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS = -203
+const ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE = -204
+const ONIGERR_TOO_MANY_MULTI_BYTE_RANGES = -205
+const ONIGERR_TOO_SHORT_MULTI_BYTE_STRING = -206
+const ONIGERR_TOO_BIG_BACKREF_NUMBER = -207
+const ONIGERR_INVALID_BACKREF = -208
+const ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED = -209
+const ONIGERR_TOO_MANY_CAPTURES = -210
+const ONIGERR_TOO_LONG_WIDE_CHAR_VALUE = -212
+const ONIGERR_UNDEFINED_OPERATOR = -213
+const ONIGERR_EMPTY_GROUP_NAME = -214
+const ONIGERR_INVALID_GROUP_NAME = -215
+const ONIGERR_INVALID_CHAR_IN_GROUP_NAME = -216
+const ONIGERR_UNDEFINED_NAME_REFERENCE = -217
+const ONIGERR_UNDEFINED_GROUP_REFERENCE = -218
+const ONIGERR_MULTIPLEX_DEFINED_NAME = -219
+const ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL = -220
+const ONIGERR_NEVER_ENDING_RECURSION = -221
+const ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY = -222
+const ONIGERR_INVALID_CHAR_PROPERTY_NAME = -223
+const ONIGERR_INVALID_IF_ELSE_SYNTAX = -224
+const ONIGERR_INVALID_ABSENT_GROUP_PATTERN = -225
+const ONIGERR_INVALID_ABSENT_GROUP_GENERATOR_PATTERN = -226
+const ONIGERR_INVALID_CALLOUT_PATTERN = -227
+const ONIGERR_INVALID_CALLOUT_NAME = -228
+const ONIGERR_UNDEFINED_CALLOUT_NAME = -229
+const ONIGERR_INVALID_CALLOUT_BODY = -230
+const ONIGERR_INVALID_CALLOUT_TAG_NAME = -231
+const ONIGERR_INVALID_CALLOUT_ARG = -232
+const ONIGERR_INVALID_CODE_POINT_VALUE = -400
+const ONIGERR_INVALID_WIDE_CHAR_VALUE = -400
+const ONIGERR_TOO_BIG_WIDE_CHAR_VALUE = -401
+const ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION = -402
+const ONIGERR_INVALID_COMBINATION_OF_OPTIONS = -403
+const ONIGERR_TOO_MANY_USER_DEFINED_OBJECTS = -404
+const ONIGERR_TOO_LONG_PROPERTY_NAME = -405
+const ONIGERR_VERY_INEFFICIENT_PATTERN = -406
+const ONIGERR_LIBRARY_IS_NOT_INITIALIZED = -500
+const ONIG_MAX_CAPTURE_HISTORY_GROUP = 31
+#define ONIG_IS_CAPTURE_HISTORY_GROUP(r, i) ((((i) <= ONIG_MAX_CAPTURE_HISTORY_GROUP) andalso (r)->list) andalso (r)->list[i])
+
+type OnigCaptureTreeNodeStruct
+ group as long
+ beg as long
+ end_ as long
+ allocated as long
+ num_childs as long
+ childs as OnigCaptureTreeNodeStruct ptr ptr
+end type
+
+type OnigCaptureTreeNode as OnigCaptureTreeNodeStruct
+
+type re_registers
+ allocated as long
+ num_regs as long
+ beg as long ptr
+ end_ as long ptr
+ history_root as OnigCaptureTreeNode ptr
+end type
+
+const ONIG_TRAVERSE_CALLBACK_AT_FIRST = 1
+const ONIG_TRAVERSE_CALLBACK_AT_LAST = 2
+const ONIG_TRAVERSE_CALLBACK_AT_BOTH = ONIG_TRAVERSE_CALLBACK_AT_FIRST or ONIG_TRAVERSE_CALLBACK_AT_LAST
+const ONIG_REGION_NOTPOS = -1
+type OnigRegion as re_registers
+
+type OnigErrorInfo
+ enc as OnigEncoding
+ par as OnigUChar ptr
+ par_end as OnigUChar ptr
+end type
+
+type OnigRepeatRange
+ lower as long
+ upper as long
+end type
+
+type OnigWarnFunc as sub(byval s as const zstring ptr)
+Declare Sub onig_null_warn(ByVal s As Const ZString Ptr)
+const ONIG_CHAR_TABLE_SIZE = 256
+type OnigRegexType as re_pattern_buffer
+type OnigRegex as OnigRegexType ptr
+type regex_t as OnigRegexType
+type OnigRegSet as OnigRegSetStruct
+
+type OnigRegSetLead as long
+enum
+ ONIG_REGSET_POSITION_LEAD = 0
+ ONIG_REGSET_REGEX_LEAD = 1
+ ONIG_REGSET_PRIORITY_TO_REGEX_ORDER = 2
+end enum
+
+type OnigCompileInfo
+ num_of_elements as long
+ pattern_enc as OnigEncoding
+ target_enc as OnigEncoding
+ syntax as OnigSyntaxType ptr
+ option As OnigOptionType
+ case_fold_flag as OnigCaseFoldType
+end type
+
+type OnigCallbackEachMatchFunc as function(byval str_ as const OnigUChar ptr, byval end_ as const OnigUChar ptr, byval match_start as const OnigUChar ptr, byval region as OnigRegion ptr, byval user_data as any ptr) as long
+
+type OnigCalloutIn as long
+enum
+ ONIG_CALLOUT_IN_PROGRESS = 1
+ ONIG_CALLOUT_IN_RETRACTION = 2
+end enum
+
+const ONIG_CALLOUT_IN_BOTH = ONIG_CALLOUT_IN_PROGRESS or ONIG_CALLOUT_IN_RETRACTION
+
+type OnigCalloutOf as long
+enum
+ ONIG_CALLOUT_OF_CONTENTS = 0
+ ONIG_CALLOUT_OF_NAME = 1
+end enum
+
+type OnigCalloutType as long
+enum
+ ONIG_CALLOUT_TYPE_SINGLE = 0
+ ONIG_CALLOUT_TYPE_START_CALL = 1
+ ONIG_CALLOUT_TYPE_BOTH_CALL = 2
+ ONIG_CALLOUT_TYPE_START_MARK_END_CALL = 3
+end enum
+
+const ONIG_NON_NAME_ID = -1
+const ONIG_NON_CALLOUT_NUM = 0
+const ONIG_CALLOUT_MAX_ARGS_NUM = 4
+const ONIG_CALLOUT_DATA_SLOT_NUM = 5
+type OnigCalloutArgs as OnigCalloutArgsStruct
+type OnigCalloutFunc as function(byval args as OnigCalloutArgs ptr, byval user_data as any ptr) as long
+
+type OnigCalloutResult as long
+enum
+ ONIG_CALLOUT_FAIL = 1
+ ONIG_CALLOUT_SUCCESS = 0
+end enum
+
+type OnigType as long
+enum
+ ONIG_TYPE_VOID = 0
+ ONIG_TYPE_LONG = 1 shl 0
+ ONIG_TYPE_CHAR = 1 shl 1
+ ONIG_TYPE_STRING = 1 shl 2
+ ONIG_TYPE_POINTER = 1 shl 3
+ ONIG_TYPE_TAG = 1 shl 4
+end enum
+
+type OnigValue_s
+ start as OnigUChar ptr
+ end_ as OnigUChar ptr
+end type
+
+union OnigValue
+ l as clong
+ c as OnigCodePoint
+ s as OnigValue_s
+ p As Any Ptr
+ tag as long
+end union
+
+type OnigMatchParam as OnigMatchParamStruct
+Declare Function onig_initialize(ByVal encodings As OnigEncoding Ptr, ByVal number_of_encodings As Long) As Long
+Declare Function onig_init() As Long
+declare function onig_error_code_to_str(byval s as OnigUChar ptr, byval err_code as long, ...) as long
+declare function onig_is_error_code_needs_param(byval code as long) as long
+Declare Sub onig_set_warn_func(ByVal f As OnigWarnFunc)
+declare sub onig_set_verb_warn_func(byval f as OnigWarnFunc)
+Declare Function onig_new(ByVal As OnigRegex Ptr, ByVal PATTERN As Const OnigUChar Ptr, ByVal pattern_end As Const OnigUChar Ptr, ByVal option As OnigOptionType, ByVal enc As OnigEncoding, ByVal syntax As OnigSyntaxType Ptr, ByVal einfo As OnigErrorInfo Ptr) As Long
+Declare Function onig_reg_init(ByVal reg As OnigRegex, ByVal option As OnigOptionType, ByVal case_fold_flag As OnigCaseFoldType, ByVal enc As OnigEncoding, ByVal syntax As OnigSyntaxType Ptr) As Long
+Declare Function onig_new_without_alloc(ByVal As OnigRegex, ByVal PATTERN As Const OnigUChar Ptr, ByVal pattern_end As Const OnigUChar Ptr, ByVal option As OnigOptionType, ByVal enc As OnigEncoding, ByVal syntax As OnigSyntaxType Ptr, ByVal einfo As OnigErrorInfo Ptr) As Long
+Declare Function onig_new_deluxe(ByVal reg As OnigRegex Ptr, ByVal PATTERN As Const OnigUChar Ptr, ByVal pattern_end As Const OnigUChar Ptr, ByVal ci As OnigCompileInfo Ptr, ByVal einfo As OnigErrorInfo Ptr) As Long
+Declare Sub onig_free(ByVal As OnigRegex)
+declare sub onig_free_body(byval as OnigRegex)
+declare function onig_scan(byval reg as OnigRegex, byval str_ as const OnigUChar ptr, byval end_ as const OnigUChar ptr, byval region as OnigRegion ptr, byval option as OnigOptionType, byval scan_callback as function(byval as long, byval as long, byval as OnigRegion ptr, byval as any ptr) as long, byval callback_arg as any ptr) as long
+declare function onig_search(byval as OnigRegex, byval str_ as const OnigUChar ptr, byval end_ as const OnigUChar ptr, byval start as const OnigUChar ptr, byval range as const OnigUChar ptr, byval region as OnigRegion ptr, byval option as OnigOptionType) as long
+declare function onig_search_with_param(byval as OnigRegex, byval str_ as const OnigUChar ptr, byval end_ as const OnigUChar ptr, byval start as const OnigUChar ptr, byval range as const OnigUChar ptr, byval region as OnigRegion ptr, byval option as OnigOptionType, byval mp as OnigMatchParam ptr) as long
+declare function onig_match(byval as OnigRegex, byval str_ as const OnigUChar ptr, byval end_ as const OnigUChar ptr, byval at as const OnigUChar ptr, byval region as OnigRegion ptr, byval option as OnigOptionType) as long
+declare function onig_match_with_param(byval as OnigRegex, byval str_ as const OnigUChar ptr, byval end_ as const OnigUChar ptr, byval at as const OnigUChar ptr, byval region as OnigRegion ptr, byval option as OnigOptionType, byval mp as OnigMatchParam ptr) as long
+declare function onig_regset_new(byval rset as OnigRegSet ptr ptr, byval n as long, byval regs as OnigRegex ptr) as long
+declare function onig_regset_add(byval set as OnigRegSet ptr, byval reg as OnigRegex) as long
+declare function onig_regset_replace(byval set as OnigRegSet ptr, byval at as long, byval reg as OnigRegex) as long
+declare sub onig_regset_free(byval set as OnigRegSet ptr)
+declare function onig_regset_number_of_regex(byval set as OnigRegSet ptr) as long
+declare function onig_regset_get_regex(byval set as OnigRegSet ptr, byval at as long) as OnigRegex
+declare function onig_regset_get_region(byval set as OnigRegSet ptr, byval at as long) as OnigRegion ptr
+declare function onig_regset_search(byval set as OnigRegSet ptr, byval str_ as const OnigUChar ptr, byval end_ as const OnigUChar ptr, byval start as const OnigUChar ptr, byval range as const OnigUChar ptr, byval lead as OnigRegSetLead, byval option as OnigOptionType, byval rmatch_pos as long ptr) as long
+declare function onig_regset_search_with_param(byval set as OnigRegSet ptr, byval str_ as const OnigUChar ptr, byval end_ as const OnigUChar ptr, byval start as const OnigUChar ptr, byval range as const OnigUChar ptr, byval lead as OnigRegSetLead, byval option as OnigOptionType, byval mps as OnigMatchParam ptr ptr, byval rmatch_pos as long ptr) as long
+Declare Function onig_region_new() As OnigRegion Ptr
+declare sub onig_region_init(byval region as OnigRegion ptr)
+declare sub onig_region_free(byval region as OnigRegion ptr, byval free_self as long)
+declare sub onig_region_copy(byval to as OnigRegion ptr, byval from as OnigRegion ptr)
+declare sub onig_region_clear(byval region as OnigRegion ptr)
+declare function onig_region_resize(byval region as OnigRegion ptr, byval n as long) as long
+declare function onig_region_set(byval region as OnigRegion ptr, byval at as long, byval beg as long, byval end_ as long) as long
+declare function onig_name_to_group_numbers(byval reg as OnigRegex, byval name_ as const OnigUChar ptr, byval name_end as const OnigUChar ptr, byval nums as long ptr ptr) as long
+declare function onig_name_to_backref_number(byval reg as OnigRegex, byval name_ as const OnigUChar ptr, byval name_end as const OnigUChar ptr, byval region as OnigRegion ptr) as long
+declare function onig_foreach_name(byval reg as OnigRegex, byval func as function(byval as const OnigUChar ptr, byval as const OnigUChar ptr, byval as long, byval as long ptr, byval as OnigRegex, byval as any ptr) as long, byval arg as any ptr) as long
+declare function onig_number_of_names(byval reg as OnigRegex) as long
+declare function onig_number_of_captures(byval reg as OnigRegex) as long
+declare function onig_number_of_capture_histories(byval reg as OnigRegex) as long
+declare function onig_get_capture_tree(byval region as OnigRegion ptr) as OnigCaptureTreeNode ptr
+declare function onig_capture_tree_traverse(byval region as OnigRegion ptr, byval at as long, byval callback_func as function(byval as long, byval as long, byval as long, byval as long, byval as long, byval as any ptr) as long, byval arg as any ptr) as long
+declare function onig_noname_group_capture_is_active(byval reg as OnigRegex) as long
+declare function onig_get_encoding(byval reg as OnigRegex) as OnigEncoding
+declare function onig_get_options(byval reg as OnigRegex) as OnigOptionType
+declare function onig_get_case_fold_flag(byval reg as OnigRegex) as OnigCaseFoldType
+declare function onig_get_syntax(byval reg as OnigRegex) as OnigSyntaxType ptr
+declare function onig_set_default_syntax(byval syntax as OnigSyntaxType ptr) as long
+declare sub onig_copy_syntax(byval to as OnigSyntaxType ptr, byval from as OnigSyntaxType ptr)
+declare function onig_get_syntax_op(byval syntax as OnigSyntaxType ptr) as ulong
+declare function onig_get_syntax_op2(byval syntax as OnigSyntaxType ptr) as ulong
+declare function onig_get_syntax_behavior(byval syntax as OnigSyntaxType ptr) as ulong
+declare function onig_get_syntax_options(byval syntax as OnigSyntaxType ptr) as OnigOptionType
+declare sub onig_set_syntax_op(byval syntax as OnigSyntaxType ptr, byval op as ulong)
+declare sub onig_set_syntax_op2(byval syntax as OnigSyntaxType ptr, byval op2 as ulong)
+declare sub onig_set_syntax_behavior(byval syntax as OnigSyntaxType ptr, byval behavior as ulong)
+declare sub onig_set_syntax_options(byval syntax as OnigSyntaxType ptr, byval options as OnigOptionType)
+declare function onig_set_meta_char(byval syntax as OnigSyntaxType ptr, byval what as ulong, byval code as OnigCodePoint) as long
+declare sub onig_copy_encoding(byval to as OnigEncoding, byval from as OnigEncoding)
+declare function onig_get_default_case_fold_flag() as OnigCaseFoldType
+declare function onig_set_default_case_fold_flag(byval case_fold_flag as OnigCaseFoldType) as long
+declare function onig_get_match_stack_limit_size() as ulong
+declare function onig_set_match_stack_limit_size(byval size as ulong) as long
+declare function onig_get_retry_limit_in_match() as culong
+declare function onig_set_retry_limit_in_match(byval n as culong) as long
+declare function onig_get_retry_limit_in_search() as culong
+declare function onig_set_retry_limit_in_search(byval n as culong) as long
+declare function onig_get_parse_depth_limit() as ulong
+declare function onig_set_capture_num_limit(byval num as long) as long
+declare function onig_set_parse_depth_limit(byval depth as ulong) as long
+declare function onig_get_subexp_call_limit_in_search() as culong
+declare function onig_set_subexp_call_limit_in_search(byval n as culong) as long
+declare function onig_get_subexp_call_max_nest_level() as long
+declare function onig_set_subexp_call_max_nest_level(byval level as long) as long
+declare function onig_unicode_define_user_property(byval name_ as const zstring ptr, byval ranges as OnigCodePoint ptr) as long
+declare function onig_end() as long
+declare function onig_version() as const zstring ptr
+declare function onig_copyright() as const zstring ptr
+declare function onig_get_callback_each_match() as OnigCallbackEachMatchFunc
+declare function onig_set_callback_each_match(byval f as OnigCallbackEachMatchFunc) as long
+Declare Function onig_new_match_param() As OnigMatchParam Ptr
+declare sub onig_free_match_param(byval p as OnigMatchParam ptr)
+declare sub onig_free_match_param_content(byval p as OnigMatchParam ptr)
+declare function onig_initialize_match_param(byval mp as OnigMatchParam ptr) as long
+declare function onig_set_match_stack_limit_size_of_match_param(byval param as OnigMatchParam ptr, byval limit as ulong) as long
+declare function onig_set_retry_limit_in_match_of_match_param(byval param as OnigMatchParam ptr, byval limit as culong) as long
+declare function onig_set_retry_limit_in_search_of_match_param(byval param as OnigMatchParam ptr, byval limit as culong) as long
+declare function onig_set_progress_callout_of_match_param(byval param as OnigMatchParam ptr, byval f as OnigCalloutFunc) as long
+declare function onig_set_retraction_callout_of_match_param(byval param as OnigMatchParam ptr, byval f as OnigCalloutFunc) as long
+declare function onig_set_callout_user_data_of_match_param(byval param as OnigMatchParam ptr, byval user_data as any ptr) as long
+declare function onig_get_progress_callout() as OnigCalloutFunc
+declare function onig_set_progress_callout(byval f as OnigCalloutFunc) as long
+declare function onig_get_retraction_callout() as OnigCalloutFunc
+declare function onig_set_retraction_callout(byval f as OnigCalloutFunc) as long
+declare function onig_set_callout_of_name(byval enc as OnigEncoding, byval type_ as OnigCalloutType, byval name_ as OnigUChar ptr, byval name_end as OnigUChar ptr, byval callout_in as long, byval callout as OnigCalloutFunc, byval end_callout as OnigCalloutFunc, byval arg_num as long, byval arg_types as ulong ptr, byval optional_arg_num as long, byval opt_defaults as OnigValue ptr) as long
+declare function onig_get_callout_name_by_name_id(byval id as long) as OnigUChar ptr
+declare function onig_get_callout_num_by_tag(byval reg as OnigRegex, byval tag as const OnigUChar ptr, byval tag_end as const OnigUChar ptr) as long
+declare function onig_get_callout_data_by_tag(byval reg as OnigRegex, byval mp as OnigMatchParam ptr, byval tag as const OnigUChar ptr, byval tag_end as const OnigUChar ptr, byval slot as long, byval type_ as OnigType ptr, byval val_ as OnigValue ptr) as long
+declare function onig_set_callout_data_by_tag(byval reg as OnigRegex, byval mp as OnigMatchParam ptr, byval tag as const OnigUChar ptr, byval tag_end as const OnigUChar ptr, byval slot as long, byval type_ as OnigType, byval val_ as OnigValue ptr) as long
+declare function onig_get_callout_data_by_tag_dont_clear_old(byval reg as OnigRegex, byval mp as OnigMatchParam ptr, byval tag as const OnigUChar ptr, byval tag_end as const OnigUChar ptr, byval slot as long, byval type_ as OnigType ptr, byval val_ as OnigValue ptr) as long
+declare function onig_get_callout_num_by_callout_args(byval args as OnigCalloutArgs ptr) as long
+declare function onig_get_callout_in_by_callout_args(byval args as OnigCalloutArgs ptr) as OnigCalloutIn
+declare function onig_get_name_id_by_callout_args(byval args as OnigCalloutArgs ptr) as long
+declare function onig_get_contents_by_callout_args(byval args as OnigCalloutArgs ptr) as const OnigUChar ptr
+declare function onig_get_contents_end_by_callout_args(byval args as OnigCalloutArgs ptr) as const OnigUChar ptr
+declare function onig_get_args_num_by_callout_args(byval args as OnigCalloutArgs ptr) as long
+declare function onig_get_passed_args_num_by_callout_args(byval args as OnigCalloutArgs ptr) as long
+declare function onig_get_arg_by_callout_args(byval args as OnigCalloutArgs ptr, byval index as long, byval type_ as OnigType ptr, byval val_ as OnigValue ptr) as long
+declare function onig_get_string_by_callout_args(byval args as OnigCalloutArgs ptr) as const OnigUChar ptr
+declare function onig_get_string_end_by_callout_args(byval args as OnigCalloutArgs ptr) as const OnigUChar ptr
+declare function onig_get_start_by_callout_args(byval args as OnigCalloutArgs ptr) as const OnigUChar ptr
+declare function onig_get_right_range_by_callout_args(byval args as OnigCalloutArgs ptr) as const OnigUChar ptr
+declare function onig_get_current_by_callout_args(byval args as OnigCalloutArgs ptr) as const OnigUChar ptr
+declare function onig_get_regex_by_callout_args(byval args as OnigCalloutArgs ptr) as OnigRegex
+declare function onig_get_retry_counter_by_callout_args(byval args as OnigCalloutArgs ptr) as culong
+declare function onig_callout_tag_is_exist_at_callout_num(byval reg as OnigRegex, byval callout_num as long) as long
+declare function onig_get_callout_tag_start(byval reg as OnigRegex, byval callout_num as long) as const OnigUChar ptr
+declare function onig_get_callout_tag_end(byval reg as OnigRegex, byval callout_num as long) as const OnigUChar ptr
+declare function onig_get_callout_data_dont_clear_old(byval reg as OnigRegex, byval mp as OnigMatchParam ptr, byval callout_num as long, byval slot as long, byval type_ as OnigType ptr, byval val_ as OnigValue ptr) as long
+declare function onig_get_callout_data_by_callout_args_self_dont_clear_old(byval args as OnigCalloutArgs ptr, byval slot as long, byval type_ as OnigType ptr, byval val_ as OnigValue ptr) as long
+declare function onig_get_callout_data(byval reg as OnigRegex, byval mp as OnigMatchParam ptr, byval callout_num as long, byval slot as long, byval type_ as OnigType ptr, byval val_ as OnigValue ptr) as long
+declare function onig_get_callout_data_by_callout_args(byval args as OnigCalloutArgs ptr, byval callout_num as long, byval slot as long, byval type_ as OnigType ptr, byval val_ as OnigValue ptr) as long
+declare function onig_get_callout_data_by_callout_args_self(byval args as OnigCalloutArgs ptr, byval slot as long, byval type_ as OnigType ptr, byval val_ as OnigValue ptr) as long
+declare function onig_set_callout_data(byval reg as OnigRegex, byval mp as OnigMatchParam ptr, byval callout_num as long, byval slot as long, byval type_ as OnigType, byval val_ as OnigValue ptr) as long
+declare function onig_set_callout_data_by_callout_args(byval args as OnigCalloutArgs ptr, byval callout_num as long, byval slot as long, byval type_ as OnigType, byval val_ as OnigValue ptr) as long
+declare function onig_set_callout_data_by_callout_args_self(byval args as OnigCalloutArgs ptr, byval slot as long, byval type_ as OnigType, byval val_ as OnigValue ptr) as long
+declare function onig_get_capture_range_in_callout(byval args as OnigCalloutArgs ptr, byval mem_num as long, byval begin as long ptr, byval end_ as long ptr) as long
+declare function onig_get_used_stack_size_in_callout(byval args as OnigCalloutArgs ptr, byval used_num as long ptr, byval used_bytes as long ptr) as long
+declare function onig_builtin_fail(byval args as OnigCalloutArgs ptr, byval user_data as any ptr) as long
+declare function onig_builtin_mismatch(byval args as OnigCalloutArgs ptr, byval user_data as any ptr) as long
+declare function onig_builtin_error(byval args as OnigCalloutArgs ptr, byval user_data as any ptr) as long
+declare function onig_builtin_count(byval args as OnigCalloutArgs ptr, byval user_data as any ptr) as long
+declare function onig_builtin_total_count(byval args as OnigCalloutArgs ptr, byval user_data as any ptr) as long
+declare function onig_builtin_max(byval args as OnigCalloutArgs ptr, byval user_data as any ptr) as long
+declare function onig_builtin_cmp(byval args as OnigCalloutArgs ptr, byval user_data as any ptr) as long
+declare function onig_setup_builtin_monitors_by_ascii_encoded_name(byval fp as any ptr) as long
+
+end extern
+#endif
diff --git a/inc/pdfgen.bi b/inc/pdfgen.bi
new file mode 100644
index 00000000..d6b3c646
--- /dev/null
+++ b/inc/pdfgen.bi
@@ -0,0 +1,203 @@
+'freebasic bindings for PDFGen
+' based on the C header files:
+'https://github.com/AndreRenaud/PDFGen
+'Simple C PDF Creation/Generation library. All contained a single C-file with header and no external library dependencies.
+'This is free and unencumbered software released into the public domain.
+'
+'Anyone is free to copy, modify, publish, use, compile, sell, or
+'distribute this software, either in source code form or as a compiled
+'binary, for any purpose, commercial or non-commercial, and by any
+'means.
+'
+'In jurisdictions that recognize copyright laws, the author or authors
+'of this software dedicate any and all copyright interest in the
+'software to the public domain. We make this dedication for the benefit
+'of the public at large and to the detriment of our heirs and
+'successors. We intend this dedication to be an overt act of
+'relinquishment in perpetuity of all present and future rights to this
+'software under copyright law.
+'
+'THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+'EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+'MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+'IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+'OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+'ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+'OTHER DEALINGS IN THE SOFTWARE.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef PDFGEN_H
+
+#define PDFGEN_H
+#include once "crt/stdint.bi"
+#include once "crt/stdio.bi"
+#inclib "PDFGen"
+
+extern "C"
+
+Type pdf_doc As Any Ptr
+Type pdf_object as any ptr
+type pdf_info
+ creator as zstring * 64
+ producer as zstring * 64
+ title as zstring * 64
+ author as zstring * 64
+ subject as zstring * 64
+ date as zstring * 64
+end type
+
+enum
+ IMAGE_PNG
+ IMAGE_JPG
+ IMAGE_PPM
+ IMAGE_BMP
+ IMAGE_UNKNOWN
+end enum
+
+enum
+ PNG_COLOR_GREYSCALE = 0
+ PNG_COLOR_RGB = 2
+ PNG_COLOR_INDEXED = 3
+ PNG_COLOR_GREYSCALE_A = 4
+ PNG_COLOR_RGBA = 6
+ PNG_COLOR_INVALID = 255
+end enum
+
+type png_header field = 1
+ width as ulong
+ height as ulong
+ bitDepth as ubyte
+ colorType as ubyte
+ deflate as ubyte
+ filtering as ubyte
+ interlace as ubyte
+end type
+
+type bmp_header field = 1
+ bfSize as ulong
+ bfReserved1 as ushort
+ bfReserved2 as ushort
+ bfOffBits as ulong
+ biSize as ulong
+ biWidth as long
+ biHeight as long
+ biPlanes as ushort
+ biBitCount as ushort
+ biCompression as ulong
+end type
+
+type jpeg_header
+ ncolours as long
+end type
+
+enum
+ PPM_BINARY_COLOR_RGB
+ PPM_BINARY_COLOR_GRAY
+end enum
+
+type ppm_header
+ size as uinteger
+ data_begin_pos as uinteger
+ color_space as long
+end type
+
+type pdf_img_info
+ image_format as long
+ width as ulong
+ height as ulong
+
+ union
+ bmp as bmp_header
+ jpeg as jpeg_header
+ png as png_header
+ ppm as ppm_header
+ end union
+end type
+
+type pdf_path_operation
+ op as byte
+ x1 as single
+ y1 as single
+ x2 as single
+ y2 as single
+ x3 as single
+ y3 as single
+end type
+
+#define PDF_INCH_TO_POINT(inch) csng((inch) * 72.0f)
+#define PDF_MM_TO_POINT(mm) csng(((mm) * 72.0f) / 25.4f)
+#define PDF_LETTER_WIDTH PDF_INCH_TO_POINT(8.5f)
+#define PDF_LETTER_HEIGHT PDF_INCH_TO_POINT(11.0f)
+#define PDF_A4_WIDTH PDF_MM_TO_POINT(210.0f)
+#define PDF_A4_HEIGHT PDF_MM_TO_POINT(297.0f)
+#define PDF_A3_WIDTH PDF_MM_TO_POINT(297.0f)
+#define PDF_A3_HEIGHT PDF_MM_TO_POINT(420.0f)
+#define PDF_RGB(r, g, b) culng(((((r) and &hff) shl 16) or (((g) and &hff) shl 8)) or ((b) and &hff))
+#define PDF_ARGB(a, r, g, b) culng(((culng(culng((a) and &hff) shl 24) or (((r) and &hff) shl 16)) or (((g) and &hff) shl 8)) or ((b) and &hff))
+#define PDF_RED PDF_RGB(&hff, 0, 0)
+#define PDF_GREEN PDF_RGB(0, &hff, 0)
+#define PDF_BLUE PDF_RGB(0, 0, &hff)
+#define PDF_BLACK PDF_RGB(0, 0, 0)
+#define PDF_WHITE PDF_RGB(&hff, &hff, &hff)
+const PDF_TRANSPARENT = culng(&hffu shl 24)
+
+enum
+ PDF_ALIGN_LEFT
+ PDF_ALIGN_RIGHT
+ PDF_ALIGN_CENTER
+ PDF_ALIGN_JUSTIFY
+ PDF_ALIGN_JUSTIFY_ALL
+ PDF_ALIGN_NO_WRITE
+end enum
+
+Declare Function pdf_create(ByVal Width As Single, ByVal height As Single, ByVal info As Const pdf_info Ptr) As pdf_doc Ptr
+declare sub pdf_destroy(byval pdf as pdf_doc ptr)
+declare function pdf_get_err(byval pdf as const pdf_doc ptr, byval errval as long ptr) as const zstring ptr
+declare sub pdf_clear_err(byval pdf as pdf_doc ptr)
+declare function pdf_set_font(byval pdf as pdf_doc ptr, byval font as const zstring ptr) as long
+declare function pdf_get_font_text_width(byval pdf as pdf_doc ptr, byval font_name as const zstring ptr, byval text as const zstring ptr, byval size as single, byval text_width as single ptr) as long
+declare function pdf_height(byval pdf as const pdf_doc ptr) as single
+declare function pdf_width(byval pdf as const pdf_doc ptr) as single
+Declare Function pdf_page_height(ByVal page As Const pdf_object Ptr) As Single
+declare function pdf_page_width(byval page as const pdf_object ptr) as single
+declare function pdf_append_page(byval pdf as pdf_doc ptr) as pdf_object ptr
+declare function pdf_get_page(byval pdf as pdf_doc ptr, byval page_number as long) as pdf_object ptr
+declare function pdf_page_set_size(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval width as single, byval height as single) as long
+declare function pdf_save(byval pdf as pdf_doc ptr, byval filename as const zstring ptr) as long
+declare function pdf_save_file(byval pdf as pdf_doc ptr, byval fp as FILE ptr) as long
+declare function pdf_add_text(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval text as const zstring ptr, byval size as single, byval xoff as single, byval yoff as single, byval colour as ulong) as long
+declare function pdf_add_text_rotate(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval text as const zstring ptr, byval size as single, byval xoff as single, byval yoff as single, byval angle as single, byval colour as ulong) as long
+declare function pdf_add_text_wrap(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval text as const zstring ptr, byval size as single, byval xoff as single, byval yoff as single, byval angle as single, byval colour as ulong, byval wrap_width as single, byval align as long, byval height as single ptr) as long
+declare function pdf_add_line(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x1 as single, byval y1 as single, byval x2 as single, byval y2 as single, byval width as single, byval colour as ulong) as long
+declare function pdf_add_cubic_bezier(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x1 as single, byval y1 as single, byval x2 as single, byval y2 as single, byval xq1 as single, byval yq1 as single, byval xq2 as single, byval yq2 as single, byval width as single, byval colour as ulong) as long
+declare function pdf_add_quadratic_bezier(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x1 as single, byval y1 as single, byval x2 as single, byval y2 as single, byval xq1 as single, byval yq1 as single, byval width as single, byval colour as ulong) as long
+declare function pdf_add_custom_path(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval operations as const pdf_path_operation ptr, byval operation_count as long, byval stroke_width as single, byval stroke_colour as ulong, byval fill_colour as ulong) as long
+declare function pdf_add_ellipse(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x as single, byval y as single, byval xradius as single, byval yradius as single, byval width as single, byval colour as ulong, byval fill_colour as ulong) as long
+declare function pdf_add_circle(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x as single, byval y as single, byval radius as single, byval width as single, byval colour as ulong, byval fill_colour as ulong) as long
+declare function pdf_add_rectangle(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x as single, byval y as single, byval width as single, byval height as single, byval border_width as single, byval colour as ulong) as long
+declare function pdf_add_filled_rectangle(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x as single, byval y as single, byval width as single, byval height as single, byval border_width as single, byval colour_fill as ulong, byval colour_border as ulong) as long
+declare function pdf_add_polygon(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x as single ptr, byval y as single ptr, byval count as long, byval border_width as single, byval colour as ulong) as long
+declare function pdf_add_filled_polygon(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x as single ptr, byval y as single ptr, byval count as long, byval border_width as single, byval colour as ulong) as long
+declare function pdf_add_bookmark(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval parent as long, byval name_ as const zstring ptr) as long
+declare function pdf_add_link(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x as single, byval y as single, byval width as single, byval height as single, byval target_page as pdf_object ptr, byval target_x as single, byval target_y as single) as long
+
+enum
+ PDF_BARCODE_128A
+ PDF_BARCODE_39
+ PDF_BARCODE_EAN13
+ PDF_BARCODE_UPCA
+ PDF_BARCODE_EAN8
+ PDF_BARCODE_UPCE
+end enum
+
+declare function pdf_add_barcode(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval code as long, byval x as single, byval y as single, byval width as single, byval height as single, byval string as const zstring ptr, byval colour as ulong) as long
+declare function pdf_add_image_data(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x as single, byval y as single, byval display_width as single, byval display_height as single, byval data_ as const ubyte ptr, byval len_ as uinteger) as long
+declare function pdf_add_rgb24(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x as single, byval y as single, byval display_width as single, byval display_height as single, byval data_ as const ubyte ptr, byval width as ulong, byval height as ulong) as long
+declare function pdf_add_grayscale8(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x as single, byval y as single, byval display_width as single, byval display_height as single, byval data_ as const ubyte ptr, byval width as ulong, byval height as ulong) as long
+declare function pdf_add_image_file(byval pdf as pdf_doc ptr, byval page as pdf_object ptr, byval x as single, byval y as single, byval display_width as single, byval display_height as single, byval image_filename as const zstring ptr) as long
+declare function pdf_parse_image_header(byval info as pdf_img_info ptr, byval data_ as const ubyte ptr, byval length as uinteger, byval err_msg as zstring ptr, byval err_msg_length as uinteger) as long
+
+end extern
+#endif
\ No newline at end of file
diff --git a/inc/tinyexpr.bi b/inc/tinyexpr.bi
new file mode 100644
index 00000000..c4669978
--- /dev/null
+++ b/inc/tinyexpr.bi
@@ -0,0 +1,79 @@
+''freebasic bindings for TINYEXPR
+' * TINYEXPR - Tiny recursive descent parser And evaluation engine in C
+' *And Is released under zlib license.
+' * Copyright (c) 2015-2020 Lewis Van Winkle
+' * http://CodePlea.com
+' * This software is provided 'as-is', without any express or implied
+' * warranty. In no event will the authors be held liable for any damages
+' * arising from the use of this software.
+' *
+' * Permission is granted to anyone to use this software for any purpose,
+' * including commercial applications, and to alter it and redistribute it
+' * freely, subject to the following restrictions:
+' *
+' * 1. The origin of this software must not be misrepresented; you must not
+' * claim that you wrote the original software. If you use this software
+' * in a product, an acknowledgement in the product documentation would be
+' * appreciated but is not required.
+' * 2. Altered source versions must be plainly marked as such, and must not be
+' * misrepresented as being the original software.
+' * 3. This notice may not be removed or altered from any source distribution.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+
+#ifndef TINYEXPR_H
+#define TINYEXPR_H
+#inclib "tinyexpr"
+
+extern "C"
+
+Type te_expr
+ type_ as long
+
+ Union
+ value as double
+ bound as const double ptr
+ function_ as const any ptr
+ end union
+
+ parameters(0 to 0) as any ptr
+end type
+
+enum
+ te_variable_ = 0
+ TE_FUNCTION0 = 8
+ TE_FUNCTION1
+ TE_FUNCTION2
+ TE_FUNCTION3
+ TE_FUNCTION4
+ TE_FUNCTION5
+ TE_FUNCTION6
+ TE_FUNCTION7
+ TE_CLOSURE0 = 16
+ TE_CLOSURE1
+ TE_CLOSURE2
+ TE_CLOSURE3
+ TE_CLOSURE4
+ TE_CLOSURE5
+ TE_CLOSURE6
+ TE_CLOSURE7
+ TE_FLAG_PURE = 32
+end enum
+
+Type te_variable
+ name_ As Const ZString Ptr
+ ADDRESS_ As Const Any Ptr
+ type_ as long
+ context as any ptr
+end type
+
+declare function te_interp(byval expression as const zstring ptr, byval error_ as long ptr) as double
+declare function te_compile(byval expression as const zstring ptr, byval variables as const te_variable ptr, byval var_count as long, byval error_ as long ptr) as te_expr ptr
+declare function te_eval(byval n as const te_expr ptr) as double
+declare sub te_print(byval n as const te_expr ptr)
+declare sub te_free(byval n as te_expr ptr)
+
+end extern
+#endif
diff --git a/inc/xlsxio/xlsxio_read.bi b/inc/xlsxio/xlsxio_read.bi
new file mode 100644
index 00000000..a2e0da39
--- /dev/null
+++ b/inc/xlsxio/xlsxio_read.bi
@@ -0,0 +1,64 @@
+'' FreeBASIC binding for XLSX I/O - 0.2.35
+''
+'' based on the C header files:
+'' XLSX I/O - C library for reading and writing .xlsx files by brechtsanders
+''XLSX I/O is released under the terms of the MIT License (MIT), see LICENSE.txt.
+''This means you are free to use XLSX I/O in any of your projects, from open source to commercial.
+''This library does not require Microsoft(R) Excel(TM) to be installed.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+#pragma once
+#ifndef INCLUDED_XLSXIO_READ_H
+
+#define INCLUDED_XLSXIO_READ_H
+#include once "crt/stdlib.bi"
+#include once "crt/stdint.bi"
+#include once "crt/time.bi"
+#inclib "xlsxio_read"
+#inclib "expat"
+#inclib "minizip"
+#inclib "z"
+extern "C"
+
+type XLSXIOCHAR as zstring
+
+Declare Sub xlsxioread_get_version(ByVal pmajor As Long Ptr, ByVal pminor As Long Ptr, ByVal pmicro As Long Ptr)
+declare function xlsxioread_get_version_string() as const zstring ptr
+Type xlsxioreader As Any Ptr
+Declare Function xlsxioread_open(ByVal filename As Const ZString Ptr) As xlsxioreader
+Declare Function xlsxioread_open_filehandle(ByVal filehandle As Long) As xlsxioreader
+declare function xlsxioread_open_memory(byval data as any ptr, byval datalen as ulongint, byval freedata as long) as xlsxioreader
+Declare Sub xlsxioread_close(ByVal HANDLE As xlsxioreader)
+Type xlsxioread_list_sheets_callback_fn As Function(ByVal name_ As Const ZString Ptr, ByVal callbackdata As Any Ptr) As Long
+Declare Sub xlsxioread_list_sheets(ByVal HANDLE As xlsxioreader, ByVal callback As xlsxioread_list_sheets_callback_fn, ByVal callbackdata As Any Ptr)
+
+const XLSXIOREAD_SKIP_NONE = 0
+const XLSXIOREAD_SKIP_EMPTY_ROWS = &h01
+const XLSXIOREAD_SKIP_EMPTY_CELLS = &h02
+const XLSXIOREAD_SKIP_ALL_EMPTY = XLSXIOREAD_SKIP_EMPTY_ROWS or XLSXIOREAD_SKIP_EMPTY_CELLS
+const XLSXIOREAD_SKIP_EXTRA_CELLS = &h04
+const XLSXIOREAD_SKIP_HIDDEN_ROWS = &h08
+type xlsxioread_process_cell_callback_fn as function(byval row as uinteger, byval col as uinteger, byval value as const zstring ptr, byval callbackdata as any ptr) as long
+type xlsxioread_process_row_callback_fn as function(byval row as uinteger, byval maxcol as uinteger, byval callbackdata as any ptr) as long
+Declare Function xlsxioread_process(ByVal HANDLE As xlsxioreader, ByVal sheetname As Const ZString Ptr, ByVal FLAGS As ULong, ByVal cell_callback As xlsxioread_process_cell_callback_fn, ByVal row_callback As xlsxioread_process_row_callback_fn, ByVal callbackdata As Any Ptr) As Long
+Type xlsxioreadersheetlist As Any Ptr
+
+Declare Function xlsxioread_sheetlist_open(ByVal HANDLE As xlsxioreader) As xlsxioreadersheetlist
+declare sub xlsxioread_sheetlist_close(byval sheetlisthandle as xlsxioreadersheetlist)
+declare function xlsxioread_sheetlist_next(byval sheetlisthandle as xlsxioreadersheetlist) as const zstring ptr
+Type xlsxioreadersheet As Any Ptr
+Declare Function xlsxioread_sheet_last_row_index(ByVal sheethandle As xlsxioreadersheet) As UInteger
+declare function xlsxioread_sheet_last_column_index(byval sheethandle as xlsxioreadersheet) as uinteger
+declare function xlsxioread_sheet_flags(byval sheethandle as xlsxioreadersheet) as ulong
+declare function xlsxioread_sheet_open(byval handle as xlsxioreader, byval sheetname as const zstring ptr, byval flags as ulong) as xlsxioreadersheet
+Declare Sub xlsxioread_sheet_close(ByVal sheethandle As xlsxioreadersheet)
+Declare Function xlsxioread_sheet_next_row(ByVal sheethandle As xlsxioreadersheet) As Long
+declare function xlsxioread_sheet_next_cell(byval sheethandle as xlsxioreadersheet) as zstring ptr
+declare function xlsxioread_sheet_next_cell_string(byval sheethandle as xlsxioreadersheet, byval pvalue as zstring ptr ptr) as long
+declare function xlsxioread_sheet_next_cell_int(byval sheethandle as xlsxioreadersheet, byval pvalue as longint ptr) as long
+declare function xlsxioread_sheet_next_cell_float(byval sheethandle as xlsxioreadersheet, byval pvalue as double ptr) as long
+declare function xlsxioread_sheet_next_cell_datetime(byval sheethandle as xlsxioreadersheet, byval pvalue as time_t ptr) as long
+Declare Sub xlsxioread_free(ByVal data_ As ZString Ptr)
+
+end extern
+#endif
diff --git a/inc/xlsxio/xlsxio_version.bi b/inc/xlsxio/xlsxio_version.bi
new file mode 100644
index 00000000..4ac60fd7
--- /dev/null
+++ b/inc/xlsxio/xlsxio_version.bi
@@ -0,0 +1,31 @@
+'' FreeBASIC binding for XLSX I/O - 0.2.35
+''
+'' based on the C header files:
+'' XLSX I/O - C library for reading and writing .xlsx files by brechtsanders
+''XLSX I/O is released under the terms of the MIT License (MIT), see LICENSE.txt.
+''This means you are free to use XLSX I/O in any of your projects, from open source to commercial.
+''This library does not require Microsoft(R) Excel(TM) to be installed.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+#pragma once
+
+#ifndef INCLUDED_XLSXIO_VERSION_H
+#define INCLUDED_XLSXIO_VERSION_H
+
+
+const XLSXIO_VERSION_MAJOR = 0
+const XLSXIO_VERSION_MINOR = 2
+const XLSXIO_VERSION_MICRO = 35
+
+#define XLSXIO_VERSION_STRINGIZE_(major, minor, micro) #major "." #minor "." #micro
+#define XLSXIO_VERSION_STRINGIZE(major, minor, micro) XLSXIO_VERSION_STRINGIZE_(major, minor, micro)
+#define XLSXIO_VERSION_STRING XLSXIO_VERSION_STRINGIZE(XLSXIO_VERSION_MAJOR, XLSXIO_VERSION_MINOR, XLSXIO_VERSION_MICRO)
+
+const XLSXIO_VERSION_ID = ((XLSXIO_VERSION_MAJOR * 10000) + (XLSXIO_VERSION_MINOR * 100)) + XLSXIO_VERSION_MICRO
+
+#define XLSXIOREAD_NAME "libxlsxio_read"
+#define XLSXIOWRITE_NAME "libxlsxio_write"
+#define XLSXIOREAD_FULLNAME XLSXIOREAD_NAME " " XLSXIO_VERSION_STRING
+#define XLSXIOWRITE_FULLNAME XLSXIOWRITE_NAME " " XLSXIO_VERSION_STRING
+
+#endif
diff --git a/inc/xlsxio/xlsxio_write.bi b/inc/xlsxio/xlsxio_write.bi
new file mode 100644
index 00000000..23b68ade
--- /dev/null
+++ b/inc/xlsxio/xlsxio_write.bi
@@ -0,0 +1,36 @@
+'' FreeBASIC binding for XLSX I/O - 0.2.35
+''
+'' based on the C header files:
+'' XLSX I/O - C library for reading and writing .xlsx files by brechtsanders
+''XLSX I/O is released under the terms of the MIT License (MIT), see LICENSE.txt.
+''This means you are free to use XLSX I/O in any of your projects, from open source to commercial.
+''This library does not require Microsoft(R) Excel(TM) to be installed.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+#pragma once
+#ifndef INCLUDED_XLSXIO_WRITE_H
+
+#define INCLUDED_XLSXIO_WRITE_H
+#include once "crt/stdlib.bi"
+#include once "crt/stdint.bi"
+#include once "crt/time.bi"
+#inclib "xlsxio_write"
+#inclib "minizip"
+#inclib "z"
+extern "C"
+
+Declare Sub xlsxiowrite_get_version(ByVal pmajor As Long Ptr, ByVal pminor As Long Ptr, ByVal pmicro As Long Ptr)
+declare function xlsxiowrite_get_version_string() as const zstring ptr
+Type xlsxiowriter As Any Ptr
+declare function xlsxiowrite_open(byval filename as const zstring ptr, byval sheetname as const zstring ptr) as xlsxiowriter
+Declare Function xlsxiowrite_close(ByVal HANDLE As xlsxiowriter) As Long
+declare sub xlsxiowrite_set_detection_rows(byval handle as xlsxiowriter, byval rows as uinteger)
+Declare Sub xlsxiowrite_set_row_height(ByVal HANDLE As xlsxiowriter, ByVal height As UInteger)
+Declare Sub xlsxiowrite_add_column(ByVal HANDLE As xlsxiowriter, ByVal name_ As Const ZString Ptr, ByVal width_ As Long)
+declare sub xlsxiowrite_add_cell_string(byval handle as xlsxiowriter, byval value as const zstring ptr)
+Declare Sub xlsxiowrite_add_cell_int(ByVal HANDLE As xlsxiowriter, ByVal value As LongInt)
+declare sub xlsxiowrite_add_cell_float(byval handle as xlsxiowriter, byval value as double)
+declare sub xlsxiowrite_add_cell_datetime(byval handle as xlsxiowriter, byval value as time_t)
+Declare Sub xlsxiowrite_next_row(ByVal HANDLE As xlsxiowriter)
+End Extern
+#endif
diff --git a/inc/xxhash.bi b/inc/xxhash.bi
new file mode 100644
index 00000000..24dfad57
--- /dev/null
+++ b/inc/xxhash.bi
@@ -0,0 +1,140 @@
+'freebasic bindings for xxHash - Extremely Fast Hash algorithm
+ '* Copyright (C) 2012-2023 Yann Collet
+ '*
+ '* BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
+ '*
+ '* Redistribution and use in source and binary forms, with or without
+ '* modification, are permitted provided that the following conditions are
+ '* met:
+ '*
+ '* * Redistributions of source code must retain the above copyright
+ '* notice, this list of conditions and the following disclaimer.
+ '* * Redistributions in binary form must reproduce the above
+ '* copyright notice, this list of conditions and the following disclaimer
+ '* in the documentation and/or other materials provided with the
+ '* distribution.
+ '*
+ '* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ '* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ '* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ '* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ '* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ '* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ '* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ '* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ '* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ '* (INCLUDING NEGLIGENCE Or OTHERWISE) ARISING IN Any WAY Out OF THE USE
+ '* OF This SOFTWARE, EVEN If ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ '' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+#ifndef XXH_PUBLIC_API
+#define XXH_PUBLIC_API
+#include once "crt/long.bi"
+#include once "crt/stddef.bi"
+#include once "crt/stdint.bi"
+#inclib "xxhash"
+extern "C"
+
+const XXHASH_H_5627135585666179 = 1
+
+const XXH_VERSION_MAJOR = 0
+const XXH_VERSION_MINOR = 8
+const XXH_VERSION_RELEASE = 3
+const XXH_VERSION_NUMBER = (((XXH_VERSION_MAJOR * 100) * 100) + (XXH_VERSION_MINOR * 100)) + XXH_VERSION_RELEASE
+declare function XXH_versionNumber() as ulong
+
+type XXH_errorcode as long
+enum
+ XXH_OK = 0
+ XXH_ERROR
+end enum
+
+type XXH32_hash_t as ulong
+declare function XXH32(byval input as const any ptr, byval length as uinteger, byval seed as XXH32_hash_t) as XXH32_hash_t
+type XXH32_state_t as XXH32_state_s
+declare function XXH32_createState() as XXH32_state_t ptr
+declare function XXH32_freeState(byval statePtr as XXH32_state_t ptr) as XXH_errorcode
+declare sub XXH32_copyState(byval dst_state as XXH32_state_t ptr, byval src_state as const XXH32_state_t ptr)
+declare function XXH32_reset(byval statePtr as XXH32_state_t ptr, byval seed as XXH32_hash_t) as XXH_errorcode
+declare function XXH32_update(byval statePtr as XXH32_state_t ptr, byval input as const any ptr, byval length as uinteger) as XXH_errorcode
+declare function XXH32_digest(byval statePtr as const XXH32_state_t ptr) as XXH32_hash_t
+
+type XXH32_canonical_t
+ digest(0 to 3) as ubyte
+end type
+
+declare sub XXH32_canonicalFromHash(byval dst as XXH32_canonical_t ptr, byval hash as XXH32_hash_t)
+declare function XXH32_hashFromCanonical(byval src as const XXH32_canonical_t ptr) as XXH32_hash_t
+#define XXH_HAS_ATTRIBUTE(x) 0
+const XXH_C23_VN = cast(clong, 201711)
+#define XXH_HAS_C_ATTRIBUTE(x) 0
+#define XXH_HAS_CPP_ATTRIBUTE(x) 0
+#define XXH_FALLTHROUGH
+#define XXH_NOESCAPE
+Type XXH64_hash_t As ULongInt
+Declare Function XXH64(ByVal Input As Const Any Ptr, ByVal length As UInteger, ByVal seed As XXH64_hash_t) As XXH64_hash_t
+type XXH64_state_t as XXH64_state_s
+
+declare function XXH64_createState() as XXH64_state_t ptr
+declare function XXH64_freeState(byval statePtr as XXH64_state_t ptr) as XXH_errorcode
+declare sub XXH64_copyState(byval dst_state as XXH64_state_t ptr, byval src_state as const XXH64_state_t ptr)
+declare function XXH64_reset(byval statePtr as XXH64_state_t ptr, byval seed as XXH64_hash_t) as XXH_errorcode
+declare function XXH64_update(byval statePtr as XXH64_state_t ptr, byval input as const any ptr, byval length as uinteger) as XXH_errorcode
+declare function XXH64_digest(byval statePtr as const XXH64_state_t ptr) as XXH64_hash_t
+
+type XXH64_canonical_t
+ digest(0 to sizeof(XXH64_hash_t) - 1) as ubyte
+end type
+
+declare sub XXH64_canonicalFromHash(byval dst as XXH64_canonical_t ptr, byval hash as XXH64_hash_t)
+declare function XXH64_hashFromCanonical(byval src as const XXH64_canonical_t ptr) as XXH64_hash_t
+const XXH_SCALAR = 0
+const XXH_SSE2 = 1
+const XXH_AVX2 = 2
+const XXH_AVX512 = 3
+const XXH_NEON = 4
+const XXH_VSX = 5
+const XXH_SVE = 6
+const XXH_LSX = 7
+declare function XXH3_64bits(byval input as const any ptr, byval length as uinteger) as XXH64_hash_t
+declare function XXH3_64bits_withSeed(byval input as const any ptr, byval length as uinteger, byval seed as XXH64_hash_t) as XXH64_hash_t
+const XXH3_SECRET_SIZE_MIN = 136
+declare function XXH3_64bits_withSecret(byval data_ as const any ptr, byval len_ as uinteger, byval secret as const any ptr, byval secretSize as uinteger) as XXH64_hash_t
+type XXH3_state_t as XXH3_state_s
+
+declare function XXH3_createState() as XXH3_state_t ptr
+declare function XXH3_freeState(byval statePtr as XXH3_state_t ptr) as XXH_errorcode
+declare sub XXH3_copyState(byval dst_state as XXH3_state_t ptr, byval src_state as const XXH3_state_t ptr)
+declare function XXH3_64bits_reset(byval statePtr as XXH3_state_t ptr) as XXH_errorcode
+declare function XXH3_64bits_reset_withSeed(byval statePtr as XXH3_state_t ptr, byval seed as XXH64_hash_t) as XXH_errorcode
+declare function XXH3_64bits_reset_withSecret(byval statePtr as XXH3_state_t ptr, byval secret as const any ptr, byval secretSize as uinteger) as XXH_errorcode
+declare function XXH3_64bits_update(byval statePtr as XXH3_state_t ptr, byval input as const any ptr, byval length as uinteger) as XXH_errorcode
+declare function XXH3_64bits_digest(byval statePtr as const XXH3_state_t ptr) as XXH64_hash_t
+
+type XXH128_hash_t
+ low64 as XXH64_hash_t
+ high64 as XXH64_hash_t
+end type
+
+declare function XXH3_128bits(byval data_ as const any ptr, byval len_ as uinteger) as XXH128_hash_t
+declare function XXH3_128bits_withSeed(byval data_ as const any ptr, byval len_ as uinteger, byval seed as XXH64_hash_t) as XXH128_hash_t
+declare function XXH3_128bits_withSecret(byval data_ as const any ptr, byval len_ as uinteger, byval secret as const any ptr, byval secretSize as uinteger) as XXH128_hash_t
+declare function XXH3_128bits_reset(byval statePtr as XXH3_state_t ptr) as XXH_errorcode
+declare function XXH3_128bits_reset_withSeed(byval statePtr as XXH3_state_t ptr, byval seed as XXH64_hash_t) as XXH_errorcode
+declare function XXH3_128bits_reset_withSecret(byval statePtr as XXH3_state_t ptr, byval secret as const any ptr, byval secretSize as uinteger) as XXH_errorcode
+declare function XXH3_128bits_update(byval statePtr as XXH3_state_t ptr, byval input as const any ptr, byval length as uinteger) as XXH_errorcode
+declare function XXH3_128bits_digest(byval statePtr as const XXH3_state_t ptr) as XXH128_hash_t
+declare function XXH128_isEqual(byval h1 as XXH128_hash_t, byval h2 as XXH128_hash_t) as long
+declare function XXH128_cmp(byval h128_1 as const any ptr, byval h128_2 as const any ptr) as long
+
+type XXH128_canonical_t
+ digest(0 to sizeof(XXH128_hash_t) - 1) as ubyte
+end type
+
+declare sub XXH128_canonicalFromHash(byval dst as XXH128_canonical_t ptr, byval hash as XXH128_hash_t)
+declare function XXH128_hashFromCanonical(byval src as const XXH128_canonical_t ptr) as XXH128_hash_t
+
+end extern
+#endif
diff --git a/inc/zstd/zstd.bi b/inc/zstd/zstd.bi
new file mode 100644
index 00000000..1573fd02
--- /dev/null
+++ b/inc/zstd/zstd.bi
@@ -0,0 +1,227 @@
+'' FreeBASIC binding for zstd-1.5.6
+'' based on the C header files:
+'' Main header file for the bfd library -- portable access to object files.
+''Zstandard, or zstd as short version, is a fast lossless compression algorithm,
+''targeting real-time compression scenarios at zlib-level and better compression ratios.
+''Zstandard is dual-licensed under BSD OR GPLv2.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+#pragma once
+#ifndef ZSTD_H_235446
+#define ZSTD_H_235446
+
+#include once "crt/limits.bi"
+#include once "crt/stddef.bi"
+#include once "zstd_errors.bi"
+#inclib "zstd"
+
+extern "C"
+
+
+#ifdef __FB_WIN32__
+ #define ZSTDLIB_VISIBLE
+ #define ZSTDLIB_HIDDEN
+#endif
+
+#define ZSTDLIB_API ZSTDLIB_VISIBLE
+const ZSTD_VERSION_MAJOR = 1
+const ZSTD_VERSION_MINOR = 5
+const ZSTD_VERSION_RELEASE = 6
+const ZSTD_VERSION_NUMBER = (((ZSTD_VERSION_MAJOR * 100) * 100) + (ZSTD_VERSION_MINOR * 100)) + ZSTD_VERSION_RELEASE
+declare function ZSTD_versionNumber() as ulong
+#define ZSTD_LIB_VERSION ZSTD_VERSION_MAJOR.ZSTD_VERSION_MINOR.ZSTD_VERSION_RELEASE
+#define ZSTD_QUOTE(str_) #str_
+#define ZSTD_EXPAND_AND_QUOTE(str_) ZSTD_QUOTE(str_)
+#define ZSTD_VERSION_STRING ZSTD_EXPAND_AND_QUOTE(ZSTD_LIB_VERSION)
+declare function ZSTD_versionString() as const zstring ptr
+const ZSTD_CLEVEL_DEFAULT = 3
+const ZSTD_MAGICNUMBER = &hFD2FB528
+const ZSTD_MAGIC_DICTIONARY = &hEC30A437
+const ZSTD_MAGIC_SKIPPABLE_START = &h184D2A50
+const ZSTD_MAGIC_SKIPPABLE_MASK = &hFFFFFFF0
+const ZSTD_BLOCKSIZELOG_MAX = 17
+const ZSTD_BLOCKSIZE_MAX = 1 shl ZSTD_BLOCKSIZELOG_MAX
+declare function ZSTD_compress(byval dst as any ptr, byval dstCapacity as uinteger, byval src as const any ptr, byval srcSize as uinteger, byval compressionLevel as long) as uinteger
+declare function ZSTD_decompress(byval dst as any ptr, byval dstCapacity as uinteger, byval src as const any ptr, byval compressedSize as uinteger) as uinteger
+const ZSTD_CONTENTSIZE_UNKNOWN = 0ull - 1
+const ZSTD_CONTENTSIZE_ERROR = 0ull - 2
+
+declare function ZSTD_getFrameContentSize(byval src as const any ptr, byval srcSize as uinteger) as ulongint
+declare function ZSTD_getDecompressedSize(byval src as const any ptr, byval srcSize as uinteger) as ulongint
+declare function ZSTD_findFrameCompressedSize(byval src as const any ptr, byval srcSize as uinteger) as uinteger
+#define ZSTD_MAX_INPUT_SIZE iif(sizeof(uinteger) = 8, &hFF00FF00FF00FF00ull, &hFF00FF00u)
+#define ZSTD_COMPRESSBOUND(srcSize) iif(cuint(srcSize) >= ZSTD_MAX_INPUT_SIZE, 0, ((srcSize) + ((srcSize) shr 8)) + iif((srcSize) < (128 shl 10), ((128 shl 10) - (srcSize)) shr 11, 0))
+'Declare Function ZSTD_compressBound(ByVal srcSize As UInteger) As UInteger
+declare function ZSTD_isError(byval code as uinteger) as ulong
+declare function ZSTD_getErrorName(byval code as uinteger) as const zstring ptr
+declare function ZSTD_minCLevel() as long
+declare function ZSTD_maxCLevel() as long
+declare function ZSTD_defaultCLevel() as long
+type ZSTD_CCtx as ZSTD_CCtx_s
+declare function ZSTD_createCCtx() as ZSTD_CCtx ptr
+declare function ZSTD_freeCCtx(byval cctx as ZSTD_CCtx ptr) as uinteger
+declare function ZSTD_compressCCtx(byval cctx as ZSTD_CCtx ptr, byval dst as any ptr, byval dstCapacity as uinteger, byval src as const any ptr, byval srcSize as uinteger, byval compressionLevel as long) as uinteger
+type ZSTD_DCtx as ZSTD_DCtx_s
+declare function ZSTD_createDCtx() as ZSTD_DCtx ptr
+declare function ZSTD_freeDCtx(byval dctx as ZSTD_DCtx ptr) as uinteger
+declare function ZSTD_decompressDCtx(byval dctx as ZSTD_DCtx ptr, byval dst as any ptr, byval dstCapacity as uinteger, byval src as const any ptr, byval srcSize as uinteger) as uinteger
+
+type ZSTD_strategy as long
+enum
+ ZSTD_fast = 1
+ ZSTD_dfast = 2
+ ZSTD_greedy = 3
+ ZSTD_lazy = 4
+ ZSTD_lazy2 = 5
+ ZSTD_btlazy2 = 6
+ ZSTD_btopt = 7
+ ZSTD_btultra = 8
+ ZSTD_btultra2 = 9
+end enum
+
+type ZSTD_cParameter as long
+enum
+ ZSTD_c_compressionLevel = 100
+ ZSTD_c_windowLog = 101
+ ZSTD_c_hashLog = 102
+ ZSTD_c_chainLog = 103
+ ZSTD_c_searchLog = 104
+ ZSTD_c_minMatch = 105
+ ZSTD_c_targetLength = 106
+ ZSTD_c_strategy = 107
+ ZSTD_c_targetCBlockSize = 130
+ ZSTD_c_enableLongDistanceMatching = 160
+ ZSTD_c_ldmHashLog = 161
+ ZSTD_c_ldmMinMatch = 162
+ ZSTD_c_ldmBucketSizeLog = 163
+ ZSTD_c_ldmHashRateLog = 164
+ ZSTD_c_contentSizeFlag = 200
+ ZSTD_c_checksumFlag = 201
+ ZSTD_c_dictIDFlag = 202
+ ZSTD_c_nbWorkers = 400
+ ZSTD_c_jobSize = 401
+ ZSTD_c_overlapLog = 402
+ ZSTD_c_experimentalParam1 = 500
+ ZSTD_c_experimentalParam2 = 10
+ ZSTD_c_experimentalParam3 = 1000
+ ZSTD_c_experimentalParam4 = 1001
+ ZSTD_c_experimentalParam5 = 1002
+ ZSTD_c_experimentalParam7 = 1004
+ ZSTD_c_experimentalParam8 = 1005
+ ZSTD_c_experimentalParam9 = 1006
+ ZSTD_c_experimentalParam10 = 1007
+ ZSTD_c_experimentalParam11 = 1008
+ ZSTD_c_experimentalParam12 = 1009
+ ZSTD_c_experimentalParam13 = 1010
+ ZSTD_c_experimentalParam14 = 1011
+ ZSTD_c_experimentalParam15 = 1012
+ ZSTD_c_experimentalParam16 = 1013
+ ZSTD_c_experimentalParam17 = 1014
+ ZSTD_c_experimentalParam18 = 1015
+ ZSTD_c_experimentalParam19 = 1016
+end enum
+
+type ZSTD_bounds
+ error as uinteger
+ lowerBound as long
+ upperBound as long
+end type
+
+declare function ZSTD_cParam_getBounds(byval cParam as ZSTD_cParameter) as ZSTD_bounds
+declare function ZSTD_CCtx_setParameter(byval cctx as ZSTD_CCtx ptr, byval param as ZSTD_cParameter, byval value as long) as uinteger
+declare function ZSTD_CCtx_setPledgedSrcSize(byval cctx as ZSTD_CCtx ptr, byval pledgedSrcSize as ulongint) as uinteger
+
+type ZSTD_ResetDirective as long
+enum
+ ZSTD_reset_session_only = 1
+ ZSTD_reset_parameters = 2
+ ZSTD_reset_session_and_parameters = 3
+end enum
+
+declare function ZSTD_CCtx_reset(byval cctx as ZSTD_CCtx ptr, byval reset as ZSTD_ResetDirective) as uinteger
+declare function ZSTD_compress2(byval cctx as ZSTD_CCtx ptr, byval dst as any ptr, byval dstCapacity as uinteger, byval src as const any ptr, byval srcSize as uinteger) as uinteger
+
+type ZSTD_dParameter as long
+enum
+ ZSTD_d_windowLogMax = 100
+ ZSTD_d_experimentalParam1 = 1000
+ ZSTD_d_experimentalParam2 = 1001
+ ZSTD_d_experimentalParam3 = 1002
+ ZSTD_d_experimentalParam4 = 1003
+ ZSTD_d_experimentalParam5 = 1004
+ ZSTD_d_experimentalParam6 = 1005
+end enum
+
+declare function ZSTD_dParam_getBounds(byval dParam as ZSTD_dParameter) as ZSTD_bounds
+declare function ZSTD_DCtx_setParameter(byval dctx as ZSTD_DCtx ptr, byval param as ZSTD_dParameter, byval value as long) as uinteger
+declare function ZSTD_DCtx_reset(byval dctx as ZSTD_DCtx ptr, byval reset as ZSTD_ResetDirective) as uinteger
+
+type ZSTD_inBuffer_s
+ src as const any ptr
+ size as uinteger
+ pos as uinteger
+end type
+
+type ZSTD_inBuffer as ZSTD_inBuffer_s
+
+type ZSTD_outBuffer_s
+ dst as any ptr
+ size as uinteger
+ pos as uinteger
+end type
+
+type ZSTD_outBuffer as ZSTD_outBuffer_s
+type ZSTD_CStream as ZSTD_CCtx
+declare function ZSTD_createCStream() as ZSTD_CStream ptr
+declare function ZSTD_freeCStream(byval zcs as ZSTD_CStream ptr) as uinteger
+
+type ZSTD_EndDirective as long
+enum
+ ZSTD_e_continue = 0
+ ZSTD_e_flush = 1
+ ZSTD_e_end = 2
+end enum
+
+declare function ZSTD_compressStream2(byval cctx as ZSTD_CCtx ptr, byval output as ZSTD_outBuffer ptr, byval input as ZSTD_inBuffer ptr, byval endOp as ZSTD_EndDirective) as uinteger
+declare function ZSTD_CStreamInSize() as uinteger
+declare function ZSTD_CStreamOutSize() as uinteger
+declare function ZSTD_initCStream(byval zcs as ZSTD_CStream ptr, byval compressionLevel as long) as uinteger
+declare function ZSTD_compressStream(byval zcs as ZSTD_CStream ptr, byval output as ZSTD_outBuffer ptr, byval input as ZSTD_inBuffer ptr) as uinteger
+declare function ZSTD_flushStream(byval zcs as ZSTD_CStream ptr, byval output as ZSTD_outBuffer ptr) as uinteger
+declare function ZSTD_endStream(byval zcs as ZSTD_CStream ptr, byval output as ZSTD_outBuffer ptr) as uinteger
+type ZSTD_DStream as ZSTD_DCtx
+declare function ZSTD_createDStream() as ZSTD_DStream ptr
+declare function ZSTD_freeDStream(byval zds as ZSTD_DStream ptr) as uinteger
+declare function ZSTD_initDStream(byval zds as ZSTD_DStream ptr) as uinteger
+declare function ZSTD_decompressStream(byval zds as ZSTD_DStream ptr, byval output as ZSTD_outBuffer ptr, byval input as ZSTD_inBuffer ptr) as uinteger
+declare function ZSTD_DStreamInSize() as uinteger
+declare function ZSTD_DStreamOutSize() as uinteger
+declare function ZSTD_compress_usingDict(byval ctx as ZSTD_CCtx ptr, byval dst as any ptr, byval dstCapacity as uinteger, byval src as const any ptr, byval srcSize as uinteger, byval dict as const any ptr, byval dictSize as uinteger, byval compressionLevel as long) as uinteger
+declare function ZSTD_decompress_usingDict(byval dctx as ZSTD_DCtx ptr, byval dst as any ptr, byval dstCapacity as uinteger, byval src as const any ptr, byval srcSize as uinteger, byval dict as const any ptr, byval dictSize as uinteger) as uinteger
+type ZSTD_CDict as ZSTD_CDict_s
+declare function ZSTD_createCDict(byval dictBuffer as const any ptr, byval dictSize as uinteger, byval compressionLevel as long) as ZSTD_CDict ptr
+declare function ZSTD_freeCDict(byval CDict as ZSTD_CDict ptr) as uinteger
+declare function ZSTD_compress_usingCDict(byval cctx as ZSTD_CCtx ptr, byval dst as any ptr, byval dstCapacity as uinteger, byval src as const any ptr, byval srcSize as uinteger, byval cdict as const ZSTD_CDict ptr) as uinteger
+type ZSTD_DDict as ZSTD_DDict_s
+declare function ZSTD_createDDict(byval dictBuffer as const any ptr, byval dictSize as uinteger) as ZSTD_DDict ptr
+declare function ZSTD_freeDDict(byval ddict as ZSTD_DDict ptr) as uinteger
+declare function ZSTD_decompress_usingDDict(byval dctx as ZSTD_DCtx ptr, byval dst as any ptr, byval dstCapacity as uinteger, byval src as const any ptr, byval srcSize as uinteger, byval ddict as const ZSTD_DDict ptr) as uinteger
+declare function ZSTD_getDictID_fromDict(byval dict as const any ptr, byval dictSize as uinteger) as ulong
+declare function ZSTD_getDictID_fromCDict(byval cdict as const ZSTD_CDict ptr) as ulong
+declare function ZSTD_getDictID_fromDDict(byval ddict as const ZSTD_DDict ptr) as ulong
+declare function ZSTD_getDictID_fromFrame(byval src as const any ptr, byval srcSize as uinteger) as ulong
+declare function ZSTD_CCtx_loadDictionary(byval cctx as ZSTD_CCtx ptr, byval dict as const any ptr, byval dictSize as uinteger) as uinteger
+declare function ZSTD_CCtx_refCDict(byval cctx as ZSTD_CCtx ptr, byval cdict as const ZSTD_CDict ptr) as uinteger
+declare function ZSTD_CCtx_refPrefix(byval cctx as ZSTD_CCtx ptr, byval prefix as const any ptr, byval prefixSize as uinteger) as uinteger
+declare function ZSTD_DCtx_loadDictionary(byval dctx as ZSTD_DCtx ptr, byval dict as const any ptr, byval dictSize as uinteger) as uinteger
+declare function ZSTD_DCtx_refDDict(byval dctx as ZSTD_DCtx ptr, byval ddict as const ZSTD_DDict ptr) as uinteger
+declare function ZSTD_DCtx_refPrefix(byval dctx as ZSTD_DCtx ptr, byval prefix as const any ptr, byval prefixSize as uinteger) as uinteger
+declare function ZSTD_sizeof_CCtx(byval cctx as const ZSTD_CCtx ptr) as uinteger
+declare function ZSTD_sizeof_DCtx(byval dctx as const ZSTD_DCtx ptr) as uinteger
+declare function ZSTD_sizeof_CStream(byval zcs as const ZSTD_CStream ptr) as uinteger
+declare function ZSTD_sizeof_DStream(byval zds as const ZSTD_DStream ptr) as uinteger
+declare function ZSTD_sizeof_CDict(byval cdict as const ZSTD_CDict ptr) as uinteger
+declare function ZSTD_sizeof_DDict(byval ddict as const ZSTD_DDict ptr) as uinteger
+
+end extern
+#endif
diff --git a/inc/zstd/zstd_errors.bi b/inc/zstd/zstd_errors.bi
new file mode 100644
index 00000000..38e73d7f
--- /dev/null
+++ b/inc/zstd/zstd_errors.bi
@@ -0,0 +1,69 @@
+'' FreeBASIC binding for zstd-1.5.6
+'' based on the C header files:
+'' Main header file for the bfd library -- portable access to object files.
+''Zstandard, or zstd as short version, is a fast lossless compression algorithm,
+''targeting real-time compression scenarios at zlib-level and better compression ratios.
+''Zstandard is dual-licensed under BSD OR GPLv2.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+#pragma once
+#ifndef ZSTD_ERRORS_H_398273423
+#define ZSTD_ERRORS_H_398273423
+
+#include once "crt/stddef.bi"
+
+extern "C"
+
+#define ZSTD_ERRORS_H_398273423
+
+#ifdef __FB_WIN32__
+ #define ZSTDERRORLIB_VISIBLE
+ #define ZSTDERRORLIB_HIDDEN
+#endif
+
+#define ZSTDERRORLIB_API ZSTDERRORLIB_VISIBLE
+
+type ZSTD_ErrorCode as long
+enum
+ ZSTD_error_no_error = 0
+ ZSTD_error_GENERIC = 1
+ ZSTD_error_prefix_unknown = 10
+ ZSTD_error_version_unsupported = 12
+ ZSTD_error_frameParameter_unsupported = 14
+ ZSTD_error_frameParameter_windowTooLarge = 16
+ ZSTD_error_corruption_detected = 20
+ ZSTD_error_checksum_wrong = 22
+ ZSTD_error_literals_headerWrong = 24
+ ZSTD_error_dictionary_corrupted = 30
+ ZSTD_error_dictionary_wrong = 32
+ ZSTD_error_dictionaryCreation_failed = 34
+ ZSTD_error_parameter_unsupported = 40
+ ZSTD_error_parameter_combination_unsupported = 41
+ ZSTD_error_parameter_outOfBound = 42
+ ZSTD_error_tableLog_tooLarge = 44
+ ZSTD_error_maxSymbolValue_tooLarge = 46
+ ZSTD_error_maxSymbolValue_tooSmall = 48
+ ZSTD_error_stabilityCondition_notRespected = 50
+ ZSTD_error_stage_wrong = 60
+ ZSTD_error_init_missing = 62
+ ZSTD_error_memory_allocation = 64
+ ZSTD_error_workSpace_tooSmall = 66
+ ZSTD_error_dstSize_tooSmall = 70
+ ZSTD_error_srcSize_wrong = 72
+ ZSTD_error_dstBuffer_null = 74
+ ZSTD_error_noForwardProgress_destFull = 80
+ ZSTD_error_noForwardProgress_inputEmpty = 82
+ ZSTD_error_frameIndex_tooLarge = 100
+ ZSTD_error_seekableIO = 102
+ ZSTD_error_dstBuffer_wrong = 104
+ ZSTD_error_srcBuffer_wrong = 105
+ ZSTD_error_sequenceProducer_failed = 106
+ ZSTD_error_externalSequences_invalid = 107
+ ZSTD_error_maxCode = 120
+end enum
+
+declare function ZSTD_getErrorCode(byval functionResult as uinteger) as ZSTD_ErrorCode
+declare function ZSTD_getErrorString(byval code as ZSTD_ErrorCode) as const zstring ptr
+
+end extern
+#endif
diff --git a/tests/cc_array_demo.bas b/tests/cc_array_demo.bas
new file mode 100644
index 00000000..d443fbf7
--- /dev/null
+++ b/tests/cc_array_demo.bas
@@ -0,0 +1,25 @@
+
+#include once "collections-c/cc_array.bi"
+#include once "crt/stdio.bi"
+#inclib "collectc"
+Dim ar As CC_Array Ptr
+ cc_array_new(@ar)
+ cc_array_add(ar, @!"Hello World!\n")
+ cc_array_add(ar, @"")
+ cc_array_add(ar, @"Ԫ")
+ Print "count of elements:" & cc_array_size(ar)
+ Dim str_ As Any Ptr
+ cc_array_get_at(ar, 1, @str_)
+ printf("element value with index 1:%s", str_)
+ Print
+ 'ɾԪ
+ Dim out_ As Any Ptr
+ cc_array_remove_at(ar, 1, @out_)
+ printf("removed value with index 1:%s", out_)
+ Print
+ Print "now array size:" & cc_array_size(ar)
+ Dim str1_ As Any Ptr
+ cc_array_get_at(ar, 1, @str1_)
+ printf("value with index 1:%s", str1_)
+ cc_array_destroy(ar)
+sleep
diff --git a/tests/cc_hashset_test.bas b/tests/cc_hashset_test.bas
new file mode 100644
index 00000000..6b7e9825
--- /dev/null
+++ b/tests/cc_hashset_test.bas
@@ -0,0 +1,23 @@
+
+#include once "collections-c/collectc.bi"
+
+Dim As CC_HashSet Ptr set
+cc_hashset_new(@set)
+dim as zstring ptr a = @"foo"
+dim as zstring ptr b = @"bar"
+dim as zstring ptr c = @"baz"
+Dim As ZString Ptr d = @"С"
+ cc_hashset_add(set, a)
+ cc_hashset_add(set, b)
+ cc_hashset_add(set, c)
+ cc_hashset_add(set, d)
+ print "hashset size:",cc_hashset_size(set)
+ Print "contains 'bar'?",cc_hashset_contains(set, @"bar")
+ dim as CC_HashSetIter iter
+ cc_hashset_iter_init(@iter, set)
+ Dim e As Any Ptr
+ While (cc_hashset_iter_next(@iter, @e) <> CC_ITER_END)
+ Print *Cast(ZString Ptr,e)
+ wend
+ cc_hashset_destroy(set)
+sleep
\ No newline at end of file
diff --git a/tests/cc_hashtable_demo.bas b/tests/cc_hashtable_demo.bas
new file mode 100644
index 00000000..db63a253
--- /dev/null
+++ b/tests/cc_hashtable_demo.bas
@@ -0,0 +1,16 @@
+
+#include once "collections-c/collectc.bi"
+#include once "crt/stdio.bi"
+ Dim As CC_HashTable Ptr table
+ cc_hashtable_new(@table)
+ Dim arr(1, 1) As ZString*10 = {{"1", "one"}, {"hello", "world"}}
+ For i As Integer= 0 To UBound(arr)
+ cc_hashtable_add(table, CPtr(Any Ptr, @arr(i,0)), CPtr(Any Ptr, @arr(i,1)))
+ Next
+ Print cc_hashtable_size(table) 'keys count
+ Dim out_ As Any Ptr
+ Dim ret As cc_stat = cc_hashtable_get(table, @"hello", @out_)'get value via key
+ If ret=cc_ok Then printf("%s",out_)
+
+ cc_hashtable_destroy(table)
+sleep
diff --git a/tests/cc_list_demo.bas b/tests/cc_list_demo.bas
new file mode 100644
index 00000000..dfbe23f4
--- /dev/null
+++ b/tests/cc_list_demo.bas
@@ -0,0 +1,12 @@
+#include once "crt/stdio.bi"
+#include once "Collections-C/collectc.bi"
+
+ Dim list As CC_List Ptr
+ cc_list_new(@list)
+ cc_list_add(list, @"a")
+ cc_list_add(list, @"n")
+ Dim s As Any Ptr
+ Dim ret As cc_stat = cc_list_get_at(list, 1, @s) 'get the list value with index 1
+ If ret = CC_OK Then printf("%s", s)
+ cc_list_destroy(list)
+ Sleep
diff --git a/tests/cc_queue_demo.bas b/tests/cc_queue_demo.bas
new file mode 100644
index 00000000..c614dbad
--- /dev/null
+++ b/tests/cc_queue_demo.bas
@@ -0,0 +1,19 @@
+#include once "collections-c/collectc.bi"
+
+Dim As CC_Queue Ptr q1
+cc_queue_new(@q1)
+Dim As Long a, b, c
+a = 1
+b = 2
+c=3
+cc_queue_enqueue(q1, @a)
+cc_queue_enqueue(q1, @b)
+cc_queue_enqueue(q1, @c)
+Dim As CC_QueueIter iter
+cc_queue_iter_init(@iter, q1)
+Dim As Long Ptr e
+While (cc_queue_iter_next(@iter,@e) <> CC_ITER_END)
+ Print *e
+Wend
+cc_queue_destroy(q1)
+sleep
\ No newline at end of file
diff --git a/tests/cc_ring_buffer_demo.bas b/tests/cc_ring_buffer_demo.bas
new file mode 100644
index 00000000..2b549f00
--- /dev/null
+++ b/tests/cc_ring_buffer_demo.bas
@@ -0,0 +1,23 @@
+
+#include once "collections-c/collectc.bi"
+#include once "crt/stdio.bi"
+
+ Dim ring_buf As CC_Rbuf Ptr
+ cc_rbuf_new(@ring_buf)
+ ring_buf->SIZE = CUInt(100)
+ For i As Long = 0 To 99
+ cc_rbuf_enqueue(ring_buf, CULngInt(i))
+ Next
+
+ Print "size of ringbuffer" & cc_rbuf_size(ring_buf)
+
+ Dim buf As ULongInt
+ While (cc_rbuf_dequeue(ring_buf, @buf) = CC_OK)
+ buf = cc_rbuf_size(ring_buf)
+ printf(!"Read: %d\n", buf)
+ Wend
+
+ printf(!"\n===============\n")
+ Print "is ringbuffer empty",cc_rbuf_is_empty(ring_buf)
+ cc_rbuf_destroy(ring_buf)
+ Sleep
diff --git a/tests/cc_stack_demo.bas b/tests/cc_stack_demo.bas
new file mode 100644
index 00000000..5be377f9
--- /dev/null
+++ b/tests/cc_stack_demo.bas
@@ -0,0 +1,19 @@
+
+#include once "collections-c/collectc.bi"
+
+Dim As CC_Stack Ptr s
+cc_stack_new(@s)
+Dim As Long a, b, c
+a = 1
+b = 2
+c = 3
+cc_stack_push(s, cast(any ptr,@a))
+cc_stack_push(s, cast(any ptr,@b))
+cc_stack_push(s, cast(any ptr, @c))
+
+print "stack size:", cc_stack_size(s)
+Dim As Long Ptr peek_
+cc_stack_peek(s, cast(any ptr, @peek_))
+print *peek_
+cc_stack_destroy(s)
+sleep
\ No newline at end of file
diff --git a/tests/cjson_test.bas b/tests/cjson_test.bas
new file mode 100644
index 00000000..5260d746
--- /dev/null
+++ b/tests/cjson_test.bas
@@ -0,0 +1,25 @@
+#include "crt/stdio.bi"
+#include "cJSON.bi"
+
+Print *cJSON_Version
+
+Dim As cJSON Ptr json, json1,name_, sex, age,element
+Dim As ZString Ptr out_=@!"{\"Name\":\"测试\",\"sex\":\"man\",\"age\":19}"
+json = cJSON_Parse(out_)
+name_ = cJSON_GetObjectItem(json, "name")' //get keyvalue
+sex = cJSON_GetObjectItem(json, "sex")
+age = cJSON_GetObjectItem(json, "age")
+cJSON_SetIntValue(age, 33) 'set a new agevalue.
+printf(!"name:%s,sex:%s,age:%d\n", name_->valuestring, sex->valuestring, age->valueint)
+
+Dim As ZString Ptr out1 = @"[1,2,3]"
+json1 = cJSON_Parse(out1)
+
+cJSON_ArrayForEach(element, json1) 'loop in an array
+print element->valueint
+cJSON_nextForEach
+
+cJSON_Delete(json)
+cJSON_Delete(json1)
+Sleep
+
diff --git a/tests/duckdb_test.bas b/tests/duckdb_test.bas
new file mode 100644
index 00000000..aa89d6ca
--- /dev/null
+++ b/tests/duckdb_test.bas
@@ -0,0 +1,48 @@
+#include once "duckdb.bi"
+#include once "crt/stdio.bi"
+
+ Dim db As duckdb_database = NULL
+ Dim con As duckdb_connection = NULL
+ Dim result As duckdb_result
+ If duckdb_open(NULL, @db) = DuckDBError Then
+ fprintf(stderr, !"Failed to open database\n")
+ Goto cleanup
+ End If
+ If duckdb_connect(db, @con) = DuckDBError Then
+ fprintf(stderr, !"Failed to open connection\n")
+ Goto cleanup
+ End If
+ If duckdb_query(con, "CREATE TABLE integers(i INTEGER, j INTEGER);", NULL) = DuckDBError Then
+ fprintf(stderr, !"Failed to query database\n")
+ Goto cleanup
+ End If
+ If duckdb_query(con, "INSERT INTO integers VALUES (3, 4), (5, 6), (7, NULL);", NULL) = DuckDBError Then
+ fprintf(stderr, !"Failed to query database\n")
+ Goto cleanup
+ End If
+ If duckdb_query(con, "SELECT * FROM integers", @result) = DuckDBError Then
+ fprintf(stderr, !"Failed to query database\n")
+ Goto cleanup
+ End If
+ Scope' If True Then
+ Dim row_count As idx_t = duckdb_row_count(@result)
+ Dim column_count As idx_t = duckdb_column_count(@result)
+ For i As UInteger = 0 To column_count -1
+ printf("%s ", duckdb_column_name(@result, i))
+ Next
+ printf(!"\n")
+
+ For row_idx As UInteger = 0 To row_count-1
+ For col_idx As UInteger = 0 To column_count -1
+ Dim As ZString Ptr Val_ = duckdb_value_varchar(@result, col_idx, row_idx)
+ printf("%s ", Val_)
+ duckdb_free(Val_)
+ Next
+ printf(!"\n")
+ Next
+ End Scope ' End If
+cleanup :
+ duckdb_destroy_result(@result)
+ duckdb_disconnect(@con)
+ duckdb_close(@db)
+ Sleep
diff --git a/tests/iniparser_test.bas b/tests/iniparser_test.bas
new file mode 100644
index 00000000..5cbc5eaa
--- /dev/null
+++ b/tests/iniparser_test.bas
@@ -0,0 +1,53 @@
+#include once "iniparser.bi"
+
+Private Sub create_empty_ini_file()
+ Dim As FILE Ptr ini= fopen("example.ini", "w")
+ If (ini = NULL) Then
+ fprintf(stderr, "iniparser: cannot create example.ini\n")
+ Exit Sub
+ End If
+ fclose(ini)
+End Sub
+
+Private Function write_to_ini(ByVal ini_name As Const ZString Ptr) As Long
+ Dim dictionary As Any Ptr
+ Dim As FILE Ptr ini_file
+ Dim ret As Long = 0
+ If ini_name = 0 Then
+ fprintf(stderr, !"Invalid argurment\n")
+ Return -1
+ End If
+ dictionary = iniparser_load(ini_name)
+ If dictionary = 0 Then
+ fprintf(stderr, !"cannot parse file: %s\n", ini_name)
+ Return -1
+ End If
+ ret = iniparser_set(dictionary, "Pizza", NULL)
+ If ret < 0 Then
+ fprintf(stderr, !"cannot set section in: %s\n", ini_name)
+ ret = -1
+ Goto free_dict
+ End If
+ ret = iniparser_set(dictionary, "Pizza:Cheese", "TRUE")
+ If ret < 0 Then
+ fprintf(stderr, !"cannot set key/value in: %s\n", ini_name)
+ ret = -1
+ Goto free_dict
+ End If
+ ini_file = fopen(ini_name, "w+")
+ If ini_file = 0 Then
+ fprintf(stderr, !"iniparser: cannot create example.ini\n")
+ ret = -1
+ Goto free_dict
+ End If
+ iniparser_dump_ini(dictionary, ini_file)
+ fclose(ini_file)
+ free_dict: iniparser_freedict(dictionary)
+ Return ret
+End Function
+
+ Dim ret As Long
+ create_empty_ini_file()
+ ret = write_to_ini("example.ini") 'generate the ini file
+ Print "done,please chck the ini file."
+Sleep
diff --git a/tests/libcalg-test.bas b/tests/libcalg-test.bas
new file mode 100644
index 00000000..1ab49a76
--- /dev/null
+++ b/tests/libcalg-test.bas
@@ -0,0 +1,96 @@
+' VisualFreeBasic 5.9.4 ԶԼ
+'[VFB_PROJECT_SETUP_START]
+'NumObjects=1
+'ProjectName=libcalg-test
+'CompilationMode=0
+'CompilationDebug=0
+'ProjectType=GUI
+'UseGDIPlus=0
+'ShowConsole=1
+'MultiLanguage=0
+'OmitInformation=0
+'StartupIcon=
+'UseWinXPthemes=1
+'StrUnicode=0
+'UseAdminPriv=0
+'DeleteGeneratedCode=1
+'Namespace=0
+'AutoAdd64=0
+'AddCompOps=
+'LastRunFilename=libcalg-test
+'Major=0
+'Minor=0
+'Revision=0
+'Build=0
+'FileMajor=0
+'FileMinor=0
+'FileRevision=0
+'FileBuild=1
+'AutoIncrement=3
+'DefaultCompiler=32
+'Comments=
+'CompanyName=
+'FileDescription=
+'LegalCopyrights=
+'LegalTrademarks=
+'ProductName=
+
+'Module=.\libcalg-test.bas|0|0||Yes|
+'TopTab=.\libcalg-test.bas|True|43|1531
+'[VFB_PROJECT_SETUP_END]
+#include once "libcalg.bi"
+#ifdef __fb_64bit__
+#libpath "win64"
+#else
+#libpath "win32"
+#endif
+'test arraylist
+scope
+ Dim arraylist As ArrayList Ptr
+ Dim st As ArrayListValue
+ ArrayList = arraylist_new(0)
+ Dim As Long v1, v2, v3, v4
+ v1=1:v2=3:v3=7:v4=10
+ arraylist_append(arraylist, Cast(Any Ptr,@v1))
+ arraylist_append(arraylist, Cast(Any Ptr,@v2))
+ arraylist_append(arraylist, Cast(Any Ptr,@v3))
+ arraylist_append(ArrayList, Cast(Any Ptr,@v4))
+ Print "SIZE of arraylist:",ArrayList->length
+ For i As Integer = 0 To ArrayList->length -1
+ Print "element(" & i &") value:";*Cast(Long Ptr,ArrayList->Data_[i])
+ Next
+ arraylist_free(ArrayList)
+End Scope
+
+Scope
+ print "------------set test-----------------"
+ Dim numbers1(0 To ...) As Long = {1, 2, 3, 4, 5, 6, 7}
+ dim numbers2(0 to ...) as long = {5, 6, 7, 8, 9, 10, 11}
+ Dim i As Long
+ Dim As Set Ptr set1 ,set2,result_set
+
+ set1 = set_new(@int_hash, @int_equal)
+ For i = 0 To 6
+ set_insert(set1, @numbers1(i))
+ Next
+
+ set2 = set_new(@int_hash, @int_equal)
+ For i = 0 To 6
+ set_insert(set2, @numbers2(i))
+ Next
+
+ result_set = set_intersection(set1, set2)
+ Print "size of set",set_num_entries(result_set)
+ Dim iterator As SetIterator
+ Dim value As Any Ptr
+ set_iterate(result_set, @iterator)
+ Print "intersection of numbers1 and numbers2:"
+ While set_iter_has_more(@iterator)
+ value = set_iter_next(@iterator)
+ Print *Cast(Long Ptr,value)
+ Wend
+ set_free(set1)
+ set_free(set2)
+ set_free(result_set)
+ End Scope
+sleep
diff --git a/tests/llhttp_test.bas b/tests/llhttp_test.bas
new file mode 100644
index 00000000..e3826642
--- /dev/null
+++ b/tests/llhttp_test.bas
@@ -0,0 +1,25 @@
+#include once "crt/stdio.bi"
+#include once "llhttp.bi"
+#include once "crt/string.bi"
+
+Private Function handle_on_message_complete cdecl (ByVal parser As llhttp_t Ptr) As Long
+ fprintf(stdout, !"Message completed!\n")
+ Return 0
+End Function
+
+ Dim As llhttp_t parser
+ Dim As llhttp_settings_t settings
+ llhttp_settings_init(@settings)
+ settings.on_message_complete = CPtr(Any Ptr,@handle_on_message_complete)
+ llhttp_init(@parser, HTTP_BOTH, @settings)
+ Dim request As String= !"GET / HTTP/1.1\r\n\r\n"
+ Dim request_len As UInteger = strlen(request)
+
+ Dim err_ As llhttp_errno= llhttp_execute(@parser, request, request_len)
+
+ If err_ = HPE_OK Then
+ fprintf(stdout, !"Successfully parsed!\n")
+ else
+ fprintf(stderr, !"Parse error: %s %s\n", llhttp_errno_name(err_), parser.reason)
+ end if
+sleep
\ No newline at end of file
diff --git a/tests/lodepng_decode_test.bas b/tests/lodepng_decode_test.bas
new file mode 100644
index 00000000..eef1531d
--- /dev/null
+++ b/tests/lodepng_decode_test.bas
@@ -0,0 +1,66 @@
+
+#include once "lodepng.bi"
+#include once "crt/stdio.bi"
+#include once "crt/stdlib.bi"
+
+private sub decodeOneStep(byval filename as const zstring ptr)
+ Dim error_ As ULong
+ dim image as ubyte ptr = 0
+ Dim Width_ As ULong
+ Dim height As ULong
+ error_ = lodepng_decode32_file(@image, @Width_, @height, filename)
+ if error_ then
+ printf(!"error %u: %s\n", error_, lodepng_error_text(error_))
+ end if
+ free(image)
+end sub
+
+private sub decodeTwoSteps(byval filename as const zstring ptr)
+ dim error_ as ulong
+ dim image as ubyte ptr = 0
+ Dim width_ As ULong
+ dim height as ulong
+ Dim png As UByte Ptr = 0
+ dim pngsize as uinteger
+ error_ = lodepng_load_file(@png, @pngsize, filename)
+ if error_ = 0 then
+ error_ = lodepng_decode32(@image, @width_, @height, png, pngsize)
+ end if
+ if error_ then
+ printf(!"error %u: %s\n", error_, lodepng_error_text(error_))
+ end if
+ free(png)
+ free(image)
+end sub
+
+Private Sub decodeWithState(ByVal filename As Const ZString Ptr)
+ dim error_ as ulong
+ Dim image As UByte Ptr = 0
+ Dim width_ As ULong
+ dim height as ulong
+ Dim png As UByte Ptr = 0
+ dim pngsize as uinteger
+ Dim As LodePNGState state
+ lodepng_state_init(@state)
+ error_ = lodepng_load_file(@png, @pngsize, filename)
+ if error_ = 0 then
+ error_ = lodepng_decode(@image, @width_, @height, @state, png, pngsize)
+ end if
+ if error_ then
+ printf(!"error %u: %s\n", error_, lodepng_error_text(error_))
+ end if
+ free(png)
+ lodepng_state_cleanup(@state)
+ free(image)
+End Sub
+
+
+Dim argc As Long = __FB_ARGC__
+ If argc <> 2 Then
+ printf(!"wrong arguments\n")
+ printf(!"usage:\n")
+ End
+ End If
+ Dim pngFilename As String = Command(1)
+ decodeWithState(pngFilename)
+print "ok"
\ No newline at end of file
diff --git a/tests/lodepng_encode_test.bas b/tests/lodepng_encode_test.bas
new file mode 100644
index 00000000..1b196dec
--- /dev/null
+++ b/tests/lodepng_encode_test.bas
@@ -0,0 +1,65 @@
+
+#include once "lodepng.bi"
+#include once "crt/stdio.bi"
+#include once "crt/stdlib.bi"
+
+Private Sub encodeOneStep(ByVal filename As Const ZString Ptr, ByVal image As Const UByte Ptr, ByVal width_ As ULong, ByVal height As ULong)
+ Dim error_ As ULong = lodepng_encode32_file(filename, image, width_, height)
+ if error_ then
+ printf(!"error %u: %s\n", error_, lodepng_error_text(error_))
+ end if
+End Sub
+
+Private Sub encodeTwoSteps(ByVal filename As Const ZString Ptr, ByVal image As Const UByte Ptr, ByVal width_ As ULong, ByVal height As ULong)
+ dim png as ubyte ptr
+ dim pngsize as uinteger
+ Dim error_ As ULong = lodepng_encode32(@png, @pngsize, image, width_, height)
+ If error_ = 0 Then
+ lodepng_save_file(png, pngsize, filename)
+ end if
+ if error_ then
+ printf(!"error %u: %s\n", error_, lodepng_error_text(error_))
+ end if
+ free(png)
+end sub
+
+Private Sub encodeWithState(ByVal filename As Const ZString Ptr, ByVal image As Const UByte Ptr, ByVal width_ As ULong, ByVal height As ULong)
+ dim error_ as ulong
+ Dim png As UByte Ptr
+ Dim pngsize As UInteger
+ Dim As LodePNGState state
+ lodepng_state_init(@state)
+ error_ = lodepng_encode(@png, @pngsize, image, width_, height, @state)
+ If error_ = 0 Then
+ lodepng_save_file(png, pngsize, filename)
+ end if
+ if error_ then
+ printf(!"error %u: %s\n", error_, lodepng_error_text(error_))
+ end if
+ lodepng_state_cleanup(@state)
+ free(png)
+end sub
+
+Dim argc As Long = __FB_ARGC__
+ If argc <> 2 Then
+ printf(!"wrong arguments\n")
+ printf(!"usage:\n")
+ End
+ End If
+ Dim pngFilename As String = Command(1)
+ Dim width_ As ULong = 512
+ dim height as ulong = 512
+ Dim image As UByte Ptr = malloc((width_ * height) * 4)
+ Dim x As ULong
+ Dim y As ULong
+ For y = 0 To height -1
+ For x = 0 To width_ -1
+ image[4 * width_ * y + 4 * x + 0] = 255 * not (x And y)
+ image[4 * width_ * y + 4 * x + 1] = x Xor y
+ image[4 * width_ * y + 4 * x + 2] = x Or y
+ image[4 * width_ * y + 4 * x + 3] = 255
+ Next
+ Next
+ encodeOneStep(pngFilename, image, width_, height)
+ free(image)
+ Print "done "
\ No newline at end of file
diff --git a/tests/mujs_test.bas b/tests/mujs_test.bas
new file mode 100644
index 00000000..cfcc0f97
--- /dev/null
+++ b/tests/mujs_test.bas
@@ -0,0 +1,16 @@
+#include once "crt/stdio.bi"
+#include once "mujs/mujs.bi"
+'test for mujs library--MuJS is a lightweight Javascript interpreter designed for embedding in other software to extend them with scripting capabilities.
+
+Private Sub hello(ByVal J As js_State Ptr)
+ Dim name_ As Const ZString Ptr = js_tostring(J, 1)
+ printf(!"Hello, %s!\n", name_)
+ js_pushundefined(J)
+End Sub
+
+ Dim As js_State Ptr J = js_newstate(NULL, NULL, JS_STRICT)
+ js_newcfunction(J, Cast(Any Ptr, @hello), "hello", 1)
+ js_setglobal(J, "hello")
+ js_dostring(J, "hello('world');")
+ js_freestate(J)
+ Sleep
diff --git a/tests/my_basic_test1.bas b/tests/my_basic_test1.bas
new file mode 100644
index 00000000..725ffc59
--- /dev/null
+++ b/tests/my_basic_test1.bas
@@ -0,0 +1,9 @@
+#include once "my_basic.bi"
+ Dim As mb_interpreter_t Ptr bas = NULL
+ mb_init()
+ mb_open(@bas)
+ mb_load_string(bas, "print 22 / 7;", True)
+ mb_run(bas, True)
+ mb_close(@bas)
+ mb_dispose()
+ Sleep
\ No newline at end of file
diff --git a/tests/my_basic_test2.bas b/tests/my_basic_test2.bas
new file mode 100644
index 00000000..dc70cc1c
--- /dev/null
+++ b/tests/my_basic_test2.bas
@@ -0,0 +1,18 @@
+#include once "my_basic.bi"
+'execute my_basic script in freebasic
+Dim bas As mb_interpreter_t Ptr = NULL
+ Dim bVal1 As mb_value_t
+Dim As WString *255 StrTemp ="RetStr1 = """""& Chr(13, 10) _
+ &"def myAdd(a, b)"& Chr(13,10) _
+ &" Return a+b" & Chr(13,10) _
+ & "enddef "& Chr(13, 10) _
+ & "RetStr1 = Str(myAdd(2222, 3333)) "
+ mb_init()
+ mb_open(@bas)
+ mb_load_string(bas ,StrTemp ,True)
+ mb_run(bas ,True)
+ mb_debug_get(bas ,UCase("RetStr1") ,@bVal1)
+ mb_close(@bas)
+ mb_dispose()
+ Print "result of myAdd(2222,3333):",*bVal1.value.String
+ Sleep
\ No newline at end of file
diff --git a/tests/oniguruma_test.bas b/tests/oniguruma_test.bas
new file mode 100644
index 00000000..744f4492
--- /dev/null
+++ b/tests/oniguruma_test.bas
@@ -0,0 +1,49 @@
+#include once "crt/stdio.bi"
+#include once "crt/string.bi"
+#include once "oniguruma.bi"
+ Dim r As Long
+ Dim As UByte Ptr start ,range, end_
+ Dim As regex_t Ptr reg
+ Dim As OnigErrorInfo einfo
+ Dim As OnigRegion Ptr region
+ Dim As OnigEncoding use_encs(0)
+ Static pattern As UChar Ptr = CPtr(UChar Ptr, @"a(.*)b|[e-f]+")
+ Static str_ As UChar Ptr = CPtr(UChar Ptr, @"zzzzaffffffffb")
+ use_encs(0)=ONIG_ENCODING_EUC_CN' ONIG_ENCODING_ASCII
+ onig_initialize(@use_encs(0), SizeOf(use_encs) / SizeOf(use_encs(0)))
+ r = onig_new(@reg, pattern, pattern + strlen(CPtr(ZString Ptr, pattern)), ONIG_OPTION_WORD_IS_ASCII, ONIG_ENCODING_EUC_CN, ONIG_SYNTAX_default , @einfo)
+ If r <> ONIG_NORMAL Then
+ Dim s As ZString * ONIG_MAX_ERROR_MESSAGE_LEN
+ onig_error_code_to_str(CPtr(UChar Ptr, @s), r, @einfo)
+ fprintf(stderr, !"ERROR: %s\n", s)
+ Sleep
+ End
+ End If
+ region = onig_region_new()
+ end_ = str_ + strlen(CPtr(ZString Ptr, str_))
+ start = str_
+ range = end_
+ r = onig_search(reg, str_, end_, start, range, region, ONIG_OPTION_NONE)
+ if r >= 0 then
+ Dim i As Long
+ fprintf(stderr, !"match at %d\n", r)
+ For i=0 To region->num_regs-1
+ fprintf(stderr, !"%d: (%d-%d)\n", i, region->beg[i], region->end_[i])
+ Print "matched value:", Mid(*Cast(ZString Ptr,str_), region->beg[i]+1,region->end_[i]-region->beg[i])
+ Next
+ ElseIf r = ONIG_MISMATCH Then
+ fprintf(stderr, !"search fail\n")
+ Else
+ Dim s As ZString * ONIG_MAX_ERROR_MESSAGE_LEN
+ onig_error_code_to_str(cptr(UChar ptr, @s), r)
+ fprintf(stderr, !"ERROR: %s\n", s)
+ onig_region_free(region, 1)
+ onig_free(reg)
+ onig_end()
+ Sleep
+ End
+ end if
+ onig_region_free(region, 1)
+ onig_free(reg)
+ onig_end()
+ Sleep
diff --git a/tests/pdfgen_test.bas b/tests/pdfgen_test.bas
new file mode 100644
index 00000000..c5f9b6f0
--- /dev/null
+++ b/tests/pdfgen_test.bas
@@ -0,0 +1,19 @@
+#include once "pdfgen.bi"
+#include once "crt/stdint.bi"
+#include once "crt/stdio.bi"
+Dim As pdf_info info
+info.creator = "My software"
+info.producer = "My software"
+info.title = "My document"
+info.author = "My name"
+info.subject = "My subject"
+info.date = "Today"
+ Dim pdf As pdf_doc Ptr = pdf_create(csng((210.0f * 72.0f) / 25.4f), csng((297.0f * 72.0f) / 25.4f), @info)
+pdf_set_font(pdf, "Times-Roman")
+pdf_append_page(pdf)
+pdf_add_text(pdf, NULL, "This is text", 12, 50, 20, culng((((0 and &hff) shl 16) or ((0 and &hff) shl 8)) or (0 and &hff)))
+pdf_add_line(pdf, NULL, 50, 24, 150, 24, 3, culng((((0 and &hff) shl 16) or ((0 and &hff) shl 8)) or (0 and &hff)))
+pdf_save(pdf, "output.pdf")
+pdf_destroy(pdf)
+Print "done,pls check the left bottom of the Output.pdf"
+ Sleep
\ No newline at end of file
diff --git a/tests/tinyexpr_test.bas b/tests/tinyexpr_test.bas
new file mode 100644
index 00000000..4e19c8d6
--- /dev/null
+++ b/tests/tinyexpr_test.bas
@@ -0,0 +1,21 @@
+#include once "crt/stdio.bi"
+#include once "tinyexpr.bi"
+
+ Dim As Double x,y
+ Dim vars(1) As te_variable
+ vars(0).name_ = StrPtr("x") : vars(0).ADDRESS_ = @x
+ vars(1).name_ = StrPtr("y") : vars(1).ADDRESS_ = @y
+ Dim err_ As Long
+ Dim expr As te_expr Ptr = te_compile("sqrt(x^2+y^2)", @vars(0), 2, @err_)
+ If expr Then
+ x = 3:y = 4
+ Dim h1 As Double = te_eval(expr)
+ Print "sqrt(3^2+4^2)=",h1
+ x = 5:y = 12
+ Dim h2 As Double = te_eval(expr)
+ Print "sqrt(5^2+12^2)=",h2
+ te_free(expr)
+ else
+ printf(!"Parse error at %d\n", err_)
+ end if
+sleep
\ No newline at end of file
diff --git a/tests/tsttable_demo.bas b/tests/tsttable_demo.bas
new file mode 100644
index 00000000..a3d428b1
--- /dev/null
+++ b/tests/tsttable_demo.bas
@@ -0,0 +1,42 @@
+#include once "collections-c/collectc.bi"
+#include once "crt/stdio.bi"
+ ' create TSTTable
+ Dim tstTable As CC_TSTTable Ptr
+
+ If (cc_tsttable_new(@tstTable) <> CC_OK) Then
+ Print "failed to create tstTable "
+ Sleep:End
+ End If
+
+ ' add
+ Dim key1 As ZString Ptr = @"hello"
+ Dim value1 As ZString Ptr = @"world"
+ If (cc_tsttable_add(tstTable, key1, value1) <> CC_OK) Then
+ Print "Add key pair error",*key1,*value1
+ End If
+
+ Dim key2 As ZString Ptr = @"foo"
+ Dim value2 As ZString Ptr = @"bar"
+ If (cc_tsttable_add(tstTable, key2, value2) <> CC_OK) Then
+ Print "Add key pair error",*key2,*value2
+ End If
+
+ ' search value
+ Dim searchKey As ZString Ptr = @"hello"
+ Dim foundValue As ZString Ptr
+ Dim ret As cc_stat= cc_tsttable_get(tstTable, searchKey,@foundValue)
+ If (ret=cc_ok) Then
+ printf(!"Found value for key '%s': %s\n", searchKey, foundValue)
+ Else
+ printf(!"Key not found.\n")
+ End If
+
+ ' delete
+ If (cc_tsttable_remove(tstTable, key1,@value1) <> CC_OK) Then 'remove Add key pair
+ printf("Key1 remove failed.\n")
+ End If
+
+ ' clear TSTTable
+ cc_tsttable_destroy(tstTable)
+
+ Sleep
\ No newline at end of file
diff --git a/tests/xlsxio_readdemo.bas b/tests/xlsxio_readdemo.bas
new file mode 100644
index 00000000..4a1f4536
--- /dev/null
+++ b/tests/xlsxio_readdemo.bas
@@ -0,0 +1,43 @@
+#include once "xlsxio/xlsxio_read.bi"
+#include once "crt/stdio.bi"
+#ifdef __FB_WIN32__
+'switch Windows console to UTF-8
+ #include Once "windows.bi"
+ SetConsoleOutputCP(65001)
+#endif
+
+'open .xlsx file for reading
+Dim xlsxioread As xlsxioreader
+Dim filename As ZString Ptr = StrPtr("1.xlsx")
+xlsxioread = xlsxioread_open(filename)
+If xlsxioread= NULL Then
+ fprintf(stderr, "Error opening .xlsx file\n")
+ Sleep: End
+End If
+' read values from first sheet
+Dim value As ZString Ptr
+Dim sheet As xlsxioreadersheet
+Dim xrow As Long
+Dim sheetname As ZString Ptr = StrPtr("Sheet1")
+Print "Contents of first sheet:"
+sheet = xlsxioread_sheet_open(xlsxioread, sheetname,XLSXIOREAD_SKIP_EMPTY_ROWS)
+ 'read all rows
+ If sheet <> NULL Then
+ xrow = xlsxioread_sheet_next_row(sheet)
+ While xrow>0
+ value = xlsxioread_sheet_next_cell(sheet)
+ While value <> NULL
+ printf("%s\t", value)
+ xlsxioread_free(value)
+ value = xlsxioread_sheet_next_cell(sheet)
+ Wend
+ Print ""
+ xrow = xlsxioread_sheet_next_row(sheet)
+ Wend
+ xlsxioread_sheet_close(sheet)
+End If
+
+' clean up
+xlsxioread_close(xlsxioread)
+Sleep
+
diff --git a/tests/xlsxio_writedemo.bas b/tests/xlsxio_writedemo.bas
new file mode 100644
index 00000000..6e3b53fa
--- /dev/null
+++ b/tests/xlsxio_writedemo.bas
@@ -0,0 +1,29 @@
+#include "xlsxio/xlsxio_write.bi"
+#include once "crt/stdio.bi"
+
+'open .xlsx file for writing (will overwrite if it already exists)
+Var filename="2.xlsx"
+Dim handle As xlsxiowriter=xlsxiowrite_open(filename, "Sheet1")
+If (handle = NULL) Then
+ fprintf(stderr, "Error creating .xlsx file\n")
+ End
+End If
+
+' write column names
+xlsxiowrite_add_column(handle, "Col1", 16)
+xlsxiowrite_add_column(handle, "Col2", 0)
+xlsxiowrite_next_row(handle)
+
+'write data
+Dim i As Long
+For i = 0 To 999
+ xlsxiowrite_add_cell_string(handle, "Test")
+ xlsxiowrite_add_cell_int(handle, i)
+ xlsxiowrite_next_row(handle)
+Next
+
+' close .xlsx file
+xlsxiowrite_close(handle)
+Print "create and write data to 2.xlsx"
+Sleep
+
diff --git a/tests/xxhash_test.bas b/tests/xxhash_test.bas
new file mode 100644
index 00000000..c320a6fd
--- /dev/null
+++ b/tests/xxhash_test.bas
@@ -0,0 +1,12 @@
+#include once "xxhash.bi"
+#include once "crt/string.bi"
+ Dim buffer As ZString Ptr = @"Hello,World!"
+ Dim size As UInteger = strlen(buffer)
+ Dim seed As ULongInt = 0
+ if size = 0 then
+ Print "Empty buffer"
+ Sleep:End
+ end if
+ Dim As XXH64_hash_t hash = XXH64(buffer, size, seed)
+ Print "Hash value: ", hash
+ Sleep
\ No newline at end of file
diff --git a/tests/zstd_common.bi b/tests/zstd_common.bi
new file mode 100644
index 00000000..6a31a8fe
--- /dev/null
+++ b/tests/zstd_common.bi
@@ -0,0 +1,152 @@
+#pragma once
+#ifndef COMMON_H
+#define COMMON_H
+'it's only an helper file with functions easy to use in zstd test
+#include once "crt/stdlib.bi"
+#include once "crt/stdio.bi"
+#include once "crt/string.bi"
+#include once "crt/errno.bi"
+#include once "crt/sys/stat.bi"
+#include once "zstd/zstd.bi"
+
+extern "C"
+
+type COMMON_ErrorCode as long
+enum
+ ERROR_fsize = 1
+ ERROR_fopen = 2
+ ERROR_fclose = 3
+ ERROR_fread = 4
+ ERROR_fwrite = 5
+ ERROR_loadFile = 6
+ ERROR_saveFile = 7
+ ERROR_malloc = 8
+ ERROR_largeFile = 9
+end enum
+
+#macro CHECK(cond, __VA_ARGS__...)
+ if (cond) = 0 then
+ fprintf(stderr, "%s:%d CHECK(%s) failed: ", __FILE__, __LINE__, #cond)
+ fprintf(stderr, "" __VA_ARGS__)
+ fprintf(stderr, !"\n")
+ exit(1)
+ end if
+#endmacro
+#macro CHECK_ZSTD(fn)
+ scope
+ dim err as const uinteger = (fn)
+ CHECK(-(ZSTD_isError(err) = 0), "%s", ZSTD_getErrorName(err))
+ End Scope
+ #endmacro
+
+Private Function fsize_orDie(ByVal filename As Const ZString Ptr) As UInteger
+ dim st as stat
+ if stat(filename, @st) <> 0 then
+ perror(filename)
+ Print "errcode:" & ERROR_fsize
+ Exit Function
+ End If
+ dim fileSize as const off_t= st.st_size
+ dim size as const uinteger = cuint(fileSize)
+ If ((fileSize < 0) Or (fileSize <> CInt(size))) Then
+ fprintf(stderr, "%s : filesize too large \n", filename)
+ Print "errcode:" & ERROR_largeFile
+ Exit Function
+ end if
+ return size
+end function
+
+Private Function fopen_orDie(ByVal filename As Const ZString Ptr, ByVal instruction As Const ZString Ptr) As FILE Ptr
+ Dim inFile As FILE Const Ptr= fopen(filename, instruction)
+ If inFile Then
+ Return inFile
+ End If
+ perror(filename)
+ Print "errcode:" & ERROR_fopen
+ Exit Function
+End Function
+
+private sub fclose_orDie(byval file as FILE ptr)
+ if fclose(file) = 0 then
+ return
+ end if
+ perror("fclose")
+ Print "errcode:" & ERROR_fclose
+end sub
+
+Private Function fread_orDie(ByVal buffer As Any Ptr, ByVal sizeToRead As UInteger, ByVal file As FILE Ptr) As UInteger
+ dim readSize as const uinteger = fread(buffer, 1, sizeToRead, file)
+ if readSize = sizeToRead then
+ return readSize
+ end if
+ if feof(file) then
+ Return readSize
+ end if
+ perror("fread")
+ Print "errcode:" & ERROR_fread
+end function
+
+Private Function fwrite_orDie(ByVal buffer As Const Any Ptr, ByVal sizeToWrite As UInteger, ByVal file As FILE Ptr) As UInteger
+ Dim writtenSize As Const UInteger = fwrite(buffer, 1, sizeToWrite, file)
+ if writtenSize = sizeToWrite then
+ return sizeToWrite
+ End If
+ perror("fwrite")
+ Print "errcode:" &ERROR_fwrite
+End Function
+
+private function malloc_orDie(byval size as uinteger) as any ptr
+ dim buff as any const ptr = malloc(size)
+ if buff then
+ Return buff
+ end if
+ perror("malloc")
+ Print "errcode:" &ERROR_malloc
+end function
+
+Private Function loadFile_orDie(ByVal fileName As Const ZString Ptr, ByVal buffer As Any Ptr, ByVal bufferSize As UInteger) As UInteger
+ dim fileSize as uinteger = fsize_orDie(fileName)
+ scope
+ if (fileSize <= bufferSize) = 0 then
+ fprintf(stderr, "%s:%d CHECK(%s) failed: ", __FILE__, __LINE__, "fileSize <= bufferSize")
+ fprintf(stderr, "" "File too large!")
+ fprintf(stderr, !"\n")
+ Print 1
+ Exit Function
+ end if
+ end scope
+ dim inFile as FILE const ptr= fopen_orDie(fileName, "rb")
+ Dim readSize As UInteger = fread(buffer, 1, fileSize, inFile)
+ If readSize <> CUInt(fileSize) Then
+ fprintf(stderr, !"fread: %s : %s \n", fileName, strerror(errno))
+ Print "errcode:" & ERROR_fread
+ Exit Function
+ end if
+ fclose(inFile)
+ return fileSize
+end function
+
+Private Function mallocAndLoadFile_orDie(ByVal fileName As Const ZString Ptr, ByVal bufferSize As UInteger Ptr) As Any Ptr
+ dim fileSize as const uinteger = fsize_orDie(fileName)
+ (*bufferSize) = fileSize
+ dim buffer as any const ptr = malloc_orDie(*bufferSize)
+ loadFile_orDie(fileName, buffer, *bufferSize)
+ return buffer
+end function
+
+Private Sub saveFile_orDie(ByVal fileName As Const ZString Ptr, ByVal buff As Const Any Ptr, ByVal buffSize As UInteger)
+ Dim oFile As FILE Const Ptr= fopen_orDie(fileName, "wb")
+ Dim wSize As Const UInteger = fwrite(buff, 1, buffSize, oFile)
+ If wSize <> CUInt(buffSize) Then
+ fprintf(stderr, !"fwrite: %s : %s \n", fileName, strerror(errno))
+ Print "errcode:" & ERROR_fwrite
+ Exit sub
+ end if
+ If fclose(oFile) Then
+ perror(fileName)
+ Print "errcode:" & ERROR_fclose
+ End If
+end sub
+
+end extern
+#endif
\ No newline at end of file
diff --git a/tests/zstd_simple_compression.bas b/tests/zstd_simple_compression.bas
new file mode 100644
index 00000000..6ab2f884
--- /dev/null
+++ b/tests/zstd_simple_compression.bas
@@ -0,0 +1,56 @@
+#include once "crt/stdio.bi"
+#include once "crt/stdlib.bi"
+#include once "crt/string.bi"
+#include once "zstd/zstd.bi"
+#include once "crt/errno.bi"
+#include once "crt/sys/stat.bi"
+#include once "zstd_common.bi"
+
+private sub compress_orDie(byval fname as const zstring ptr, byval oname as const zstring ptr)
+ dim fSize as uinteger
+ Dim fBuff As Any Const Ptr = mallocAndLoadFile_orDie(fname, @fSize)
+ dim cBuffSize as const uinteger = ZSTD_compressBound(fSize)
+ Dim cBuff As Any Const Ptr = malloc_orDie(cBuffSize)
+ dim cSize as const uinteger = ZSTD_compress(cBuff, cBuffSize, fBuff, fSize, 1)
+ Scope
+ Dim err_ As Const UInteger = cSize
+ scope
+ If (ZSTD_isError(err_) = 0) = 0 Then
+ fprintf(stderr, "%s:%d CHECK(%s) failed: ", __FILE__, __LINE__, "!ZSTD_isError(err)")
+ fprintf(stderr, "" "%s", ZSTD_getErrorName(err_))
+ fprintf(stderr, !"\n")
+ Print 1
+ Exit Sub
+ end if
+ end scope
+ end scope
+ saveFile_orDie(oname, cBuff, cSize)
+ printf(!"%25s : %6u -> %7u - %s \n", fname, culng(fSize), culng(cSize), oname)
+ free(fBuff)
+ free(cBuff)
+end sub
+
+private function createOutFilename_orDie(byval filename as const zstring ptr) as zstring ptr
+ dim inL as const uinteger = strlen(filename)
+ dim outL as const uinteger = inL + 5
+ dim outSpace as any const ptr = malloc_orDie(outL)
+ memset(outSpace, 0, outL)
+ strcat(outSpace, filename)
+ strcat(outSpace, ".zst")
+ return cptr(zstring ptr, outSpace)
+End Function
+
+Dim exeName As String = Command(0)
+Dim argc As Long =__FB_ARGC__
+ If argc <> 2 Then
+ printf(!"wrong arguments\n")
+ printf(!"usage:\n")
+ Print exeName
+ End
+ End If
+ Dim inFilename As String = Command(1)
+ Dim outFilename As ZString Const Ptr = createOutFilename_orDie(inFilename)
+ compress_orDie(inFilename, outFilename)
+ free(outFilename)
+ Print "ok"
+
diff --git a/tests/zstd_simple_decompression.bas b/tests/zstd_simple_decompression.bas
new file mode 100644
index 00000000..67a5fc11
--- /dev/null
+++ b/tests/zstd_simple_decompression.bas
@@ -0,0 +1,61 @@
+#include once "crt/stdio.bi"
+#include once "crt/stdlib.bi"
+#include once "zstd/zstd.bi"
+#include once "zstd_common.bi"
+
+
+private sub decompress(byval fname as const zstring ptr)
+ dim cSize as uinteger
+ dim cBuff as any const ptr = mallocAndLoadFile_orDie(fname, @cSize)
+ Dim rSize As Const ULongInt = ZSTD_getFrameContentSize(cBuff, cSize)
+ scope
+ if (rSize <> ZSTD_CONTENTSIZE_ERROR) = 0 then
+ fprintf(stderr, "%s:%d CHECK(%s) failed: ", __FILE__, __LINE__, "rSize != ZSTD_CONTENTSIZE_ERROR")
+ fprintf(stderr, "" "%s: not compressed by zstd!", fname)
+ fprintf(stderr, !"\n")
+ Exit Sub
+ end if
+ end scope
+ Scope
+ if (rSize <> ZSTD_CONTENTSIZE_UNKNOWN) = 0 then
+ fprintf(stderr, "%s:%d CHECK(%s) failed: ", __FILE__, __LINE__, "rSize != ZSTD_CONTENTSIZE_UNKNOWN")
+ fprintf(stderr, "" "%s: original size unknown!", fname)
+ fprintf(stderr, !"\n")
+ Exit Sub
+ end if
+ end scope
+ dim rBuff as any const ptr = malloc_orDie(cuint(rSize))
+ dim dSize as const uinteger = ZSTD_decompress(rBuff, rSize, cBuff, cSize)
+ Scope
+ Dim err_ As Const UInteger = dSize
+ scope
+ If (ZSTD_isError(err_) = 0) = 0 Then
+ fprintf(stderr, "%s:%d CHECK(%s) failed: ", __FILE__, __LINE__, "!ZSTD_isError(err_)")
+ fprintf(stderr, "" "%s", ZSTD_getErrorName(err_))
+ fprintf(stderr, !"\n")
+ Exit Sub
+ end if
+ End Scope
+ end scope
+ scope
+ if (dSize = rSize) = 0 then
+ fprintf(stderr, "%s:%d CHECK(%s) failed: ", __FILE__, __LINE__, "dSize == rSize")
+ fprintf(stderr, "" "Impossible because zstd will check this condition!")
+ fprintf(stderr, !"\n")
+ Exit Sub
+ end if
+ end scope
+ printf(!"%25s : %6u -> %7u \n", fname, culng(cSize), culng(rSize))
+ free(rBuff)
+ free(cBuff)
+end sub
+
+ Dim exeName As String = Command(0)
+ If __FB_ARGC__ <> 2 Then
+ printf(!"wrong arguments\n")
+ printf(!"usage:\n")
+ Print exeName
+ End
+ end if
+ decompress(Command(1))
+ printf(!"%s correctly decoded (in memory). \n", Command(1))
\ No newline at end of file
diff --git a/tinyexpr.bi b/tinyexpr.bi
new file mode 100644
index 00000000..c4669978
--- /dev/null
+++ b/tinyexpr.bi
@@ -0,0 +1,79 @@
+''freebasic bindings for TINYEXPR
+' * TINYEXPR - Tiny recursive descent parser And evaluation engine in C
+' *And Is released under zlib license.
+' * Copyright (c) 2015-2020 Lewis Van Winkle
+' * http://CodePlea.com
+' * This software is provided 'as-is', without any express or implied
+' * warranty. In no event will the authors be held liable for any damages
+' * arising from the use of this software.
+' *
+' * Permission is granted to anyone to use this software for any purpose,
+' * including commercial applications, and to alter it and redistribute it
+' * freely, subject to the following restrictions:
+' *
+' * 1. The origin of this software must not be misrepresented; you must not
+' * claim that you wrote the original software. If you use this software
+' * in a product, an acknowledgement in the product documentation would be
+' * appreciated but is not required.
+' * 2. Altered source versions must be plainly marked as such, and must not be
+' * misrepresented as being the original software.
+' * 3. This notice may not be removed or altered from any source distribution.
+'' translated to FreeBASIC by:
+'' FreeBASIC development team
+
+#pragma once
+
+#ifndef TINYEXPR_H
+#define TINYEXPR_H
+#inclib "tinyexpr"
+
+extern "C"
+
+Type te_expr
+ type_ as long
+
+ Union
+ value as double
+ bound as const double ptr
+ function_ as const any ptr
+ end union
+
+ parameters(0 to 0) as any ptr
+end type
+
+enum
+ te_variable_ = 0
+ TE_FUNCTION0 = 8
+ TE_FUNCTION1
+ TE_FUNCTION2
+ TE_FUNCTION3
+ TE_FUNCTION4
+ TE_FUNCTION5
+ TE_FUNCTION6
+ TE_FUNCTION7
+ TE_CLOSURE0 = 16
+ TE_CLOSURE1
+ TE_CLOSURE2
+ TE_CLOSURE3
+ TE_CLOSURE4
+ TE_CLOSURE5
+ TE_CLOSURE6
+ TE_CLOSURE7
+ TE_FLAG_PURE = 32
+end enum
+
+Type te_variable
+ name_ As Const ZString Ptr
+ ADDRESS_ As Const Any Ptr
+ type_ as long
+ context as any ptr
+end type
+
+declare function te_interp(byval expression as const zstring ptr, byval error_ as long ptr) as double
+declare function te_compile(byval expression as const zstring ptr, byval variables as const te_variable ptr, byval var_count as long, byval error_ as long ptr) as te_expr ptr
+declare function te_eval(byval n as const te_expr ptr) as double
+declare sub te_print(byval n as const te_expr ptr)
+declare sub te_free(byval n as te_expr ptr)
+
+end extern
+#endif