/src/gettext-0.26/gettext-tools/libgettextpo/uniwidth/cjk.h
Line | Count | Source |
1 | | /* Test for CJK encoding. |
2 | | Copyright (C) 2001-2002, 2005-2007, 2009-2025 Free Software Foundation, Inc. |
3 | | Written by Bruno Haible <bruno@clisp.org>, 2002. |
4 | | |
5 | | This file is free software: you can redistribute it and/or modify |
6 | | it under the terms of the GNU Lesser General Public License as |
7 | | published by the Free Software Foundation; either version 2.1 of the |
8 | | License, or (at your option) any later version. |
9 | | |
10 | | This file is distributed in the hope that it will be useful, |
11 | | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | | GNU Lesser General Public License for more details. |
14 | | |
15 | | You should have received a copy of the GNU Lesser General Public License |
16 | | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
17 | | |
18 | | #include "streq.h" |
19 | | |
20 | | static int |
21 | | is_cjk_encoding (const char *encoding) |
22 | 12.1k | { |
23 | 12.1k | if (0 |
24 | | /* Legacy Japanese encodings */ |
25 | 12.1k | || STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0) |
26 | | /* Legacy Chinese encodings */ |
27 | 12.1k | || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) |
28 | 12.1k | || STREQ_OPT (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0) |
29 | 0 | || STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0) |
30 | 0 | || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0) |
31 | | /* Legacy Korean encodings */ |
32 | 0 | || STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) |
33 | 0 | || STREQ_OPT (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0) |
34 | 0 | || STREQ_OPT (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0)) |
35 | 12.1k | return 1; |
36 | 0 | return 0; |
37 | 12.1k | } Line | Count | Source | 22 | 12.1k | { | 23 | 12.1k | if (0 | 24 | | /* Legacy Japanese encodings */ | 25 | 12.1k | || STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0) | 26 | | /* Legacy Chinese encodings */ | 27 | 12.1k | || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) | 28 | 12.1k | || STREQ_OPT (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0) | 29 | 0 | || STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0) | 30 | 0 | || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0) | 31 | | /* Legacy Korean encodings */ | 32 | 0 | || STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) | 33 | 0 | || STREQ_OPT (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0) | 34 | 0 | || STREQ_OPT (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0)) | 35 | 12.1k | return 1; | 36 | 0 | return 0; | 37 | 12.1k | } |
Unexecuted instantiation: u8-possible-linebreaks.c:is_cjk_encoding |