mt-lang 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/index.html +4 -3
- data/lib/milk_tea/base.rb +1 -1
- data/std/asset_pack.mt +267 -0
- data/std/async/libuv_runtime.mt +539 -0
- data/std/async/mailbox.mt +191 -0
- data/std/async/runtime.mt +87 -0
- data/std/async.mt +87 -0
- data/std/base64.mt +185 -0
- data/std/behavior_tree.mt +396 -0
- data/std/binary.mt +314 -0
- data/std/binary_heap.mt +157 -0
- data/std/bitset.mt +239 -0
- data/std/box2d.mt +535 -0
- data/std/bytes.mt +46 -0
- data/std/c/box2d.mt +1254 -0
- data/std/c/cgltf.mt +647 -0
- data/std/c/cjson.mt +106 -0
- data/std/c/crypto.mt +11 -0
- data/std/c/crypto_support.h +51 -0
- data/std/c/ctype.mt +19 -0
- data/std/c/ctype_bindgen.h +29 -0
- data/std/c/curl.mt +1223 -0
- data/std/c/enet.mt +473 -0
- data/std/c/errno.mt +41 -0
- data/std/c/errno_bindgen.h +53 -0
- data/std/c/flecs.mt +2945 -0
- data/std/c/fs.linux.mt +43 -0
- data/std/c/fs.windows.mt +43 -0
- data/std/c/fs_support.h +954 -0
- data/std/c/gl.mt +2065 -0
- data/std/c/gl_registry_helpers.h +10748 -0
- data/std/c/glfw.mt +499 -0
- data/std/c/libc.mt +167 -0
- data/std/c/libuv.mt +1491 -0
- data/std/c/math.mt +22 -0
- data/std/c/math_bindgen.h +31 -0
- data/std/c/miniaudio.mt +3420 -0
- data/std/c/pcre2.mt +735 -0
- data/std/c/process.mt +58 -0
- data/std/c/process_support.h +1147 -0
- data/std/c/raygui.mt +1602 -0
- data/std/c/raylib.mt +1245 -0
- data/std/c/raymath.mt +163 -0
- data/std/c/rlgl.mt +434 -0
- data/std/c/rpng.mt +60 -0
- data/std/c/rres.mt +187 -0
- data/std/c/sdl3.mt +4132 -0
- data/std/c/sqlite3.mt +951 -0
- data/std/c/stb_image.mt +52 -0
- data/std/c/stb_image_resize2.mt +128 -0
- data/std/c/stb_image_write.mt +19 -0
- data/std/c/stb_rect_pack.mt +38 -0
- data/std/c/stb_truetype.mt +175 -0
- data/std/c/stb_vorbis.mt +31 -0
- data/std/c/stdio.mt +90 -0
- data/std/c/steamworks.h +5769 -0
- data/std/c/steamworks.mt +4771 -0
- data/std/c/string.mt +16 -0
- data/std/c/string_bindgen.h +36 -0
- data/std/c/sync.mt +33 -0
- data/std/c/sync_support.h +219 -0
- data/std/c/terminal.mt +24 -0
- data/std/c/terminal_support.h +408 -0
- data/std/c/time.mt +26 -0
- data/std/c/tls.mt +24 -0
- data/std/c/tls_support.h +626 -0
- data/std/c/tracy.mt +53 -0
- data/std/c/zlib.mt +20 -0
- data/std/c/zlib_support.h +239 -0
- data/std/c/zstd.mt +231 -0
- data/std/cell.mt +60 -0
- data/std/cgltf.mt +115 -0
- data/std/cjson.mt +90 -0
- data/std/cli.mt +768 -0
- data/std/cookie.mt +198 -0
- data/std/counter.mt +160 -0
- data/std/crypto.mt +74 -0
- data/std/cstring.mt +13 -0
- data/std/ctype.mt +52 -0
- data/std/curl/runtime.mt +261 -0
- data/std/curl.mt +38 -0
- data/std/deque.mt +348 -0
- data/std/encoding.mt +93 -0
- data/std/enet.mt +133 -0
- data/std/env.mt +41 -0
- data/std/errno.mt +47 -0
- data/std/flecs.mt +978 -0
- data/std/fmt.mt +271 -0
- data/std/fs.linux.mt +696 -0
- data/std/fs.windows.mt +711 -0
- data/std/fsm.mt +267 -0
- data/std/gl.mt +2062 -0
- data/std/glfw.mt +471 -0
- data/std/goap.mt +342 -0
- data/std/graph.mt +521 -0
- data/std/gzip.mt +77 -0
- data/std/hash.mt +429 -0
- data/std/http/server.mt +810 -0
- data/std/http.mt +1227 -0
- data/std/intern.mt +53 -0
- data/std/jobs.mt +288 -0
- data/std/json.mt +627 -0
- data/std/libc.mt +34 -0
- data/std/libuv.mt +554 -0
- data/std/linear_algebra.mt +243 -0
- data/std/linked_map.mt +372 -0
- data/std/linked_map_view.mt +49 -0
- data/std/linked_set.mt +117 -0
- data/std/log.mt +69 -0
- data/std/map.mt +418 -0
- data/std/math.mt +24 -0
- data/std/mem/arena.mt +137 -0
- data/std/mem/endian.mt +51 -0
- data/std/mem/heap.mt +298 -0
- data/std/mem/pool.mt +164 -0
- data/std/mem/stack.mt +47 -0
- data/std/mem/tracking.mt +119 -0
- data/std/miniaudio.mt +1299 -0
- data/std/multiset.mt +191 -0
- data/std/net/channel.mt +727 -0
- data/std/net/clock.mt +237 -0
- data/std/net/discovery.mt +277 -0
- data/std/net/lobby.mt +813 -0
- data/std/net/manager.mt +539 -0
- data/std/net/mux.mt +839 -0
- data/std/net/nat.mt +122 -0
- data/std/net/packet.mt +219 -0
- data/std/net/punch.mt +162 -0
- data/std/net/rpc.mt +119 -0
- data/std/net/session.mt +1157 -0
- data/std/net/stun.mt +252 -0
- data/std/net/sync.mt +183 -0
- data/std/net/turn.mt +459 -0
- data/std/net.mt +2944 -0
- data/std/oauth2.mt +408 -0
- data/std/option.mt +51 -0
- data/std/ordered_map.mt +497 -0
- data/std/ordered_set.mt +348 -0
- data/std/path.mt +368 -0
- data/std/pcre2/runtime.mt +35 -0
- data/std/pcre2.mt +78 -0
- data/std/priority_queue.mt +55 -0
- data/std/process.mt +837 -0
- data/std/queue.mt +55 -0
- data/std/random.mt +146 -0
- data/std/raygui.mt +99 -0
- data/std/raylib/debug_console.mt +71 -0
- data/std/raylib/easing.mt +388 -0
- data/std/raylib/packed_assets.mt +255 -0
- data/std/raylib/runtime.mt +30 -0
- data/std/raylib/tracy_gpu.mt +37 -0
- data/std/raylib.mt +1510 -0
- data/std/raymath.mt +153 -0
- data/std/result.mt +89 -0
- data/std/rlgl.mt +268 -0
- data/std/rpng.mt +46 -0
- data/std/rres.mt +36 -0
- data/std/sdl3/runtime.mt +54 -0
- data/std/sdl3.mt +1731 -0
- data/std/serialize.mt +68 -0
- data/std/set.mt +124 -0
- data/std/spatial.mt +176 -0
- data/std/sqlite3.mt +151 -0
- data/std/stack.mt +55 -0
- data/std/stb_image.mt +47 -0
- data/std/stb_image_resize2.mt +41 -0
- data/std/stb_image_write.mt +17 -0
- data/std/stb_rect_pack.mt +15 -0
- data/std/stb_truetype.mt +77 -0
- data/std/stb_vorbis.mt +16 -0
- data/std/stdio.mt +88 -0
- data/std/steamworks.mt +1542 -0
- data/std/str.mt +293 -0
- data/std/string.mt +234 -0
- data/std/sync.mt +194 -0
- data/std/tar.mt +704 -0
- data/std/terminal.mt +1002 -0
- data/std/testing.mt +266 -0
- data/std/thread.mt +120 -0
- data/std/time.mt +105 -0
- data/std/tls.mt +616 -0
- data/std/toml.mt +1310 -0
- data/std/tracy.mt +42 -0
- data/std/uri.mt +118 -0
- data/std/url.mt +372 -0
- data/std/vec.mt +433 -0
- data/std/zstd.mt +94 -0
- metadata +187 -2
data/std/c/cjson.mt
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# generated by mtc bindgen from /home/teefan/Projects/Ruby/mt-lang/third_party/cjson-upstream/cJSON.h
|
|
2
|
+
external
|
|
3
|
+
|
|
4
|
+
link "cjson"
|
|
5
|
+
include "cJSON.h"
|
|
6
|
+
|
|
7
|
+
struct cJSON:
|
|
8
|
+
next: ptr[cJSON]
|
|
9
|
+
prev: ptr[cJSON]
|
|
10
|
+
child: ptr[cJSON]
|
|
11
|
+
type_: int
|
|
12
|
+
valuestring: ptr[char]
|
|
13
|
+
valueint: int
|
|
14
|
+
valuedouble: double
|
|
15
|
+
string: ptr[char]
|
|
16
|
+
|
|
17
|
+
struct cJSON_Hooks:
|
|
18
|
+
malloc_fn: fn(arg0: ptr_uint) -> ptr[void]
|
|
19
|
+
free_fn: fn(arg0: ptr[void]) -> void
|
|
20
|
+
|
|
21
|
+
type cJSON_bool = int
|
|
22
|
+
|
|
23
|
+
external function cJSON_Version() -> cstr
|
|
24
|
+
external function cJSON_InitHooks(hooks: ptr[cJSON_Hooks]) -> void
|
|
25
|
+
external function cJSON_Parse(value: cstr) -> ptr[cJSON]?
|
|
26
|
+
external function cJSON_ParseWithLength(value: cstr, buffer_length: ptr_uint) -> ptr[cJSON]?
|
|
27
|
+
external function cJSON_ParseWithOpts(value: cstr, return_parse_end: ptr[cstr], require_null_terminated: int) -> ptr[cJSON]?
|
|
28
|
+
external function cJSON_ParseWithLengthOpts(value: cstr, buffer_length: ptr_uint, return_parse_end: ptr[cstr], require_null_terminated: int) -> ptr[cJSON]?
|
|
29
|
+
external function cJSON_Print(item: const_ptr[cJSON]) -> ptr[char]?
|
|
30
|
+
external function cJSON_PrintUnformatted(item: const_ptr[cJSON]) -> ptr[char]?
|
|
31
|
+
external function cJSON_PrintBuffered(item: const_ptr[cJSON], prebuffer: int, fmt: int) -> ptr[char]?
|
|
32
|
+
external function cJSON_PrintPreallocated(item: ptr[cJSON], buffer: ptr[char], length: int, format: int) -> cJSON_bool
|
|
33
|
+
external function cJSON_Delete(item: ptr[cJSON]) -> void
|
|
34
|
+
external function cJSON_GetArraySize(array: const_ptr[cJSON]) -> int
|
|
35
|
+
external function cJSON_GetArrayItem(array: const_ptr[cJSON], index: int) -> ptr[cJSON]?
|
|
36
|
+
external function cJSON_GetObjectItem(object: const_ptr[cJSON], string: cstr) -> ptr[cJSON]?
|
|
37
|
+
external function cJSON_GetObjectItemCaseSensitive(object: const_ptr[cJSON], string: cstr) -> ptr[cJSON]?
|
|
38
|
+
external function cJSON_HasObjectItem(object: const_ptr[cJSON], string: cstr) -> cJSON_bool
|
|
39
|
+
external function cJSON_GetErrorPtr() -> cstr?
|
|
40
|
+
external function cJSON_GetStringValue(item: const_ptr[cJSON]) -> cstr?
|
|
41
|
+
external function cJSON_GetNumberValue(item: const_ptr[cJSON]) -> double
|
|
42
|
+
external function cJSON_IsInvalid(item: const_ptr[cJSON]) -> cJSON_bool
|
|
43
|
+
external function cJSON_IsFalse(item: const_ptr[cJSON]) -> cJSON_bool
|
|
44
|
+
external function cJSON_IsTrue(item: const_ptr[cJSON]) -> cJSON_bool
|
|
45
|
+
external function cJSON_IsBool(item: const_ptr[cJSON]) -> cJSON_bool
|
|
46
|
+
external function cJSON_IsNull(item: const_ptr[cJSON]) -> cJSON_bool
|
|
47
|
+
external function cJSON_IsNumber(item: const_ptr[cJSON]) -> cJSON_bool
|
|
48
|
+
external function cJSON_IsString(item: const_ptr[cJSON]) -> cJSON_bool
|
|
49
|
+
external function cJSON_IsArray(item: const_ptr[cJSON]) -> cJSON_bool
|
|
50
|
+
external function cJSON_IsObject(item: const_ptr[cJSON]) -> cJSON_bool
|
|
51
|
+
external function cJSON_IsRaw(item: const_ptr[cJSON]) -> cJSON_bool
|
|
52
|
+
external function cJSON_CreateNull() -> ptr[cJSON]?
|
|
53
|
+
external function cJSON_CreateTrue() -> ptr[cJSON]?
|
|
54
|
+
external function cJSON_CreateFalse() -> ptr[cJSON]?
|
|
55
|
+
external function cJSON_CreateBool(boolean: int) -> ptr[cJSON]?
|
|
56
|
+
external function cJSON_CreateNumber(num: double) -> ptr[cJSON]?
|
|
57
|
+
external function cJSON_CreateString(string: cstr) -> ptr[cJSON]?
|
|
58
|
+
external function cJSON_CreateRaw(raw: cstr) -> ptr[cJSON]?
|
|
59
|
+
external function cJSON_CreateArray() -> ptr[cJSON]?
|
|
60
|
+
external function cJSON_CreateObject() -> ptr[cJSON]?
|
|
61
|
+
external function cJSON_CreateStringReference(string: cstr) -> ptr[cJSON]?
|
|
62
|
+
external function cJSON_CreateObjectReference(child: const_ptr[cJSON]) -> ptr[cJSON]?
|
|
63
|
+
external function cJSON_CreateArrayReference(child: const_ptr[cJSON]) -> ptr[cJSON]?
|
|
64
|
+
external function cJSON_CreateIntArray(numbers: const_ptr[int], count: int) -> ptr[cJSON]
|
|
65
|
+
external function cJSON_CreateFloatArray(numbers: const_ptr[float], count: int) -> ptr[cJSON]
|
|
66
|
+
external function cJSON_CreateDoubleArray(numbers: const_ptr[double], count: int) -> ptr[cJSON]
|
|
67
|
+
external function cJSON_CreateStringArray(strings: const_ptr[cstr], count: int) -> ptr[cJSON]
|
|
68
|
+
external function cJSON_AddItemToArray(array: ptr[cJSON], item: ptr[cJSON]) -> cJSON_bool
|
|
69
|
+
external function cJSON_AddItemToObject(object: ptr[cJSON], string: cstr, item: ptr[cJSON]) -> cJSON_bool
|
|
70
|
+
external function cJSON_AddItemToObjectCS(object: ptr[cJSON], string: cstr, item: ptr[cJSON]) -> cJSON_bool
|
|
71
|
+
external function cJSON_AddItemReferenceToArray(array: ptr[cJSON], item: ptr[cJSON]) -> cJSON_bool
|
|
72
|
+
external function cJSON_AddItemReferenceToObject(object: ptr[cJSON], string: cstr, item: ptr[cJSON]) -> cJSON_bool
|
|
73
|
+
external function cJSON_DetachItemViaPointer(parent: ptr[cJSON], item: ptr[cJSON]) -> ptr[cJSON]?
|
|
74
|
+
external function cJSON_DetachItemFromArray(array: ptr[cJSON], which: int) -> ptr[cJSON]?
|
|
75
|
+
external function cJSON_DeleteItemFromArray(array: ptr[cJSON], which: int) -> void
|
|
76
|
+
external function cJSON_DetachItemFromObject(object: ptr[cJSON], string: cstr) -> ptr[cJSON]?
|
|
77
|
+
external function cJSON_DetachItemFromObjectCaseSensitive(object: ptr[cJSON], string: cstr) -> ptr[cJSON]?
|
|
78
|
+
external function cJSON_DeleteItemFromObject(object: ptr[cJSON], string: cstr) -> void
|
|
79
|
+
external function cJSON_DeleteItemFromObjectCaseSensitive(object: ptr[cJSON], string: cstr) -> void
|
|
80
|
+
external function cJSON_InsertItemInArray(array: ptr[cJSON], which: int, newitem: ptr[cJSON]) -> cJSON_bool
|
|
81
|
+
external function cJSON_ReplaceItemViaPointer(parent: ptr[cJSON], item: ptr[cJSON], replacement: ptr[cJSON]) -> cJSON_bool
|
|
82
|
+
external function cJSON_ReplaceItemInArray(array: ptr[cJSON], which: int, newitem: ptr[cJSON]) -> cJSON_bool
|
|
83
|
+
external function cJSON_ReplaceItemInObject(object: ptr[cJSON], string: cstr, newitem: ptr[cJSON]) -> cJSON_bool
|
|
84
|
+
external function cJSON_ReplaceItemInObjectCaseSensitive(object: ptr[cJSON], string: cstr, newitem: ptr[cJSON]) -> cJSON_bool
|
|
85
|
+
external function cJSON_Duplicate(item: const_ptr[cJSON], recurse: int) -> ptr[cJSON]
|
|
86
|
+
external function cJSON_Compare(a: const_ptr[cJSON], b: const_ptr[cJSON], case_sensitive: int) -> cJSON_bool
|
|
87
|
+
external function cJSON_Minify(json: ptr[char]) -> void
|
|
88
|
+
external function cJSON_AddNullToObject(object: ptr[cJSON], name: cstr) -> ptr[cJSON]?
|
|
89
|
+
external function cJSON_AddTrueToObject(object: ptr[cJSON], name: cstr) -> ptr[cJSON]?
|
|
90
|
+
external function cJSON_AddFalseToObject(object: ptr[cJSON], name: cstr) -> ptr[cJSON]?
|
|
91
|
+
external function cJSON_AddBoolToObject(object: ptr[cJSON], name: cstr, boolean: int) -> ptr[cJSON]?
|
|
92
|
+
external function cJSON_AddNumberToObject(object: ptr[cJSON], name: cstr, number: double) -> ptr[cJSON]?
|
|
93
|
+
external function cJSON_AddStringToObject(object: ptr[cJSON], name: cstr, string: cstr) -> ptr[cJSON]?
|
|
94
|
+
external function cJSON_AddRawToObject(object: ptr[cJSON], name: cstr, raw: cstr) -> ptr[cJSON]?
|
|
95
|
+
external function cJSON_AddObjectToObject(object: ptr[cJSON], name: cstr) -> ptr[cJSON]?
|
|
96
|
+
external function cJSON_AddArrayToObject(object: ptr[cJSON], name: cstr) -> ptr[cJSON]?
|
|
97
|
+
external function cJSON_SetNumberHelper(object: ptr[cJSON], number: double) -> double
|
|
98
|
+
external function cJSON_SetValuestring(object: ptr[cJSON], valuestring: cstr) -> ptr[char]
|
|
99
|
+
external function cJSON_malloc(size: ptr_uint) -> ptr[void]
|
|
100
|
+
external function cJSON_free(object: ptr[void]) -> void
|
|
101
|
+
|
|
102
|
+
const CJSON_VERSION_MAJOR: int = 1
|
|
103
|
+
const CJSON_VERSION_MINOR: int = 7
|
|
104
|
+
const CJSON_VERSION_PATCH: int = 19
|
|
105
|
+
const CJSON_NESTING_LIMIT: int = 1000
|
|
106
|
+
const CJSON_CIRCULAR_LIMIT: int = 10000
|
data/std/c/crypto.mt
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
external
|
|
2
|
+
|
|
3
|
+
link "ssl"
|
|
4
|
+
link "crypto"
|
|
5
|
+
include "crypto_support.h"
|
|
6
|
+
|
|
7
|
+
const SHA256_DIGEST_LENGTH: ptr_uint = 32
|
|
8
|
+
|
|
9
|
+
external function mt_sha256(data: ptr[ubyte]?, data_len: ptr_uint, out_digest: ptr[ubyte]) -> int
|
|
10
|
+
external function mt_hmac_sha256(key: ptr[ubyte]?, key_len: ptr_uint, data: ptr[ubyte]?, data_len: ptr_uint, out_digest: ptr[ubyte]) -> int
|
|
11
|
+
external function mt_random_bytes(buffer: ptr[ubyte], count: ptr_uint) -> int
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#ifndef MT_CRYPTO_SUPPORT_H
|
|
2
|
+
#define MT_CRYPTO_SUPPORT_H
|
|
3
|
+
|
|
4
|
+
#include <openssl/evp.h>
|
|
5
|
+
#include <openssl/hmac.h>
|
|
6
|
+
#include <openssl/rand.h>
|
|
7
|
+
#include <stdint.h>
|
|
8
|
+
#include <stdlib.h>
|
|
9
|
+
#include <string.h>
|
|
10
|
+
|
|
11
|
+
static inline int mt_sha256(const uint8_t* data, uintptr_t data_len, uint8_t* out_digest) {
|
|
12
|
+
if (out_digest == NULL) {
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
unsigned int digest_len = 0;
|
|
17
|
+
EVP_MD_CTX* ctx = EVP_MD_CTX_new();
|
|
18
|
+
if (ctx == NULL) {
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
int ok = EVP_DigestInit_ex(ctx, EVP_sha256(), NULL) == 1
|
|
23
|
+
&& EVP_DigestUpdate(ctx, data, (size_t) data_len) == 1
|
|
24
|
+
&& EVP_DigestFinal_ex(ctx, out_digest, &digest_len) == 1;
|
|
25
|
+
|
|
26
|
+
EVP_MD_CTX_free(ctx);
|
|
27
|
+
return ok ? 1 : 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static inline int mt_hmac_sha256(const uint8_t* key, uintptr_t key_len, const uint8_t* data, uintptr_t data_len, uint8_t* out_digest) {
|
|
31
|
+
if (out_digest == NULL) {
|
|
32
|
+
return 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
unsigned int digest_len = 0;
|
|
36
|
+
unsigned char* result = HMAC(EVP_sha256(),
|
|
37
|
+
key, (int) key_len,
|
|
38
|
+
data, (size_t) data_len,
|
|
39
|
+
out_digest, &digest_len);
|
|
40
|
+
return result != NULL ? 1 : 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static inline int mt_random_bytes(uint8_t* buffer, uintptr_t count) {
|
|
44
|
+
if (buffer == NULL || count == 0) {
|
|
45
|
+
return 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return RAND_bytes(buffer, (int) count) == 1 ? 1 : 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
#endif
|
data/std/c/ctype.mt
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# generated by mtc bindgen from /home/teefan/Projects/Ruby/mt-lang/std/c/ctype_bindgen.h
|
|
2
|
+
external
|
|
3
|
+
|
|
4
|
+
include "ctype_bindgen.h"
|
|
5
|
+
|
|
6
|
+
external function mt_ctype_isalnum(value: int) -> int
|
|
7
|
+
external function mt_ctype_isalpha(value: int) -> int
|
|
8
|
+
external function mt_ctype_isblank(value: int) -> int
|
|
9
|
+
external function mt_ctype_iscntrl(value: int) -> int
|
|
10
|
+
external function mt_ctype_isdigit(value: int) -> int
|
|
11
|
+
external function mt_ctype_isgraph(value: int) -> int
|
|
12
|
+
external function mt_ctype_islower(value: int) -> int
|
|
13
|
+
external function mt_ctype_isprint(value: int) -> int
|
|
14
|
+
external function mt_ctype_ispunct(value: int) -> int
|
|
15
|
+
external function mt_ctype_isspace(value: int) -> int
|
|
16
|
+
external function mt_ctype_isupper(value: int) -> int
|
|
17
|
+
external function mt_ctype_isxdigit(value: int) -> int
|
|
18
|
+
external function mt_ctype_tolower(value: int) -> int
|
|
19
|
+
external function mt_ctype_toupper(value: int) -> int
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#ifndef MT_LANG_CTYPE_BINDGEN_H
|
|
2
|
+
#define MT_LANG_CTYPE_BINDGEN_H
|
|
3
|
+
|
|
4
|
+
#include <ctype.h>
|
|
5
|
+
|
|
6
|
+
#ifdef __cplusplus
|
|
7
|
+
extern "C" {
|
|
8
|
+
#endif
|
|
9
|
+
|
|
10
|
+
static inline int mt_ctype_isalnum(int value) { return isalnum(value); }
|
|
11
|
+
static inline int mt_ctype_isalpha(int value) { return isalpha(value); }
|
|
12
|
+
static inline int mt_ctype_isblank(int value) { return isblank(value); }
|
|
13
|
+
static inline int mt_ctype_iscntrl(int value) { return iscntrl(value); }
|
|
14
|
+
static inline int mt_ctype_isdigit(int value) { return isdigit(value); }
|
|
15
|
+
static inline int mt_ctype_isgraph(int value) { return isgraph(value); }
|
|
16
|
+
static inline int mt_ctype_islower(int value) { return islower(value); }
|
|
17
|
+
static inline int mt_ctype_isprint(int value) { return isprint(value); }
|
|
18
|
+
static inline int mt_ctype_ispunct(int value) { return ispunct(value); }
|
|
19
|
+
static inline int mt_ctype_isspace(int value) { return isspace(value); }
|
|
20
|
+
static inline int mt_ctype_isupper(int value) { return isupper(value); }
|
|
21
|
+
static inline int mt_ctype_isxdigit(int value) { return isxdigit(value); }
|
|
22
|
+
static inline int mt_ctype_tolower(int value) { return tolower(value); }
|
|
23
|
+
static inline int mt_ctype_toupper(int value) { return toupper(value); }
|
|
24
|
+
|
|
25
|
+
#ifdef __cplusplus
|
|
26
|
+
}
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
#endif
|