강현태

Fix Some

Showing 308 changed files with 4884 additions and 1 deletions
35.05,35,17.5,1,137.85,137.85,137.85,137.85,73.5,89,20,52,75,0.2,100,134.5,83,134.5,83,36,20,0.75,50,15.5,144.5,31.5,9.3,140,3.45,102.5,13.5,13.5,13.5,13.5,2.239,2.239,2.239,1.6,1.4,6.85,1.65,1.24,0.15,0.25,1.4,0.25,3.5,8.75,100,85,2.4,99.9,300,10.75,1.36,0.5,25,88,90,85,5.5,50,44,14.5,1.5,223,50,267,1156,161.5,6.75,15.8,6.75,4.25,350.75,65,40.5,2.25,33.5,29,35,35,88.5,2.2,15,15,6.5,9.15,61.55,140,285,40,4,20,250,100,105,7.15,10.7,6.8,99.5,0.55,37.75,10.5,8.6,10,13.5,4.975,1.25,0.495,57,100,140,8.25,30,300,0.65,132.5,26,550,100,0.02,2.15,5.1,565,7,145
\ No newline at end of file
"1.25-(OH)2 vit D3","ACTH(P)","ADA","Albumin","Aldosterone 0��","Aldosterone 3ȸ����","Aldosterone 30��","Aldosterone 60��","ALP-IU/L","ALP-U/L","ALT (GPT)","Ammonia","Amylase","Anti-thrombin ��-g/L","Anti-thrombin ��-%","Apolipoprotein A1","Apolipoprotein B","Apoliprotein A1","Apoliprotein B","a PTT","AST (GOT)","Basophil","BNP","BUN","C3","C4","Ca","CK","CK-MB","Cl","Cortisol 3ȸ����","Cortisol(S) 0��","Cortisol (S) 30��","Cortisol (S) 60��","Cpep- 0&6m","Cpep- 0m","Cpep- 6m","C-peptide 0��","C-peptide 0&30��","C-peptide 30��","Creatinine","Creatinine 24h (U)","CRP","D-dimer","Digoxin","Direct bilirubin","Eosinophil","ESR","Factor��","FBS(B)","FDP","Ferritin(S)","Fibrinogen","Folate(S)","Free-T4(S)","GAD-Ab","GGT","Glucose","Glucose(POCT)","Glucose pp2","HbA1C(B)","HDL-cholesterol","Hematocrit","Hemoglobin","hs-CRP","Ig A","Ig E","IGF-1(S)","Ig G","Ig M","Insulin 0��","Insulin 2ȸ����","Insulin 30��","K","LD","LDL-cholesterol","Lipase","LUC","Lymphocyte","MCH","MCHC-%","MCHC-g/dL","MCV","Mg","Micro-Alb(spot)","Micro-Alb(spot) new","Monocyte","MPV","Myoglobin","Na","Osmol(S)","Parathyroid hormone","Phosphorus","PIVKA-II","Platelet count","PP2Hr(B)","Prolactin (S)","Protein","PT %","PTH related peptide","PTH(S)","PT INR","PT sec","RA factor","% ratio","RBC","Reticulocyte count","RPR","Seg. neutrophil","s-iron","T3(S)","T4(S)","TG-Ab(S)","TIBC","Total bilirubin","Total cholesterol","Total CO2","Total lipid","Triglyceride","Troponin-I","TSH(S)","Uric acid","Vit-B12(S)","WBC","��1-Antitrypsin"
35.05,35,17.5,1,137.85,137.85,137.85,137.85,73.5,89,20,52,75,0.2,100,134.5,83,134.5,83,36,20,0.75,50,15.5,144.5,31.5,9.3,140,3.45,102.5,13.5,13.5,13.5,13.5,2.239,2.239,2.239,1.6,1.4,6.85,1.65,1.24,0.15,0.25,1.4,0.25,3.5,8.75,100,85,2.4,99.9,300,10.75,1.36,0.5,25,88,90,85,5.5,50,44,14.5,1.5,223,50,267,1156,161.5,6.75,15.8,6.75,4.25,350.75,65,40.5,2.25,33.5,29,35,35,88.5,2.2,15,15,6.5,9.15,61.55,140,285,40,4,20,250,100,7.15,6.8,99.5,0.55,37.75,10.5,8.6,10,13.5,4.975,1.25,0.495,57,100,140,8.25,30,300,0.65,132.5,26,550,100,0.02,2.15,5.1,565,7,145
......
deps/libiconv/tests
\ No newline at end of file
node-iconv license
==============================================================================
Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
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.
GNU libiconv license
==============================================================================
Copyright (C) 2000-2009, 2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
# node-iconv
Text recoding in JavaScript for fun and profit!
## Supported encodings
European languages
ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16},
KOI8-R, KOI8-U, KOI8-RU,
CP{437,737,775,850,852,853,855,857,858,860,861,863,865,866,869}
CP{1125,1250,1251,1252,1253,1254,1257}
Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
Mac{Cyrillic,Ukraine,Greek,Turkish},
Macintosh
Semitic languages
ISO-8859-{6,8}, CP{1255,1256}, CP862, CP864, Mac{Hebrew,Arabic}
Japanese
EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1
EUC-JISX0213, Shift_JISX0213, ISO-2022-JP-3
Chinese
EUC-CN, HZ, GBK, CP936, GB18030, EUC-TW, BIG5, CP950, BIG5-HKSCS,
BIG5-HKSCS:2004, BIG5-HKSCS:2001, BIG5-HKSCS:1999, ISO-2022-CN,
ISO-2022-CN-EXT, BIG5-2003 (experimental)
Korean
EUC-KR, CP949, ISO-2022-KR, JOHAB
Turkmen
TDS565
Armenian
ARMSCII-8
Georgian
Georgian-Academy, Georgian-PS
Tajik
KOI8-T
Kazakh
PT154, RK1048
Thai
ISO-8859-11, TIS-620, CP874, MacThai
Laotian
MuleLao-1, CP1133
Vietnamese
VISCII, TCVN, CP1258
Platform specifics
HP-ROMAN8, NEXTSTEP, ATARIST, RISCOS-LATIN1
Full Unicode
UTF-8
UCS-2, UCS-2BE, UCS-2LE
UCS-4, UCS-4BE, UCS-4LE
UTF-16, UTF-16BE, UTF-16LE
UTF-32, UTF-32BE, UTF-32LE
UTF-7
C99, JAVA
Full Unicode, in terms of `uint16_t` or `uint32_t`
(with machine dependent endianness and alignment)
UCS-2-INTERNAL, UCS-4-INTERNAL
Locale dependent, in terms of `char` or `wchar_t`
(with machine dependent endianness and alignment, and with OS and
locale dependent semantics)
char, wchar_t
The empty encoding name "" is equivalent to "char": it denotes the
locale dependent character encoding.
If you don't need the full gamut of encodings, consider using [iconv-lite][].
It supports most common encodings and doesn't require a compiler to install.
## Installing with [npm](http://npmjs.org/)
$ npm install iconv
Note that you do not need to have a copy of libiconv installed to use this
module.
## Compiling from source
$ git clone git://github.com/bnoordhuis/node-iconv.git
$ cd node-iconv
$ npm install
If you have a specific node.js source checkout that you want to build against,
replace the last command with:
$ npm install --nodedir=/path/to/node
## Usage
Encode from one character encoding to another:
// convert from UTF-8 to ISO-8859-1
var Buffer = require('buffer').Buffer;
var Iconv = require('iconv').Iconv;
var assert = require('assert');
var iconv = new Iconv('UTF-8', 'ISO-8859-1');
var buffer = iconv.convert('Hello, world!');
var buffer2 = iconv.convert(new Buffer('Hello, world!'));
assert.equals(buffer.inspect(), buffer2.inspect());
// do something useful with the buffers
A simple ISO-8859-1 to UTF-8 conversion TCP service:
var net = require('net');
var Iconv = require('iconv').Iconv;
var server = net.createServer(function(conn) {
var iconv = new Iconv('latin1', 'utf-8');
conn.pipe(iconv).pipe(conn);
});
server.listen(8000);
console.log('Listening on tcp://0.0.0.0:8000/');
Look at test/test-basic.js and test/test-stream.js for more examples
and node-iconv's behaviour under error conditions.
## Notes
Things to keep in mind when you work with node-iconv.
### Chunked data
Say you are reading data in chunks from a HTTP stream. The logical input is a
single document (the full POST request data) but the physical input will be
spread over several buffers (the request chunks).
You must accumulate the small buffers into a single large buffer before
performing the conversion. If you don't, you will get unexpected results with
multi-byte and stateful character sets like UTF-8 and ISO-2022-JP.
The above only applies when you are calling `Iconv#convert()` yourself.
If you use the streaming interface, node-iconv takes care of stitching
partial character sequences together again.
### Dealing with untranslatable characters
Characters are not always translatable to another encoding. The UTF-8 string
"ça va が", for example, cannot be represented in plain 7-bits ASCII without
some loss of fidelity.
By default, node-iconv throws EILSEQ when untranslatabe characters are
encountered but this can be customized. Quoting the `iconv_open(3)` man page:
//TRANSLIT
When the string "//TRANSLIT" is appended to tocode, transliteration is
activated. This means that when a character cannot be represented in the
target character set, it can be approximated through one or several
similarly looking characters.
//IGNORE
When the string "//IGNORE" is appended to tocode, characters that cannot be
represented in the target character set will be silently discarded.
Example usage:
var iconv = new Iconv('UTF-8', 'ASCII');
iconv.convert('ça va'); // throws EILSEQ
var iconv = new Iconv('UTF-8', 'ASCII//IGNORE');
iconv.convert('ça va'); // returns "a va"
var iconv = new Iconv('UTF-8', 'ASCII//TRANSLIT');
iconv.convert('ça va'); // "ca va"
var iconv = new Iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE');
iconv.convert('ça va が'); // "ca va "
### EINVAL
EINVAL is raised when the input ends in a partial character sequence. This is a
feature, not a bug.
[iconv-lite]: https://www.npmjs.org/package/iconv-lite
{
'variables': {
'node_iconv_use_system_libiconv%': 0,
},
'targets': [
{
'target_name': 'iconv',
'include_dirs': ['<!(node -e "require(\'nan\')")'],
'sources': ['src/binding.cc'],
'ccflags': [
'-Wall',
'-Wextra',
'-Wno-unused-parameter', # Squelches warnings coming from v8.h.
'-fno-exceptions',
'-fno-rtti',
],
# Have to repeat flags on mac because of gyp's xcode emulation "feature".
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
'GCC_ENABLE_CPP_RTTI': 'NO',
'WARNING_CFLAGS': ['-Wall', '-Wextra', '-Wno-unused-parameter'],
},
'conditions': [
['node_iconv_use_system_libiconv==0', {
'defines': ['ICONV_CONST=const', 'ENABLE_EXTRA=1'],
'include_dirs': ['support'],
'sources': [
'deps/libiconv/lib/iconv.c',
'support/localcharset.c',
],
'cflags!': ['-W', '-Wall', '-Wextra'],
'msvs_settings': {
'VCCLCompilerTool': {
'DisableSpecificWarnings': [
'4018', # Signed/unsigned comparison.
'4090', # Const/non-const mismatch.
'4244', # Narrowing cast.
'4267', # Narrowing cast.
],
},
},
'xcode_settings': {
'WARNING_CFLAGS!': ['-W', '-Wall', '-Wextra'],
'WARNING_CFLAGS': [
'-Wno-parentheses-equality',
'-Wno-static-in-inline',
'-Wno-tautological-compare',
],
},
}],
],
},
],
}
This diff is collapsed. Click to expand it.
cmd_Release/iconv.node := rm -rf "Release/iconv.node" && cp -af "Release/obj.target/iconv.node" "Release/iconv.node"
cmd_Release/obj.target/iconv.node := g++ -shared -pthread -rdynamic -m64 -Wl,-soname=iconv.node -o Release/obj.target/iconv.node -Wl,--start-group Release/obj.target/iconv/src/binding.o Release/obj.target/iconv/deps/libiconv/lib/iconv.o Release/obj.target/iconv/support/localcharset.o -Wl,--end-group
cmd_Release/obj.target/iconv/src/binding.o := g++ '-DNODE_GYP_MODULE_NAME=iconv' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DICONV_CONST=const' '-DENABLE_EXTRA=1' '-DBUILDING_NODE_EXTENSION' -I/home/swc/.node-gyp/8.11.2/include/node -I/home/swc/.node-gyp/8.11.2/src -I/home/swc/.node-gyp/8.11.2/deps/uv/include -I/home/swc/.node-gyp/8.11.2/deps/v8/include -I../../nan -I../support -fPIC -pthread -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF ./Release/.deps/Release/obj.target/iconv/src/binding.o.d.raw -c -o Release/obj.target/iconv/src/binding.o ../src/binding.cc
Release/obj.target/iconv/src/binding.o: ../src/binding.cc \
../support/iconv.h ../../nan/nan.h \
/home/swc/.node-gyp/8.11.2/include/node/node_version.h \
/home/swc/.node-gyp/8.11.2/include/node/uv.h \
/home/swc/.node-gyp/8.11.2/include/node/uv-errno.h \
/home/swc/.node-gyp/8.11.2/include/node/uv-version.h \
/home/swc/.node-gyp/8.11.2/include/node/uv-unix.h \
/home/swc/.node-gyp/8.11.2/include/node/uv-threadpool.h \
/home/swc/.node-gyp/8.11.2/include/node/uv-linux.h \
/home/swc/.node-gyp/8.11.2/include/node/node.h \
/home/swc/.node-gyp/8.11.2/include/node/v8.h \
/home/swc/.node-gyp/8.11.2/include/node/v8-version.h \
/home/swc/.node-gyp/8.11.2/include/node/v8config.h \
/home/swc/.node-gyp/8.11.2/include/node/node_version.h \
/home/swc/.node-gyp/8.11.2/include/node/node_buffer.h \
/home/swc/.node-gyp/8.11.2/include/node/node.h \
/home/swc/.node-gyp/8.11.2/include/node/node_object_wrap.h \
../../nan/nan_callbacks.h ../../nan/nan_callbacks_12_inl.h \
../../nan/nan_maybe_43_inl.h ../../nan/nan_converters.h \
../../nan/nan_converters_43_inl.h ../../nan/nan_new.h \
../../nan/nan_implementation_12_inl.h ../../nan/nan_persistent_12_inl.h \
../../nan/nan_weak.h ../../nan/nan_object_wrap.h ../../nan/nan_private.h \
../../nan/nan_typedarray_contents.h ../../nan/nan_json.h
../src/binding.cc:
../support/iconv.h:
../../nan/nan.h:
/home/swc/.node-gyp/8.11.2/include/node/node_version.h:
/home/swc/.node-gyp/8.11.2/include/node/uv.h:
/home/swc/.node-gyp/8.11.2/include/node/uv-errno.h:
/home/swc/.node-gyp/8.11.2/include/node/uv-version.h:
/home/swc/.node-gyp/8.11.2/include/node/uv-unix.h:
/home/swc/.node-gyp/8.11.2/include/node/uv-threadpool.h:
/home/swc/.node-gyp/8.11.2/include/node/uv-linux.h:
/home/swc/.node-gyp/8.11.2/include/node/node.h:
/home/swc/.node-gyp/8.11.2/include/node/v8.h:
/home/swc/.node-gyp/8.11.2/include/node/v8-version.h:
/home/swc/.node-gyp/8.11.2/include/node/v8config.h:
/home/swc/.node-gyp/8.11.2/include/node/node_version.h:
/home/swc/.node-gyp/8.11.2/include/node/node_buffer.h:
/home/swc/.node-gyp/8.11.2/include/node/node.h:
/home/swc/.node-gyp/8.11.2/include/node/node_object_wrap.h:
../../nan/nan_callbacks.h:
../../nan/nan_callbacks_12_inl.h:
../../nan/nan_maybe_43_inl.h:
../../nan/nan_converters.h:
../../nan/nan_converters_43_inl.h:
../../nan/nan_new.h:
../../nan/nan_implementation_12_inl.h:
../../nan/nan_persistent_12_inl.h:
../../nan/nan_weak.h:
../../nan/nan_object_wrap.h:
../../nan/nan_private.h:
../../nan/nan_typedarray_contents.h:
../../nan/nan_json.h:
cmd_Release/obj.target/iconv/support/localcharset.o := cc '-DNODE_GYP_MODULE_NAME=iconv' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DICONV_CONST=const' '-DENABLE_EXTRA=1' '-DBUILDING_NODE_EXTENSION' -I/home/swc/.node-gyp/8.11.2/include/node -I/home/swc/.node-gyp/8.11.2/src -I/home/swc/.node-gyp/8.11.2/deps/uv/include -I/home/swc/.node-gyp/8.11.2/deps/v8/include -I../../nan -I../support -fPIC -pthread -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/iconv/support/localcharset.o.d.raw -c -o Release/obj.target/iconv/support/localcharset.o ../support/localcharset.c
Release/obj.target/iconv/support/localcharset.o: \
../support/localcharset.c ../support/localcharset.h
../support/localcharset.c:
../support/localcharset.h:
No preview for this file type
# This file is generated by gyp; do not edit.
export builddir_name ?= ./build/.
.PHONY: all
all:
$(MAKE) iconv
# Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": []
},
"variables": {
"asan": 0,
"coverage": "false",
"debug_devtools": "node",
"debug_http2": "false",
"debug_nghttp2": "false",
"force_dynamic_crt": 0,
"gas_version": "2.23",
"host_arch": "x64",
"icu_data_file": "icudt60l.dat",
"icu_data_in": "../../deps/icu-small/source/data/in/icudt60l.dat",
"icu_endianness": "l",
"icu_gyp_path": "tools/icu/icu-generic.gyp",
"icu_locales": "en,root",
"icu_path": "deps/icu-small",
"icu_small": "true",
"icu_ver_major": "60",
"llvm_version": 0,
"node_byteorder": "little",
"node_enable_d8": "false",
"node_enable_v8_vtunejit": "false",
"node_install_npm": "true",
"node_module_version": 57,
"node_no_browser_globals": "false",
"node_prefix": "/",
"node_release_urlbase": "https://nodejs.org/download/release/",
"node_shared": "false",
"node_shared_cares": "false",
"node_shared_http_parser": "false",
"node_shared_libuv": "false",
"node_shared_nghttp2": "false",
"node_shared_openssl": "false",
"node_shared_zlib": "false",
"node_tag": "",
"node_target_type": "executable",
"node_use_bundled_v8": "true",
"node_use_dtrace": "false",
"node_use_etw": "false",
"node_use_lttng": "false",
"node_use_openssl": "true",
"node_use_perfctr": "false",
"node_use_v8_platform": "true",
"node_without_node_options": "false",
"openssl_fips": "",
"openssl_no_asm": 0,
"shlib_suffix": "so.57",
"target_arch": "x64",
"uv_parent_path": "/deps/uv/",
"uv_use_dtrace": "false",
"v8_enable_gdbjit": 0,
"v8_enable_i18n_support": 1,
"v8_enable_inspector": 1,
"v8_no_strict_aliasing": 1,
"v8_optimized_debug": 0,
"v8_promise_internal_field_count": 1,
"v8_random_seed": 0,
"v8_trace_maps": 0,
"v8_use_snapshot": "true",
"want_separate_host_toolset": 0,
"nodedir": "/home/swc/.node-gyp/8.11.2",
"standalone_static_library": 1,
"cache_lock_stale": "60000",
"ham_it_up": "",
"legacy_bundling": "",
"sign_git_tag": "",
"user_agent": "npm/5.6.0 node/v8.11.2 linux x64",
"always_auth": "",
"bin_links": "true",
"key": "",
"allow_same_version": "",
"description": "true",
"fetch_retries": "2",
"heading": "npm",
"if_present": "",
"init_version": "1.0.0",
"user": "",
"prefer_online": "",
"force": "",
"only": "",
"read_only": "",
"cache_min": "10",
"init_license": "ISC",
"editor": "vi",
"rollback": "true",
"tag_version_prefix": "v",
"cache_max": "Infinity",
"timing": "",
"userconfig": "/home/swc/.npmrc",
"engine_strict": "",
"init_author_name": "",
"init_author_url": "",
"tmp": "/tmp",
"depth": "Infinity",
"package_lock_only": "",
"save_dev": "",
"usage": "",
"metrics_registry": "https://registry.npmjs.org/",
"otp": "",
"package_lock": "true",
"progress": "true",
"https_proxy": "",
"save_prod": "",
"cidr": "",
"onload_script": "",
"sso_type": "oauth",
"rebuild_bundle": "true",
"save_bundle": "",
"shell": "/bin/bash",
"dry_run": "",
"prefix": "/usr",
"scope": "",
"browser": "",
"cache_lock_wait": "10000",
"ignore_prepublish": "",
"registry": "https://registry.npmjs.org/",
"save_optional": "",
"searchopts": "",
"versions": "",
"cache": "/home/swc/.npm",
"send_metrics": "",
"global_style": "",
"ignore_scripts": "",
"version": "",
"local_address": "",
"viewer": "man",
"node_gyp": "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",
"prefer_offline": "",
"color": "true",
"fetch_retry_mintimeout": "10000",
"maxsockets": "50",
"offline": "",
"sso_poll_frequency": "500",
"umask": "0002",
"fetch_retry_maxtimeout": "60000",
"logs_max": "10",
"message": "%s",
"ca": "",
"cert": "",
"global": "",
"link": "",
"access": "",
"also": "",
"save": "true",
"unicode": "true",
"long": "",
"production": "",
"searchlimit": "20",
"unsafe_perm": "true",
"auth_type": "legacy",
"node_version": "8.11.2",
"tag": "latest",
"git_tag_version": "true",
"commit_hooks": "true",
"script_shell": "",
"shrinkwrap": "true",
"fetch_retry_factor": "10",
"save_exact": "",
"strict_ssl": "true",
"dev": "",
"globalconfig": "/usr/etc/npmrc",
"init_module": "/home/swc/.npm-init.js",
"parseable": "",
"globalignorefile": "/usr/etc/npmignore",
"cache_lock_retries": "10",
"searchstaleness": "900",
"node_options": "",
"save_prefix": "^",
"scripts_prepend_node_path": "warn-only",
"group": "1002",
"init_author_email": "",
"searchexclude": "",
"git": "git",
"optional": "true",
"json": ""
}
}
# This file is generated by gyp; do not edit.
TOOLSET := target
TARGET := iconv
DEFS_Debug := \
'-DNODE_GYP_MODULE_NAME=iconv' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-DICONV_CONST=const' \
'-DENABLE_EXTRA=1' \
'-DBUILDING_NODE_EXTENSION' \
'-DDEBUG' \
'-D_DEBUG' \
'-DV8_ENABLE_CHECKS'
# Flags passed to all source files.
CFLAGS_Debug := \
-fPIC \
-pthread \
-Wno-unused-parameter \
-m64 \
-g \
-O0
# Flags passed to only C files.
CFLAGS_C_Debug :=
# Flags passed to only C++ files.
CFLAGS_CC_Debug := \
-fno-rtti \
-fno-exceptions \
-std=gnu++0x
INCS_Debug := \
-I/home/swc/.node-gyp/8.11.2/include/node \
-I/home/swc/.node-gyp/8.11.2/src \
-I/home/swc/.node-gyp/8.11.2/deps/uv/include \
-I/home/swc/.node-gyp/8.11.2/deps/v8/include \
-I$(srcdir)/../nan \
-I$(srcdir)/support
DEFS_Release := \
'-DNODE_GYP_MODULE_NAME=iconv' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-DICONV_CONST=const' \
'-DENABLE_EXTRA=1' \
'-DBUILDING_NODE_EXTENSION'
# Flags passed to all source files.
CFLAGS_Release := \
-fPIC \
-pthread \
-Wno-unused-parameter \
-m64 \
-O3 \
-fno-omit-frame-pointer
# Flags passed to only C files.
CFLAGS_C_Release :=
# Flags passed to only C++ files.
CFLAGS_CC_Release := \
-fno-rtti \
-fno-exceptions \
-std=gnu++0x
INCS_Release := \
-I/home/swc/.node-gyp/8.11.2/include/node \
-I/home/swc/.node-gyp/8.11.2/src \
-I/home/swc/.node-gyp/8.11.2/deps/uv/include \
-I/home/swc/.node-gyp/8.11.2/deps/v8/include \
-I$(srcdir)/../nan \
-I$(srcdir)/support
OBJS := \
$(obj).target/$(TARGET)/src/binding.o \
$(obj).target/$(TARGET)/deps/libiconv/lib/iconv.o \
$(obj).target/$(TARGET)/support/localcharset.o
# Add to the list of files we specially track dependencies for.
all_deps += $(OBJS)
# CFLAGS et al overrides must be target-local.
# See "Target-specific Variable Values" in the GNU Make manual.
$(OBJS): TOOLSET := $(TOOLSET)
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
# Suffix rules, putting all outputs into $(obj).
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
# Try building from generated source, too.
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
# End of this set of suffix rules
### Rules for final target.
LDFLAGS_Debug := \
-pthread \
-rdynamic \
-m64
LDFLAGS_Release := \
-pthread \
-rdynamic \
-m64
LIBS :=
$(obj).target/iconv.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(obj).target/iconv.node: LIBS := $(LIBS)
$(obj).target/iconv.node: TOOLSET := $(TOOLSET)
$(obj).target/iconv.node: $(OBJS) FORCE_DO_CMD
$(call do_cmd,solink_module)
all_deps += $(obj).target/iconv.node
# Add target alias
.PHONY: iconv
iconv: $(builddir)/iconv.node
# Copy this to the executable output path.
$(builddir)/iconv.node: TOOLSET := $(TOOLSET)
$(builddir)/iconv.node: $(obj).target/iconv.node FORCE_DO_CMD
$(call do_cmd,copy)
all_deps += $(builddir)/iconv.node
# Short alias for building this executable.
.PHONY: iconv.node
iconv.node: $(obj).target/iconv.node $(builddir)/iconv.node
# Add executable to "all" target.
.PHONY: all
all: $(builddir)/iconv.node
This diff is collapsed. Click to expand it.
/*
* Copyright (C) 1999-2003, 2008 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef USE_AIX
# if defined _AIX
# include "aliases_aix_sysaix.h"
# else
# include "aliases_aix.h"
# endif
#endif
#ifdef USE_OSF1
# if defined __osf__
# include "aliases_osf1_sysosf1.h"
# else
# include "aliases_osf1.h"
# endif
#endif
#ifdef USE_DOS
# include "aliases_dos.h"
#endif
#ifdef USE_EXTRA
# include "aliases_extra.h"
#endif
S(aix_0, "CP856", ei_cp856 )
S(aix_1, "CP922", ei_cp922 )
S(aix_2, "CP943", ei_cp943 )
S(aix_3, "CP1046", ei_cp1046 )
S(aix_4, "CP1124", ei_cp1124 )
S(aix_5, "CP1129", ei_cp1129 )
S(aix_6, "CP1161", ei_cp1161 )
S(aix_7, "IBM1161", ei_cp1161 )
S(aix_8, "IBM-1161", ei_cp1161 )
S(aix_9, "CSIBM1161", ei_cp1161 )
S(aix_10, "CP1162", ei_cp1162 )
S(aix_11, "IBM1162", ei_cp1162 )
S(aix_12, "IBM-1162", ei_cp1162 )
S(aix_13, "CSIBM1162", ei_cp1162 )
S(aix_14, "CP1163", ei_cp1163 )
S(aix_15, "IBM1163", ei_cp1163 )
S(aix_16, "IBM-1163", ei_cp1163 )
S(aix_17, "CSIBM1163", ei_cp1163 )
S(aix_0, "CP856", ei_cp856 )
S(aix_1, "IBM-856", ei_cp856 )
S(aix_2, "CP922", ei_cp922 )
S(aix_3, "IBM-922", ei_cp922 )
S(aix_4, "CP943", ei_cp943 )
S(aix_5, "IBM-943", ei_cp943 )
S(aix_6, "CP1046", ei_cp1046 )
S(aix_7, "IBM-1046", ei_cp1046 )
S(aix_8, "CP1124", ei_cp1124 )
S(aix_9, "IBM-1124", ei_cp1124 )
S(aix_10, "CP1129", ei_cp1129 )
S(aix_11, "IBM-1129", ei_cp1129 )
S(aix_12, "CP1161", ei_cp1161 )
S(aix_13, "IBM1161", ei_cp1161 )
S(aix_14, "IBM-1161", ei_cp1161 )
S(aix_15, "CSIBM1161", ei_cp1161 )
S(aix_16, "CP1162", ei_cp1162 )
S(aix_17, "IBM1162", ei_cp1162 )
S(aix_18, "IBM-1162", ei_cp1162 )
S(aix_19, "CSIBM1162", ei_cp1162 )
S(aix_20, "CP1163", ei_cp1163 )
S(aix_21, "IBM1163", ei_cp1163 )
S(aix_22, "IBM-1163", ei_cp1163 )
S(aix_23, "CSIBM1163", ei_cp1163 )
S(dos_0, "CP437", ei_cp437 )
S(dos_1, "IBM437", ei_cp437 )
S(dos_2, "437", ei_cp437 )
S(dos_3, "CSPC8CODEPAGE437", ei_cp437 )
S(dos_4, "CP737", ei_cp737 )
S(dos_5, "CP775", ei_cp775 )
S(dos_6, "IBM775", ei_cp775 )
S(dos_7, "CSPC775BALTIC", ei_cp775 )
S(dos_8, "CP852", ei_cp852 )
S(dos_9, "IBM852", ei_cp852 )
S(dos_10, "852", ei_cp852 )
S(dos_11, "CSPCP852", ei_cp852 )
S(dos_12, "CP853", ei_cp853 )
S(dos_13, "CP855", ei_cp855 )
S(dos_14, "IBM855", ei_cp855 )
S(dos_15, "855", ei_cp855 )
S(dos_16, "CSIBM855", ei_cp855 )
S(dos_17, "CP857", ei_cp857 )
S(dos_18, "IBM857", ei_cp857 )
S(dos_19, "857", ei_cp857 )
S(dos_20, "CSIBM857", ei_cp857 )
S(dos_21, "CP858", ei_cp858 )
S(dos_22, "CP860", ei_cp860 )
S(dos_23, "IBM860", ei_cp860 )
S(dos_24, "860", ei_cp860 )
S(dos_25, "CSIBM860", ei_cp860 )
S(dos_26, "CP861", ei_cp861 )
S(dos_27, "IBM861", ei_cp861 )
S(dos_28, "861", ei_cp861 )
S(dos_29, "CP-IS", ei_cp861 )
S(dos_30, "CSIBM861", ei_cp861 )
S(dos_31, "CP863", ei_cp863 )
S(dos_32, "IBM863", ei_cp863 )
S(dos_33, "863", ei_cp863 )
S(dos_34, "CSIBM863", ei_cp863 )
S(dos_35, "CP864", ei_cp864 )
S(dos_36, "IBM864", ei_cp864 )
S(dos_37, "CSIBM864", ei_cp864 )
S(dos_38, "CP865", ei_cp865 )
S(dos_39, "IBM865", ei_cp865 )
S(dos_40, "865", ei_cp865 )
S(dos_41, "CSIBM865", ei_cp865 )
S(dos_42, "CP869", ei_cp869 )
S(dos_43, "IBM869", ei_cp869 )
S(dos_44, "869", ei_cp869 )
S(dos_45, "CP-GR", ei_cp869 )
S(dos_46, "CSIBM869", ei_cp869 )
S(dos_47, "CP1125", ei_cp1125 )
S(extra_0, "EUC-JISX0213", ei_euc_jisx0213 )
S(extra_1, "EUC-JIS-2004", ei_euc_jisx0213 )
S(extra_2, "SHIFT_JISX0213", ei_shift_jisx0213 )
S(extra_3, "SHIFT_JIS-2004", ei_shift_jisx0213 )
S(extra_4, "ISO-2022-JP-3", ei_iso2022_jp3 )
S(extra_5, "ISO-2022-JP-2004", ei_iso2022_jp3 )
S(extra_6, "BIG5-2003", ei_big5_2003 )
S(extra_7, "TDS565", ei_tds565 )
S(extra_8, "ISO-IR-230", ei_tds565 )
S(extra_9, "ATARIST", ei_atarist )
S(extra_10, "ATARI", ei_atarist )
S(extra_11, "RISCOS-LATIN1", ei_riscos1 )
S(osf1_0, "DEC-KANJI", ei_dec_kanji )
S(osf1_1, "DEC-HANYU", ei_dec_hanyu )
S(osf1_0, "DEC-KANJI", ei_dec_kanji )
S(osf1_1, "DECKANJI", ei_dec_kanji )
S(osf1_2, "DEC-HANYU", ei_dec_hanyu )
S(osf1_3, "DECHANYU", ei_dec_hanyu )
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
/*
* Copyright (C) 1999-2002, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* ARMSCII-8
*/
static const unsigned short armscii_8_2uni[96] = {
/* 0xa0 */
0x00a0, 0xfffd, 0x0587, 0x0589, 0x0029, 0x0028, 0x00bb, 0x00ab,
0x2014, 0x002e, 0x055d, 0x002c, 0x002d, 0x058a, 0x2026, 0x055c,
/* 0xb0 */
0x055b, 0x055e, 0x0531, 0x0561, 0x0532, 0x0562, 0x0533, 0x0563,
0x0534, 0x0564, 0x0535, 0x0565, 0x0536, 0x0566, 0x0537, 0x0567,
/* 0xc0 */
0x0538, 0x0568, 0x0539, 0x0569, 0x053a, 0x056a, 0x053b, 0x056b,
0x053c, 0x056c, 0x053d, 0x056d, 0x053e, 0x056e, 0x053f, 0x056f,
/* 0xd0 */
0x0540, 0x0570, 0x0541, 0x0571, 0x0542, 0x0572, 0x0543, 0x0573,
0x0544, 0x0574, 0x0545, 0x0575, 0x0546, 0x0576, 0x0547, 0x0577,
/* 0xe0 */
0x0548, 0x0578, 0x0549, 0x0579, 0x054a, 0x057a, 0x054b, 0x057b,
0x054c, 0x057c, 0x054d, 0x057d, 0x054e, 0x057e, 0x054f, 0x057f,
/* 0xf0 */
0x0550, 0x0580, 0x0551, 0x0581, 0x0552, 0x0582, 0x0553, 0x0583,
0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x055a, 0xfffd,
};
static int
armscii_8_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0xa0) {
*pwc = (ucs4_t) c;
return 1;
}
else {
unsigned short wc = armscii_8_2uni[c-0xa0];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
return RET_ILSEQ;
}
static const unsigned char armscii_8_page00[8] = {
0xa5, 0xa4, 0x2a, 0x2b, 0xab, 0xac, 0xa9, 0x2f, /* 0x28-0x2f */
};
static const unsigned char armscii_8_page00_1[32] = {
0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0xa7, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
0x00, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
};
static const unsigned char armscii_8_page05[96] = {
0x00, 0xb2, 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, /* 0x30-0x37 */
0xc0, 0xc2, 0xc4, 0xc6, 0xc8, 0xca, 0xcc, 0xce, /* 0x38-0x3f */
0xd0, 0xd2, 0xd4, 0xd6, 0xd8, 0xda, 0xdc, 0xde, /* 0x40-0x47 */
0xe0, 0xe2, 0xe4, 0xe6, 0xe8, 0xea, 0xec, 0xee, /* 0x48-0x4f */
0xf0, 0xf2, 0xf4, 0xf6, 0xf8, 0xfa, 0xfc, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0xfe, 0xb0, 0xaf, 0xaa, 0xb1, 0x00, /* 0x58-0x5f */
0x00, 0xb3, 0xb5, 0xb7, 0xb9, 0xbb, 0xbd, 0xbf, /* 0x60-0x67 */
0xc1, 0xc3, 0xc5, 0xc7, 0xc9, 0xcb, 0xcd, 0xcf, /* 0x68-0x6f */
0xd1, 0xd3, 0xd5, 0xd7, 0xd9, 0xdb, 0xdd, 0xdf, /* 0x70-0x77 */
0xe1, 0xe3, 0xe5, 0xe7, 0xe9, 0xeb, 0xed, 0xef, /* 0x78-0x7f */
0xf1, 0xf3, 0xf5, 0xf7, 0xf9, 0xfb, 0xfd, 0xa2, /* 0x80-0x87 */
0x00, 0xa3, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
};
static const unsigned char armscii_8_page20[24] = {
0x00, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x00, /* 0x20-0x27 */
};
static int
armscii_8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0028) {
*r = wc;
return 1;
}
else if (wc >= 0x0028 && wc < 0x0030)
c = armscii_8_page00[wc-0x0028];
else if (wc >= 0x0030 && wc < 0x00a0)
c = wc;
else if (wc >= 0x00a0 && wc < 0x00c0)
c = armscii_8_page00_1[wc-0x00a0];
else if (wc >= 0x0530 && wc < 0x0590)
c = armscii_8_page05[wc-0x0530];
else if (wc >= 0x2010 && wc < 0x2028)
c = armscii_8_page20[wc-0x2010];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* ASCII
*/
static int
ascii_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80) {
*pwc = (ucs4_t) c;
return 1;
}
return RET_ILSEQ;
}
static int
ascii_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
if (wc < 0x0080) {
*r = wc;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2005, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Atari ST
*/
static const unsigned short atarist_2uni[128] = {
/* 0x80 */
0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7,
0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5,
/* 0x90 */
0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9,
0x00ff, 0x00d6, 0x00dc, 0x00a2, 0x00a3, 0x00a5, 0x00df, 0x0192,
/* 0xa0 */
0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba,
0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb,
/* 0xb0 */
0x00e3, 0x00f5, 0x00d8, 0x00f8, 0x0153, 0x0152, 0x00c0, 0x00c3,
0x00d5, 0x00a8, 0x00b4, 0x2020, 0x00b6, 0x00a9, 0x00ae, 0x2122,
/* 0xc0 */
0x0133, 0x0132, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5,
0x05d6, 0x05d7, 0x05d8, 0x05d9, 0x05db, 0x05dc, 0x05de, 0x05e0,
/* 0xd0 */
0x05e1, 0x05e2, 0x05e4, 0x05e6, 0x05e7, 0x05e8, 0x05e9, 0x05ea,
0x05df, 0x05da, 0x05dd, 0x05e3, 0x05e5, 0x00a7, 0x2227, 0x221e,
/* 0xe0 */
0x03b1, 0x03b2, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4,
0x03a6, 0x0398, 0x03a9, 0x03b4, 0x222e, 0x03c6, 0x2208, 0x2229,
/* 0xf0 */
0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248,
0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x00b3, 0x00af,
};
static int
atarist_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80)
*pwc = (ucs4_t) c;
else
*pwc = (ucs4_t) atarist_2uni[c-0x80];
return 1;
}
static const unsigned char atarist_page00[96] = {
0x00, 0xad, 0x9b, 0x9c, 0x00, 0x9d, 0x00, 0xdd, /* 0xa0-0xa7 */
0xb9, 0xbd, 0xa6, 0xae, 0xaa, 0x00, 0xbe, 0xff, /* 0xa8-0xaf */
0xf8, 0xf1, 0xfd, 0xfe, 0xba, 0xe6, 0xbc, 0xfa, /* 0xb0-0xb7 */
0x00, 0x00, 0xa7, 0xaf, 0xac, 0xab, 0x00, 0xa8, /* 0xb8-0xbf */
0xb6, 0x00, 0x00, 0xb7, 0x8e, 0x8f, 0x92, 0x80, /* 0xc0-0xc7 */
0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
0x00, 0xa5, 0x00, 0x00, 0x00, 0xb8, 0x99, 0x00, /* 0xd0-0xd7 */
0xb2, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x9e, /* 0xd8-0xdf */
0x85, 0xa0, 0x83, 0xb0, 0x84, 0x86, 0x91, 0x87, /* 0xe0-0xe7 */
0x8a, 0x82, 0x88, 0x89, 0x8d, 0xa1, 0x8c, 0x8b, /* 0xe8-0xef */
0x00, 0xa4, 0x95, 0xa2, 0x93, 0xb1, 0x94, 0xf6, /* 0xf0-0xf7 */
0xb3, 0x97, 0xa3, 0x96, 0x81, 0x00, 0x00, 0x98, /* 0xf8-0xff */
};
static const unsigned char atarist_page01[104] = {
0x00, 0x00, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0x00, 0x00, 0xb5, 0xb4, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static const unsigned char atarist_page03[56] = {
0x00, 0x00, 0x00, 0xe2, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
0xe9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0xe8, 0x00, /* 0xa0-0xa7 */
0x00, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0xe0, 0xe1, 0x00, 0xeb, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
0xe3, 0x00, 0x00, 0xe5, 0xe7, 0x00, 0xed, 0x00, /* 0xc0-0xc7 */
};
static const unsigned char atarist_page05[32] = {
0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, /* 0xd0-0xd7 */
0xca, 0xcb, 0xd9, 0xcc, 0xcd, 0xda, 0xce, 0xd8, /* 0xd8-0xdf */
0xcf, 0xd0, 0xd1, 0xdb, 0xd2, 0xdc, 0xd3, 0xd4, /* 0xe0-0xe7 */
0xd5, 0xd6, 0xd7, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
};
static const unsigned char atarist_page22[96] = {
0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0xf9, 0xfb, 0x00, 0x00, 0x00, 0xdf, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, /* 0x20-0x27 */
0x00, 0xef, 0x00, 0x00, 0x00, 0x00, 0xec, 0x00, /* 0x28-0x2f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x00, 0xf0, 0x00, 0x00, 0xf3, 0xf2, 0x00, 0x00, /* 0x60-0x67 */
};
static const unsigned char atarist_page23[24] = {
0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0xf4, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
};
static int
atarist_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x0100)
c = atarist_page00[wc-0x00a0];
else if (wc >= 0x0130 && wc < 0x0198)
c = atarist_page01[wc-0x0130];
else if (wc >= 0x0390 && wc < 0x03c8)
c = atarist_page03[wc-0x0390];
else if (wc >= 0x05d0 && wc < 0x05f0)
c = atarist_page05[wc-0x05d0];
else if (wc == 0x2020)
c = 0xbb;
else if (wc == 0x207f)
c = 0xfc;
else if (wc == 0x2122)
c = 0xbf;
else if (wc >= 0x2208 && wc < 0x2268)
c = atarist_page22[wc-0x2208];
else if (wc >= 0x2310 && wc < 0x2328)
c = atarist_page23[wc-0x2310];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
/*
* Copyright (C) 1999-2002, 2006, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* BIG5-HKSCS:1999
*/
/*
* BIG5-HKSCS:1999 can be downloaded from
* http://www.info.gov.hk/digital21/eng/hkscs/download.html
* http://www.info.gov.hk/digital21/eng/hkscs/index.html
*
* It extends BIG5 (without the rows 0xC6..0xC7) through the ranges
*
* 0x{88..8D}{40..7E,A1..FE} 641 characters
* 0x{8E..A0}{40..7E,A1..FE} 2898 characters
* 0x{C6..C8}{40..7E,A1..FE} 359 characters
* 0xF9{D6..FE} 41 characters
* 0x{FA..FE}{40..7E,A1..FE} 763 characters
*
* Note that some HKSCS characters are not contained in Unicode 3.2
* and are therefore best represented as sequences of Unicode characters:
* 0x8862 U+00CA U+0304 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x8864 U+00CA U+030C LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND CARON
* 0x88A3 U+00EA U+0304 LATIN SMALL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x88A5 U+00EA U+030C LATIN SMALL LETTER E WITH CIRCUMFLEX AND CARON
*/
#include "hkscs1999.h"
#include "flushwc.h"
static int
big5hkscs1999_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
ucs4_t last_wc = conv->istate;
if (last_wc) {
/* Output the buffered character. */
conv->istate = 0;
*pwc = last_wc;
return 0; /* Don't advance the input pointer. */
} else {
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
}
}
}
}
{
int ret = hkscs1999_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
if (c == 0x88) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if (c2 == 0x62 || c2 == 0x64 || c2 == 0xa3 || c2 == 0xa5) {
/* It's a composed character. */
ucs4_t wc1 = ((c2 >> 3) << 2) + 0x009a; /* = 0x00ca or 0x00ea */
ucs4_t wc2 = ((c2 & 6) << 2) + 0x02fc; /* = 0x0304 or 0x030c */
/* We cannot output two Unicode characters at once. So,
output the first character and buffer the second one. */
*pwc = wc1;
conv->istate = wc2;
return 2;
}
}
}
return RET_ILSEQ;
}
}
#define big5hkscs1999_flushwc normal_flushwc
static int
big5hkscs1999_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
int count = 0;
unsigned char last = conv->ostate;
if (last) {
/* last is = 0x66 or = 0xa7. */
if (wc == 0x0304 || wc == 0x030c) {
/* Output the combined character. */
if (n >= 2) {
r[0] = 0x88;
r[1] = last + ((wc & 24) >> 2) - 4; /* = 0x62 or 0x64 or 0xa3 or 0xa5 */
conv->ostate = 0;
return 2;
} else
return RET_TOOSMALL;
}
/* Output the buffered character. */
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
r += 2;
count = 2;
}
/* Code set 0 (ASCII) */
if (wc < 0x0080) {
/* Plain ASCII character. */
if (n > count) {
r[0] = (unsigned char) wc;
conv->ostate = 0;
return count+1;
} else
return RET_TOOSMALL;
} else {
unsigned char buf[2];
int ret;
/* Code set 1 (BIG5 extended) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (!((buf[0] == 0xc6 && buf[1] >= 0xa1) || buf[0] == 0xc7)) {
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
}
ret = hkscs1999_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if ((wc & ~0x0020) == 0x00ca) {
/* A possible first character of a multi-character sequence. We have to
buffer it. */
if (!(buf[0] == 0x88 && (buf[1] == 0x66 || buf[1] == 0xa7))) abort();
conv->ostate = buf[1]; /* = 0x66 or = 0xa7 */
return count+0;
}
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
return RET_ILUNI;
}
}
static int
big5hkscs1999_reset (conv_t conv, unsigned char *r, size_t n)
{
unsigned char last = conv->ostate;
if (last) {
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
/* conv->ostate = 0; will be done by the caller */
return 2;
} else
return 0;
}
/*
* Copyright (C) 1999-2002, 2006, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* BIG5-HKSCS:2001
*/
/*
* BIG5-HKSCS:2001 can be downloaded from
* http://www.info.gov.hk/digital21/eng/hkscs/download.html
* http://www.info.gov.hk/digital21/eng/hkscs/index.html
*
* It extends BIG5-HKSCS:1999 through 116 characters.
*
* It extends BIG5 (without the rows 0xC6..0xC7) through the ranges
*
* 0x{88..8D}{40..7E,A1..FE} 757 characters
* 0x{8E..A0}{40..7E,A1..FE} 2898 characters
* 0x{C6..C8}{40..7E,A1..FE} 359 characters
* 0xF9{D6..FE} 41 characters
* 0x{FA..FE}{40..7E,A1..FE} 763 characters
*
* Note that some HKSCS characters are not contained in Unicode 3.2
* and are therefore best represented as sequences of Unicode characters:
* 0x8862 U+00CA U+0304 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x8864 U+00CA U+030C LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND CARON
* 0x88A3 U+00EA U+0304 LATIN SMALL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x88A5 U+00EA U+030C LATIN SMALL LETTER E WITH CIRCUMFLEX AND CARON
*/
#include "hkscs2001.h"
#include "flushwc.h"
static int
big5hkscs2001_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
ucs4_t last_wc = conv->istate;
if (last_wc) {
/* Output the buffered character. */
conv->istate = 0;
*pwc = last_wc;
return 0; /* Don't advance the input pointer. */
} else {
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
}
}
}
}
{
int ret = hkscs1999_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2001_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
if (c == 0x88) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if (c2 == 0x62 || c2 == 0x64 || c2 == 0xa3 || c2 == 0xa5) {
/* It's a composed character. */
ucs4_t wc1 = ((c2 >> 3) << 2) + 0x009a; /* = 0x00ca or 0x00ea */
ucs4_t wc2 = ((c2 & 6) << 2) + 0x02fc; /* = 0x0304 or 0x030c */
/* We cannot output two Unicode characters at once. So,
output the first character and buffer the second one. */
*pwc = wc1;
conv->istate = wc2;
return 2;
}
}
}
return RET_ILSEQ;
}
}
#define big5hkscs2001_flushwc normal_flushwc
static int
big5hkscs2001_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
int count = 0;
unsigned char last = conv->ostate;
if (last) {
/* last is = 0x66 or = 0xa7. */
if (wc == 0x0304 || wc == 0x030c) {
/* Output the combined character. */
if (n >= 2) {
r[0] = 0x88;
r[1] = last + ((wc & 24) >> 2) - 4; /* = 0x62 or 0x64 or 0xa3 or 0xa5 */
conv->ostate = 0;
return 2;
} else
return RET_TOOSMALL;
}
/* Output the buffered character. */
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
r += 2;
count = 2;
}
/* Code set 0 (ASCII) */
if (wc < 0x0080) {
/* Plain ASCII character. */
if (n > count) {
r[0] = (unsigned char) wc;
conv->ostate = 0;
return count+1;
} else
return RET_TOOSMALL;
} else {
unsigned char buf[2];
int ret;
/* Code set 1 (BIG5 extended) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (!((buf[0] == 0xc6 && buf[1] >= 0xa1) || buf[0] == 0xc7)) {
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
}
ret = hkscs1999_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if ((wc & ~0x0020) == 0x00ca) {
/* A possible first character of a multi-character sequence. We have to
buffer it. */
if (!(buf[0] == 0x88 && (buf[1] == 0x66 || buf[1] == 0xa7))) abort();
conv->ostate = buf[1]; /* = 0x66 or = 0xa7 */
return count+0;
}
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2001_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
return RET_ILUNI;
}
}
static int
big5hkscs2001_reset (conv_t conv, unsigned char *r, size_t n)
{
unsigned char last = conv->ostate;
if (last) {
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
/* conv->ostate = 0; will be done by the caller */
return 2;
} else
return 0;
}
/*
* Copyright (C) 1999-2002, 2006, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* BIG5-HKSCS:2004
*/
/*
* BIG5-HKSCS:2004 can be downloaded from
* http://www.info.gov.hk/digital21/eng/hkscs/download.html
* http://www.info.gov.hk/digital21/eng/hkscs/index.html
*
* It extends BIG5-HKSCS:2001 through 123 characters.
*
* It extends BIG5 (without the rows 0xC6..0xC7) through the ranges
*
* 0x{87..8D}{40..7E,A1..FE} 880 characters
* 0x{8E..A0}{40..7E,A1..FE} 2898 characters
* 0x{C6..C8}{40..7E,A1..FE} 359 characters
* 0xF9{D6..FE} 41 characters
* 0x{FA..FE}{40..7E,A1..FE} 763 characters
*
* Note that some HKSCS characters are not contained in Unicode 3.2
* and are therefore best represented as sequences of Unicode characters:
* 0x8862 U+00CA U+0304 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x8864 U+00CA U+030C LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND CARON
* 0x88A3 U+00EA U+0304 LATIN SMALL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x88A5 U+00EA U+030C LATIN SMALL LETTER E WITH CIRCUMFLEX AND CARON
*/
#include "hkscs2004.h"
#include "flushwc.h"
static int
big5hkscs2004_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
ucs4_t last_wc = conv->istate;
if (last_wc) {
/* Output the buffered character. */
conv->istate = 0;
*pwc = last_wc;
return 0; /* Don't advance the input pointer. */
} else {
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
}
}
}
}
{
int ret = hkscs1999_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2001_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2004_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
if (c == 0x88) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if (c2 == 0x62 || c2 == 0x64 || c2 == 0xa3 || c2 == 0xa5) {
/* It's a composed character. */
ucs4_t wc1 = ((c2 >> 3) << 2) + 0x009a; /* = 0x00ca or 0x00ea */
ucs4_t wc2 = ((c2 & 6) << 2) + 0x02fc; /* = 0x0304 or 0x030c */
/* We cannot output two Unicode characters at once. So,
output the first character and buffer the second one. */
*pwc = wc1;
conv->istate = wc2;
return 2;
}
}
}
return RET_ILSEQ;
}
}
#define big5hkscs2004_flushwc normal_flushwc
static int
big5hkscs2004_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
int count = 0;
unsigned char last = conv->ostate;
if (last) {
/* last is = 0x66 or = 0xa7. */
if (wc == 0x0304 || wc == 0x030c) {
/* Output the combined character. */
if (n >= 2) {
r[0] = 0x88;
r[1] = last + ((wc & 24) >> 2) - 4; /* = 0x62 or 0x64 or 0xa3 or 0xa5 */
conv->ostate = 0;
return 2;
} else
return RET_TOOSMALL;
}
/* Output the buffered character. */
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
r += 2;
count = 2;
}
/* Code set 0 (ASCII) */
if (wc < 0x0080) {
/* Plain ASCII character. */
if (n > count) {
r[0] = (unsigned char) wc;
conv->ostate = 0;
return count+1;
} else
return RET_TOOSMALL;
} else {
unsigned char buf[2];
int ret;
/* Code set 1 (BIG5 extended) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (!((buf[0] == 0xc6 && buf[1] >= 0xa1) || buf[0] == 0xc7)) {
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
}
ret = hkscs1999_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if ((wc & ~0x0020) == 0x00ca) {
/* A possible first character of a multi-character sequence. We have to
buffer it. */
if (!(buf[0] == 0x88 && (buf[1] == 0x66 || buf[1] == 0xa7))) abort();
conv->ostate = buf[1]; /* = 0x66 or = 0xa7 */
return count+0;
}
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2001_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2004_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
return RET_ILUNI;
}
}
static int
big5hkscs2004_reset (conv_t conv, unsigned char *r, size_t n)
{
unsigned char last = conv->ostate;
if (last) {
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
/* conv->ostate = 0; will be done by the caller */
return 2;
} else
return 0;
}
/*
* Copyright (C) 1999-2002, 2006, 2010 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* BIG5-HKSCS:2008
*/
/*
* BIG5-HKSCS:2008 can be downloaded from
* http://www.ogcio.gov.hk/ccli/eng/hkscs/download.html
* http://www.ogcio.gov.hk/ccli/eng/hkscs/introduction.html
*
* It extends BIG5-HKSCS:2004 through 68 characters.
*
* It extends BIG5 (without the rows 0xC6..0xC7) through the ranges
*
* 0x{87..8D}{40..7E,A1..FE} 880 characters
* 0x{8E..A0}{40..7E,A1..FE} 2898 characters
* 0x{C6..C8}{40..7E,A1..FE} 359 characters
* 0xF9{D6..FE} 41 characters
* 0x{FA..FE}{40..7E,A1..FE} 763 characters
*
* Note that some HKSCS characters are not contained in Unicode 3.2
* and are therefore best represented as sequences of Unicode characters:
* 0x8862 U+00CA U+0304 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x8864 U+00CA U+030C LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND CARON
* 0x88A3 U+00EA U+0304 LATIN SMALL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x88A5 U+00EA U+030C LATIN SMALL LETTER E WITH CIRCUMFLEX AND CARON
*/
#include "hkscs2008.h"
#include "flushwc.h"
static int
big5hkscs2008_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
ucs4_t last_wc = conv->istate;
if (last_wc) {
/* Output the buffered character. */
conv->istate = 0;
*pwc = last_wc;
return 0; /* Don't advance the input pointer. */
} else {
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
}
}
}
}
{
int ret = hkscs1999_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2001_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2004_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2008_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
if (c == 0x88) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if (c2 == 0x62 || c2 == 0x64 || c2 == 0xa3 || c2 == 0xa5) {
/* It's a composed character. */
ucs4_t wc1 = ((c2 >> 3) << 2) + 0x009a; /* = 0x00ca or 0x00ea */
ucs4_t wc2 = ((c2 & 6) << 2) + 0x02fc; /* = 0x0304 or 0x030c */
/* We cannot output two Unicode characters at once. So,
output the first character and buffer the second one. */
*pwc = wc1;
conv->istate = wc2;
return 2;
}
}
}
return RET_ILSEQ;
}
}
#define big5hkscs2008_flushwc normal_flushwc
static int
big5hkscs2008_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
int count = 0;
unsigned char last = conv->ostate;
if (last) {
/* last is = 0x66 or = 0xa7. */
if (wc == 0x0304 || wc == 0x030c) {
/* Output the combined character. */
if (n >= 2) {
r[0] = 0x88;
r[1] = last + ((wc & 24) >> 2) - 4; /* = 0x62 or 0x64 or 0xa3 or 0xa5 */
conv->ostate = 0;
return 2;
} else
return RET_TOOSMALL;
}
/* Output the buffered character. */
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
r += 2;
count = 2;
}
/* Code set 0 (ASCII) */
if (wc < 0x0080) {
/* Plain ASCII character. */
if (n > count) {
r[0] = (unsigned char) wc;
conv->ostate = 0;
return count+1;
} else
return RET_TOOSMALL;
} else {
unsigned char buf[2];
int ret;
/* Code set 1 (BIG5 extended) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (!((buf[0] == 0xc6 && buf[1] >= 0xa1) || buf[0] == 0xc7)) {
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
}
ret = hkscs1999_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if ((wc & ~0x0020) == 0x00ca) {
/* A possible first character of a multi-character sequence. We have to
buffer it. */
if (!(buf[0] == 0x88 && (buf[1] == 0x66 || buf[1] == 0xa7))) abort();
conv->ostate = buf[1]; /* = 0x66 or = 0xa7 */
return count+0;
}
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2001_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2004_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2008_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
return RET_ILUNI;
}
}
static int
big5hkscs2008_reset (conv_t conv, unsigned char *r, size_t n)
{
unsigned char last = conv->ostate;
if (last) {
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
/* conv->ostate = 0; will be done by the caller */
return 2;
} else
return 0;
}
/*
* Copyright (C) 1999-2002, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* C99
* This is ASCII with \uXXXX and \UXXXXXXXX escape sequences, denoting Unicode
* characters. See ISO/IEC 9899:1999, section 6.4.3.
* The treatment of control characters in the range U+0080..U+009F is not
* specified; we pass them through unmodified.
*/
static int
c99_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c;
ucs4_t wc;
int i;
c = s[0];
if (c < 0xa0) {
if (c != '\\') {
*pwc = c;
return 1;
}
if (n < 2)
return RET_TOOFEW(0);
c = s[1];
if (c == 'u') {
wc = 0;
for (i = 2; i < 6; i++) {
if (n <= i)
return RET_TOOFEW(0);
c = s[i];
if (c >= '0' && c <= '9')
c -= '0';
else if (c >= 'A' && c <= 'Z')
c -= 'A'-10;
else if (c >= 'a' && c <= 'z')
c -= 'a'-10;
else
goto simply_backslash;
wc |= (ucs4_t) c << (4 * (5-i));
}
if ((wc >= 0x00a0 && !(wc >= 0xd800 && wc < 0xe000))
|| wc == 0x0024 || wc == 0x0040 || wc == 0x0060) {
*pwc = wc;
return 6;
}
} else if (c == 'U') {
wc = 0;
for (i = 2; i < 10; i++) {
if (n <= i)
return RET_TOOFEW(0);
c = s[i];
if (c >= '0' && c <= '9')
c -= '0';
else if (c >= 'A' && c <= 'Z')
c -= 'A'-10;
else if (c >= 'a' && c <= 'z')
c -= 'a'-10;
else
goto simply_backslash;
wc |= (ucs4_t) c << (4 * (9-i));
}
if ((wc >= 0x00a0 && !(wc >= 0xd800 && wc < 0xe000))
|| wc == 0x0024 || wc == 0x0040 || wc == 0x0060) {
*pwc = wc;
return 10;
}
} else
goto simply_backslash;
}
return RET_ILSEQ;
simply_backslash:
*pwc = '\\';
return 1;
}
static int
c99_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
if (wc < 0xa0) {
*r = wc;
return 1;
} else {
int result;
unsigned char u;
if (wc < 0x10000) {
result = 6;
u = 'u';
} else {
result = 10;
u = 'U';
}
if (n >= result) {
int count;
r[0] = '\\';
r[1] = u;
r += 2;
for (count = result-3; count >= 0; count--) {
unsigned int i = (wc >> (4*count)) & 0x0f;
*r++ = (i < 10 ? '0'+i : 'a'-10+i);
}
return result;
} else
return RET_TOOSMALL;
}
}
(int)(long)&((struct stringpool_t *)0)->stringpool_str392,
(int)(long)&((struct stringpool_t *)0)->stringpool_str389,
(int)(long)&((struct stringpool_t *)0)->stringpool_str258,
(int)(long)&((struct stringpool_t *)0)->stringpool_str436,
(int)(long)&((struct stringpool_t *)0)->stringpool_str285,
(int)(long)&((struct stringpool_t *)0)->stringpool_str222,
(int)(long)&((struct stringpool_t *)0)->stringpool_str418,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str361,
(int)(long)&((struct stringpool_t *)0)->stringpool_str567,
(int)(long)&((struct stringpool_t *)0)->stringpool_str416,
(int)(long)&((struct stringpool_t *)0)->stringpool_str512,
(int)(long)&((struct stringpool_t *)0)->stringpool_str690,
(int)(long)&((struct stringpool_t *)0)->stringpool_str539,
(int)(long)&((struct stringpool_t *)0)->stringpool_str689,
(int)(long)&((struct stringpool_t *)0)->stringpool_str320,
(int)(long)&((struct stringpool_t *)0)->stringpool_str750,
(int)(long)&((struct stringpool_t *)0)->stringpool_str302,
(int)(long)&((struct stringpool_t *)0)->stringpool_str732,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str811,
(int)(long)&((struct stringpool_t *)0)->stringpool_str134,
(int)(long)&((struct stringpool_t *)0)->stringpool_str186,
(int)(long)&((struct stringpool_t *)0)->stringpool_str324,
(int)(long)&((struct stringpool_t *)0)->stringpool_str150,
(int)(long)&((struct stringpool_t *)0)->stringpool_str154,
(int)(long)&((struct stringpool_t *)0)->stringpool_str130,
(int)(long)&((struct stringpool_t *)0)->stringpool_str466,
(int)(long)&((struct stringpool_t *)0)->stringpool_str166,
(int)(long)&((struct stringpool_t *)0)->stringpool_str170,
(int)(long)&((struct stringpool_t *)0)->stringpool_str322,
(int)(long)&((struct stringpool_t *)0)->stringpool_str142,
(int)(long)&((struct stringpool_t *)0)->stringpool_str332,
(int)(long)&((struct stringpool_t *)0)->stringpool_str158,
(int)(long)&((struct stringpool_t *)0)->stringpool_str162,
(int)(long)&((struct stringpool_t *)0)->stringpool_str138,
(int)(long)&((struct stringpool_t *)0)->stringpool_str236,
(int)(long)&((struct stringpool_t *)0)->stringpool_str574,
(int)(long)&((struct stringpool_t *)0)->stringpool_str580,
(int)(long)&((struct stringpool_t *)0)->stringpool_str268,
(int)(long)&((struct stringpool_t *)0)->stringpool_str88,
(int)(long)&((struct stringpool_t *)0)->stringpool_str140,
(int)(long)&((struct stringpool_t *)0)->stringpool_str278,
(int)(long)&((struct stringpool_t *)0)->stringpool_str104,
(int)(long)&((struct stringpool_t *)0)->stringpool_str108,
(int)(long)&((struct stringpool_t *)0)->stringpool_str84,
(int)(long)&((struct stringpool_t *)0)->stringpool_str420,
(int)(long)&((struct stringpool_t *)0)->stringpool_str120,
(int)(long)&((struct stringpool_t *)0)->stringpool_str250,
(int)(long)&((struct stringpool_t *)0)->stringpool_str110,
(int)(long)&((struct stringpool_t *)0)->stringpool_str54,
(int)(long)&((struct stringpool_t *)0)->stringpool_str147,
(int)(long)&((struct stringpool_t *)0)->stringpool_str476,
(int)(long)&((struct stringpool_t *)0)->stringpool_str463,
(int)(long)&((struct stringpool_t *)0)->stringpool_str442,
(int)(long)&((struct stringpool_t *)0)->stringpool_str562,
(int)(long)&((struct stringpool_t *)0)->stringpool_str813,
(int)(long)&((struct stringpool_t *)0)->stringpool_str248,
(int)(long)&((struct stringpool_t *)0)->stringpool_str749,
(int)(long)&((struct stringpool_t *)0)->stringpool_str591,
(int)(long)&((struct stringpool_t *)0)->stringpool_str702,
(int)(long)&((struct stringpool_t *)0)->stringpool_str796,
(int)(long)&((struct stringpool_t *)0)->stringpool_str680,
(int)(long)&((struct stringpool_t *)0)->stringpool_str430,
(int)(long)&((struct stringpool_t *)0)->stringpool_str448,
(int)(long)&((struct stringpool_t *)0)->stringpool_str311,
(int)(long)&((struct stringpool_t *)0)->stringpool_str391,
(int)(long)&((struct stringpool_t *)0)->stringpool_str446,
(int)(long)&((struct stringpool_t *)0)->stringpool_str312,
(int)(long)&((struct stringpool_t *)0)->stringpool_str286,
(int)(long)&((struct stringpool_t *)0)->stringpool_str121,
(int)(long)&((struct stringpool_t *)0)->stringpool_str176,
(int)(long)&((struct stringpool_t *)0)->stringpool_str375,
(int)(long)&((struct stringpool_t *)0)->stringpool_str337,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str242,
(int)(long)&((struct stringpool_t *)0)->stringpool_str206,
(int)(long)&((struct stringpool_t *)0)->stringpool_str211,
(int)(long)&((struct stringpool_t *)0)->stringpool_str536,
(int)(long)&((struct stringpool_t *)0)->stringpool_str651,
(int)(long)&((struct stringpool_t *)0)->stringpool_str683,
(int)(long)&((struct stringpool_t *)0)->stringpool_str613,
(int)(long)&((struct stringpool_t *)0)->stringpool_str329,
(int)(long)&((struct stringpool_t *)0)->stringpool_str426,
(int)(long)&((struct stringpool_t *)0)->stringpool_str89,
(int)(long)&((struct stringpool_t *)0)->stringpool_str344,
(int)(long)&((struct stringpool_t *)0)->stringpool_str479,
(int)(long)&((struct stringpool_t *)0)->stringpool_str548,
(int)(long)&((struct stringpool_t *)0)->stringpool_str209,
(int)(long)&((struct stringpool_t *)0)->stringpool_str661,
(int)(long)&((struct stringpool_t *)0)->stringpool_str608,
(int)(long)&((struct stringpool_t *)0)->stringpool_str634,
(int)(long)&((struct stringpool_t *)0)->stringpool_str610,
(int)(long)&((struct stringpool_t *)0)->stringpool_str72,
(int)(long)&((struct stringpool_t *)0)->stringpool_str388,
(int)(long)&((struct stringpool_t *)0)->stringpool_str153,
(int)(long)&((struct stringpool_t *)0)->stringpool_str443,
(int)(long)&((struct stringpool_t *)0)->stringpool_str254,
(int)(long)&((struct stringpool_t *)0)->stringpool_str281,
(int)(long)&((struct stringpool_t *)0)->stringpool_str78,
(int)(long)&((struct stringpool_t *)0)->stringpool_str437,
(int)(long)&((struct stringpool_t *)0)->stringpool_str210,
(int)(long)&((struct stringpool_t *)0)->stringpool_str252,
(int)(long)&((struct stringpool_t *)0)->stringpool_str710,
(int)(long)&((struct stringpool_t *)0)->stringpool_str692,
(int)(long)&((struct stringpool_t *)0)->stringpool_str700,
(int)(long)&((struct stringpool_t *)0)->stringpool_str495,
(int)(long)&((struct stringpool_t *)0)->stringpool_str243,
(int)(long)&((struct stringpool_t *)0)->stringpool_str106,
(int)(long)&((struct stringpool_t *)0)->stringpool_str869,
(int)(long)&((struct stringpool_t *)0)->stringpool_str425,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_1,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_2,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_3,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_5,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_6,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_10,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_14,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_2,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_6,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_8,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_10,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_12,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_16,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_20,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_5,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_8,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_12,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_13,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_17,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_21,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_22,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_26,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_31,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_35,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_38,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_42,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_47,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_2,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_6,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_7,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_9,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_11,
(int)(long)&((struct stringpool_t *)0)->stringpool_str193,
(int)(long)&((struct stringpool_t *)0)->stringpool_str496,
(int)(long)&((struct stringpool_t *)0)->stringpool_str15,
(int)(long)&((struct stringpool_t *)0)->stringpool_str484,
(int)(long)&((struct stringpool_t *)0)->stringpool_str171,
(int)(long)&((struct stringpool_t *)0)->stringpool_str723,
(int)(long)&((struct stringpool_t *)0)->stringpool_str193,
(int)(long)&((struct stringpool_t *)0)->stringpool_str457,
(int)(long)&((struct stringpool_t *)0)->stringpool_str112,
(int)(long)&((struct stringpool_t *)0)->stringpool_str491,
(int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_1,
(int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_2,
(int)(long)&((struct stringpool_t *)0)->stringpool_str391,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str145,
(int)(long)&((struct stringpool_t *)0)->stringpool_str452,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str131,
(int)(long)&((struct stringpool_t *)0)->stringpool_str445,
(int)(long)&((struct stringpool_t *)0)->stringpool_str260,
(int)(long)&((struct stringpool_t *)0)->stringpool_str255,
(int)(long)&((struct stringpool_t *)0)->stringpool_str573,
(int)(long)&((struct stringpool_t *)0)->stringpool_str388,
(int)(long)&((struct stringpool_t *)0)->stringpool_str303,
(int)(long)&((struct stringpool_t *)0)->stringpool_str610,
(int)(long)&((struct stringpool_t *)0)->stringpool_str425,
(int)(long)&((struct stringpool_t *)0)->stringpool_str618,
(int)(long)&((struct stringpool_t *)0)->stringpool_str418,
(int)(long)&((struct stringpool_t *)0)->stringpool_str469,
(int)(long)&((struct stringpool_t *)0)->stringpool_str411,
(int)(long)&((struct stringpool_t *)0)->stringpool_str462,
(int)(long)&((struct stringpool_t *)0)->stringpool_str5,
(int)(long)&((struct stringpool_t *)0)->stringpool_str457,
(int)(long)&((struct stringpool_t *)0)->stringpool_str155,
(int)(long)&((struct stringpool_t *)0)->stringpool_str183,
(int)(long)&((struct stringpool_t *)0)->stringpool_str207,
(int)(long)&((struct stringpool_t *)0)->stringpool_str169,
(int)(long)&((struct stringpool_t *)0)->stringpool_str177,
(int)(long)&((struct stringpool_t *)0)->stringpool_str161,
(int)(long)&((struct stringpool_t *)0)->stringpool_str527,
(int)(long)&((struct stringpool_t *)0)->stringpool_str191,
(int)(long)&((struct stringpool_t *)0)->stringpool_str151,
(int)(long)&((struct stringpool_t *)0)->stringpool_str242,
(int)(long)&((struct stringpool_t *)0)->stringpool_str158,
(int)(long)&((struct stringpool_t *)0)->stringpool_str210,
(int)(long)&((struct stringpool_t *)0)->stringpool_str172,
(int)(long)&((struct stringpool_t *)0)->stringpool_str180,
(int)(long)&((struct stringpool_t *)0)->stringpool_str164,
(int)(long)&((struct stringpool_t *)0)->stringpool_str313,
(int)(long)&((struct stringpool_t *)0)->stringpool_str507,
(int)(long)&((struct stringpool_t *)0)->stringpool_str508,
(int)(long)&((struct stringpool_t *)0)->stringpool_str127,
(int)(long)&((struct stringpool_t *)0)->stringpool_str43,
(int)(long)&((struct stringpool_t *)0)->stringpool_str71,
(int)(long)&((struct stringpool_t *)0)->stringpool_str95,
(int)(long)&((struct stringpool_t *)0)->stringpool_str57,
(int)(long)&((struct stringpool_t *)0)->stringpool_str65,
(int)(long)&((struct stringpool_t *)0)->stringpool_str49,
(int)(long)&((struct stringpool_t *)0)->stringpool_str415,
(int)(long)&((struct stringpool_t *)0)->stringpool_str79,
(int)(long)&((struct stringpool_t *)0)->stringpool_str128,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str42,
(int)(long)&((struct stringpool_t *)0)->stringpool_str44,
(int)(long)&((struct stringpool_t *)0)->stringpool_str437,
(int)(long)&((struct stringpool_t *)0)->stringpool_str557,
(int)(long)&((struct stringpool_t *)0)->stringpool_str429,
(int)(long)&((struct stringpool_t *)0)->stringpool_str451,
(int)(long)&((struct stringpool_t *)0)->stringpool_str542,
(int)(long)&((struct stringpool_t *)0)->stringpool_str426,
(int)(long)&((struct stringpool_t *)0)->stringpool_str744,
(int)(long)&((struct stringpool_t *)0)->stringpool_str809,
(int)(long)&((struct stringpool_t *)0)->stringpool_str815,
(int)(long)&((struct stringpool_t *)0)->stringpool_str958,
(int)(long)&((struct stringpool_t *)0)->stringpool_str518,
(int)(long)&((struct stringpool_t *)0)->stringpool_str560,
(int)(long)&((struct stringpool_t *)0)->stringpool_str309,
(int)(long)&((struct stringpool_t *)0)->stringpool_str647,
(int)(long)&((struct stringpool_t *)0)->stringpool_str453,
(int)(long)&((struct stringpool_t *)0)->stringpool_str270,
(int)(long)&((struct stringpool_t *)0)->stringpool_str315,
(int)(long)&((struct stringpool_t *)0)->stringpool_str549,
(int)(long)&((struct stringpool_t *)0)->stringpool_str90,
(int)(long)&((struct stringpool_t *)0)->stringpool_str101,
(int)(long)&((struct stringpool_t *)0)->stringpool_str305,
(int)(long)&((struct stringpool_t *)0)->stringpool_str96,
(int)(long)&((struct stringpool_t *)0)->stringpool_str245,
(int)(long)&((struct stringpool_t *)0)->stringpool_str233,
(int)(long)&((struct stringpool_t *)0)->stringpool_str342,
(int)(long)&((struct stringpool_t *)0)->stringpool_str187,
(int)(long)&((struct stringpool_t *)0)->stringpool_str490,
(int)(long)&((struct stringpool_t *)0)->stringpool_str725,
(int)(long)&((struct stringpool_t *)0)->stringpool_str761,
(int)(long)&((struct stringpool_t *)0)->stringpool_str711,
(int)(long)&((struct stringpool_t *)0)->stringpool_str226,
(int)(long)&((struct stringpool_t *)0)->stringpool_str246,
(int)(long)&((struct stringpool_t *)0)->stringpool_str219,
(int)(long)&((struct stringpool_t *)0)->stringpool_str276,
(int)(long)&((struct stringpool_t *)0)->stringpool_str553,
(int)(long)&((struct stringpool_t *)0)->stringpool_str853,
(int)(long)&((struct stringpool_t *)0)->stringpool_str67,
(int)(long)&((struct stringpool_t *)0)->stringpool_str671,
(int)(long)&((struct stringpool_t *)0)->stringpool_str623,
(int)(long)&((struct stringpool_t *)0)->stringpool_str637,
(int)(long)&((struct stringpool_t *)0)->stringpool_str633,
(int)(long)&((struct stringpool_t *)0)->stringpool_str81,
(int)(long)&((struct stringpool_t *)0)->stringpool_str466,
(int)(long)&((struct stringpool_t *)0)->stringpool_str45,
(int)(long)&((struct stringpool_t *)0)->stringpool_str254,
(int)(long)&((struct stringpool_t *)0)->stringpool_str199,
(int)(long)&((struct stringpool_t *)0)->stringpool_str318,
(int)(long)&((struct stringpool_t *)0)->stringpool_str48,
(int)(long)&((struct stringpool_t *)0)->stringpool_str569,
(int)(long)&((struct stringpool_t *)0)->stringpool_str286,
(int)(long)&((struct stringpool_t *)0)->stringpool_str108,
(int)(long)&((struct stringpool_t *)0)->stringpool_str719,
(int)(long)&((struct stringpool_t *)0)->stringpool_str721,
(int)(long)&((struct stringpool_t *)0)->stringpool_str728,
(int)(long)&((struct stringpool_t *)0)->stringpool_str555,
(int)(long)&((struct stringpool_t *)0)->stringpool_str272,
(int)(long)&((struct stringpool_t *)0)->stringpool_str16,
(int)(long)&((struct stringpool_t *)0)->stringpool_str814,
(int)(long)&((struct stringpool_t *)0)->stringpool_str390,
(int)(long)&((struct stringpool_t *)0)->stringpool_str396,
(int)(long)&((struct stringpool_t *)0)->stringpool_str355,
(int)(long)&((struct stringpool_t *)0)->stringpool_str293,
(int)(long)&((struct stringpool_t *)0)->stringpool_str499,
(int)(long)&((struct stringpool_t *)0)->stringpool_str345,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str486,
(int)(long)&((struct stringpool_t *)0)->stringpool_str332,
(int)(long)&((struct stringpool_t *)0)->stringpool_str322,
(int)(long)&((struct stringpool_t *)0)->stringpool_str553,
(int)(long)&((struct stringpool_t *)0)->stringpool_str399,
(int)(long)&((struct stringpool_t *)0)->stringpool_str430,
(int)(long)&((struct stringpool_t *)0)->stringpool_str636,
(int)(long)&((struct stringpool_t *)0)->stringpool_str482,
(int)(long)&((struct stringpool_t *)0)->stringpool_str495,
(int)(long)&((struct stringpool_t *)0)->stringpool_str503,
(int)(long)&((struct stringpool_t *)0)->stringpool_str500,
(int)(long)&((struct stringpool_t *)0)->stringpool_str490,
(int)(long)&((struct stringpool_t *)0)->stringpool_str487,
(int)(long)&((struct stringpool_t *)0)->stringpool_str110,
(int)(long)&((struct stringpool_t *)0)->stringpool_str639,
(int)(long)&((struct stringpool_t *)0)->stringpool_str114,
(int)(long)&((struct stringpool_t *)0)->stringpool_str178,
(int)(long)&((struct stringpool_t *)0)->stringpool_str230,
(int)(long)&((struct stringpool_t *)0)->stringpool_str152,
(int)(long)&((struct stringpool_t *)0)->stringpool_str142,
(int)(long)&((struct stringpool_t *)0)->stringpool_str128,
(int)(long)&((struct stringpool_t *)0)->stringpool_str306,
(int)(long)&((struct stringpool_t *)0)->stringpool_str166,
(int)(long)&((struct stringpool_t *)0)->stringpool_str112,
(int)(long)&((struct stringpool_t *)0)->stringpool_str223,
(int)(long)&((struct stringpool_t *)0)->stringpool_str119,
(int)(long)&((struct stringpool_t *)0)->stringpool_str235,
(int)(long)&((struct stringpool_t *)0)->stringpool_str157,
(int)(long)&((struct stringpool_t *)0)->stringpool_str147,
(int)(long)&((struct stringpool_t *)0)->stringpool_str133,
(int)(long)&((struct stringpool_t *)0)->stringpool_str100,
(int)(long)&((struct stringpool_t *)0)->stringpool_str516,
(int)(long)&((struct stringpool_t *)0)->stringpool_str519,
(int)(long)&((struct stringpool_t *)0)->stringpool_str277,
(int)(long)&((struct stringpool_t *)0)->stringpool_str173,
(int)(long)&((struct stringpool_t *)0)->stringpool_str237,
(int)(long)&((struct stringpool_t *)0)->stringpool_str289,
(int)(long)&((struct stringpool_t *)0)->stringpool_str211,
(int)(long)&((struct stringpool_t *)0)->stringpool_str201,
(int)(long)&((struct stringpool_t *)0)->stringpool_str187,
(int)(long)&((struct stringpool_t *)0)->stringpool_str365,
(int)(long)&((struct stringpool_t *)0)->stringpool_str225,
(int)(long)&((struct stringpool_t *)0)->stringpool_str266,
(int)(long)&((struct stringpool_t *)0)->stringpool_str219,
(int)(long)&((struct stringpool_t *)0)->stringpool_str169,
(int)(long)&((struct stringpool_t *)0)->stringpool_str185,
(int)(long)&((struct stringpool_t *)0)->stringpool_str515,
(int)(long)&((struct stringpool_t *)0)->stringpool_str731,
(int)(long)&((struct stringpool_t *)0)->stringpool_str501,
(int)(long)&((struct stringpool_t *)0)->stringpool_str696,
(int)(long)&((struct stringpool_t *)0)->stringpool_str626,
(int)(long)&((struct stringpool_t *)0)->stringpool_str610,
(int)(long)&((struct stringpool_t *)0)->stringpool_str680,
(int)(long)&((struct stringpool_t *)0)->stringpool_str518,
(int)(long)&((struct stringpool_t *)0)->stringpool_str1033,
(int)(long)&((struct stringpool_t *)0)->stringpool_str986,
(int)(long)&((struct stringpool_t *)0)->stringpool_str760,
(int)(long)&((struct stringpool_t *)0)->stringpool_str655,
(int)(long)&((struct stringpool_t *)0)->stringpool_str479,
(int)(long)&((struct stringpool_t *)0)->stringpool_str584,
(int)(long)&((struct stringpool_t *)0)->stringpool_str393,
(int)(long)&((struct stringpool_t *)0)->stringpool_str436,
(int)(long)&((struct stringpool_t *)0)->stringpool_str273,
(int)(long)&((struct stringpool_t *)0)->stringpool_str418,
(int)(long)&((struct stringpool_t *)0)->stringpool_str76,
(int)(long)&((struct stringpool_t *)0)->stringpool_str151,
(int)(long)&((struct stringpool_t *)0)->stringpool_str305,
(int)(long)&((struct stringpool_t *)0)->stringpool_str301,
(int)(long)&((struct stringpool_t *)0)->stringpool_str333,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str256,
(int)(long)&((struct stringpool_t *)0)->stringpool_str337,
(int)(long)&((struct stringpool_t *)0)->stringpool_str653,
(int)(long)&((struct stringpool_t *)0)->stringpool_str738,
(int)(long)&((struct stringpool_t *)0)->stringpool_str790,
(int)(long)&((struct stringpool_t *)0)->stringpool_str750,
(int)(long)&((struct stringpool_t *)0)->stringpool_str302,
(int)(long)&((struct stringpool_t *)0)->stringpool_str373,
(int)(long)&((struct stringpool_t *)0)->stringpool_str81,
(int)(long)&((struct stringpool_t *)0)->stringpool_str260,
(int)(long)&((struct stringpool_t *)0)->stringpool_str525,
(int)(long)&((struct stringpool_t *)0)->stringpool_str644,
(int)(long)&((struct stringpool_t *)0)->stringpool_str243,
(int)(long)&((struct stringpool_t *)0)->stringpool_str571,
(int)(long)&((struct stringpool_t *)0)->stringpool_str574,
(int)(long)&((struct stringpool_t *)0)->stringpool_str606,
(int)(long)&((struct stringpool_t *)0)->stringpool_str575,
(int)(long)&((struct stringpool_t *)0)->stringpool_str281,
(int)(long)&((struct stringpool_t *)0)->stringpool_str191,
(int)(long)&((struct stringpool_t *)0)->stringpool_str193,
(int)(long)&((struct stringpool_t *)0)->stringpool_str349,
(int)(long)&((struct stringpool_t *)0)->stringpool_str327,
(int)(long)&((struct stringpool_t *)0)->stringpool_str474,
(int)(long)&((struct stringpool_t *)0)->stringpool_str176,
(int)(long)&((struct stringpool_t *)0)->stringpool_str621,
(int)(long)&((struct stringpool_t *)0)->stringpool_str288,
(int)(long)&((struct stringpool_t *)0)->stringpool_str239,
(int)(long)&((struct stringpool_t *)0)->stringpool_str734,
(int)(long)&((struct stringpool_t *)0)->stringpool_str735,
(int)(long)&((struct stringpool_t *)0)->stringpool_str754,
(int)(long)&((struct stringpool_t *)0)->stringpool_str615,
(int)(long)&((struct stringpool_t *)0)->stringpool_str203,
(int)(long)&((struct stringpool_t *)0)->stringpool_str138,
(int)(long)&((struct stringpool_t *)0)->stringpool_str951,
(int)(long)&((struct stringpool_t *)0)->stringpool_str249,
(int)(long)&((struct stringpool_t *)0)->stringpool_str453,
(int)(long)&((struct stringpool_t *)0)->stringpool_str308,
(int)(long)&((struct stringpool_t *)0)->stringpool_str319,
(int)(long)&((struct stringpool_t *)0)->stringpool_str586,
(int)(long)&((struct stringpool_t *)0)->stringpool_str346,
(int)(long)&((struct stringpool_t *)0)->stringpool_str283,
(int)(long)&((struct stringpool_t *)0)->stringpool_str568,
(int)(long)&((struct stringpool_t *)0)->stringpool_str328,
(int)(long)&((struct stringpool_t *)0)->stringpool_str280,
(int)(long)&((struct stringpool_t *)0)->stringpool_str575,
(int)(long)&((struct stringpool_t *)0)->stringpool_str335,
(int)(long)&((struct stringpool_t *)0)->stringpool_str431,
(int)(long)&((struct stringpool_t *)0)->stringpool_str698,
(int)(long)&((struct stringpool_t *)0)->stringpool_str458,
(int)(long)&((struct stringpool_t *)0)->stringpool_str608,
(int)(long)&((struct stringpool_t *)0)->stringpool_str381,
(int)(long)&((struct stringpool_t *)0)->stringpool_str911,
(int)(long)&((struct stringpool_t *)0)->stringpool_str363,
(int)(long)&((struct stringpool_t *)0)->stringpool_str893,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str664,
(int)(long)&((struct stringpool_t *)0)->stringpool_str134,
(int)(long)&((struct stringpool_t *)0)->stringpool_str186,
(int)(long)&((struct stringpool_t *)0)->stringpool_str324,
(int)(long)&((struct stringpool_t *)0)->stringpool_str150,
(int)(long)&((struct stringpool_t *)0)->stringpool_str154,
(int)(long)&((struct stringpool_t *)0)->stringpool_str130,
(int)(long)&((struct stringpool_t *)0)->stringpool_str466,
(int)(long)&((struct stringpool_t *)0)->stringpool_str166,
(int)(long)&((struct stringpool_t *)0)->stringpool_str170,
(int)(long)&((struct stringpool_t *)0)->stringpool_str322,
(int)(long)&((struct stringpool_t *)0)->stringpool_str142,
(int)(long)&((struct stringpool_t *)0)->stringpool_str332,
(int)(long)&((struct stringpool_t *)0)->stringpool_str158,
(int)(long)&((struct stringpool_t *)0)->stringpool_str162,
(int)(long)&((struct stringpool_t *)0)->stringpool_str138,
(int)(long)&((struct stringpool_t *)0)->stringpool_str203,
(int)(long)&((struct stringpool_t *)0)->stringpool_str663,
(int)(long)&((struct stringpool_t *)0)->stringpool_str669,
(int)(long)&((struct stringpool_t *)0)->stringpool_str268,
(int)(long)&((struct stringpool_t *)0)->stringpool_str88,
(int)(long)&((struct stringpool_t *)0)->stringpool_str140,
(int)(long)&((struct stringpool_t *)0)->stringpool_str278,
(int)(long)&((struct stringpool_t *)0)->stringpool_str104,
(int)(long)&((struct stringpool_t *)0)->stringpool_str108,
(int)(long)&((struct stringpool_t *)0)->stringpool_str84,
(int)(long)&((struct stringpool_t *)0)->stringpool_str420,
(int)(long)&((struct stringpool_t *)0)->stringpool_str120,
(int)(long)&((struct stringpool_t *)0)->stringpool_str250,
(int)(long)&((struct stringpool_t *)0)->stringpool_str110,
(int)(long)&((struct stringpool_t *)0)->stringpool_str54,
(int)(long)&((struct stringpool_t *)0)->stringpool_str147,
(int)(long)&((struct stringpool_t *)0)->stringpool_str476,
(int)(long)&((struct stringpool_t *)0)->stringpool_str463,
(int)(long)&((struct stringpool_t *)0)->stringpool_str430,
(int)(long)&((struct stringpool_t *)0)->stringpool_str562,
(int)(long)&((struct stringpool_t *)0)->stringpool_str813,
(int)(long)&((struct stringpool_t *)0)->stringpool_str225,
(int)(long)&((struct stringpool_t *)0)->stringpool_str777,
(int)(long)&((struct stringpool_t *)0)->stringpool_str541,
(int)(long)&((struct stringpool_t *)0)->stringpool_str648,
(int)(long)&((struct stringpool_t *)0)->stringpool_str848,
(int)(long)&((struct stringpool_t *)0)->stringpool_str769,
(int)(long)&((struct stringpool_t *)0)->stringpool_str389,
(int)(long)&((struct stringpool_t *)0)->stringpool_str407,
(int)(long)&((struct stringpool_t *)0)->stringpool_str561,
(int)(long)&((struct stringpool_t *)0)->stringpool_str391,
(int)(long)&((struct stringpool_t *)0)->stringpool_str455,
(int)(long)&((struct stringpool_t *)0)->stringpool_str396,
(int)(long)&((struct stringpool_t *)0)->stringpool_str253,
(int)(long)&((struct stringpool_t *)0)->stringpool_str173,
(int)(long)&((struct stringpool_t *)0)->stringpool_str176,
(int)(long)&((struct stringpool_t *)0)->stringpool_str375,
(int)(long)&((struct stringpool_t *)0)->stringpool_str337,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str242,
(int)(long)&((struct stringpool_t *)0)->stringpool_str228,
(int)(long)&((struct stringpool_t *)0)->stringpool_str233,
(int)(long)&((struct stringpool_t *)0)->stringpool_str367,
(int)(long)&((struct stringpool_t *)0)->stringpool_str628,
(int)(long)&((struct stringpool_t *)0)->stringpool_str660,
(int)(long)&((struct stringpool_t *)0)->stringpool_str590,
(int)(long)&((struct stringpool_t *)0)->stringpool_str345,
(int)(long)&((struct stringpool_t *)0)->stringpool_str442,
(int)(long)&((struct stringpool_t *)0)->stringpool_str89,
(int)(long)&((struct stringpool_t *)0)->stringpool_str311,
(int)(long)&((struct stringpool_t *)0)->stringpool_str414,
(int)(long)&((struct stringpool_t *)0)->stringpool_str237,
(int)(long)&((struct stringpool_t *)0)->stringpool_str209,
(int)(long)&((struct stringpool_t *)0)->stringpool_str596,
(int)(long)&((struct stringpool_t *)0)->stringpool_str491,
(int)(long)&((struct stringpool_t *)0)->stringpool_str517,
(int)(long)&((struct stringpool_t *)0)->stringpool_str493,
(int)(long)&((struct stringpool_t *)0)->stringpool_str72,
(int)(long)&((struct stringpool_t *)0)->stringpool_str338,
(int)(long)&((struct stringpool_t *)0)->stringpool_str153,
(int)(long)&((struct stringpool_t *)0)->stringpool_str459,
(int)(long)&((struct stringpool_t *)0)->stringpool_str254,
(int)(long)&((struct stringpool_t *)0)->stringpool_str281,
(int)(long)&((struct stringpool_t *)0)->stringpool_str49,
(int)(long)&((struct stringpool_t *)0)->stringpool_str441,
(int)(long)&((struct stringpool_t *)0)->stringpool_str315,
(int)(long)&((struct stringpool_t *)0)->stringpool_str252,
(int)(long)&((struct stringpool_t *)0)->stringpool_str846,
(int)(long)&((struct stringpool_t *)0)->stringpool_str828,
(int)(long)&((struct stringpool_t *)0)->stringpool_str836,
(int)(long)&((struct stringpool_t *)0)->stringpool_str526,
(int)(long)&((struct stringpool_t *)0)->stringpool_str210,
(int)(long)&((struct stringpool_t *)0)->stringpool_str106,
(int)(long)&((struct stringpool_t *)0)->stringpool_str837,
(int)(long)&((struct stringpool_t *)0)->stringpool_str392,
(int)(long)&((struct stringpool_t *)0)->stringpool_str239,
(int)(long)&((struct stringpool_t *)0)->stringpool_str275,
(int)(long)&((struct stringpool_t *)0)->stringpool_str218,
(int)(long)&((struct stringpool_t *)0)->stringpool_str532,
(int)(long)&((struct stringpool_t *)0)->stringpool_str517,
(int)(long)&((struct stringpool_t *)0)->stringpool_str264,
(int)(long)&((struct stringpool_t *)0)->stringpool_str555,
(int)(long)&((struct stringpool_t *)0)->stringpool_str540,
(int)(long)&((struct stringpool_t *)0)->stringpool_str272,
(int)(long)&((struct stringpool_t *)0)->stringpool_str591,
(int)(long)&((struct stringpool_t *)0)->stringpool_str576,
(int)(long)&((struct stringpool_t *)0)->stringpool_str365,
(int)(long)&((struct stringpool_t *)0)->stringpool_str679,
(int)(long)&((struct stringpool_t *)0)->stringpool_str664,
(int)(long)&((struct stringpool_t *)0)->stringpool_str603,
(int)(long)&((struct stringpool_t *)0)->stringpool_str530,
(int)(long)&((struct stringpool_t *)0)->stringpool_str797,
(int)(long)&((struct stringpool_t *)0)->stringpool_str553,
(int)(long)&((struct stringpool_t *)0)->stringpool_str820,
(int)(long)&((struct stringpool_t *)0)->stringpool_str19,
(int)(long)&((struct stringpool_t *)0)->stringpool_str330,
(int)(long)&((struct stringpool_t *)0)->stringpool_str61,
(int)(long)&((struct stringpool_t *)0)->stringpool_str73,
(int)(long)&((struct stringpool_t *)0)->stringpool_str227,
(int)(long)&((struct stringpool_t *)0)->stringpool_str119,
(int)(long)&((struct stringpool_t *)0)->stringpool_str65,
(int)(long)&((struct stringpool_t *)0)->stringpool_str63,
(int)(long)&((struct stringpool_t *)0)->stringpool_str397,
(int)(long)&((struct stringpool_t *)0)->stringpool_str69,
(int)(long)&((struct stringpool_t *)0)->stringpool_str71,
(int)(long)&((struct stringpool_t *)0)->stringpool_str128,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str230,
(int)(long)&((struct stringpool_t *)0)->stringpool_str122,
(int)(long)&((struct stringpool_t *)0)->stringpool_str68,
(int)(long)&((struct stringpool_t *)0)->stringpool_str66,
(int)(long)&((struct stringpool_t *)0)->stringpool_str207,
(int)(long)&((struct stringpool_t *)0)->stringpool_str373,
(int)(long)&((struct stringpool_t *)0)->stringpool_str414,
(int)(long)&((struct stringpool_t *)0)->stringpool_str90,
(int)(long)&((struct stringpool_t *)0)->stringpool_str26,
(int)(long)&((struct stringpool_t *)0)->stringpool_str38,
(int)(long)&((struct stringpool_t *)0)->stringpool_str192,
(int)(long)&((struct stringpool_t *)0)->stringpool_str84,
(int)(long)&((struct stringpool_t *)0)->stringpool_str30,
(int)(long)&((struct stringpool_t *)0)->stringpool_str28,
(int)(long)&((struct stringpool_t *)0)->stringpool_str362,
(int)(long)&((struct stringpool_t *)0)->stringpool_str34,
(int)(long)&((struct stringpool_t *)0)->stringpool_str85,
(int)(long)&((struct stringpool_t *)0)->stringpool_str32,
(int)(long)&((struct stringpool_t *)0)->stringpool_str22,
(int)(long)&((struct stringpool_t *)0)->stringpool_str101,
(int)(long)&((struct stringpool_t *)0)->stringpool_str372,
(int)(long)&((struct stringpool_t *)0)->stringpool_str644,
(int)(long)&((struct stringpool_t *)0)->stringpool_str494,
(int)(long)&((struct stringpool_t *)0)->stringpool_str290,
(int)(long)&((struct stringpool_t *)0)->stringpool_str424,
(int)(long)&((struct stringpool_t *)0)->stringpool_str509,
(int)(long)&((struct stringpool_t *)0)->stringpool_str609,
(int)(long)&((struct stringpool_t *)0)->stringpool_str653,
(int)(long)&((struct stringpool_t *)0)->stringpool_str751,
(int)(long)&((struct stringpool_t *)0)->stringpool_str956,
(int)(long)&((struct stringpool_t *)0)->stringpool_str416,
(int)(long)&((struct stringpool_t *)0)->stringpool_str328,
(int)(long)&((struct stringpool_t *)0)->stringpool_str364,
(int)(long)&((struct stringpool_t *)0)->stringpool_str678,
(int)(long)&((struct stringpool_t *)0)->stringpool_str270,
(int)(long)&((struct stringpool_t *)0)->stringpool_str329,
(int)(long)&((struct stringpool_t *)0)->stringpool_str558,
(int)(long)&((struct stringpool_t *)0)->stringpool_str183,
(int)(long)&((struct stringpool_t *)0)->stringpool_str212,
(int)(long)&((struct stringpool_t *)0)->stringpool_str125,
(int)(long)&((struct stringpool_t *)0)->stringpool_str570,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str188,
(int)(long)&((struct stringpool_t *)0)->stringpool_str245,
(int)(long)&((struct stringpool_t *)0)->stringpool_str184,
(int)(long)&((struct stringpool_t *)0)->stringpool_str146,
(int)(long)&((struct stringpool_t *)0)->stringpool_str400,
(int)(long)&((struct stringpool_t *)0)->stringpool_str593,
(int)(long)&((struct stringpool_t *)0)->stringpool_str601,
(int)(long)&((struct stringpool_t *)0)->stringpool_str573,
(int)(long)&((struct stringpool_t *)0)->stringpool_str295,
(int)(long)&((struct stringpool_t *)0)->stringpool_str377,
(int)(long)&((struct stringpool_t *)0)->stringpool_str89,
(int)(long)&((struct stringpool_t *)0)->stringpool_str240,
(int)(long)&((struct stringpool_t *)0)->stringpool_str542,
(int)(long)&((struct stringpool_t *)0)->stringpool_str608,
(int)(long)&((struct stringpool_t *)0)->stringpool_str115,
(int)(long)&((struct stringpool_t *)0)->stringpool_str539,
(int)(long)&((struct stringpool_t *)0)->stringpool_str404,
(int)(long)&((struct stringpool_t *)0)->stringpool_str410,
(int)(long)&((struct stringpool_t *)0)->stringpool_str467,
(int)(long)&((struct stringpool_t *)0)->stringpool_str106,
(int)(long)&((struct stringpool_t *)0)->stringpool_str307,
(int)(long)&((struct stringpool_t *)0)->stringpool_str105,
(int)(long)&((struct stringpool_t *)0)->stringpool_str300,
(int)(long)&((struct stringpool_t *)0)->stringpool_str103,
(int)(long)&((struct stringpool_t *)0)->stringpool_str131,
(int)(long)&((struct stringpool_t *)0)->stringpool_str124,
(int)(long)&((struct stringpool_t *)0)->stringpool_str448,
(int)(long)&((struct stringpool_t *)0)->stringpool_str274,
(int)(long)&((struct stringpool_t *)0)->stringpool_str86,
(int)(long)&((struct stringpool_t *)0)->stringpool_str841,
(int)(long)&((struct stringpool_t *)0)->stringpool_str836,
(int)(long)&((struct stringpool_t *)0)->stringpool_str865,
(int)(long)&((struct stringpool_t *)0)->stringpool_str701,
(int)(long)&((struct stringpool_t *)0)->stringpool_str279,
(int)(long)&((struct stringpool_t *)0)->stringpool_str59,
(int)(long)&((struct stringpool_t *)0)->stringpool_str645,
(int)(long)&((struct stringpool_t *)0)->stringpool_str276,
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* BIG-5
*/
static int
ces_big5_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff))
return big5_mbtowc(conv,pwc,s,2);
else
return RET_ILSEQ;
}
}
return RET_ILSEQ;
}
static int
ces_big5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char buf[2];
int ret;
/* Code set 0 (ASCII) */
ret = ascii_wctomb(conv,r,wc,n);
if (ret != RET_ILUNI)
return ret;
/* Code set 1 (BIG5) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n < 2)
return RET_TOOSMALL;
r[0] = buf[0];
r[1] = buf[1];
return 2;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2005, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* GBK
*/
static int
ces_gbk_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
/* Code set 0 (ASCII or GB 1988-89) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (GBK) */
if (c >= 0x81 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
return gbk_mbtowc(conv,pwc,s,2);
}
return RET_ILSEQ;
}
static int
ces_gbk_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char buf[2];
int ret;
/* Code set 0 (ASCII or GB 1988-89) */
ret = ascii_wctomb(conv,r,wc,n);
if (ret != RET_ILUNI)
return ret;
/* Code set 1 (GBK) */
ret = gbk_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n < 2)
return RET_TOOSMALL;
r[0] = buf[0];
r[1] = buf[1];
return 2;
}
return RET_ILUNI;
}
This diff could not be displayed because it is too large.
/*
* Copyright (C) 1999-2001 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CNS 11643-1992
*/
/* ISO-2022-CN and EUC-TW use CNS 11643-1992 planes 1 to 7. We also
* have a table for the older plane 15. We use a trick to keep the
* Unicode -> CNS 11643 table as small as possible (see cns11643_inv.h).
*/
#include "cns11643_1.h"
#include "cns11643_2.h"
#include "cns11643_3.h"
#include "cns11643_4.h"
#include "cns11643_5.h"
#include "cns11643_6.h"
#include "cns11643_7.h"
#include "cns11643_15.h"
#include "cns11643_inv.h"
/* Returns the plane number (1,...,7,15) in r[0], the two bytes in r[1],r[2]. */
#define cns11643_wctomb cns11643_inv_wctomb
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CNS 11643-1992 plane 4
*/
/*
* The table has been split into two parts. Each part's entries fit it 16 bits.
* But the combined table would need 17 bits per entry.
*/
#include "cns11643_4a.h"
#include "cns11643_4b.h"
static int
cns11643_4_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c1 = s[0];
if ((c1 >= 0x21 && c1 <= 0x6e)) {
if (n >= 2) {
unsigned char c2 = s[1];
if (c2 >= 0x21 && c2 < 0x7f) {
unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21);
ucs4_t wc = 0xfffd;
unsigned short swc;
{
if (i < 2914)
swc = cns11643_4a_2uni_page21[i],
wc = cns11643_4a_2uni_upages[swc>>8] | (swc & 0xff);
else if (i < 7298)
swc = cns11643_4b_2uni_page40[i-2914],
wc = cns11643_4b_2uni_upages[swc>>8] | (swc & 0xff);
}
if (wc != 0xfffd) {
*pwc = wc;
return 2;
}
}
return RET_ILSEQ;
}
return RET_TOOFEW(0);
}
return RET_ILSEQ;
}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
/*
* Copyright (C) 1999-2002, 2004-2011, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/* This file defines all the converters. */
/* Our own notion of wide character, as UCS-4, according to ISO-10646-1. */
typedef unsigned int ucs4_t;
/* State used by a conversion. 0 denotes the initial state. */
typedef unsigned int state_t;
/* iconv_t is an opaque type. This is the real iconv_t type. */
typedef struct conv_struct * conv_t;
/*
* Data type for conversion multibyte -> unicode
*/
struct mbtowc_funcs {
int (*xxx_mbtowc) (conv_t conv, ucs4_t *pwc, unsigned char const *s, size_t n);
/*
* int xxx_mbtowc (conv_t conv, ucs4_t *pwc, unsigned char const *s, size_t n)
* converts the byte sequence starting at s to a wide character. Up to n bytes
* are available at s. n is >= 1.
* Result is number of bytes consumed (if a wide character was read),
* or -1 if invalid, or -2 if n too small,
* or RET_SHIFT_ILSEQ(number of bytes consumed) if invalid input after a shift
* sequence was read,
* or RET_TOOFEW(number of bytes consumed) if only a shift sequence was read.
*/
int (*xxx_flushwc) (conv_t conv, ucs4_t *pwc);
/*
* int xxx_flushwc (conv_t conv, ucs4_t *pwc)
* returns to the initial state and stores the pending wide character, if any.
* Result is 1 (if a wide character was read) or 0 if none was pending.
*/
};
/* Return code if invalid input after a shift sequence of n bytes was read.
(xxx_mbtowc) */
#define RET_SHIFT_ILSEQ(n) (-1-2*(n))
/* Return code if invalid. (xxx_mbtowc) */
#define RET_ILSEQ RET_SHIFT_ILSEQ(0)
/* Return code if only a shift sequence of n bytes was read. (xxx_mbtowc) */
#define RET_TOOFEW(n) (-2-2*(n))
/* Retrieve the n from the encoded RET_... value. */
#define DECODE_SHIFT_ILSEQ(r) ((unsigned int)(RET_SHIFT_ILSEQ(0) - (r)) / 2)
#define DECODE_TOOFEW(r) ((unsigned int)(RET_TOOFEW(0) - (r)) / 2)
/* Maximum value of n that may be used as argument to RET_SHIFT_ILSEQ or RET_TOOFEW. */
#define RET_COUNT_MAX ((INT_MAX / 2) - 1)
/*
* Data type for conversion unicode -> multibyte
*/
struct wctomb_funcs {
int (*xxx_wctomb) (conv_t conv, unsigned char *r, ucs4_t wc, size_t n);
/*
* int xxx_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
* converts the wide character wc to the character set xxx, and stores the
* result beginning at r. Up to n bytes may be written at r. n is >= 1.
* Result is number of bytes written, or -1 if invalid, or -2 if n too small.
*/
int (*xxx_reset) (conv_t conv, unsigned char *r, size_t n);
/*
* int xxx_reset (conv_t conv, unsigned char *r, size_t n)
* stores a shift sequences returning to the initial state beginning at r.
* Up to n bytes may be written at r. n is >= 0.
* Result is number of bytes written, or -2 if n too small.
*/
};
/* Return code if invalid. (xxx_wctomb) */
#define RET_ILUNI -1
/* Return code if output buffer is too small. (xxx_wctomb, xxx_reset) */
#define RET_TOOSMALL -2
/*
* Contents of a conversion descriptor.
*/
struct conv_struct {
struct loop_funcs lfuncs;
/* Input (conversion multibyte -> unicode) */
int iindex;
struct mbtowc_funcs ifuncs;
state_t istate;
/* Output (conversion unicode -> multibyte) */
int oindex;
struct wctomb_funcs ofuncs;
int oflags;
state_t ostate;
/* Operation flags */
int transliterate;
int discard_ilseq;
#ifndef LIBICONV_PLUG
struct iconv_fallbacks fallbacks;
struct iconv_hooks hooks;
#endif
};
/*
* Include all the converters.
*/
#include "ascii.h"
/* General multi-byte encodings */
#include "utf8.h"
#include "ucs2.h"
#include "ucs2be.h"
#include "ucs2le.h"
#include "ucs4.h"
#include "ucs4be.h"
#include "ucs4le.h"
#include "utf16.h"
#include "utf16be.h"
#include "utf16le.h"
#include "utf32.h"
#include "utf32be.h"
#include "utf32le.h"
#include "utf7.h"
#include "ucs2internal.h"
#include "ucs2swapped.h"
#include "ucs4internal.h"
#include "ucs4swapped.h"
#include "c99.h"
#include "java.h"
/* 8-bit encodings */
#include "iso8859_1.h"
#include "iso8859_2.h"
#include "iso8859_3.h"
#include "iso8859_4.h"
#include "iso8859_5.h"
#include "iso8859_6.h"
#include "iso8859_7.h"
#include "iso8859_8.h"
#include "iso8859_9.h"
#include "iso8859_10.h"
#include "iso8859_11.h"
#include "iso8859_13.h"
#include "iso8859_14.h"
#include "iso8859_15.h"
#include "iso8859_16.h"
#include "koi8_r.h"
#include "koi8_u.h"
#include "koi8_ru.h"
#include "cp1250.h"
#include "cp1251.h"
#include "cp1252.h"
#include "cp1253.h"
#include "cp1254.h"
#include "cp1255.h"
#include "cp1256.h"
#include "cp1257.h"
#include "cp1258.h"
#include "cp850.h"
#include "cp862.h"
#include "cp866.h"
#include "cp1131.h"
#include "mac_roman.h"
#include "mac_centraleurope.h"
#include "mac_iceland.h"
#include "mac_croatian.h"
#include "mac_romania.h"
#include "mac_cyrillic.h"
#include "mac_ukraine.h"
#include "mac_greek.h"
#include "mac_turkish.h"
#include "mac_hebrew.h"
#include "mac_arabic.h"
#include "mac_thai.h"
#include "hp_roman8.h"
#include "nextstep.h"
#include "armscii_8.h"
#include "georgian_academy.h"
#include "georgian_ps.h"
#include "koi8_t.h"
#include "pt154.h"
#include "rk1048.h"
#include "mulelao.h"
#include "cp1133.h"
#include "tis620.h"
#include "cp874.h"
#include "viscii.h"
#include "tcvn.h"
/* CJK character sets [CCS = coded character set] [CJKV.INF chapter 3] */
typedef struct {
unsigned short indx; /* index into big table */
unsigned short used; /* bitmask of used entries */
} Summary16;
#include "iso646_jp.h"
#include "jisx0201.h"
#include "jisx0208.h"
#include "jisx0212.h"
#include "iso646_cn.h"
#include "gb2312.h"
#include "isoir165.h"
/*#include "gb12345.h"*/
#include "gbk.h"
#include "cns11643.h"
#include "big5.h"
#include "ksc5601.h"
#include "johab_hangul.h"
/* CJK encodings [CES = character encoding scheme] [CJKV.INF chapter 4] */
#include "euc_jp.h"
#include "sjis.h"
#include "cp932.h"
#include "iso2022_jp.h"
#include "iso2022_jp1.h"
#include "iso2022_jp2.h"
#include "iso2022_jpms.h"
#include "euc_cn.h"
#include "ces_gbk.h"
#include "cp936.h"
#include "gb18030.h"
#include "iso2022_cn.h"
#include "iso2022_cnext.h"
#include "hz.h"
#include "euc_tw.h"
#include "ces_big5.h"
#include "cp950.h"
#include "big5hkscs1999.h"
#include "big5hkscs2001.h"
#include "big5hkscs2004.h"
#include "big5hkscs2008.h"
#include "euc_kr.h"
#include "cp949.h"
#include "johab.h"
#include "iso2022_kr.h"
/* Encodings used by system dependent locales. */
#ifdef USE_AIX
#include "cp856.h"
#include "cp922.h"
#include "cp943.h"
#include "cp1046.h"
#include "cp1124.h"
#include "cp1129.h"
#include "cp1161.h"
#include "cp1162.h"
#include "cp1163.h"
#endif
#ifdef USE_OSF1
#include "dec_kanji.h"
#include "dec_hanyu.h"
#endif
#ifdef USE_DOS
#include "cp437.h"
#include "cp737.h"
#include "cp775.h"
#include "cp852.h"
#include "cp853.h"
#include "cp855.h"
#include "cp857.h"
#include "cp858.h"
#include "cp860.h"
#include "cp861.h"
#include "cp863.h"
#include "cp864.h"
#include "cp865.h"
#include "cp869.h"
#include "cp1125.h"
#endif
#ifdef USE_EXTRA
#include "euc_jisx0213.h"
#include "shift_jisx0213.h"
#include "iso2022_jp3.h"
#include "big5_2003.h"
#include "tds565.h"
#include "atarist.h"
#include "riscos1.h"
#endif
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1046
*/
static const unsigned short cp1046_2uni[128] = {
/* 0x80 */
0xfe88, 0x00d7, 0x00f7, 0xf8f6, 0xf8f5, 0xf8f4, 0xf8f7, 0xfe71,
0x0088, 0x25a0, 0x2502, 0x2500, 0x2510, 0x250c, 0x2514, 0x2518,
/* 0x90 */
0xfe79, 0xfe7b, 0xfe7d, 0xfe7f, 0xfe77, 0xfe8a, 0xfef0, 0xfef3,
0xfef2, 0xfece, 0xfecf, 0xfed0, 0xfef6, 0xfef8, 0xfefa, 0xfefc,
/* 0xa0 */
0x00a0, 0xf8fa, 0xf8f9, 0xf8f8, 0x00a4, 0xf8fb, 0xfe8b, 0xfe91,
0xfe97, 0xfe9b, 0xfe9f, 0xfea3, 0x060c, 0x00ad, 0xfea7, 0xfeb3,
/* 0xb0 */
0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667,
0x0668, 0x0669, 0xfeb7, 0x061b, 0xfebb, 0xfebf, 0xfeca, 0x061f,
/* 0xc0 */
0xfecb, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f,
/* 0xd0 */
0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637,
0xfec7, 0x0639, 0x063a, 0xfecc, 0xfe82, 0xfe84, 0xfe8e, 0xfed3,
/* 0xe0 */
0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647,
0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f,
/* 0xf0 */
0x0650, 0x0651, 0x0652, 0xfed7, 0xfedb, 0xfedf, 0xf8fc, 0xfef5,
0xfef7, 0xfef9, 0xfefb, 0xfee3, 0xfee7, 0xfeec, 0xfee9, 0xfffd,
};
static int
cp1046_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80) {
*pwc = (ucs4_t) c;
return 1;
}
else {
unsigned short wc = cp1046_2uni[c-0x80];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
return RET_ILSEQ;
}
static const unsigned char cp1046_page00[112] = {
0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, /* 0xd0-0xd7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, /* 0xf0-0xf7 */
};
static const unsigned char cp1046_page06[104] = {
0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0xbf, /* 0x18-0x1f */
0x00, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x20-0x27 */
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x28-0x2f */
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0x30-0x37 */
0x00, 0xd9, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */
0xf0, 0xf1, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0x60-0x67 */
0xb8, 0xb9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
};
static const unsigned char cp1046_page25[32] = {
0x8b, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0x8c, 0x00, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
};
static const unsigned char cp1046_pagef8[16] = {
0x00, 0x00, 0x00, 0x00, 0x85, 0x84, 0x83, 0x86, /* 0xf0-0xf7 */
0xa3, 0xa2, 0xa1, 0xa5, 0xf6, 0x00, 0x00, 0x00, /* 0xf8-0xff */
};
static const unsigned char cp1046_pagefe[144] = {
0x00, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, /* 0x70-0x77 */
0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, /* 0x78-0x7f */
0x00, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x80, 0x00, 0x95, 0xa6, 0x00, 0x00, 0xde, 0x00, /* 0x88-0x8f */
0x00, 0xa7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, /* 0x90-0x97 */
0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0xaa, /* 0x98-0x9f */
0x00, 0x00, 0x00, 0xab, 0x00, 0x00, 0x00, 0xae, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0x00, 0x00, 0xaf, 0x00, 0x00, 0x00, 0xba, /* 0xb0-0xb7 */
0x00, 0x00, 0x00, 0xbc, 0x00, 0x00, 0x00, 0xbd, /* 0xb8-0xbf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, /* 0xc0-0xc7 */
0x00, 0x00, 0xbe, 0xc0, 0xdb, 0x00, 0x99, 0x9a, /* 0xc8-0xcf */
0x9b, 0x00, 0x00, 0xdf, 0x00, 0x00, 0x00, 0xf3, /* 0xd0-0xd7 */
0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0xf5, /* 0xd8-0xdf */
0x00, 0x00, 0x00, 0xfb, 0x00, 0x00, 0x00, 0xfc, /* 0xe0-0xe7 */
0x00, 0xfe, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, /* 0xe8-0xef */
0x96, 0x00, 0x98, 0x97, 0x00, 0xf7, 0x9c, 0xf8, /* 0xf0-0xf7 */
0x9d, 0xf9, 0x9e, 0xfa, 0x9f, 0x00, 0x00, 0x00, /* 0xf8-0xff */
};
static int
cp1046_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x0088 && wc < 0x00f8)
c = cp1046_page00[wc-0x0088];
else if (wc >= 0x0608 && wc < 0x0670)
c = cp1046_page06[wc-0x0608];
else if (wc >= 0x2500 && wc < 0x2520)
c = cp1046_page25[wc-0x2500];
else if (wc == 0x25a0)
c = 0x89;
else if (wc >= 0xf8f0 && wc < 0xf900)
c = cp1046_pagef8[wc-0xf8f0];
else if (wc >= 0xfe70 && wc < 0xff00)
c = cp1046_pagefe[wc-0xfe70];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1124
*/
static const unsigned short cp1124_2uni[96] = {
/* 0xa0 */
0x00a0, 0x0401, 0x0402, 0x0490, 0x0404, 0x0405, 0x0406, 0x0407,
0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f,
/* 0xb0 */
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
/* 0xc0 */
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
/* 0xd0 */
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
/* 0xe0 */
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
/* 0xf0 */
0x2116, 0x0451, 0x0452, 0x0491, 0x0454, 0x0455, 0x0456, 0x0457,
0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f,
};
static int
cp1124_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0xa0)
*pwc = (ucs4_t) c;
else
*pwc = (ucs4_t) cp1124_2uni[c-0xa0];
return 1;
}
static const unsigned char cp1124_page00[16] = {
0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */
};
static const unsigned char cp1124_page04[152] = {
0x00, 0xa1, 0xa2, 0x00, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x00-0x07 */
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0x00, 0xae, 0xaf, /* 0x08-0x0f */
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0x10-0x17 */
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0x18-0x1f */
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x20-0x27 */
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x28-0x2f */
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0x30-0x37 */
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, /* 0x38-0x3f */
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */
0x00, 0xf1, 0xf2, 0x00, 0xf4, 0xf5, 0xf6, 0xf7, /* 0x50-0x57 */
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x00, 0xfe, 0xff, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0xa3, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static int
cp1124_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x00a0) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00b0)
c = cp1124_page00[wc-0x00a0];
else if (wc >= 0x0400 && wc < 0x0498)
c = cp1124_page04[wc-0x0400];
else if (wc == 0x2116)
c = 0xf0;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1125
*/
static const unsigned short cp1125_2uni[80] = {
/* 0xb0 */
0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510,
/* 0xc0 */
0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f,
0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567,
/* 0xd0 */
0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b,
0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580,
/* 0xe0 */
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
/* 0xf0 */
0x0401, 0x0451, 0x0490, 0x0491, 0x0404, 0x0454, 0x0406, 0x0456,
0x0407, 0x0457, 0x00b7, 0x221a, 0x2116, 0x00a4, 0x25a0, 0x00a0,
};
static int
cp1125_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80)
*pwc = (ucs4_t) c;
else if (c < 0xb0)
*pwc = (ucs4_t) c + 0x0390;
else
*pwc = (ucs4_t) cp1125_2uni[c-0xb0];
return 1;
}
static const unsigned char cp1125_page00[24] = {
0xff, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, /* 0xb0-0xb7 */
};
static const unsigned char cp1125_page04[152] = {
0x00, 0xf0, 0x00, 0x00, 0xf4, 0x00, 0xf6, 0xf8, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 0x10-0x17 */
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, /* 0x18-0x1f */
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x20-0x27 */
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, /* 0x28-0x2f */
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x30-0x37 */
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0x38-0x3f */
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */
0x00, 0xf1, 0x00, 0x00, 0xf5, 0x00, 0xf7, 0xf9, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0xf2, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static const unsigned char cp1125_page25[168] = {
0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0xd9, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0x00, 0x00, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, /* 0x50-0x57 */
0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, /* 0x58-0x5f */
0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, /* 0x60-0x67 */
0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0xdf, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0xdb, 0x00, 0x00, 0x00, 0xdd, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0xde, 0xb0, 0xb1, 0xb2, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
};
static int
cp1125_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00b8)
c = cp1125_page00[wc-0x00a0];
else if (wc >= 0x0400 && wc < 0x0498)
c = cp1125_page04[wc-0x0400];
else if (wc == 0x2116)
c = 0xfc;
else if (wc == 0x221a)
c = 0xfb;
else if (wc >= 0x2500 && wc < 0x25a8)
c = cp1125_page25[wc-0x2500];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1129
*/
static const unsigned short cp1129_2uni[96] = {
/* 0xa0 */
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
0x0153, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
/* 0xb0 */
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0178, 0x00b5, 0x00b6, 0x00b7,
0x0152, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
/* 0xc0 */
0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x0300, 0x00cd, 0x00ce, 0x00cf,
/* 0xd0 */
0x0110, 0x00d1, 0x0309, 0x00d3, 0x00d4, 0x01a0, 0x00d6, 0x00d7,
0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x01af, 0x0303, 0x00df,
/* 0xe0 */
0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x0301, 0x00ed, 0x00ee, 0x00ef,
/* 0xf0 */
0x0111, 0x00f1, 0x0323, 0x00f3, 0x00f4, 0x01a1, 0x00f6, 0x00f7,
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x01b0, 0x20ab, 0x00ff,
};
static int
cp1129_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0xa0)
*pwc = (ucs4_t) c;
else
*pwc = (ucs4_t) cp1129_2uni[c-0xa0];
return 1;
}
static const unsigned char cp1129_page00[272] = {
0x00, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */
0xb0, 0xb1, 0xb2, 0xb3, 0x00, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
0x00, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0xb8-0xbf */
0xc0, 0xc1, 0xc2, 0x00, 0xc4, 0xc5, 0xc6, 0xc7, /* 0xc0-0xc7 */
0xc8, 0xc9, 0xca, 0xcb, 0x00, 0xcd, 0xce, 0xcf, /* 0xc8-0xcf */
0x00, 0xd1, 0x00, 0xd3, 0xd4, 0x00, 0xd6, 0xd7, /* 0xd0-0xd7 */
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x00, 0x00, 0xdf, /* 0xd8-0xdf */
0xe0, 0xe1, 0xe2, 0x00, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xe0-0xe7 */
0xe8, 0xe9, 0xea, 0xeb, 0x00, 0xed, 0xee, 0xef, /* 0xe8-0xef */
0x00, 0xf1, 0x00, 0xf3, 0xf4, 0x00, 0xf6, 0xf7, /* 0xf0-0xf7 */
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x00, 0x00, 0xff, /* 0xf8-0xff */
/* 0x0100 */
0x00, 0x00, 0xc3, 0xe3, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0xd0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0x00, 0x00, 0xb8, 0xa8, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
0xd5, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, /* 0xa8-0xaf */
0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
};
static const unsigned char cp1129_page03[40] = {
0xcc, 0xec, 0x00, 0xde, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
0x00, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0xf2, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
};
static int
cp1129_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x00a8) {
*r = wc;
return 1;
}
else if (wc >= 0x00a8 && wc < 0x01b8)
c = cp1129_page00[wc-0x00a8];
else if (wc >= 0x0300 && wc < 0x0328)
c = cp1129_page03[wc-0x0300];
else if (wc == 0x20ab)
c = 0xfe;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2002, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1131
*/
static const unsigned short cp1131_2uni[128] = {
/* 0x80 */
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
/* 0x90 */
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
/* 0xa0 */
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
/* 0xb0 */
0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510,
/* 0xc0 */
0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f,
0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567,
/* 0xd0 */
0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b,
0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580,
/* 0xe0 */
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
/* 0xf0 */
0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040e, 0x045e,
0x0406, 0x0456, 0x00b7, 0x00a4, 0x0490, 0x0491, 0x2219, 0x00a0,
};
static int
cp1131_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80)
*pwc = (ucs4_t) c;
else
*pwc = (ucs4_t) cp1131_2uni[c-0x80];
return 1;
}
static const unsigned char cp1131_page00[24] = {
0xff, 0x00, 0x00, 0x00, 0xfb, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, /* 0xb0-0xb7 */
};
static const unsigned char cp1131_page04[152] = {
0x00, 0xf0, 0x00, 0x00, 0xf2, 0x00, 0xf8, 0xf4, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x00, /* 0x08-0x0f */
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 0x10-0x17 */
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, /* 0x18-0x1f */
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x20-0x27 */
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, /* 0x28-0x2f */
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x30-0x37 */
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0x38-0x3f */
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */
0x00, 0xf1, 0x00, 0x00, 0xf3, 0x00, 0xf9, 0xf5, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf7, 0x00, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0xfc, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static const unsigned char cp1131_page25[152] = {
0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0xd9, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0x00, 0x00, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, /* 0x50-0x57 */
0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, /* 0x58-0x5f */
0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, /* 0x60-0x67 */
0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0xdf, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0xdb, 0x00, 0x00, 0x00, 0xdd, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0xde, 0xb0, 0xb1, 0xb2, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static int
cp1131_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00b8)
c = cp1131_page00[wc-0x00a0];
else if (wc >= 0x0400 && wc < 0x0498)
c = cp1131_page04[wc-0x0400];
else if (wc == 0x2219)
c = 0xfe;
else if (wc >= 0x2500 && wc < 0x2598)
c = cp1131_page25[wc-0x2500];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* IBM-CP1133
*/
static const unsigned short cp1133_2uni_1[64] = {
/* 0xa0 */
0x00a0, 0x0e81, 0x0e82, 0x0e84, 0x0e87, 0x0e88, 0x0eaa, 0x0e8a,
0x0e8d, 0x0e94, 0x0e95, 0x0e96, 0x0e97, 0x0e99, 0x0e9a, 0x0e9b,
/* 0xb0 */
0x0e9c, 0x0e9d, 0x0e9e, 0x0e9f, 0x0ea1, 0x0ea2, 0x0ea3, 0x0ea5,
0x0ea7, 0x0eab, 0x0ead, 0x0eae, 0xfffd, 0xfffd, 0xfffd, 0x0eaf,
/* 0xc0 */
0x0eb0, 0x0eb2, 0x0eb3, 0x0eb4, 0x0eb5, 0x0eb6, 0x0eb7, 0x0eb8,
0x0eb9, 0x0ebc, 0x0eb1, 0x0ebb, 0x0ebd, 0xfffd, 0xfffd, 0xfffd,
/* 0xd0 */
0x0ec0, 0x0ec1, 0x0ec2, 0x0ec3, 0x0ec4, 0x0ec8, 0x0ec9, 0x0eca,
0x0ecb, 0x0ecc, 0x0ecd, 0x0ec6, 0xfffd, 0x0edc, 0x0edd, 0x20ad,
};
static const unsigned short cp1133_2uni_2[16] = {
/* 0xf0 */
0x0ed0, 0x0ed1, 0x0ed2, 0x0ed3, 0x0ed4, 0x0ed5, 0x0ed6, 0x0ed7,
0x0ed8, 0x0ed9, 0xfffd, 0xfffd, 0x00a2, 0x00ac, 0x00a6, 0xfffd,
};
static int
cp1133_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0xa0) {
*pwc = (ucs4_t) c;
return 1;
}
else if (c < 0xe0) {
unsigned short wc = cp1133_2uni_1[c-0xa0];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
else if (c < 0xf0) {
}
else {
unsigned short wc = cp1133_2uni_2[c-0xf0];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
return RET_ILSEQ;
}
static const unsigned char cp1133_page00[16] = {
0xa0, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfe, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
};
static const unsigned char cp1133_page0e[96] = {
0x00, 0xa1, 0xa2, 0x00, 0xa3, 0x00, 0x00, 0xa4, /* 0x80-0x87 */
0xa5, 0x00, 0xa7, 0x00, 0x00, 0xa8, 0x00, 0x00, /* 0x88-0x8f */
0x00, 0x00, 0x00, 0x00, 0xa9, 0xaa, 0xab, 0xac, /* 0x90-0x97 */
0x00, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, /* 0x98-0x9f */
0x00, 0xb4, 0xb5, 0xb6, 0x00, 0xb7, 0x00, 0xb8, /* 0xa0-0xa7 */
0x00, 0x00, 0xa6, 0xb9, 0x00, 0xba, 0xbb, 0xbf, /* 0xa8-0xaf */
0xc0, 0xca, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, /* 0xb0-0xb7 */
0xc7, 0xc8, 0x00, 0xcb, 0xc9, 0xcc, 0x00, 0x00, /* 0xb8-0xbf */
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0x00, 0xdb, 0x00, /* 0xc0-0xc7 */
0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0x00, 0x00, /* 0xc8-0xcf */
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xd0-0xd7 */
0xf8, 0xf9, 0x00, 0x00, 0xdd, 0xde, 0x00, 0x00, /* 0xd8-0xdf */
};
static int
cp1133_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x00a0) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00b0)
c = cp1133_page00[wc-0x00a0];
else if (wc >= 0x0e80 && wc < 0x0ee0)
c = cp1133_page0e[wc-0x0e80];
else if (wc == 0x20ad)
c = 0xdf;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2002, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1161
*/
static const unsigned short cp1161_2uni[96] = {
/* 0xa0 */
0x0e48, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07,
0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f,
/* 0xb0 */
0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17,
0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f,
/* 0xc0 */
0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27,
0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f,
/* 0xd0 */
0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37,
0x0e38, 0x0e39, 0x0e3a, 0x0e49, 0x0e4a, 0x0e4b, 0x20ac, 0x0e3f,
/* 0xe0 */
0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47,
0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f,
/* 0xf0 */
0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57,
0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0x00a2, 0x00ac, 0x00a6, 0x00a0,
};
static int
cp1161_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80) {
*pwc = (ucs4_t) c;
return 1;
}
else if (c < 0xa0) {
}
else {
*pwc = (ucs4_t) cp1161_2uni[c-0xa0];
return 1;
}
return RET_ILSEQ;
}
static const unsigned char cp1161_page00[16] = {
0xff, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfe, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
};
static int
cp1161_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00b0)
c = cp1161_page00[wc-0x00a0];
else if (wc >= 0x0e48 && wc < 0x0e4c)
c = wc-0x0d60;
else if (wc >= 0x0e00 && wc < 0x0e60)
c = cp874_page0e[wc-0x0e00];
else if (wc == 0x20ac)
c = 0xde;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2002, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1162
*/
static int
cp1162_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80) {
*pwc = (ucs4_t) c;
return 1;
}
else {
unsigned short wc = cp874_2uni[c-0x80];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
if (c < 0xa0) {
*pwc = (ucs4_t) c;
return 1;
}
}
return RET_ILSEQ;
}
static int
cp1162_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x0080 && wc < 0x00a0 && cp874_2uni[wc-0x0080] == 0xfffd)
c = wc;
else if (wc == 0x00a0)
c = 0xa0;
else if (wc >= 0x0e00 && wc < 0x0e60)
c = cp874_page0e[wc-0x0e00];
else if (wc >= 0x2010 && wc < 0x2028)
c = cp874_page20[wc-0x2010];
else if (wc == 0x20ac)
c = 0x80;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2002, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1163
*/
static int
cp1163_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0xa0)
*pwc = (ucs4_t) c;
else if (c == 0xa4)
*pwc = 0x20ac;
else
*pwc = (ucs4_t) cp1129_2uni[c-0xa0];
return 1;
}
static const unsigned char cp1163_page20[8] = {
0x00, 0x00, 0x00, 0xfe, 0xa4, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
};
static int
cp1163_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x00a0 || (wc < 0x00a8 && wc != 0x00a4) || wc == 0x00d0) {
*r = wc;
return 1;
}
else if (wc >= 0x00a8 && wc < 0x01b8)
c = cp1129_page00[wc-0x00a8];
else if (wc >= 0x0300 && wc < 0x0328)
c = cp1129_page03[wc-0x0300];
else if (wc == 0x203e)
c = 0xaf;
else if (wc >= 0x20a8 && wc < 0x20b0)
c = cp1163_page20[wc-0x20a8];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1250
*/
static const unsigned short cp1250_2uni[128] = {
/* 0x80 */
0x20ac, 0xfffd, 0x201a, 0xfffd, 0x201e, 0x2026, 0x2020, 0x2021,
0xfffd, 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179,
/* 0x90 */
0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
0xfffd, 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a,
/* 0xa0 */
0x00a0, 0x02c7, 0x02d8, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7,
0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b,
/* 0xb0 */
0x00b0, 0x00b1, 0x02db, 0x0142, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
0x00b8, 0x0105, 0x015f, 0x00bb, 0x013d, 0x02dd, 0x013e, 0x017c,
/* 0xc0 */
0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7,
0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
/* 0xd0 */
0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7,
0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
/* 0xe0 */
0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7,
0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
/* 0xf0 */
0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7,
0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9,
};
static int
cp1250_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80) {
*pwc = (ucs4_t) c;
return 1;
}
else {
unsigned short wc = cp1250_2uni[c-0x80];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
return RET_ILSEQ;
}
static const unsigned char cp1250_page00[224] = {
0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0xa6, 0xa7, /* 0xa0-0xa7 */
0xa8, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0x00, /* 0xa8-0xaf */
0xb0, 0xb1, 0x00, 0x00, 0xb4, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
0xb8, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
0x00, 0xc1, 0xc2, 0x00, 0xc4, 0x00, 0x00, 0xc7, /* 0xc0-0xc7 */
0x00, 0xc9, 0x00, 0xcb, 0x00, 0xcd, 0xce, 0x00, /* 0xc8-0xcf */
0x00, 0x00, 0x00, 0xd3, 0xd4, 0x00, 0xd6, 0xd7, /* 0xd0-0xd7 */
0x00, 0x00, 0xda, 0x00, 0xdc, 0xdd, 0x00, 0xdf, /* 0xd8-0xdf */
0x00, 0xe1, 0xe2, 0x00, 0xe4, 0x00, 0x00, 0xe7, /* 0xe0-0xe7 */
0x00, 0xe9, 0x00, 0xeb, 0x00, 0xed, 0xee, 0x00, /* 0xe8-0xef */
0x00, 0x00, 0x00, 0xf3, 0xf4, 0x00, 0xf6, 0xf7, /* 0xf0-0xf7 */
0x00, 0x00, 0xfa, 0x00, 0xfc, 0xfd, 0x00, 0x00, /* 0xf8-0xff */
/* 0x0100 */
0x00, 0x00, 0xc3, 0xe3, 0xa5, 0xb9, 0xc6, 0xe6, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0xc8, 0xe8, 0xcf, 0xef, /* 0x08-0x0f */
0xd0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0xca, 0xea, 0xcc, 0xec, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0xc5, 0xe5, 0x00, 0x00, 0xbc, 0xbe, 0x00, /* 0x38-0x3f */
0x00, 0xa3, 0xb3, 0xd1, 0xf1, 0x00, 0x00, 0xd2, /* 0x40-0x47 */
0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0xd5, 0xf5, 0x00, 0x00, 0xc0, 0xe0, 0x00, 0x00, /* 0x50-0x57 */
0xd8, 0xf8, 0x8c, 0x9c, 0x00, 0x00, 0xaa, 0xba, /* 0x58-0x5f */
0x8a, 0x9a, 0xde, 0xfe, 0x8d, 0x9d, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd9, 0xf9, /* 0x68-0x6f */
0xdb, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x8f, 0x9f, 0xaf, 0xbf, 0x8e, 0x9e, 0x00, /* 0x78-0x7f */
};
static const unsigned char cp1250_page02[32] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, /* 0xc0-0xc7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
0xa2, 0xff, 0x00, 0xb2, 0x00, 0xbd, 0x00, 0x00, /* 0xd8-0xdf */
};
static const unsigned char cp1250_page20[48] = {
0x00, 0x00, 0x00, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x18-0x1f */
0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x8b, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
};
static int
cp1250_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x0180)
c = cp1250_page00[wc-0x00a0];
else if (wc >= 0x02c0 && wc < 0x02e0)
c = cp1250_page02[wc-0x02c0];
else if (wc >= 0x2010 && wc < 0x2040)
c = cp1250_page20[wc-0x2010];
else if (wc == 0x20ac)
c = 0x80;
else if (wc == 0x2122)
c = 0x99;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1251
*/
static const unsigned short cp1251_2uni[128] = {
/* 0x80 */
0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021,
0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f,
/* 0x90 */
0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
0xfffd, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f,
/* 0xa0 */
0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7,
0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407,
/* 0xb0 */
0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7,
0x0451, 0x2116, 0x0454, 0x00bb, 0x0458, 0x0405, 0x0455, 0x0457,
/* 0xc0 */
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
/* 0xd0 */
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
/* 0xe0 */
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
/* 0xf0 */
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
};
static int
cp1251_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80) {
*pwc = (ucs4_t) c;
return 1;
}
else {
unsigned short wc = cp1251_2uni[c-0x80];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
return RET_ILSEQ;
}
static const unsigned char cp1251_page00[32] = {
0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0xa6, 0xa7, /* 0xa0-0xa7 */
0x00, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0x00, /* 0xa8-0xaf */
0xb0, 0xb1, 0x00, 0x00, 0x00, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
};
static const unsigned char cp1251_page04[152] = {
0x00, 0xa8, 0x80, 0x81, 0xaa, 0xbd, 0xb2, 0xaf, /* 0x00-0x07 */
0xa3, 0x8a, 0x8c, 0x8e, 0x8d, 0x00, 0xa1, 0x8f, /* 0x08-0x0f */
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x10-0x17 */
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x18-0x1f */
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0x20-0x27 */
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, /* 0x28-0x2f */
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x30-0x37 */
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x38-0x3f */
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0x40-0x47 */
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0x48-0x4f */
0x00, 0xb8, 0x90, 0x83, 0xba, 0xbe, 0xb3, 0xbf, /* 0x50-0x57 */
0xbc, 0x9a, 0x9c, 0x9e, 0x9d, 0x00, 0xa2, 0x9f, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0xa5, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static const unsigned char cp1251_page20[48] = {
0x00, 0x00, 0x00, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x18-0x1f */
0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x8b, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
};
static int
cp1251_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00c0)
c = cp1251_page00[wc-0x00a0];
else if (wc >= 0x0400 && wc < 0x0498)
c = cp1251_page04[wc-0x0400];
else if (wc >= 0x2010 && wc < 0x2040)
c = cp1251_page20[wc-0x2010];
else if (wc == 0x20ac)
c = 0x88;
else if (wc == 0x2116)
c = 0xb9;
else if (wc == 0x2122)
c = 0x99;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1252
*/
static const unsigned short cp1252_2uni[32] = {
/* 0x80 */
0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021,
0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0xfffd, 0x017d, 0xfffd,
/* 0x90 */
0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0xfffd, 0x017e, 0x0178,
};
static int
cp1252_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80 || c >= 0xa0) {
*pwc = (ucs4_t) c;
return 1;
}
else {
unsigned short wc = cp1252_2uni[c-0x80];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
return RET_ILSEQ;
}
static const unsigned char cp1252_page01[72] = {
0x00, 0x00, 0x8c, 0x9c, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x8a, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x9f, 0x00, 0x00, 0x00, 0x00, 0x8e, 0x9e, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static const unsigned char cp1252_page02[32] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, /* 0xc0-0xc7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
};
static const unsigned char cp1252_page20[48] = {
0x00, 0x00, 0x00, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x18-0x1f */
0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x8b, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
};
static int
cp1252_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x0100)
c = wc;
else if (wc >= 0x0150 && wc < 0x0198)
c = cp1252_page01[wc-0x0150];
else if (wc >= 0x02c0 && wc < 0x02e0)
c = cp1252_page02[wc-0x02c0];
else if (wc >= 0x2010 && wc < 0x2040)
c = cp1252_page20[wc-0x2010];
else if (wc == 0x20ac)
c = 0x80;
else if (wc == 0x2122)
c = 0x99;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1253
*/
static const unsigned short cp1253_2uni[128] = {
/* 0x80 */
0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021,
0xfffd, 0x2030, 0xfffd, 0x2039, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
/* 0x90 */
0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
0xfffd, 0x2122, 0xfffd, 0x203a, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
/* 0xa0 */
0x00a0, 0x0385, 0x0386, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
0x00a8, 0x00a9, 0xfffd, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x2015,
/* 0xb0 */
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x00b5, 0x00b6, 0x00b7,
0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f,
/* 0xc0 */
0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,
/* 0xd0 */
0x03a0, 0x03a1, 0xfffd, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7,
0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af,
/* 0xe0 */
0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7,
0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
/* 0xf0 */
0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7,
0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0xfffd,
};
static int
cp1253_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80) {
*pwc = (ucs4_t) c;
return 1;
}
else {
unsigned short wc = cp1253_2uni[c-0x80];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
return RET_ILSEQ;
}
static const unsigned char cp1253_page00[32] = {
0xa0, 0x00, 0x00, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0xa0-0xa7 */
0xa8, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0x00, /* 0xa8-0xaf */
0xb0, 0xb1, 0xb2, 0xb3, 0x00, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
0x00, 0x00, 0x00, 0xbb, 0x00, 0xbd, 0x00, 0x00, /* 0xb8-0xbf */
};
static const unsigned char cp1253_page03[80] = {
0x00, 0x00, 0x00, 0x00, 0xb4, 0xa1, 0xa2, 0x00, /* 0x80-0x87 */
0xb8, 0xb9, 0xba, 0x00, 0xbc, 0x00, 0xbe, 0xbf, /* 0x88-0x8f */
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x90-0x97 */
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x98-0x9f */
0xd0, 0xd1, 0x00, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0xa0-0xa7 */
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, /* 0xa8-0xaf */
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xb0-0xb7 */
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xb8-0xbf */
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xc0-0xc7 */
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x00, /* 0xc8-0xcf */
};
static const unsigned char cp1253_page20[48] = {
0x00, 0x00, 0x00, 0x96, 0x97, 0xaf, 0x00, 0x00, /* 0x10-0x17 */
0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x18-0x1f */
0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x8b, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
};
static int
cp1253_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00c0)
c = cp1253_page00[wc-0x00a0];
else if (wc == 0x0192)
c = 0x83;
else if (wc >= 0x0380 && wc < 0x03d0)
c = cp1253_page03[wc-0x0380];
else if (wc >= 0x2010 && wc < 0x2040)
c = cp1253_page20[wc-0x2010];
else if (wc == 0x20ac)
c = 0x80;
else if (wc == 0x2122)
c = 0x99;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1254
*/
static const unsigned short cp1254_2uni_1[32] = {
/* 0x80 */
0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021,
0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0xfffd, 0xfffd, 0xfffd,
/* 0x90 */
0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0xfffd, 0xfffd, 0x0178,
};
static const unsigned short cp1254_2uni_2[16] = {
/* 0xd0 */
0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df,
};
static const unsigned short cp1254_2uni_3[16] = {
/* 0xf0 */
0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff,
};
static int
cp1254_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80) {
*pwc = (ucs4_t) c;
return 1;
}
else if (c < 0xa0) {
unsigned short wc = cp1254_2uni_1[c-0x80];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
else if (c < 0xd0) {
*pwc = (ucs4_t) c;
return 1;
}
else if (c < 0xe0) {
*pwc = (ucs4_t) cp1254_2uni_2[c-0xd0];
return 1;
}
else if (c < 0xf0) {
*pwc = (ucs4_t) c;
return 1;
}
else {
*pwc = (ucs4_t) cp1254_2uni_3[c-0xf0];
return 1;
}
return RET_ILSEQ;
}
static const unsigned char cp1254_page00[48] = {
0x00, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0xd0-0xd7 */
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x00, 0x00, 0xdf, /* 0xd8-0xdf */
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xe0-0xe7 */
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xe8-0xef */
0x00, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xf0-0xf7 */
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x00, 0x00, 0xff, /* 0xf8-0xff */
};
static const unsigned char cp1254_page01[128] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0xf0, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0xdd, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0x00, 0x00, 0x8c, 0x9c, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0xfe, /* 0x58-0x5f */
0x8a, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static const unsigned char cp1254_page02[32] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, /* 0xc0-0xc7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
};
static const unsigned char cp1254_page20[48] = {
0x00, 0x00, 0x00, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x18-0x1f */
0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x8b, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
};
static int
cp1254_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00d0)
c = wc;
else if (wc >= 0x00d0 && wc < 0x0100)
c = cp1254_page00[wc-0x00d0];
else if (wc >= 0x0118 && wc < 0x0198)
c = cp1254_page01[wc-0x0118];
else if (wc >= 0x02c0 && wc < 0x02e0)
c = cp1254_page02[wc-0x02c0];
else if (wc >= 0x2010 && wc < 0x2040)
c = cp1254_page20[wc-0x2010];
else if (wc == 0x20ac)
c = 0x80;
else if (wc == 0x2122)
c = 0x99;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.