liblouis-rb 0.1.0
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 +7 -0
- data/LICENSE +520 -0
- data/README.md +100 -0
- data/Rakefile +80 -0
- data/ext/liblouis/braille_character.c +200 -0
- data/ext/liblouis/braille_table.c +198 -0
- data/ext/liblouis/braille_text.c +223 -0
- data/ext/liblouis/extconf.rb +73 -0
- data/ext/liblouis/liblouis.c +168 -0
- data/ext/liblouis/liblouis_ext.h +49 -0
- data/ext/liblouis/table_source.c +161 -0
- data/ext/liblouis/translation.c +443 -0
- data/liblouis-rb.gemspec +49 -0
- data/spec/liblouis_spec.rb +62 -0
- data/test/integration/packaging_test.rb +82 -0
- data/test/table_source_cases.rb +9 -0
- data/test/test_braille_character.rb +62 -0
- data/test/test_braille_table.rb +379 -0
- data/test/test_braille_text.rb +30 -0
- data/test/test_helper.rb +7 -0
- data/test/translation_cases.rb +33 -0
- data/vendor/liblouis/COPYING +674 -0
- data/vendor/liblouis/COPYING.LESSER +502 -0
- data/vendor/liblouis/configure.ac +290 -0
- data/vendor/liblouis/liblouis/commonTranslationFunctions.c +95 -0
- data/vendor/liblouis/liblouis/compileTranslationTable.c +5515 -0
- data/vendor/liblouis/liblouis/internal.h +781 -0
- data/vendor/liblouis/liblouis/liblouis.h.in +514 -0
- data/vendor/liblouis/liblouis/logging.c +233 -0
- data/vendor/liblouis/liblouis/lou_backTranslateString.c +1855 -0
- data/vendor/liblouis/liblouis/lou_translateString.c +4177 -0
- data/vendor/liblouis/liblouis/maketable.c +463 -0
- data/vendor/liblouis/liblouis/metadata.c +1258 -0
- data/vendor/liblouis/liblouis/pattern.c +1632 -0
- data/vendor/liblouis/liblouis/utils.c +448 -0
- data/vendor/liblouis/tables/Es-Es-G0.utb +248 -0
- data/vendor/liblouis/tables/IPA-unicode-range.uti +200 -0
- data/vendor/liblouis/tables/IPA.utb +164 -0
- data/vendor/liblouis/tables/Lv-Lv-g1.utb +509 -0
- data/vendor/liblouis/tables/Makefile.am +503 -0
- data/vendor/liblouis/tables/Pl-Pl-g1.utb +312 -0
- data/vendor/liblouis/tables/README +6 -0
- data/vendor/liblouis/tables/afr-za-g1.ctb +63 -0
- data/vendor/liblouis/tables/afr-za-g2.ctb +1050 -0
- data/vendor/liblouis/tables/akk-borger.utb +997 -0
- data/vendor/liblouis/tables/akk.utb +1002 -0
- data/vendor/liblouis/tables/ancient-languages-borger.utb +114 -0
- data/vendor/liblouis/tables/ancient-languages-us.utb +114 -0
- data/vendor/liblouis/tables/ar-ar-comp8.utb +293 -0
- data/vendor/liblouis/tables/ar-ar-g1-core.uti +291 -0
- data/vendor/liblouis/tables/ar-ar-g1.utb +26 -0
- data/vendor/liblouis/tables/ar-ar-g2.ctb +447 -0
- data/vendor/liblouis/tables/ar-ar-math.uti +501 -0
- data/vendor/liblouis/tables/ar.tbl +17 -0
- data/vendor/liblouis/tables/as-in-g1.utb +27 -0
- data/vendor/liblouis/tables/as.tbl +18 -0
- data/vendor/liblouis/tables/aw-in-g1.utb +27 -0
- data/vendor/liblouis/tables/awa.tbl +18 -0
- data/vendor/liblouis/tables/ba.utb +64 -0
- data/vendor/liblouis/tables/be-in-g1.utb +27 -0
- data/vendor/liblouis/tables/bel-comp.utb +42 -0
- data/vendor/liblouis/tables/bel-detailed.utb +32 -0
- data/vendor/liblouis/tables/bel.utb +61 -0
- data/vendor/liblouis/tables/bengali.cti +238 -0
- data/vendor/liblouis/tables/bg.ctb +215 -0
- data/vendor/liblouis/tables/bg.dis +84 -0
- data/vendor/liblouis/tables/bg.tbl +21 -0
- data/vendor/liblouis/tables/bg.utb +454 -0
- data/vendor/liblouis/tables/bh.ctb +24 -0
- data/vendor/liblouis/tables/bh.tbl +17 -0
- data/vendor/liblouis/tables/bn.tbl +18 -0
- data/vendor/liblouis/tables/bo.ctb +184 -0
- data/vendor/liblouis/tables/bo.tbl +21 -0
- data/vendor/liblouis/tables/boxes.ctb +162 -0
- data/vendor/liblouis/tables/br-in-g1.utb +27 -0
- data/vendor/liblouis/tables/bra.tbl +18 -0
- data/vendor/liblouis/tables/braille-patterns.cti +287 -0
- data/vendor/liblouis/tables/ca-chardefs.cti +225 -0
- data/vendor/liblouis/tables/ca-g1.ctb +46 -0
- data/vendor/liblouis/tables/ca.tbl +18 -0
- data/vendor/liblouis/tables/chr-us-g1.ctb +180 -0
- data/vendor/liblouis/tables/ckb-chardefs.cti +219 -0
- data/vendor/liblouis/tables/ckb-g1.ctb +31 -0
- data/vendor/liblouis/tables/ckb-translation.cti +131 -0
- data/vendor/liblouis/tables/ckb.tbl +18 -0
- data/vendor/liblouis/tables/compress.cti +44 -0
- data/vendor/liblouis/tables/controlchars.cti +27 -0
- data/vendor/liblouis/tables/cop-eg-comp8.utb +255 -0
- data/vendor/liblouis/tables/cop.utb +231 -0
- data/vendor/liblouis/tables/corrections.cti +47 -0
- data/vendor/liblouis/tables/countries.cti +263 -0
- data/vendor/liblouis/tables/critical-apparatus.uti +54 -0
- data/vendor/liblouis/tables/cs-chardefs.cti +385 -0
- data/vendor/liblouis/tables/cs-comp8.utb +405 -0
- data/vendor/liblouis/tables/cs-g1.ctb +37 -0
- data/vendor/liblouis/tables/cs-translation.cti +63 -0
- data/vendor/liblouis/tables/cs.tbl +20 -0
- data/vendor/liblouis/tables/cuneiform-transliterated-compact.utb +432 -0
- data/vendor/liblouis/tables/cuneiform-transliterated.utb +160 -0
- data/vendor/liblouis/tables/cy-cy-g1.utb +487 -0
- data/vendor/liblouis/tables/cy-cy-g2.ctb +199 -0
- data/vendor/liblouis/tables/cy.tbl +19 -0
- data/vendor/liblouis/tables/da-dk-6miscChars.cti +385 -0
- data/vendor/liblouis/tables/da-dk-6miscChars_1993.cti +412 -0
- data/vendor/liblouis/tables/da-dk-8miscChars.cti +90 -0
- data/vendor/liblouis/tables/da-dk-8miscChars_1993.cti +102 -0
- data/vendor/liblouis/tables/da-dk-g08.ctb +290 -0
- data/vendor/liblouis/tables/da-dk-g08_1993.ctb +331 -0
- data/vendor/liblouis/tables/da-dk-g16-lit_1993.ctb +294 -0
- data/vendor/liblouis/tables/da-dk-g16.ctb +289 -0
- data/vendor/liblouis/tables/da-dk-g16_1993.ctb +305 -0
- data/vendor/liblouis/tables/da-dk-g18.ctb +545 -0
- data/vendor/liblouis/tables/da-dk-g18_1993.ctb +563 -0
- data/vendor/liblouis/tables/da-dk-g2.dic +7439 -0
- data/vendor/liblouis/tables/da-dk-g26-lit_1993.ctb +898 -0
- data/vendor/liblouis/tables/da-dk-g26.ctb +1345 -0
- data/vendor/liblouis/tables/da-dk-g26_1993.ctb +1127 -0
- data/vendor/liblouis/tables/da-dk-g26l-lit_1993.ctb +588 -0
- data/vendor/liblouis/tables/da-dk-g26l_1993.ctb +604 -0
- data/vendor/liblouis/tables/da-dk-g28.ctb +2426 -0
- data/vendor/liblouis/tables/da-dk-g28_1993.ctb +2063 -0
- data/vendor/liblouis/tables/da-dk-g28l_1993.ctb +1594 -0
- data/vendor/liblouis/tables/da-dk-octobraille.dis +316 -0
- data/vendor/liblouis/tables/da-dk-octobraille_1993.dis +313 -0
- data/vendor/liblouis/tables/de-accents-detailed.cti +214 -0
- data/vendor/liblouis/tables/de-accents.cti +214 -0
- data/vendor/liblouis/tables/de-chardefs6.cti +289 -0
- data/vendor/liblouis/tables/de-chardefs8.cti +278 -0
- data/vendor/liblouis/tables/de-chess.ctb +37 -0
- data/vendor/liblouis/tables/de-comp6.utb +226 -0
- data/vendor/liblouis/tables/de-de-comp8.ctb +492 -0
- data/vendor/liblouis/tables/de-de.dis +331 -0
- data/vendor/liblouis/tables/de-eurobrl6.dis +101 -0
- data/vendor/liblouis/tables/de-eurobrl6u.dis +96 -0
- data/vendor/liblouis/tables/de-g0-core.uti +732 -0
- data/vendor/liblouis/tables/de-g0-detailed.utb +84 -0
- data/vendor/liblouis/tables/de-g0.utb +57 -0
- data/vendor/liblouis/tables/de-g1-core-patterns.dic +4863 -0
- data/vendor/liblouis/tables/de-g1-core.cti +67 -0
- data/vendor/liblouis/tables/de-g1-detailed.ctb +79 -0
- data/vendor/liblouis/tables/de-g1.ctb +54 -0
- data/vendor/liblouis/tables/de-g2-core-patterns.dic +26711 -0
- data/vendor/liblouis/tables/de-g2-core.cti +607 -0
- data/vendor/liblouis/tables/de-g2-detailed.ctb +60 -0
- data/vendor/liblouis/tables/de-g2.ctb +57 -0
- data/vendor/liblouis/tables/devanagari.cti +325 -0
- data/vendor/liblouis/tables/digits6Dots.uti +30 -0
- data/vendor/liblouis/tables/digits6DotsPlusDot6.uti +30 -0
- data/vendor/liblouis/tables/digits8Dots.uti +30 -0
- data/vendor/liblouis/tables/dra.ctb +23 -0
- data/vendor/liblouis/tables/dra.tbl +21 -0
- data/vendor/liblouis/tables/el.ctb +775 -0
- data/vendor/liblouis/tables/en-GB-g2.ctb +829 -0
- data/vendor/liblouis/tables/en-chardefs.cti +193 -0
- data/vendor/liblouis/tables/en-chess.ctb +37 -0
- data/vendor/liblouis/tables/en-g3-patterns.dic +11194 -0
- data/vendor/liblouis/tables/en-g3.ctb +2261 -0
- data/vendor/liblouis/tables/en-gb-comp8.ctb +282 -0
- data/vendor/liblouis/tables/en-gb-g1.utb +527 -0
- data/vendor/liblouis/tables/en-in-g1.ctb +162 -0
- data/vendor/liblouis/tables/en-nabcc.utb +166 -0
- data/vendor/liblouis/tables/en-nz-g1.utb +65 -0
- data/vendor/liblouis/tables/en-nz-g2.ctb +46 -0
- data/vendor/liblouis/tables/en-ueb-chardefs.uti +938 -0
- data/vendor/liblouis/tables/en-ueb-g1.ctb +167 -0
- data/vendor/liblouis/tables/en-ueb-g2.ctb +3925 -0
- data/vendor/liblouis/tables/en-ueb-math.ctb +71 -0
- data/vendor/liblouis/tables/en-us-brf.dis +102 -0
- data/vendor/liblouis/tables/en-us-comp6.ctb +149 -0
- data/vendor/liblouis/tables/en-us-comp8-ext.utb +626 -0
- data/vendor/liblouis/tables/en-us-comp8.ctb +62 -0
- data/vendor/liblouis/tables/en-us-compbrl.uti +69 -0
- data/vendor/liblouis/tables/en-us-emphasis.uti +45 -0
- data/vendor/liblouis/tables/en-us-g1.ctb +199 -0
- data/vendor/liblouis/tables/en-us-g2.ctb +1081 -0
- data/vendor/liblouis/tables/en-us-interline.ctb +1126 -0
- data/vendor/liblouis/tables/en-us-mathtext.ctb +880 -0
- data/vendor/liblouis/tables/en_CA.ctb +195 -0
- data/vendor/liblouis/tables/en_CA.tbl +21 -0
- data/vendor/liblouis/tables/en_GB.tbl +26 -0
- data/vendor/liblouis/tables/en_US-comp8-ext.tbl +15 -0
- data/vendor/liblouis/tables/en_US.tbl +26 -0
- data/vendor/liblouis/tables/eo-g1-x-system.ctb +85 -0
- data/vendor/liblouis/tables/eo-g1.ctb +165 -0
- data/vendor/liblouis/tables/eo.tbl +14 -0
- data/vendor/liblouis/tables/es-chardefs.cti +206 -0
- data/vendor/liblouis/tables/es-g1.ctb +36 -0
- data/vendor/liblouis/tables/es-g2.ctb +955 -0
- data/vendor/liblouis/tables/es-new.dis +284 -0
- data/vendor/liblouis/tables/es-no.utb +79 -0
- data/vendor/liblouis/tables/es-old.dis +284 -0
- data/vendor/liblouis/tables/es.tbl +19 -0
- data/vendor/liblouis/tables/et-6dot.utb +269 -0
- data/vendor/liblouis/tables/et-g0.utb +139 -0
- data/vendor/liblouis/tables/ethio-g1.ctb +335 -0
- data/vendor/liblouis/tables/eurodefs.cti +107 -0
- data/vendor/liblouis/tables/fa-ir-comp8.ctb +250 -0
- data/vendor/liblouis/tables/fa-ir-g1.utb +311 -0
- data/vendor/liblouis/tables/fi-fi-8dot.ctb +278 -0
- data/vendor/liblouis/tables/fi.utb +354 -0
- data/vendor/liblouis/tables/fil-g2.ctb +491 -0
- data/vendor/liblouis/tables/fr-bfu-comp6-puncs-math.uti +351 -0
- data/vendor/liblouis/tables/fr-bfu-comp6.utb +238 -0
- data/vendor/liblouis/tables/fr-bfu-comp68.cti +251 -0
- data/vendor/liblouis/tables/fr-bfu-comp8.utb +323 -0
- data/vendor/liblouis/tables/fr-bfu-g2.ctb +4644 -0
- data/vendor/liblouis/tables/ga-g1.utb +95 -0
- data/vendor/liblouis/tables/ga-g2.ctb +231 -0
- data/vendor/liblouis/tables/gd.ctb +123 -0
- data/vendor/liblouis/tables/gd.tbl +21 -0
- data/vendor/liblouis/tables/gez.tbl +21 -0
- data/vendor/liblouis/tables/gon.ctb +25 -0
- data/vendor/liblouis/tables/gon.tbl +17 -0
- data/vendor/liblouis/tables/gr-pl-comp8.uti +256 -0
- data/vendor/liblouis/tables/grc-international-common.uti +104 -0
- data/vendor/liblouis/tables/grc-international-composed.uti +268 -0
- data/vendor/liblouis/tables/grc-international-decomposed.uti +268 -0
- data/vendor/liblouis/tables/grc-international-en-composed.utb +54 -0
- data/vendor/liblouis/tables/grc-international-en.utb +206 -0
- data/vendor/liblouis/tables/grc-international-es.utb +228 -0
- data/vendor/liblouis/tables/gu-in-g1.utb +27 -0
- data/vendor/liblouis/tables/gu.tbl +18 -0
- data/vendor/liblouis/tables/gujarati.cti +221 -0
- data/vendor/liblouis/tables/gurumuki.cti +393 -0
- data/vendor/liblouis/tables/haw-us-g1.ctb +54 -0
- data/vendor/liblouis/tables/hbo-cantillated-rules.uti +71 -0
- data/vendor/liblouis/tables/hbo-cantillated.utb +109 -0
- data/vendor/liblouis/tables/hbo-common-rules.uti +152 -0
- data/vendor/liblouis/tables/hbo-ihbc-rules.uti +58 -0
- data/vendor/liblouis/tables/hbo-slim-rules.uti +68 -0
- data/vendor/liblouis/tables/hbo-slim.utb +100 -0
- data/vendor/liblouis/tables/hbo.utb +107 -0
- data/vendor/liblouis/tables/he-IL-comp8.utb +464 -0
- data/vendor/liblouis/tables/he-IL.utb +406 -0
- data/vendor/liblouis/tables/he-common-consonants.uti +102 -0
- data/vendor/liblouis/tables/he-common-vowels-ihbc.uti +161 -0
- data/vendor/liblouis/tables/hi-in-g1.utb +27 -0
- data/vendor/liblouis/tables/hi.tbl +18 -0
- data/vendor/liblouis/tables/hr-chardefs.cti +278 -0
- data/vendor/liblouis/tables/hr-comp8.tbl +21 -0
- data/vendor/liblouis/tables/hr-comp8.utb +239 -0
- data/vendor/liblouis/tables/hr-digits.uti +40 -0
- data/vendor/liblouis/tables/hr-g1.ctb +36 -0
- data/vendor/liblouis/tables/hr-g1.tbl +9 -0
- data/vendor/liblouis/tables/hr-translation.cti +364 -0
- data/vendor/liblouis/tables/ht-frenchcompatibility.uti +61 -0
- data/vendor/liblouis/tables/ht-g1.utb +114 -0
- data/vendor/liblouis/tables/hu-backtranslate-correction.dis +38 -0
- data/vendor/liblouis/tables/hu-backtranslate-word-corrections.cti +4293 -0
- data/vendor/liblouis/tables/hu-chardefs.cti +298 -0
- data/vendor/liblouis/tables/hu-exceptionwords.cti +3204 -0
- data/vendor/liblouis/tables/hu-hu-comp8.ctb +183 -0
- data/vendor/liblouis/tables/hu-hu-g1.ctb +129 -0
- data/vendor/liblouis/tables/hu-hu-g1_braille_input.cti +486 -0
- data/vendor/liblouis/tables/hu-hu-g2.ctb +270 -0
- data/vendor/liblouis/tables/hu-hu-g2_exceptions.cti +1164 -0
- data/vendor/liblouis/tables/hy.ctb +121 -0
- data/vendor/liblouis/tables/hy.tbl +21 -0
- data/vendor/liblouis/tables/hyph_cs_CZ.dic +3637 -0
- data/vendor/liblouis/tables/hyph_da_DK.dic +8896 -0
- data/vendor/liblouis/tables/hyph_de_DE.dic +5799 -0
- data/vendor/liblouis/tables/hyph_en_US.dic +5537 -0
- data/vendor/liblouis/tables/hyph_eo.dic +1024 -0
- data/vendor/liblouis/tables/hyph_es_ES.dic +877 -0
- data/vendor/liblouis/tables/hyph_fr_FR.dic +1067 -0
- data/vendor/liblouis/tables/hyph_hu_HU.dic +98519 -0
- data/vendor/liblouis/tables/hyph_it_IT.dic +410 -0
- data/vendor/liblouis/tables/hyph_nb_NO.dic +27142 -0
- data/vendor/liblouis/tables/hyph_nl_NL.dic +12725 -0
- data/vendor/liblouis/tables/hyph_nn_NO.dic +27142 -0
- data/vendor/liblouis/tables/hyph_pl_PL.dic +4074 -0
- data/vendor/liblouis/tables/hyph_pt_PT.dic +308 -0
- data/vendor/liblouis/tables/hyph_ru.dic +6480 -0
- data/vendor/liblouis/tables/hyph_sv_SE.dic +4697 -0
- data/vendor/liblouis/tables/is-chardefs6.cti +170 -0
- data/vendor/liblouis/tables/is-chardefs8.cti +293 -0
- data/vendor/liblouis/tables/is.ctb +157 -0
- data/vendor/liblouis/tables/is.tbl +18 -0
- data/vendor/liblouis/tables/it-it-comp6.utb +404 -0
- data/vendor/liblouis/tables/it-it-comp8.utb +663 -0
- data/vendor/liblouis/tables/iu-ca-g1.ctb +236 -0
- data/vendor/liblouis/tables/ja-kantenji-ucs2.utb +11448 -0
- data/vendor/liblouis/tables/ja-kantenji.utb +53 -0
- data/vendor/liblouis/tables/ja-rokutenkanji.utb +8710 -0
- data/vendor/liblouis/tables/ka-in-g1.utb +27 -0
- data/vendor/liblouis/tables/ka.utb +128 -0
- data/vendor/liblouis/tables/kannada.cti +282 -0
- data/vendor/liblouis/tables/kh-in-g1.utb +26 -0
- data/vendor/liblouis/tables/kha.tbl +18 -0
- data/vendor/liblouis/tables/kk.utb +77 -0
- data/vendor/liblouis/tables/km-g1.utb +412 -0
- data/vendor/liblouis/tables/kmr.tbl +108 -0
- data/vendor/liblouis/tables/kn.tbl +18 -0
- data/vendor/liblouis/tables/ko-2006-g1.ctb +49 -0
- data/vendor/liblouis/tables/ko-2006-g2.ctb +53 -0
- data/vendor/liblouis/tables/ko-2006.cti +190 -0
- data/vendor/liblouis/tables/ko-chars.cti +15140 -0
- data/vendor/liblouis/tables/ko-g1-rules.cti +634 -0
- data/vendor/liblouis/tables/ko-g1.ctb +48 -0
- data/vendor/liblouis/tables/ko-g2-rules.cti +9263 -0
- data/vendor/liblouis/tables/ko-g2.ctb +52 -0
- data/vendor/liblouis/tables/ko.cti +223 -0
- data/vendor/liblouis/tables/kok.ctb +24 -0
- data/vendor/liblouis/tables/kok.tbl +17 -0
- data/vendor/liblouis/tables/kru.ctb +24 -0
- data/vendor/liblouis/tables/kru.tbl +17 -0
- data/vendor/liblouis/tables/ks-in-g1.utb +27 -0
- data/vendor/liblouis/tables/latinLetterDef6Dots.uti +78 -0
- data/vendor/liblouis/tables/latinLetterDef8Dots.uti +75 -0
- data/vendor/liblouis/tables/latinLowercase.uti +389 -0
- data/vendor/liblouis/tables/latinUppercaseComp6.uti +78 -0
- data/vendor/liblouis/tables/lg-ug-g1.utb +60 -0
- data/vendor/liblouis/tables/litdigits6Dots.uti +30 -0
- data/vendor/liblouis/tables/litdigits6DotsPlusDot6.uti +30 -0
- data/vendor/liblouis/tables/lo-g1.utb +3127 -0
- data/vendor/liblouis/tables/loweredDigits6Dots.uti +30 -0
- data/vendor/liblouis/tables/loweredDigits8Dots.uti +30 -0
- data/vendor/liblouis/tables/lt-6dot.utb +308 -0
- data/vendor/liblouis/tables/lt-8dot.utb +281 -0
- data/vendor/liblouis/tables/lt.ctb +313 -0
- data/vendor/liblouis/tables/lv.tbl +22 -0
- data/vendor/liblouis/tables/maketablelist.sh +52 -0
- data/vendor/liblouis/tables/malayalam.cti +674 -0
- data/vendor/liblouis/tables/mao-nz-g1.ctb +65 -0
- data/vendor/liblouis/tables/marburg_single_cell_defs.cti +66 -0
- data/vendor/liblouis/tables/marburg_unicode_defs.cti +297 -0
- data/vendor/liblouis/tables/mk-g1.utb +240 -0
- data/vendor/liblouis/tables/ml-in-g1.utb +27 -0
- data/vendor/liblouis/tables/ml.tbl +21 -0
- data/vendor/liblouis/tables/mn-MN-common.cti +110 -0
- data/vendor/liblouis/tables/mn-MN-g1.utb +52 -0
- data/vendor/liblouis/tables/mn-MN-g2.ctb +50 -0
- data/vendor/liblouis/tables/mn-in-g1.utb +27 -0
- data/vendor/liblouis/tables/mni.tbl +18 -0
- data/vendor/liblouis/tables/mr-in-g1.utb +27 -0
- data/vendor/liblouis/tables/mr.tbl +18 -0
- data/vendor/liblouis/tables/ms-my-g2.ctb +4897 -0
- data/vendor/liblouis/tables/mt.ctb +114 -0
- data/vendor/liblouis/tables/mt.tbl +21 -0
- data/vendor/liblouis/tables/mun.ctb +24 -0
- data/vendor/liblouis/tables/mun.tbl +17 -0
- data/vendor/liblouis/tables/mwr.ctb +24 -0
- data/vendor/liblouis/tables/mwr.tbl +17 -0
- data/vendor/liblouis/tables/my-g1.utb +771 -0
- data/vendor/liblouis/tables/my-g2.ctb +3805 -0
- data/vendor/liblouis/tables/ne.ctb +22 -0
- data/vendor/liblouis/tables/ne.tbl +18 -0
- data/vendor/liblouis/tables/nemethdefs.cti +382 -0
- data/vendor/liblouis/tables/nl-BE.dis +532 -0
- data/vendor/liblouis/tables/nl-NL-g0.utb.in +646 -0
- data/vendor/liblouis/tables/nl-chardefs.uti.in +455 -0
- data/vendor/liblouis/tables/nl-comp8.utb +411 -0
- data/vendor/liblouis/tables/nl-print.dis +551 -0
- data/vendor/liblouis/tables/nl-unicode.dis +540 -0
- data/vendor/liblouis/tables/no-no-8dot-fallback-6dot-g0.utb +59 -0
- data/vendor/liblouis/tables/no-no-8dot.utb +629 -0
- data/vendor/liblouis/tables/no-no-braillo-047-01.dis +247 -0
- data/vendor/liblouis/tables/no-no-chardefs6.uti +305 -0
- data/vendor/liblouis/tables/no-no-comp8.ctb +323 -0
- data/vendor/liblouis/tables/no-no-cyrillic6dot.uti +95 -0
- data/vendor/liblouis/tables/no-no-g0.utb +320 -0
- data/vendor/liblouis/tables/no-no-g1.ctb +272 -0
- data/vendor/liblouis/tables/no-no-g2.ctb +737 -0
- data/vendor/liblouis/tables/no-no-g3.ctb +3597 -0
- data/vendor/liblouis/tables/no-no-generic.ctb +295 -0
- data/vendor/liblouis/tables/no-no-generic.dis +295 -0
- data/vendor/liblouis/tables/no-no-latinLetterDef6Dots_diacritics.uti +852 -0
- data/vendor/liblouis/tables/no-no.dis +291 -0
- data/vendor/liblouis/tables/np-in-g1.utb +27 -0
- data/vendor/liblouis/tables/nso-za-g1.utb +38 -0
- data/vendor/liblouis/tables/nso-za-g2.ctb +38 -0
- data/vendor/liblouis/tables/ny-mw.utb +70 -0
- data/vendor/liblouis/tables/or-in-g1.utb +27 -0
- data/vendor/liblouis/tables/or.tbl +18 -0
- data/vendor/liblouis/tables/oriya.cti +238 -0
- data/vendor/liblouis/tables/ovd-6g0.utb +64 -0
- data/vendor/liblouis/tables/ovd-8g0.utb +81 -0
- data/vendor/liblouis/tables/pa.tbl +18 -0
- data/vendor/liblouis/tables/pi.ctb +24 -0
- data/vendor/liblouis/tables/pi.tbl +17 -0
- data/vendor/liblouis/tables/pl-pl-comp8.ctb +658 -0
- data/vendor/liblouis/tables/pl.tbl +12 -0
- data/vendor/liblouis/tables/printables.cti +70 -0
- data/vendor/liblouis/tables/pt-comp6.utb +299 -0
- data/vendor/liblouis/tables/pt-pt-comp8.ctb +395 -0
- data/vendor/liblouis/tables/pt-pt-g1.utb +1312 -0
- data/vendor/liblouis/tables/pt-pt-g2.ctb +874 -0
- data/vendor/liblouis/tables/pt.tbl +20 -0
- data/vendor/liblouis/tables/pu-in-g1.utb +42 -0
- data/vendor/liblouis/tables/quotation-marks.uti +30 -0
- data/vendor/liblouis/tables/ro-g0.utb +85 -0
- data/vendor/liblouis/tables/ro.ctb +126 -0
- data/vendor/liblouis/tables/ro.tbl +21 -0
- data/vendor/liblouis/tables/ru-brf.dis +116 -0
- data/vendor/liblouis/tables/ru-comp6.utb +258 -0
- data/vendor/liblouis/tables/ru-comp8.utb +740 -0
- data/vendor/liblouis/tables/ru-letters.dis +145 -0
- data/vendor/liblouis/tables/ru-litbrl-detailed.utb +77 -0
- data/vendor/liblouis/tables/ru-litbrl.ctb +857 -0
- data/vendor/liblouis/tables/ru-math.uti +395 -0
- data/vendor/liblouis/tables/ru-ru-g1.ctb +804 -0
- data/vendor/liblouis/tables/ru-unicode.dis +121 -0
- data/vendor/liblouis/tables/rw-rw-g1.utb +133 -0
- data/vendor/liblouis/tables/sa-in-g1.utb +27 -0
- data/vendor/liblouis/tables/sa.tbl +18 -0
- data/vendor/liblouis/tables/sah.utb +72 -0
- data/vendor/liblouis/tables/sd.tbl +18 -0
- data/vendor/liblouis/tables/se-se.ctb +246 -0
- data/vendor/liblouis/tables/se-se.dis +334 -0
- data/vendor/liblouis/tables/si-in-g1.utb +27 -0
- data/vendor/liblouis/tables/sin.cti +213 -0
- data/vendor/liblouis/tables/sin.utb +35 -0
- data/vendor/liblouis/tables/sk-g1.ctb +1019 -0
- data/vendor/liblouis/tables/sk-sk-g1.utb +206 -0
- data/vendor/liblouis/tables/sk-sk.utb +112 -0
- data/vendor/liblouis/tables/sl-si-comp8.ctb +204 -0
- data/vendor/liblouis/tables/sl-si-g1.utb +471 -0
- data/vendor/liblouis/tables/sl.tbl +20 -0
- data/vendor/liblouis/tables/smi-6g0.utb +64 -0
- data/vendor/liblouis/tables/smi-8g0.utb +61 -0
- data/vendor/liblouis/tables/sot-za-g1.ctb +72 -0
- data/vendor/liblouis/tables/sot-za-g2.ctb +244 -0
- data/vendor/liblouis/tables/spaces.uti +62 -0
- data/vendor/liblouis/tables/sr-Cyrl.ctb +59 -0
- data/vendor/liblouis/tables/sr-common.cti +161 -0
- data/vendor/liblouis/tables/sr-cyrletters.cti +92 -0
- data/vendor/liblouis/tables/sr-g1.ctb +57 -0
- data/vendor/liblouis/tables/sr-latletters.cti +45 -0
- data/vendor/liblouis/tables/sv-1989.ctb +241 -0
- data/vendor/liblouis/tables/sv-1996.ctb +180 -0
- data/vendor/liblouis/tables/sv-6common.uti +1199 -0
- data/vendor/liblouis/tables/sv-6g0d.utb +508 -0
- data/vendor/liblouis/tables/sv-6g0p.utb +61 -0
- data/vendor/liblouis/tables/sv-6g1.uti +106 -0
- data/vendor/liblouis/tables/sv-6g1d.ctb +57 -0
- data/vendor/liblouis/tables/sv-6g2.uti +254 -0
- data/vendor/liblouis/tables/sv-6g2d.ctb +57 -0
- data/vendor/liblouis/tables/sv-8g0d.utb +495 -0
- data/vendor/liblouis/tables/sv-8g0n.utb +1236 -0
- data/vendor/liblouis/tables/sv-8g1.uti +199 -0
- data/vendor/liblouis/tables/sv-8g1d.ctb +73 -0
- data/vendor/liblouis/tables/sv-8g1n.ctb +73 -0
- data/vendor/liblouis/tables/sv-8g2.uti +486 -0
- data/vendor/liblouis/tables/sv-8g2d.ctb +73 -0
- data/vendor/liblouis/tables/sv-8g2n.ctb +73 -0
- data/vendor/liblouis/tables/sv-g0.utb +65 -0
- data/vendor/liblouis/tables/sv-g1.ctb +57 -0
- data/vendor/liblouis/tables/sv-g2.ctb +57 -0
- data/vendor/liblouis/tables/sv-phon.uti +241 -0
- data/vendor/liblouis/tables/sw-ke-g1-2.ctb +90 -0
- data/vendor/liblouis/tables/sw-ke-g1-3.ctb +109 -0
- data/vendor/liblouis/tables/sw-ke-g1-4.ctb +107 -0
- data/vendor/liblouis/tables/sw-ke-g1-5.ctb +73 -0
- data/vendor/liblouis/tables/sw-ke-g1.utb +278 -0
- data/vendor/liblouis/tables/sw-ke-g2.ctb +276 -0
- data/vendor/liblouis/tables/syc.utb +195 -0
- data/vendor/liblouis/tables/ta-ta-g1.ctb +167 -0
- data/vendor/liblouis/tables/ta.ctb +24 -0
- data/vendor/liblouis/tables/ta.tbl +21 -0
- data/vendor/liblouis/tables/tamil.cti +86 -0
- data/vendor/liblouis/tables/te-in-g1.utb +27 -0
- data/vendor/liblouis/tables/te.tbl +18 -0
- data/vendor/liblouis/tables/telugu.cti +239 -0
- data/vendor/liblouis/tables/text_nabcc.dis +426 -0
- data/vendor/liblouis/tables/th-comp8-backward.utb +226 -0
- data/vendor/liblouis/tables/th-g0.utb +177 -0
- data/vendor/liblouis/tables/th-g1.utb +89 -0
- data/vendor/liblouis/tables/th-g1.uti +315 -0
- data/vendor/liblouis/tables/th-g2.ctb +616 -0
- data/vendor/liblouis/tables/tr-g1.ctb +254 -0
- data/vendor/liblouis/tables/tr-g2.ctb +863 -0
- data/vendor/liblouis/tables/tr-g2.tbl +20 -0
- data/vendor/liblouis/tables/tr.ctb +324 -0
- data/vendor/liblouis/tables/tr.tbl +21 -0
- data/vendor/liblouis/tables/tsn-za-g1.ctb +33 -0
- data/vendor/liblouis/tables/tsn-za-g2.ctb +33 -0
- data/vendor/liblouis/tables/tt.utb +74 -0
- data/vendor/liblouis/tables/uga.utb +86 -0
- data/vendor/liblouis/tables/uk-comp.utb +53 -0
- data/vendor/liblouis/tables/uk-detailed.utb +32 -0
- data/vendor/liblouis/tables/uk.utb +101 -0
- data/vendor/liblouis/tables/ukchardefs.cti +106 -0
- data/vendor/liblouis/tables/ukmaths_single_cell_defs.cti +65 -0
- data/vendor/liblouis/tables/ukmaths_unicode_defs.cti +298 -0
- data/vendor/liblouis/tables/uni-text.dis +330 -0
- data/vendor/liblouis/tables/unicode-braille.utb +291 -0
- data/vendor/liblouis/tables/unicode-without-blank.dis +24 -0
- data/vendor/liblouis/tables/unicode.dis +278 -0
- data/vendor/liblouis/tables/ur-pk-g1.utb +248 -0
- data/vendor/liblouis/tables/ur-pk-g2.ctb +641 -0
- data/vendor/liblouis/tables/us-table.dis +67 -0
- data/vendor/liblouis/tables/uz-g1.utb +117 -0
- data/vendor/liblouis/tables/ve-za-g1.utb +69 -0
- data/vendor/liblouis/tables/ve-za-g2.ctb +208 -0
- data/vendor/liblouis/tables/vi-cb8.utb +49 -0
- data/vendor/liblouis/tables/vi-charsdef.uti +36 -0
- data/vendor/liblouis/tables/vi-lettersdef.uti +401 -0
- data/vendor/liblouis/tables/vi-puncsdef.uti +446 -0
- data/vendor/liblouis/tables/vi-saigon-g1.ctb +530 -0
- data/vendor/liblouis/tables/vi-vn-g0.utb +135 -0
- data/vendor/liblouis/tables/vi-vn-g1.ctb +574 -0
- data/vendor/liblouis/tables/vi-vn-g2.ctb +743 -0
- data/vendor/liblouis/tables/wiskunde-chardefs.cti +261 -0
- data/vendor/liblouis/tables/wordcx.dis +91 -0
- data/vendor/liblouis/tables/xh-za-g1.utb +61 -0
- data/vendor/liblouis/tables/xh-za-g2.ctb +386 -0
- data/vendor/liblouis/tables/yi.utb +236 -0
- data/vendor/liblouis/tables/zh-chn.ctb +45011 -0
- data/vendor/liblouis/tables/zh-hk.ctb +10461 -0
- data/vendor/liblouis/tables/zh-tw.ctb +53810 -0
- data/vendor/liblouis/tables/zh_CHN.tbl +23 -0
- data/vendor/liblouis/tables/zhcn-cbs.ctb +31523 -0
- data/vendor/liblouis/tables/zhcn-g1.ctb +26523 -0
- data/vendor/liblouis/tables/zhcn-g2.ctb +26519 -0
- data/vendor/liblouis/tables/zu-za-g1.utb +33 -0
- data/vendor/liblouis/tables/zu-za-g2.ctb +33 -0
- metadata +558 -0
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
/* liblouis Braille Translation and Back-Translation Library
|
|
2
|
+
|
|
3
|
+
Based on the Linux screenreader BRLTTY, copyright (C) 1999-2006 by The
|
|
4
|
+
BRLTTY Team
|
|
5
|
+
|
|
6
|
+
Copyright (C) 2004, 2005, 2006 ViewPlus Technologies, Inc. www.viewplus.com
|
|
7
|
+
Copyright (C) 2004, 2005, 2006 JJB Software, Inc. www.jjb-software.com
|
|
8
|
+
Copyright (C) 2016 Mike Gray, American Printing House for the Blind
|
|
9
|
+
Copyright (C) 2016 Davy Kager, Dedicon
|
|
10
|
+
|
|
11
|
+
This file is part of liblouis.
|
|
12
|
+
|
|
13
|
+
liblouis is free software: you can redistribute it and/or modify it
|
|
14
|
+
under the terms of the GNU Lesser General Public License as published
|
|
15
|
+
by the Free Software Foundation, either version 2.1 of the License, or
|
|
16
|
+
(at your option) any later version.
|
|
17
|
+
|
|
18
|
+
liblouis is distributed in the hope that it will be useful, but
|
|
19
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
20
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
21
|
+
Lesser General Public License for more details.
|
|
22
|
+
|
|
23
|
+
You should have received a copy of the GNU Lesser General Public
|
|
24
|
+
License along with liblouis. If not, see <http://www.gnu.org/licenses/>.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @file
|
|
29
|
+
* @brief Public API of liblouis
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
#ifndef __LIBLOUIS_H_
|
|
33
|
+
#define __LIBLOUIS_H_
|
|
34
|
+
#ifdef __cplusplus
|
|
35
|
+
extern "C" {
|
|
36
|
+
#endif /* __cplusplus */
|
|
37
|
+
|
|
38
|
+
// clang-format interacts badly with @foo@
|
|
39
|
+
// clang-format off
|
|
40
|
+
typedef @WIDECHAR_TYPE@ widechar;
|
|
41
|
+
// clang-format on
|
|
42
|
+
typedef unsigned short formtype;
|
|
43
|
+
|
|
44
|
+
#ifdef _MSC_VER
|
|
45
|
+
#ifdef _EXPORTING
|
|
46
|
+
#define LIBLOUIS_API __declspec(dllexport)
|
|
47
|
+
#else
|
|
48
|
+
#define LIBLOUIS_API __declspec(dllimport)
|
|
49
|
+
#endif
|
|
50
|
+
#else
|
|
51
|
+
#define LIBLOUIS_API
|
|
52
|
+
#endif
|
|
53
|
+
|
|
54
|
+
#ifdef __EMSCRIPTEN__
|
|
55
|
+
#include "emscripten.h"
|
|
56
|
+
#define EXPORT_CALL EMSCRIPTEN_KEEPALIVE
|
|
57
|
+
#elif defined(_WIN32)
|
|
58
|
+
#define EXPORT_CALL __stdcall
|
|
59
|
+
LIBLOUIS_API
|
|
60
|
+
char *EXPORT_CALL
|
|
61
|
+
lou_getProgramPath(void);
|
|
62
|
+
#else
|
|
63
|
+
#define EXPORT_CALL
|
|
64
|
+
#endif
|
|
65
|
+
|
|
66
|
+
typedef enum {
|
|
67
|
+
plain_text = 0x0000,
|
|
68
|
+
emph_1 = 0x0001,
|
|
69
|
+
emph_2 = 0x0002,
|
|
70
|
+
emph_3 = 0x0004,
|
|
71
|
+
emph_4 = 0x0008,
|
|
72
|
+
emph_5 = 0x0010,
|
|
73
|
+
emph_6 = 0x0020,
|
|
74
|
+
emph_7 = 0x0040,
|
|
75
|
+
emph_8 = 0x0080,
|
|
76
|
+
emph_9 = 0x0100,
|
|
77
|
+
emph_10 = 0x0200,
|
|
78
|
+
computer_braille = 0x0400,
|
|
79
|
+
// @deprecated for input. This feature is unreliable and will be removed in a future
|
|
80
|
+
// release
|
|
81
|
+
no_translate = 0x0800,
|
|
82
|
+
no_contract = 0x1000,
|
|
83
|
+
// SYLLABLE_MARKER_1 0x2000,
|
|
84
|
+
// SYLLABLE_MARKER_1 0x4000
|
|
85
|
+
// CAPSEMPH 0x4000
|
|
86
|
+
} typeforms;
|
|
87
|
+
|
|
88
|
+
#define italic emph_1
|
|
89
|
+
#define underline emph_2
|
|
90
|
+
#define bold emph_3
|
|
91
|
+
|
|
92
|
+
#define comp_emph_1 emph_1
|
|
93
|
+
#define comp_emph_2 emph_2
|
|
94
|
+
#define comp_emph_3 emph_3
|
|
95
|
+
|
|
96
|
+
#define EMPH_NAME_BOLD "bold"
|
|
97
|
+
#define EMPH_NAME_ITALIC "italic"
|
|
98
|
+
#define EMPH_NAME_UNDERLINE "underline"
|
|
99
|
+
|
|
100
|
+
typedef enum {
|
|
101
|
+
noContractions = 1,
|
|
102
|
+
compbrlAtCursor = 2,
|
|
103
|
+
dotsIO = 4,
|
|
104
|
+
// for historic reasons 8 and 16 are free
|
|
105
|
+
compbrlLeftCursor = 32,
|
|
106
|
+
ucBrl = 64,
|
|
107
|
+
noUndefined = 128,
|
|
108
|
+
partialTrans = 256
|
|
109
|
+
} translationModes;
|
|
110
|
+
|
|
111
|
+
#define noUndefinedDots noUndefined
|
|
112
|
+
|
|
113
|
+
LIBLOUIS_API
|
|
114
|
+
const char *EXPORT_CALL
|
|
115
|
+
lou_version(void);
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Return the size of widechar
|
|
119
|
+
*/
|
|
120
|
+
LIBLOUIS_API
|
|
121
|
+
int EXPORT_CALL
|
|
122
|
+
lou_charSize(void);
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Translates a string according to the given translation table(s)
|
|
126
|
+
*
|
|
127
|
+
* Take a string of wide characters in `inbuf` and translate it to a
|
|
128
|
+
* string of wide characters in `outbuf`.
|
|
129
|
+
*
|
|
130
|
+
* For detailed documentation check the chapter on [Programming with
|
|
131
|
+
* liblouis](https://liblouis.io/documentation/liblouis.html#Programming-with-liblouis)
|
|
132
|
+
* of the liblouis manual.
|
|
133
|
+
*
|
|
134
|
+
* @return 1 on success, 0 on failure
|
|
135
|
+
*
|
|
136
|
+
* @warning BUFFER OVERFLOW RISK: Caller must ensure that:
|
|
137
|
+
* - `inlen` does not exceed actual size of `inbuf`
|
|
138
|
+
* - `typeform` array is NULL or at least `inlen` elements long
|
|
139
|
+
* - `outbuf` can hold at least `outlen` elements
|
|
140
|
+
* Passing incorrect lengths will cause buffer overflows
|
|
141
|
+
*
|
|
142
|
+
* @note `typeform` may be NULL if no typeform checking is needed
|
|
143
|
+
* @note `spacing` is deprecated and must be NULL; any other value is
|
|
144
|
+
* ignored and a warning is logged
|
|
145
|
+
*/
|
|
146
|
+
LIBLOUIS_API
|
|
147
|
+
int EXPORT_CALL
|
|
148
|
+
lou_translateString(const char *tableList, const widechar *inbuf, int *inlen,
|
|
149
|
+
widechar *outbuf, int *outlen, formtype *typeform, char *spacing, int mode);
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Basically the same as [lou_translateString](#lou_translateString) providing additional
|
|
153
|
+
* cursor position tracking information
|
|
154
|
+
*
|
|
155
|
+
* @return 1 on success, 0 on failure
|
|
156
|
+
*
|
|
157
|
+
* @warning BUFFER OVERFLOW RISK: Caller must ensure that:
|
|
158
|
+
* - `inlen` does not exceed actual size of `inbuf`
|
|
159
|
+
* - `typeform` array is NULL or at least `inlen` elements long
|
|
160
|
+
* - `outbuf` can hold at least `outlen` elements
|
|
161
|
+
* - `outputPos` array is at least `inlen` elements long
|
|
162
|
+
* - `inputPos` array is at least `outlen` elements long
|
|
163
|
+
* Passing incorrect lengths will cause buffer overflows
|
|
164
|
+
*
|
|
165
|
+
* @note `outputPos`, `inputPos`, and `cursorPos` may be NULL if position tracking is not
|
|
166
|
+
* needed
|
|
167
|
+
*/
|
|
168
|
+
LIBLOUIS_API
|
|
169
|
+
int EXPORT_CALL
|
|
170
|
+
lou_translate(const char *tableList, const widechar *inbuf, int *inlen, widechar *outbuf,
|
|
171
|
+
int *outlen, formtype *typeform, char *spacing, int *outputPos, int *inputPos,
|
|
172
|
+
int *cursorPos, int mode);
|
|
173
|
+
|
|
174
|
+
LIBLOUIS_API
|
|
175
|
+
int EXPORT_CALL
|
|
176
|
+
lou_translatePrehyphenated(const char *tableList, const widechar *inbuf, int *inlen,
|
|
177
|
+
widechar *outbuf, int *outlen, formtype *typeform, char *spacing, int *outputPos,
|
|
178
|
+
int *inputPos, int *cursorPos, char *inputHyphens, char *outputHyphens, int mode);
|
|
179
|
+
|
|
180
|
+
LIBLOUIS_API
|
|
181
|
+
int EXPORT_CALL
|
|
182
|
+
lou_hyphenate(
|
|
183
|
+
const char *tableList, const widechar *inbuf, int inlen, char *hyphens, int mode);
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Convert a string of dot patterns to a string of chars
|
|
187
|
+
*
|
|
188
|
+
* @param[in] tableList comma separated list of braille tables
|
|
189
|
+
* @param[in] inbuf widechar string of dot patterns, either in liblouis format or Unicode
|
|
190
|
+
* braille
|
|
191
|
+
* @param[out] outbuf widechar string corresponding to the dot patterns in `inbuf`
|
|
192
|
+
* @param[in,out] length of both `inbuf` and `outbuf`
|
|
193
|
+
* @param[in] mode (deprecated)
|
|
194
|
+
*
|
|
195
|
+
* @return 1 on success and 0 on failure.
|
|
196
|
+
*/
|
|
197
|
+
LIBLOUIS_API
|
|
198
|
+
int EXPORT_CALL
|
|
199
|
+
lou_dotsToChar(
|
|
200
|
+
const char *tableList, widechar *inbuf, widechar *outbuf, int length, int mode);
|
|
201
|
+
LIBLOUIS_API
|
|
202
|
+
int EXPORT_CALL
|
|
203
|
+
lou_charToDots(const char *tableList, const widechar *inbuf, widechar *outbuf, int length,
|
|
204
|
+
int mode);
|
|
205
|
+
LIBLOUIS_API
|
|
206
|
+
int EXPORT_CALL
|
|
207
|
+
lou_backTranslateString(const char *tableList, const widechar *inbuf, int *inlen,
|
|
208
|
+
widechar *outbuf, int *outlen, formtype *typeform, char *spacing, int mode);
|
|
209
|
+
|
|
210
|
+
LIBLOUIS_API
|
|
211
|
+
int EXPORT_CALL
|
|
212
|
+
lou_backTranslate(const char *tableList, const widechar *inbuf, int *inlen,
|
|
213
|
+
widechar *outbuf, int *outlen, formtype *typeform, char *spacing, int *outputPos,
|
|
214
|
+
int *inputPos, int *cursorPos, int mode);
|
|
215
|
+
/**
|
|
216
|
+
* Print error messages to a file
|
|
217
|
+
*
|
|
218
|
+
* @deprecated As of 2.6.0, applications using liblouis should
|
|
219
|
+
* implement their own logging system.
|
|
220
|
+
*/
|
|
221
|
+
LIBLOUIS_API
|
|
222
|
+
void EXPORT_CALL
|
|
223
|
+
lou_logPrint(const char *format, ...);
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Specify the name of the file to be used by lou_logPrint.
|
|
227
|
+
*
|
|
228
|
+
* If it is not used, this file is stderr
|
|
229
|
+
*
|
|
230
|
+
* @deprecated As of 2.6.0, applications using liblouis should
|
|
231
|
+
* implement their own logging system.
|
|
232
|
+
*/
|
|
233
|
+
LIBLOUIS_API
|
|
234
|
+
void EXPORT_CALL
|
|
235
|
+
lou_logFile(const char *filename);
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Read a character from a file, whether big-endian, little-endian or ASCII8
|
|
239
|
+
*
|
|
240
|
+
* and return it as an integer. EOF at end of file. Mode = 1 on first
|
|
241
|
+
* call, any other value thereafter
|
|
242
|
+
*/
|
|
243
|
+
LIBLOUIS_API
|
|
244
|
+
int EXPORT_CALL
|
|
245
|
+
lou_readCharFromFile(const char *fileName, int *mode);
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Close the log file so it can be read by other functions.
|
|
249
|
+
*
|
|
250
|
+
* @deprecated As of 2.6.0, applications using liblouis should
|
|
251
|
+
* implement their own logging system.
|
|
252
|
+
*/
|
|
253
|
+
LIBLOUIS_API
|
|
254
|
+
void EXPORT_CALL
|
|
255
|
+
lou_logEnd(void);
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Load and compile a translation table
|
|
259
|
+
*
|
|
260
|
+
* Check the table for errors. If none are found load the table into
|
|
261
|
+
* memory and return a pointer to it. If errors are found return a
|
|
262
|
+
* null pointer. It is called by lou_translateString() and
|
|
263
|
+
* lou_backTranslateString() and also by functions in liblouisutdml
|
|
264
|
+
* and by the tools.
|
|
265
|
+
*/
|
|
266
|
+
LIBLOUIS_API
|
|
267
|
+
const void *EXPORT_CALL
|
|
268
|
+
lou_getTable(const char *tableList);
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Check a translation table for errors.
|
|
272
|
+
*
|
|
273
|
+
* If no errors are found it load the table into memory and returns a
|
|
274
|
+
* non-zero value. Else the return value is 0.
|
|
275
|
+
*/
|
|
276
|
+
LIBLOUIS_API
|
|
277
|
+
int EXPORT_CALL
|
|
278
|
+
lou_checkTable(const char *tableList);
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Register a new table resolver. Overrides the default resolver. */
|
|
282
|
+
LIBLOUIS_API
|
|
283
|
+
void EXPORT_CALL
|
|
284
|
+
lou_registerTableResolver(
|
|
285
|
+
char **(EXPORT_CALL *resolver)(const char *table, const char *base));
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Compile a table entry on the fly at run-time
|
|
289
|
+
*
|
|
290
|
+
* This function enables you to compile a table entry on the fly at
|
|
291
|
+
* run-time. The new entry is added to tableList and remains in
|
|
292
|
+
* force until lou_free() is called. If tableList has not
|
|
293
|
+
* previously been loaded it is loaded and compiled.
|
|
294
|
+
*
|
|
295
|
+
* @param inString contains the table entry to be added. It may be
|
|
296
|
+
* anything valid. Error messages will be produced if it is invalid.
|
|
297
|
+
*
|
|
298
|
+
* @return 1 on success and 0 on failure.
|
|
299
|
+
*/
|
|
300
|
+
LIBLOUIS_API
|
|
301
|
+
int EXPORT_CALL
|
|
302
|
+
lou_compileString(const char *tableList, const char *inString);
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Get the typeform bit for the named emphasis class.
|
|
306
|
+
*
|
|
307
|
+
* If the table defines the specified emphasis class the corresponding
|
|
308
|
+
* typeform is returned. Else the return value is 0.
|
|
309
|
+
*/
|
|
310
|
+
LIBLOUIS_API
|
|
311
|
+
formtype EXPORT_CALL
|
|
312
|
+
lou_getTypeformForEmphClass(const char *tableList, const char *emphClass);
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Return the emphasis class names declared in tableList as a
|
|
316
|
+
* NULL-terminated array of strings. The array is acquired with malloc()
|
|
317
|
+
* and should be released with lou_freeEmphClasses(). The strings must
|
|
318
|
+
* not be released, and are no longer valid after lou_free() has been
|
|
319
|
+
* called.
|
|
320
|
+
*/
|
|
321
|
+
LIBLOUIS_API
|
|
322
|
+
char const **EXPORT_CALL
|
|
323
|
+
lou_getEmphClasses(const char *tableList);
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Free the memory allocated and returned by lou_getEmphClasses.
|
|
327
|
+
*/
|
|
328
|
+
LIBLOUIS_API
|
|
329
|
+
void EXPORT_CALL
|
|
330
|
+
lou_freeEmphClasses(char const **);
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Set the path used for searching for tables and liblouisutdml files.
|
|
334
|
+
*
|
|
335
|
+
* Overrides the installation path. Returns NULL if `path` is NULL or
|
|
336
|
+
* if the length of `path` is equal or longer than `MAXSTRING`.
|
|
337
|
+
*
|
|
338
|
+
* @deprecated Please migrate to one of the other ways to set the
|
|
339
|
+
* table search path. See the NEWS file for details.
|
|
340
|
+
*/
|
|
341
|
+
|
|
342
|
+
LIBLOUIS_API
|
|
343
|
+
char *EXPORT_CALL
|
|
344
|
+
lou_setDataPath(const char *path);
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Get the path set in the previous function.
|
|
348
|
+
*
|
|
349
|
+
* @deprecated Please migrate to one of the other ways to get the
|
|
350
|
+
* table search path. See the NEWS file for details.
|
|
351
|
+
*/
|
|
352
|
+
LIBLOUIS_API
|
|
353
|
+
char *EXPORT_CALL
|
|
354
|
+
lou_getDataPath(void);
|
|
355
|
+
|
|
356
|
+
typedef enum {
|
|
357
|
+
LOU_LOG_ALL = 0,
|
|
358
|
+
LOU_LOG_DEBUG = 10000,
|
|
359
|
+
LOU_LOG_INFO = 20000,
|
|
360
|
+
LOU_LOG_WARN = 30000,
|
|
361
|
+
LOU_LOG_ERROR = 40000,
|
|
362
|
+
LOU_LOG_FATAL = 50000,
|
|
363
|
+
LOU_LOG_OFF = 60000
|
|
364
|
+
} logLevels;
|
|
365
|
+
|
|
366
|
+
typedef void(EXPORT_CALL *logcallback)(logLevels level, const char *message);
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Register logging callbacks
|
|
370
|
+
* Set to NULL for default callback.
|
|
371
|
+
*/
|
|
372
|
+
LIBLOUIS_API
|
|
373
|
+
void EXPORT_CALL
|
|
374
|
+
lou_registerLogCallback(logcallback callback);
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Set the level for logging callback to be called at
|
|
378
|
+
*/
|
|
379
|
+
LIBLOUIS_API
|
|
380
|
+
void EXPORT_CALL
|
|
381
|
+
lou_setLogLevel(logLevels level);
|
|
382
|
+
|
|
383
|
+
typedef enum { LOU_ROW_BRAILLE = 0X2800 } LOU_UnicodeConstants;
|
|
384
|
+
|
|
385
|
+
/* ========================= Sort-of private API ========================= */
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Definitions of braille dots
|
|
389
|
+
*/
|
|
390
|
+
typedef enum BrailleDots {
|
|
391
|
+
LOU_DOT_1 = 0X01, /** dot 1 */
|
|
392
|
+
LOU_DOT_2 = 0X02, /** dot 2 */
|
|
393
|
+
LOU_DOT_3 = 0X04, /** dot 3 */
|
|
394
|
+
LOU_DOT_4 = 0X08, /** dot 4 */
|
|
395
|
+
LOU_DOT_5 = 0X10, /** dot 5 */
|
|
396
|
+
LOU_DOT_6 = 0X20, /** dot 6 */
|
|
397
|
+
LOU_DOT_7 = 0X40, /** dot 7 */
|
|
398
|
+
LOU_DOT_8 = 0X80, /** dot 8 */
|
|
399
|
+
LOU_DOT_9 = 0X100, /** virtual dot 9 */
|
|
400
|
+
LOU_DOT_10 = 0X200, /** virtual dot A */
|
|
401
|
+
LOU_DOT_11 = 0X400, /** virtual dot B */
|
|
402
|
+
LOU_DOT_12 = 0X800, /** virtual dot C */
|
|
403
|
+
LOU_DOT_13 = 0X1000, /** virtual dot D */
|
|
404
|
+
LOU_DOT_14 = 0X2000, /** virtual dot E */
|
|
405
|
+
LOU_DOT_15 = 0X4000, /** virtual dot F */
|
|
406
|
+
LOU_DOTS = 0X8000 /** if this bit is true, the widechar represents a dot pattern */
|
|
407
|
+
} BrailleDots;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* A sentinel, used in liblouisutdml
|
|
411
|
+
*/
|
|
412
|
+
#define LOU_ENDSEGMENT 0xffff
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Parse, analyze and index tables.
|
|
416
|
+
*
|
|
417
|
+
* This function must be called prior to lou_findTable() and
|
|
418
|
+
* lou_listTables(). Table names must be provided as a NULL-terminated
|
|
419
|
+
* array of strings. Each table should resolve to exactly one file. An
|
|
420
|
+
* error message is given when a table contains invalid or duplicate
|
|
421
|
+
* metadata fields.
|
|
422
|
+
*/
|
|
423
|
+
LIBLOUIS_API
|
|
424
|
+
void EXPORT_CALL
|
|
425
|
+
lou_indexTables(const char **tables);
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Find the best match for a query.
|
|
429
|
+
*
|
|
430
|
+
* Returns the name of the table, or NULL when no match can be
|
|
431
|
+
* found. If lou_indexTables() has not been previously called, the
|
|
432
|
+
* table search path specified with LOUIS_TABLEPATH will be indexed
|
|
433
|
+
* first. An error message is given when the query is invalid. The
|
|
434
|
+
* caller should free the memory of the returned string with
|
|
435
|
+
* lou_freeTableFile.
|
|
436
|
+
*/
|
|
437
|
+
LIBLOUIS_API
|
|
438
|
+
char *EXPORT_CALL
|
|
439
|
+
lou_findTable(const char *query);
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Free the memory allocated and returned by lou_findTable.
|
|
443
|
+
*/
|
|
444
|
+
LIBLOUIS_API
|
|
445
|
+
void EXPORT_CALL
|
|
446
|
+
lou_freeTableFile(char *);
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Find all matches for a query, best match first.
|
|
450
|
+
*
|
|
451
|
+
* Returns the names of the matched table as a NULL-terminated array
|
|
452
|
+
* of string. If lou_indexTables() has not been previously called, the
|
|
453
|
+
* table search path specified with LOUIS_TABLEPATH will be indexed
|
|
454
|
+
* first. An error message is given when the query is invalid. The
|
|
455
|
+
* caller should free the memory of the returned array and strings
|
|
456
|
+
* with lou_freeTableFiles.
|
|
457
|
+
*/
|
|
458
|
+
LIBLOUIS_API
|
|
459
|
+
char **EXPORT_CALL
|
|
460
|
+
lou_findTables(const char *query);
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Read metadata from a file.
|
|
464
|
+
*
|
|
465
|
+
* Returns the value of the first occuring metadata field specified by
|
|
466
|
+
* `key' in `table', or NULL when the field does not exist. The caller
|
|
467
|
+
* should free the memory of the returned string with lou_freeTableInfo.
|
|
468
|
+
*/
|
|
469
|
+
LIBLOUIS_API
|
|
470
|
+
char *EXPORT_CALL
|
|
471
|
+
lou_getTableInfo(const char *table, const char *key);
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Free the memory allocated and returned by lou_getTableInfo.
|
|
475
|
+
*/
|
|
476
|
+
LIBLOUIS_API
|
|
477
|
+
void EXPORT_CALL
|
|
478
|
+
lou_freeTableInfo(char *);
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* List available tables.
|
|
482
|
+
*
|
|
483
|
+
* Returns the names of available tables as a NULL-terminated array of
|
|
484
|
+
* strings. Only tables that are discoverable, i.e. the have active
|
|
485
|
+
* metadata, are listed. If lou_indexTables() has not been previously
|
|
486
|
+
* called, the table search path specified with LOUIS_TABLEPATH will
|
|
487
|
+
* be indexed first. The caller should free the memory of the returned array with
|
|
488
|
+
* lou_freeTableFiles.
|
|
489
|
+
*/
|
|
490
|
+
LIBLOUIS_API
|
|
491
|
+
char **EXPORT_CALL
|
|
492
|
+
lou_listTables(void);
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Free the memory allocated and returned by lou_findTables or lou_listTables.
|
|
496
|
+
*/
|
|
497
|
+
LIBLOUIS_API
|
|
498
|
+
void EXPORT_CALL
|
|
499
|
+
lou_freeTableFiles(char **);
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Free all memory allocated by liblouis.
|
|
503
|
+
*
|
|
504
|
+
* This function should be called at the end of the application to
|
|
505
|
+
* free all memory allocated by liblouis.
|
|
506
|
+
*/
|
|
507
|
+
LIBLOUIS_API
|
|
508
|
+
void EXPORT_CALL
|
|
509
|
+
lou_free(void);
|
|
510
|
+
|
|
511
|
+
#ifdef __cplusplus
|
|
512
|
+
}
|
|
513
|
+
#endif /* __cplusplus */
|
|
514
|
+
#endif /* __LIBLOUIS_H_ */
|