about summary refs log tree commit diff stats
path: root/src/bindings/libunicode.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-06-03 20:42:16 +0200
committerbptato <nincsnevem662@gmail.com>2024-06-03 21:15:44 +0200
commit3aa8f1e0694d1606c3f3795f8b83e8a82caacd3e (patch)
tree9708d4599360116a96e4aa7f983eea387e8437c6 /src/bindings/libunicode.nim
parent3e12a95ab34e120fb958ba0eeebaada5def7cd11 (diff)
downloadchawan-3aa8f1e0694d1606c3f3795f8b83e8a82caacd3e.tar.gz
Move JS wrapper into Monoucha
Operation "modularize Chawan somewhat" part 3
Diffstat (limited to 'src/bindings/libunicode.nim')
-rw-r--r--src/bindings/libunicode.nim44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/bindings/libunicode.nim b/src/bindings/libunicode.nim
deleted file mode 100644
index 18d146fe..00000000
--- a/src/bindings/libunicode.nim
+++ /dev/null
@@ -1,44 +0,0 @@
-type
-  DynBufReallocFunc = proc(opaque, p: pointer; size: csize_t): pointer {.cdecl.}
-
-  CharRange* = object
-    len*: cint # in points, always even
-    size*: cint
-    points*: ptr uint32 # points sorted by increasing value
-    mem_opaque*: pointer
-    realloc_func*: DynBufReallocFunc
-
-  UnicodeNormalizationEnum* {.size: sizeof(cint).} = enum
-    UNICODE_NFC, UNICODE_NFD, UNICODE_NKFC, UNICODE_NKFD
-
-{.passc: "-Ilib/".}
-
-{.push header: "quickjs/libunicode.h", importc.}
-
-proc cr_init*(cr: ptr CharRange; mem_opaque: pointer;
-  realloc_func: DynBufReallocFunc)
-
-proc cr_free*(cr: ptr CharRange)
-
-proc unicode_normalize*(pdst: ptr ptr uint32; src: ptr uint32; src_len: cint;
-  n_type: UnicodeNormalizationEnum; opaque: pointer;
-  realloc_func: DynBufReallocFunc): cint
-
-proc unicode_script*(cr: ptr CharRange; script_name: cstring; is_ext: cint):
-  cint
-proc unicode_prop*(cr: ptr CharRange; prop_name: cstring): cint
-proc unicode_general_category*(cr: ptr CharRange; gc_name: cstring): cint
-
-const LRE_CC_RES_LEN_MAX* = 3
-
-# conv_type:
-# 0 = to upper
-# 1 = to lower
-# 2 = case folding
-# res must be an array of LRE_CC_RES_LEN_MAX
-proc lre_case_conv*(res: ptr UncheckedArray[uint32]; c: uint32;
-  conv_type: cint): cint
-
-proc lre_is_space*(c: uint32): cint
-
-{.pop.}