summaryrefslogtreecommitdiff
path: root/src/xutf8
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-01 18:03:10 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-06 20:28:20 +0200
commitf09e17c3c564e8310125a10c03397cbf473ff643 (patch)
tree8d0fd4a28e3686c33aaa140d07ddba26ab28bdc2 /src/xutf8
parentb0e0c355edaa2e23148cb0260ada907aec930f05 (diff)
Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
Diffstat (limited to 'src/xutf8')
-rw-r--r--src/xutf8/COPYING8
-rw-r--r--src/xutf8/case.c14
-rw-r--r--src/xutf8/fl_wcwidth.c12
-rw-r--r--src/xutf8/headers/case_tbl.txt16
-rw-r--r--src/xutf8/headers/spacing_tbl.txt20
-rw-r--r--src/xutf8/headers/tbl.txt244
-rw-r--r--src/xutf8/imKStoUCS.c52
-rw-r--r--src/xutf8/is_right2left.c13
-rw-r--r--src/xutf8/is_spacing.c13
-rw-r--r--src/xutf8/keysym2Ucs.c13
-rw-r--r--src/xutf8/lcUniConv/cp936ext.h12
-rw-r--r--src/xutf8/lcUniConv/gbk_tab_to_h.c2
-rw-r--r--src/xutf8/lcUniConv/iso8859_9e.h2
-rw-r--r--src/xutf8/mk_wcwidth.c6
-rw-r--r--src/xutf8/test.c139
-rw-r--r--src/xutf8/test2.c95
-rw-r--r--src/xutf8/ucs2fontmap.c127
-rw-r--r--src/xutf8/ucs2fontmap.c.mini13
-rw-r--r--src/xutf8/utf8Input.c195
-rw-r--r--src/xutf8/utf8Utils.c227
-rw-r--r--src/xutf8/utf8Wrap.c379
-rw-r--r--src/xutf8/utils/Makefile4
-rwxr-xr-xsrc/xutf8/utils/case.sh14
-rw-r--r--src/xutf8/utils/conv_gen.c43
-rw-r--r--src/xutf8/utils/convert_map.c25
-rw-r--r--src/xutf8/utils/create_table.c59
-rw-r--r--src/xutf8/utils/euc_tw.c12
-rwxr-xr-xsrc/xutf8/utils/non_spacing.sh14
-rwxr-xr-xsrc/xutf8/utils/tbl_gen.sh16
29 files changed, 849 insertions, 940 deletions
diff --git a/src/xutf8/COPYING b/src/xutf8/COPYING
index eb163a5e5..571d66823 100644
--- a/src/xutf8/COPYING
+++ b/src/xutf8/COPYING
@@ -5,14 +5,14 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
- lcUniConv directory:
+ lcUniConv directory:
Copyright (c) 1999-2000 Free Software Foundation, Inc.
diff --git a/src/xutf8/case.c b/src/xutf8/case.c
index 5fce6b570..21ce3c59f 100644
--- a/src/xutf8/case.c
+++ b/src/xutf8/case.c
@@ -1,6 +1,4 @@
/*
- * "$Id$"
- *
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2010 by O'ksi'D.
*
@@ -8,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
/*
@@ -95,7 +93,7 @@ XUtf8Tolower(int ucs) {
return ucs;
}
-int
+int
XUtf8Toupper(int ucs) {
int i;
static unsigned short *table = NULL;
@@ -114,7 +112,3 @@ XUtf8Toupper(int ucs) {
if (ucs >= 0x10000 || ucs < 0) return ucs;
return table[ucs];
}
-
-/*
-* End of "$Id$".
-*/
diff --git a/src/xutf8/fl_wcwidth.c b/src/xutf8/fl_wcwidth.c
index f31f472dc..c525a4bda 100644
--- a/src/xutf8/fl_wcwidth.c
+++ b/src/xutf8/fl_wcwidth.c
@@ -1,6 +1,4 @@
/*
- * "$Id$"
- *
* wrapper(s) around Markus Kuhn's wcwidth() implementation.
*
* Copyright 2006-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
/* include Markus Kuhn's wcwidth() implementation.
@@ -38,7 +36,3 @@ int fl_wcwidth(unsigned int ucs) {
/* warning: we have problems if sizeof(wchar_t) == 2 and ucs > 0xffff */
return mk_wcwidth(ucs);
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/headers/case_tbl.txt b/src/xutf8/headers/case_tbl.txt
index 2ed45fc21..e62d22567 100644
--- a/src/xutf8/headers/case_tbl.txt
+++ b/src/xutf8/headers/case_tbl.txt
@@ -1,8 +1,8 @@
-ucs_table_0041[]; /* end: U+02B6 */
-ucs_table_0386[]; /* end: U+0556 */
-ucs_table_10A0[]; /* end: U+10C5 */
-ucs_table_1E00[]; /* end: U+1FFC */
-ucs_table_2102[]; /* end: U+2133 */
-ucs_table_24B6[]; /* end: U+24CF */
-ucs_table_33CE[]; /* end: U+33CE */
-ucs_table_FF21[]; /* end: U+FF3A */
+ucs_table_0041[]; /* end: U+02B6 */
+ucs_table_0386[]; /* end: U+0556 */
+ucs_table_10A0[]; /* end: U+10C5 */
+ucs_table_1E00[]; /* end: U+1FFC */
+ucs_table_2102[]; /* end: U+2133 */
+ucs_table_24B6[]; /* end: U+24CF */
+ucs_table_33CE[]; /* end: U+33CE */
+ucs_table_FF21[]; /* end: U+FF3A */
diff --git a/src/xutf8/headers/spacing_tbl.txt b/src/xutf8/headers/spacing_tbl.txt
index 2e3d90c50..20f9ada04 100644
--- a/src/xutf8/headers/spacing_tbl.txt
+++ b/src/xutf8/headers/spacing_tbl.txt
@@ -1,10 +1,10 @@
-ucs_table_0300[]; /* end: U+0361 */
-ucs_table_0483[]; /* end: U+0486 */
-ucs_table_0591[]; /* end: U+05C4 */
-ucs_table_064B[]; /* end: U+06ED */
-ucs_table_0901[]; /* end: U+0D4D */
-ucs_table_0E31[]; /* end: U+0FB9 */
-ucs_table_20D0[]; /* end: U+20E1 */
-ucs_table_302A[]; /* end: U+309A */
-ucs_table_FB1E[]; /* end: U+FB1E */
-ucs_table_FE20[]; /* end: U+FE23 */
+ucs_table_0300[]; /* end: U+0361 */
+ucs_table_0483[]; /* end: U+0486 */
+ucs_table_0591[]; /* end: U+05C4 */
+ucs_table_064B[]; /* end: U+06ED */
+ucs_table_0901[]; /* end: U+0D4D */
+ucs_table_0E31[]; /* end: U+0FB9 */
+ucs_table_20D0[]; /* end: U+20E1 */
+ucs_table_302A[]; /* end: U+309A */
+ucs_table_FB1E[]; /* end: U+FB1E */
+ucs_table_FE20[]; /* end: U+FE23 */
diff --git a/src/xutf8/headers/tbl.txt b/src/xutf8/headers/tbl.txt
index ddb2c457f..cb01c6941 100644
--- a/src/xutf8/headers/tbl.txt
+++ b/src/xutf8/headers/tbl.txt
@@ -1,122 +1,122 @@
-unicode_to_iso8859_1_1b_0001[]; /* end: U+00FF */
-unicode_to_iso8859_2_1b_0001[]; /* end: U+017E */
-unicode_to_iso8859_2_1b_02C7[]; /* end: U+02DD */
-unicode_to_iso8859_3_1b_0001[]; /* end: U+017C */
-unicode_to_iso8859_3_1b_02D8[]; /* end: U+02D9 */
-unicode_to_iso8859_4_1b_0001[]; /* end: U+017E */
-unicode_to_iso8859_4_1b_02C7[]; /* end: U+02DB */
-unicode_to_iso8859_5_1b_0001[]; /* end: U+00AD */
-unicode_to_iso8859_5_1b_0401[]; /* end: U+045F */
-unicode_to_iso8859_5_1b_2116[]; /* end: U+2116 */
-unicode_to_iso8859_6_1b_0001[]; /* end: U+00AD */
-unicode_to_iso8859_6_1b_060C[]; /* end: U+0652 */
-unicode_to_iso8859_7_1b_0001[]; /* end: U+00BD */
-unicode_to_iso8859_7_1b_0384[]; /* end: U+03CE */
-unicode_to_iso8859_7_1b_2015[]; /* end: U+2019 */
-unicode_to_iso8859_8_1b_0001[]; /* end: U+00F7 */
-unicode_to_iso8859_8_1b_05D0[]; /* end: U+05EA */
-unicode_to_iso8859_8_1b_200E[]; /* end: U+2017 */
-unicode_to_iso8859_9_1b_0001[]; /* end: U+015F */
-unicode_to_iso8859_10_1b_0001[]; /* end: U+017E */
-unicode_to_iso8859_10_1b_2015[]; /* end: U+2015 */
-unicode_to_iso8859_13_1b_0001[]; /* end: U+017E */
-unicode_to_iso8859_13_1b_2019[]; /* end: U+201E */
-unicode_to_iso8859_14_1b_0001[]; /* end: U+0178 */
-unicode_to_iso8859_14_1b_1E02[]; /* end: U+1EF3 */
-unicode_to_iso8859_15_1b_0001[]; /* end: U+017E */
-unicode_to_iso8859_15_1b_20AC[]; /* end: U+20AC */
-unicode_to_koi8_1_1b_0001[]; /* end: U+00F7 */
-unicode_to_koi8_1_1b_0401[]; /* end: U+0451 */
-unicode_to_koi8_1_1b_2219[]; /* end: U+2265 */
-unicode_to_koi8_1_1b_2320[]; /* end: U+2321 */
-unicode_to_koi8_1_1b_2500[]; /* end: U+25A0 */
-unicode_to_big5_0_2b_00A2[]; /* end: U+00F7 */
-unicode_to_big5_0_2b_02C7[]; /* end: U+02D9 */
-unicode_to_big5_0_2b_0391[]; /* end: U+0451 */
-unicode_to_big5_0_2b_2013[]; /* end: U+203E */
-unicode_to_big5_0_2b_2103[]; /* end: U+2199 */
-unicode_to_big5_0_2b_221A[]; /* end: U+22BF */
-unicode_to_big5_0_2b_2460[]; /* end: U+247D */
-unicode_to_big5_0_2b_2500[]; /* end: U+2642 */
-unicode_to_big5_0_2b_3000[]; /* end: U+3129 */
-unicode_to_big5_0_2b_32A3[]; /* end: U+32A3 */
-unicode_to_big5_0_2b_338E[]; /* end: U+33D5 */
-unicode_to_big5_0_2b_4E00[]; /* end: U+7E9C */
-unicode_to_big5_0_2b_7F36[]; /* end: U+8B9F */
-unicode_to_big5_0_2b_8C37[]; /* end: U+9483 */
-unicode_to_big5_0_2b_9577[]; /* end: U+9FA4 */
-unicode_to_big5_0_2b_FA0C[]; /* end: U+FA0D */
-unicode_to_big5_0_2b_FE30[]; /* end: U+FE6B */
-unicode_to_big5_0_2b_FF01[]; /* end: U+FF64 */
-unicode_to_big5_0_2b_FFFD[]; /* end: U+FFFD */
-unicode_to_ksc5601_1987_0_2b_00A1[]; /* end: U+0167 */
-unicode_to_ksc5601_1987_0_2b_02C7[]; /* end: U+02DD */
-unicode_to_ksc5601_1987_0_2b_0391[]; /* end: U+0451 */
-unicode_to_ksc5601_1987_0_2b_2015[]; /* end: U+2312 */
-unicode_to_ksc5601_1987_0_2b_2460[]; /* end: U+266D */
-unicode_to_ksc5601_1987_0_2b_3000[]; /* end: U+327F */
-unicode_to_ksc5601_1987_0_2b_3380[]; /* end: U+33DD */
-unicode_to_ksc5601_1987_0_2b_4E00[]; /* end: U+7E9C */
-unicode_to_ksc5601_1987_0_2b_7F36[]; /* end: U+8B9A */
-unicode_to_ksc5601_1987_0_2b_8C37[]; /* end: U+947F */
-unicode_to_ksc5601_1987_0_2b_9577[]; /* end: U+9C57 */
-unicode_to_ksc5601_1987_0_2b_9CE5[]; /* end: U+9F9C */
-unicode_to_ksc5601_1987_0_2b_AC00[]; /* end: U+D79D */
-unicode_to_ksc5601_1987_0_2b_F900[]; /* end: U+FA0B */
-unicode_to_ksc5601_1987_0_2b_FF01[]; /* end: U+FF5E */
-unicode_to_ksc5601_1987_0_2b_FFE0[]; /* end: U+FFE6 */
-unicode_to_gb2312_1980_0_2b_00A4[]; /* end: U+01DC */
-unicode_to_gb2312_1980_0_2b_02C7[]; /* end: U+02C9 */
-unicode_to_gb2312_1980_0_2b_0391[]; /* end: U+0451 */
-unicode_to_gb2312_1980_0_2b_2015[]; /* end: U+203B */
-unicode_to_gb2312_1980_0_2b_2103[]; /* end: U+2312 */
-unicode_to_gb2312_1980_0_2b_2460[]; /* end: U+2642 */
-unicode_to_gb2312_1980_0_2b_3000[]; /* end: U+3129 */
-unicode_to_gb2312_1980_0_2b_3220[]; /* end: U+3229 */
-unicode_to_gb2312_1980_0_2b_4E00[]; /* end: U+7DAE */
-unicode_to_gb2312_1980_0_2b_7E3B[]; /* end: U+8C98 */
-unicode_to_gb2312_1980_0_2b_8D1D[]; /* end: U+8ECE */
-unicode_to_gb2312_1980_0_2b_8F66[]; /* end: U+91DC */
-unicode_to_gb2312_1980_0_2b_9274[]; /* end: U+99A8 */
-unicode_to_gb2312_1980_0_2b_9A6C[]; /* end: U+9B54 */
-unicode_to_gb2312_1980_0_2b_9C7C[]; /* end: U+9CE2 */
-unicode_to_gb2312_1980_0_2b_9E1F[]; /* end: U+9FA0 */
-unicode_to_gb2312_1980_0_2b_FF01[]; /* end: U+FF5E */
-unicode_to_gb2312_1980_0_2b_FFE0[]; /* end: U+FFE5 */
-unicode_to_jisx0201_1976_0_1b_0020[]; /* end: U+00A5 */
-unicode_to_jisx0201_1976_0_1b_203E[]; /* end: U+203E */
-unicode_to_jisx0201_1976_0_1b_FF61[]; /* end: U+FF9F */
-unicode_to_jisx0208_1983_0_2b_005C[]; /* end: U+00F7 */
-unicode_to_jisx0208_1983_0_2b_0391[]; /* end: U+0451 */
-unicode_to_jisx0208_1983_0_2b_2010[]; /* end: U+203B */
-unicode_to_jisx0208_1983_0_2b_2103[]; /* end: U+2312 */
-unicode_to_jisx0208_1983_0_2b_2500[]; /* end: U+266F */
-unicode_to_jisx0208_1983_0_2b_3000[]; /* end: U+30FE */
-unicode_to_jisx0208_1983_0_2b_4E00[]; /* end: U+7E9C */
-unicode_to_jisx0208_1983_0_2b_7F36[]; /* end: U+8B9A */
-unicode_to_jisx0208_1983_0_2b_8C37[]; /* end: U+9481 */
-unicode_to_jisx0208_1983_0_2b_9577[]; /* end: U+9FA0 */
-unicode_to_jisx0208_1983_0_2b_FF01[]; /* end: U+FF5D */
-unicode_to_jisx0208_1983_0_2b_FFE3[]; /* end: U+FFE5 */
-unicode_to_jisx0212_1990_0_2b_007E[]; /* end: U+01F5 */
-unicode_to_jisx0212_1990_0_2b_02C7[]; /* end: U+02DD */
-unicode_to_jisx0212_1990_0_2b_0384[]; /* end: U+045F */
-unicode_to_jisx0212_1990_0_2b_2116[]; /* end: U+2122 */
-unicode_to_jisx0212_1990_0_2b_4E02[]; /* end: U+7E9E */
-unicode_to_jisx0212_1990_0_2b_7F3B[]; /* end: U+8B9F */
-unicode_to_jisx0212_1990_0_2b_8C38[]; /* end: U+9484 */
-unicode_to_jisx0212_1990_0_2b_9578[]; /* end: U+9FA5 */
-unicode_to_symbol_1b_0020[]; /* end: U+00F7 */
-unicode_to_symbol_1b_0192[]; /* end: U+0192 */
-unicode_to_symbol_1b_0391[]; /* end: U+03D6 */
-unicode_to_symbol_1b_2022[]; /* end: U+232A */
-unicode_to_symbol_1b_25CA[]; /* end: U+25CA */
-unicode_to_symbol_1b_2660[]; /* end: U+2666 */
-unicode_to_symbol_1b_F6D9[]; /* end: U+F6DB */
-unicode_to_symbol_1b_F8E5[]; /* end: U+F8FE */
-unicode_to_dingbats_1b_0020[]; /* end: U+00A0 */
-unicode_to_dingbats_1b_2192[]; /* end: U+2195 */
-unicode_to_dingbats_1b_2460[]; /* end: U+2469 */
-unicode_to_dingbats_1b_25A0[]; /* end: U+2666 */
-unicode_to_dingbats_1b_2701[]; /* end: U+27BE */
-unicode_to_dingbats_1b_F8D7[]; /* end: U+F8E4 */
+unicode_to_iso8859_1_1b_0001[]; /* end: U+00FF */
+unicode_to_iso8859_2_1b_0001[]; /* end: U+017E */
+unicode_to_iso8859_2_1b_02C7[]; /* end: U+02DD */
+unicode_to_iso8859_3_1b_0001[]; /* end: U+017C */
+unicode_to_iso8859_3_1b_02D8[]; /* end: U+02D9 */
+unicode_to_iso8859_4_1b_0001[]; /* end: U+017E */
+unicode_to_iso8859_4_1b_02C7[]; /* end: U+02DB */
+unicode_to_iso8859_5_1b_0001[]; /* end: U+00AD */
+unicode_to_iso8859_5_1b_0401[]; /* end: U+045F */
+unicode_to_iso8859_5_1b_2116[]; /* end: U+2116 */
+unicode_to_iso8859_6_1b_0001[]; /* end: U+00AD */
+unicode_to_iso8859_6_1b_060C[]; /* end: U+0652 */
+unicode_to_iso8859_7_1b_0001[]; /* end: U+00BD */
+unicode_to_iso8859_7_1b_0384[]; /* end: U+03CE */
+unicode_to_iso8859_7_1b_2015[]; /* end: U+2019 */
+unicode_to_iso8859_8_1b_0001[]; /* end: U+00F7 */
+unicode_to_iso8859_8_1b_05D0[]; /* end: U+05EA */
+unicode_to_iso8859_8_1b_200E[]; /* end: U+2017 */
+unicode_to_iso8859_9_1b_0001[]; /* end: U+015F */
+unicode_to_iso8859_10_1b_0001[]; /* end: U+017E */
+unicode_to_iso8859_10_1b_2015[]; /* end: U+2015 */
+unicode_to_iso8859_13_1b_0001[]; /* end: U+017E */
+unicode_to_iso8859_13_1b_2019[]; /* end: U+201E */
+unicode_to_iso8859_14_1b_0001[]; /* end: U+0178 */
+unicode_to_iso8859_14_1b_1E02[]; /* end: U+1EF3 */
+unicode_to_iso8859_15_1b_0001[]; /* end: U+017E */
+unicode_to_iso8859_15_1b_20AC[]; /* end: U+20AC */
+unicode_to_koi8_1_1b_0001[]; /* end: U+00F7 */
+unicode_to_koi8_1_1b_0401[]; /* end: U+0451 */
+unicode_to_koi8_1_1b_2219[]; /* end: U+2265 */
+unicode_to_koi8_1_1b_2320[]; /* end: U+2321 */
+unicode_to_koi8_1_1b_2500[]; /* end: U+25A0 */
+unicode_to_big5_0_2b_00A2[]; /* end: U+00F7 */
+unicode_to_big5_0_2b_02C7[]; /* end: U+02D9 */
+unicode_to_big5_0_2b_0391[]; /* end: U+0451 */
+unicode_to_big5_0_2b_2013[]; /* end: U+203E */
+unicode_to_big5_0_2b_2103[]; /* end: U+2199 */
+unicode_to_big5_0_2b_221A[]; /* end: U+22BF */
+unicode_to_big5_0_2b_2460[]; /* end: U+247D */
+unicode_to_big5_0_2b_2500[]; /* end: U+2642 */
+unicode_to_big5_0_2b_3000[]; /* end: U+3129 */
+unicode_to_big5_0_2b_32A3[]; /* end: U+32A3 */
+unicode_to_big5_0_2b_338E[]; /* end: U+33D5 */
+unicode_to_big5_0_2b_4E00[]; /* end: U+7E9C */
+unicode_to_big5_0_2b_7F36[]; /* end: U+8B9F */
+unicode_to_big5_0_2b_8C37[]; /* end: U+9483 */
+unicode_to_big5_0_2b_9577[]; /* end: U+9FA4 */
+unicode_to_big5_0_2b_FA0C[]; /* end: U+FA0D */
+unicode_to_big5_0_2b_FE30[]; /* end: U+FE6B */
+unicode_to_big5_0_2b_FF01[]; /* end: U+FF64 */
+unicode_to_big5_0_2b_FFFD[]; /* end: U+FFFD */
+unicode_to_ksc5601_1987_0_2b_00A1[]; /* end: U+0167 */
+unicode_to_ksc5601_1987_0_2b_02C7[]; /* end: U+02DD */
+unicode_to_ksc5601_1987_0_2b_0391[]; /* end: U+0451 */
+unicode_to_ksc5601_1987_0_2b_2015[]; /* end: U+2312 */
+unicode_to_ksc5601_1987_0_2b_2460[]; /* end: U+266D */
+unicode_to_ksc5601_1987_0_2b_3000[]; /* end: U+327F */
+unicode_to_ksc5601_1987_0_2b_3380[]; /* end: U+33DD */
+unicode_to_ksc5601_1987_0_2b_4E00[]; /* end: U+7E9C */
+unicode_to_ksc5601_1987_0_2b_7F36[]; /* end: U+8B9A */
+unicode_to_ksc5601_1987_0_2b_8C37[]; /* end: U+947F */
+unicode_to_ksc5601_1987_0_2b_9577[]; /* end: U+9C57 */
+unicode_to_ksc5601_1987_0_2b_9CE5[]; /* end: U+9F9C */
+unicode_to_ksc5601_1987_0_2b_AC00[]; /* end: U+D79D */
+unicode_to_ksc5601_1987_0_2b_F900[]; /* end: U+FA0B */
+unicode_to_ksc5601_1987_0_2b_FF01[]; /* end: U+FF5E */
+unicode_to_ksc5601_1987_0_2b_FFE0[]; /* end: U+FFE6 */
+unicode_to_gb2312_1980_0_2b_00A4[]; /* end: U+01DC */
+unicode_to_gb2312_1980_0_2b_02C7[]; /* end: U+02C9 */
+unicode_to_gb2312_1980_0_2b_0391[]; /* end: U+0451 */
+unicode_to_gb2312_1980_0_2b_2015[]; /* end: U+203B */
+unicode_to_gb2312_1980_0_2b_2103[]; /* end: U+2312 */
+unicode_to_gb2312_1980_0_2b_2460[]; /* end: U+2642 */
+unicode_to_gb2312_1980_0_2b_3000[]; /* end: U+3129 */
+unicode_to_gb2312_1980_0_2b_3220[]; /* end: U+3229 */
+unicode_to_gb2312_1980_0_2b_4E00[]; /* end: U+7DAE */
+unicode_to_gb2312_1980_0_2b_7E3B[]; /* end: U+8C98 */
+unicode_to_gb2312_1980_0_2b_8D1D[]; /* end: U+8ECE */
+unicode_to_gb2312_1980_0_2b_8F66[]; /* end: U+91DC */
+unicode_to_gb2312_1980_0_2b_9274[]; /* end: U+99A8 */
+unicode_to_gb2312_1980_0_2b_9A6C[]; /* end: U+9B54 */
+unicode_to_gb2312_1980_0_2b_9C7C[]; /* end: U+9CE2 */
+unicode_to_gb2312_1980_0_2b_9E1F[]; /* end: U+9FA0 */
+unicode_to_gb2312_1980_0_2b_FF01[]; /* end: U+FF5E */
+unicode_to_gb2312_1980_0_2b_FFE0[]; /* end: U+FFE5 */
+unicode_to_jisx0201_1976_0_1b_0020[]; /* end: U+00A5 */
+unicode_to_jisx0201_1976_0_1b_203E[]; /* end: U+203E */
+unicode_to_jisx0201_1976_0_1b_FF61[]; /* end: U+FF9F */
+unicode_to_jisx0208_1983_0_2b_005C[]; /* end: U+00F7 */
+unicode_to_jisx0208_1983_0_2b_0391[]; /* end: U+0451 */
+unicode_to_jisx0208_1983_0_2b_2010[]; /* end: U+203B */
+unicode_to_jisx0208_1983_0_2b_2103[]; /* end: U+2312 */
+unicode_to_jisx0208_1983_0_2b_2500[]; /* end: U+266F */
+unicode_to_jisx0208_1983_0_2b_3000[]; /* end: U+30FE */
+unicode_to_jisx0208_1983_0_2b_4E00[]; /* end: U+7E9C */
+unicode_to_jisx0208_1983_0_2b_7F36[]; /* end: U+8B9A */
+unicode_to_jisx0208_1983_0_2b_8C37[]; /* end: U+9481 */
+unicode_to_jisx0208_1983_0_2b_9577[]; /* end: U+9FA0 */
+unicode_to_jisx0208_1983_0_2b_FF01[]; /* end: U+FF5D */
+unicode_to_jisx0208_1983_0_2b_FFE3[]; /* end: U+FFE5 */
+unicode_to_jisx0212_1990_0_2b_007E[]; /* end: U+01F5 */
+unicode_to_jisx0212_1990_0_2b_02C7[]; /* end: U+02DD */
+unicode_to_jisx0212_1990_0_2b_0384[]; /* end: U+045F */
+unicode_to_jisx0212_1990_0_2b_2116[]; /* end: U+2122 */
+unicode_to_jisx0212_1990_0_2b_4E02[]; /* end: U+7E9E */
+unicode_to_jisx0212_1990_0_2b_7F3B[]; /* end: U+8B9F */
+unicode_to_jisx0212_1990_0_2b_8C38[]; /* end: U+9484 */
+unicode_to_jisx0212_1990_0_2b_9578[]; /* end: U+9FA5 */
+unicode_to_symbol_1b_0020[]; /* end: U+00F7 */
+unicode_to_symbol_1b_0192[]; /* end: U+0192 */
+unicode_to_symbol_1b_0391[]; /* end: U+03D6 */
+unicode_to_symbol_1b_2022[]; /* end: U+232A */
+unicode_to_symbol_1b_25CA[]; /* end: U+25CA */
+unicode_to_symbol_1b_2660[]; /* end: U+2666 */
+unicode_to_symbol_1b_F6D9[]; /* end: U+F6DB */
+unicode_to_symbol_1b_F8E5[]; /* end: U+F8FE */
+unicode_to_dingbats_1b_0020[]; /* end: U+00A0 */
+unicode_to_dingbats_1b_2192[]; /* end: U+2195 */
+unicode_to_dingbats_1b_2460[]; /* end: U+2469 */
+unicode_to_dingbats_1b_25A0[]; /* end: U+2666 */
+unicode_to_dingbats_1b_2701[]; /* end: U+27BE */
+unicode_to_dingbats_1b_F8D7[]; /* end: U+F8E4 */
diff --git a/src/xutf8/imKStoUCS.c b/src/xutf8/imKStoUCS.c
index aa67020f0..af82f4593 100644
--- a/src/xutf8/imKStoUCS.c
+++ b/src/xutf8/imKStoUCS.c
@@ -63,7 +63,7 @@ static unsigned short const keysym_to_unicode_590_5fe[] = {
0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5, 0x06f6, 0x06f7, /* 0x0590-0x0597 */
0x06f8, 0x06f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x0598-0x059f */
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x066a, 0x0670, 0x0679, /* 0x05a0-0x05a7 */
-
+
0x067e, 0x0686, 0x0688, 0x0691, 0x060c, 0x0000, 0x06d4, 0x0000, /* 0x05ac-0x05af */
0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, /* 0x05b0-0x05b7 */
0x0668, 0x0669, 0x0000, 0x061b, 0x0000, 0x0000, 0x0000, 0x061f, /* 0x05b8-0x05bf */
@@ -203,7 +203,7 @@ static unsigned short keysym_to_unicode_12a1_12fe[] = {
0x0175, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e6b, /* 0x12f0-0x12f7 */
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0177 /* 0x12f0-0x12ff */
};
-
+
static unsigned short const keysym_to_unicode_13bc_13be[] = {
0x0152, 0x0153, 0x0178 /* 0x13b8-0x13bf */
};
@@ -274,51 +274,47 @@ KeySymToUcs4(KeySym keysym)
return (keysym & 0x00ffffff);
if (keysym > 0 && keysym < 0x100)
- return keysym;
+ return keysym;
else if (keysym > 0x1a0 && keysym < 0x200)
- return keysym_to_unicode_1a1_1ff[keysym - 0x1a1];
+ return keysym_to_unicode_1a1_1ff[keysym - 0x1a1];
else if (keysym > 0x2a0 && keysym < 0x2ff)
- return keysym_to_unicode_2a1_2fe[keysym - 0x2a1];
+ return keysym_to_unicode_2a1_2fe[keysym - 0x2a1];
else if (keysym > 0x3a1 && keysym < 0x3ff)
- return keysym_to_unicode_3a2_3fe[keysym - 0x3a2];
+ return keysym_to_unicode_3a2_3fe[keysym - 0x3a2];
else if (keysym > 0x4a0 && keysym < 0x4e0)
- return keysym_to_unicode_4a1_4df[keysym - 0x4a1];
+ return keysym_to_unicode_4a1_4df[keysym - 0x4a1];
else if (keysym > 0x589 && keysym < 0x5ff)
- return keysym_to_unicode_590_5fe[keysym - 0x590];
+ return keysym_to_unicode_590_5fe[keysym - 0x590];
else if (keysym > 0x67f && keysym < 0x700)
- return keysym_to_unicode_680_6ff[keysym - 0x680];
+ return keysym_to_unicode_680_6ff[keysym - 0x680];
else if (keysym > 0x7a0 && keysym < 0x7fa)
- return keysym_to_unicode_7a1_7f9[keysym - 0x7a1];
+ return keysym_to_unicode_7a1_7f9[keysym - 0x7a1];
else if (keysym > 0x8a3 && keysym < 0x8ff)
- return keysym_to_unicode_8a4_8fe[keysym - 0x8a4];
+ return keysym_to_unicode_8a4_8fe[keysym - 0x8a4];
else if (keysym > 0x9de && keysym < 0x9f9)
- return keysym_to_unicode_9df_9f8[keysym - 0x9df];
+ return keysym_to_unicode_9df_9f8[keysym - 0x9df];
else if (keysym > 0xaa0 && keysym < 0xaff)
- return keysym_to_unicode_aa1_afe[keysym - 0xaa1];
+ return keysym_to_unicode_aa1_afe[keysym - 0xaa1];
else if (keysym > 0xcde && keysym < 0xcfb)
- return keysym_to_unicode_cdf_cfa[keysym - 0xcdf];
+ return keysym_to_unicode_cdf_cfa[keysym - 0xcdf];
else if (keysym > 0xda0 && keysym < 0xdfa)
- return keysym_to_unicode_da1_df9[keysym - 0xda1];
+ return keysym_to_unicode_da1_df9[keysym - 0xda1];
else if (keysym > 0xe9f && keysym < 0xf00)
- return keysym_to_unicode_ea0_eff[keysym - 0xea0];
+ return keysym_to_unicode_ea0_eff[keysym - 0xea0];
else if (keysym > 0x12a0 && keysym < 0x12ff)
- return keysym_to_unicode_12a1_12fe[keysym - 0x12a1];
+ return keysym_to_unicode_12a1_12fe[keysym - 0x12a1];
else if (keysym > 0x13bb && keysym < 0x13bf)
- return keysym_to_unicode_13bc_13be[keysym - 0x13bc];
+ return keysym_to_unicode_13bc_13be[keysym - 0x13bc];
else if (keysym > 0x14a0 && keysym < 0x1500)
return keysym_to_unicode_14a1_14ff[keysym - 0x14a1];
else if (keysym > 0x15cf && keysym < 0x15f7)
- return keysym_to_unicode_15d0_15f6[keysym - 0x15d0];
+ return keysym_to_unicode_15d0_15f6[keysym - 0x15d0];
else if (keysym > 0x169f && keysym < 0x16f7)
- return keysym_to_unicode_16a0_16f6[keysym - 0x16a0];
+ return keysym_to_unicode_16a0_16f6[keysym - 0x16a0];
else if (keysym > 0x1e9e && keysym < 0x1f00)
- return keysym_to_unicode_1e9f_1eff[keysym - 0x1e9f];
+ return keysym_to_unicode_1e9f_1eff[keysym - 0x1e9f];
else if (keysym > 0x209f && keysym < 0x20ad)
- return keysym_to_unicode_20a0_20ac[keysym - 0x20a0];
- else
- return 0;
+ return keysym_to_unicode_20a0_20ac[keysym - 0x20a0];
+ else
+ return 0;
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/is_right2left.c b/src/xutf8/is_right2left.c
index 9f8e44fe4..aca6dee5e 100644
--- a/src/xutf8/is_right2left.c
+++ b/src/xutf8/is_right2left.c
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2010 by O'ksi'D.
*
@@ -7,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
/*
@@ -71,7 +70,3 @@ XUtf8IsRightToLeft(unsigned int ucs) {
return 0;
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/is_spacing.c b/src/xutf8/is_spacing.c
index c17dc2b60..53bab4f95 100644
--- a/src/xutf8/is_spacing.c
+++ b/src/xutf8/is_spacing.c
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2010 by O'ksi'D.
*
@@ -7,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
/*
@@ -78,7 +77,3 @@ XUtf8IsNonSpacing(unsigned int ucs) {
return 0;
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/keysym2Ucs.c b/src/xutf8/keysym2Ucs.c
index 7e451f890..92bd7b32f 100644
--- a/src/xutf8/keysym2Ucs.c
+++ b/src/xutf8/keysym2Ucs.c
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
*
@@ -7,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
#include "../Xutf8.h"
@@ -20,7 +19,3 @@
long XKeysymToUcs(KeySym keysym) {
return (long) KeySymToUcs4(keysym);
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/lcUniConv/cp936ext.h b/src/xutf8/lcUniConv/cp936ext.h
index 6c4763833..4fff93bae 100644
--- a/src/xutf8/lcUniConv/cp936ext.h
+++ b/src/xutf8/lcUniConv/cp936ext.h
@@ -1,6 +1,4 @@
/*
- * "$Id$"
- *
* Character encoding support for the Fast Light Tool Kit (FLTK).
*
* Copyright 1998-2018 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
#if defined(_WIN32) || defined(__APPLE__) /* PORTME: is this really needed? It's huge! */
@@ -6248,7 +6246,3 @@ cp936ext_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
#endif /* CP936 */
#endif /* _WIN32 || __APPLE__ */ /* PORTME: Unicode stuff */
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/lcUniConv/gbk_tab_to_h.c b/src/xutf8/lcUniConv/gbk_tab_to_h.c
index 0df963756..893db9d7b 100644
--- a/src/xutf8/lcUniConv/gbk_tab_to_h.c
+++ b/src/xutf8/lcUniConv/gbk_tab_to_h.c
@@ -1,6 +1,6 @@
/* $XFree86: xc/lib/X11/lcUniConv/cjk_tab_to_h.c,v 1.2 2000/12/04 18:49:31 dawes Exp $ */
-/* 2009-02-17 <sparkaround@gmail.com>: Create gbk_tab_to_h.c from
+/* 2009-02-17 <sparkaround@gmail.com>: Create gbk_tab_to_h.c from
* cjk_tab_to_h.c to generate GBK(cp936ext) table correctly.
*
*
diff --git a/src/xutf8/lcUniConv/iso8859_9e.h b/src/xutf8/lcUniConv/iso8859_9e.h
index a5a0b609c..47fda5268 100644
--- a/src/xutf8/lcUniConv/iso8859_9e.h
+++ b/src/xutf8/lcUniConv/iso8859_9e.h
@@ -74,7 +74,7 @@ static const unsigned char iso8859_9e_page01_d[24] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xba, /* 0xe0-0xe7 */
};
-
+
static int
iso8859_9e_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
{
diff --git a/src/xutf8/mk_wcwidth.c b/src/xutf8/mk_wcwidth.c
index 086665a31..ab16ff4fa 100644
--- a/src/xutf8/mk_wcwidth.c
+++ b/src/xutf8/mk_wcwidth.c
@@ -204,12 +204,12 @@ int mk_wcwidth(unsigned int ucs)
/* binary search in table of non-spacing characters */
if (bisearch(ucs, combining,
- sizeof(combining) / sizeof(struct interval) - 1))
+ sizeof(combining) / sizeof(struct interval) - 1))
return 0;
/* if we arrive here, ucs is not a combining or C0/C1 control character */
- return 1 +
+ return 1 +
(ucs >= 0x1100 &&
(ucs <= 0x115f || /* Hangul Jamo init. consonants */
ucs == 0x2329 || ucs == 0x232a ||
@@ -323,7 +323,7 @@ int mk_wcwidth_cjk(unsigned int ucs)
/* binary search in table of non-spacing characters */
if (bisearch(ucs, ambiguous,
- sizeof(ambiguous) / sizeof(struct interval) - 1))
+ sizeof(ambiguous) / sizeof(struct interval) - 1))
return 2;
return mk_wcwidth(ucs);
diff --git a/src/xutf8/test.c b/src/xutf8/test.c
index 6140afbc6..fe0dd6cb5 100644
--- a/src/xutf8/test.c
+++ b/src/xutf8/test.c
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
*
@@ -7,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
/*
@@ -26,13 +25,13 @@ XMODIFIERS="@im=kinput2"; export XMODIFIERS
LANG=ja_JP; export LANG
./test
- to open a conversion window press "Shift space"
- type some keys.
- press space.
- select glyph with arrows keys.
- press return.
- press return.
- press "Shift space" to close the window
+ to open a conversion window press "Shift space"
+ type some keys.
+ press space.
+ select glyph with arrows keys.
+ press return.
+ press return.
+ press "Shift space" to close the window
LANG=ar_AE; export LANG
LANG=he_IL; export LANG
@@ -58,10 +57,10 @@ export LANG=C; export XMODIFIERS="@im=interxim"
#include <X11/Intrinsic.h>
#include <X11/Xmd.h>
-char *jp_txt = "é UTF-8 e\xCC\x82=\xC3\xAA"
- " \357\274\270\357\274\254\357\274\246\357\274"
- "\244\345\220\215\343\201\247\346\214\207 \345\256\232"
- "\343\201\231\343\202\213";
+char *jp_txt = "é UTF-8 e\xCC\x82=\xC3\xAA"
+ " \357\274\270\357\274\254\357\274\246\357\274"
+ "\244\345\220\215\343\201\247\346\214\207 \345\256\232"
+ "\343\201\231\343\202\213";
char *rtl_txt = "->e\xCC\x82=\xC3\xAA";
@@ -104,7 +103,7 @@ int main(int argc, char**argv) {
if (!XSetLocaleModifiers(""))
puts("X locale modifiers not supported, using default");
-
+
dpy = XOpenDisplay(0);
if (!dpy) { puts("cannot open display.\n"); exit(-1); }
scr = DefaultScreen(dpy);
@@ -112,10 +111,10 @@ int main(int argc, char**argv) {
set_attr.event_mask = KeyPressMask|FocusChangeMask;
set_attr.background_pixel = WhitePixel(dpy, DefaultScreen(dpy));
set_attr.border_pixel = BlackPixel(dpy, DefaultScreen(dpy));
- w = XCreateWindow(dpy, root, 10,10,200,100,0,
- DefaultDepth(dpy, DefaultScreen(dpy)),
- InputOutput, DefaultVisual(dpy, DefaultScreen(dpy)),
- CWEventMask | CWBackPixel | CWBorderPixel, &set_attr);
+ w = XCreateWindow(dpy, root, 10,10,200,100,0,
+ DefaultDepth(dpy, DefaultScreen(dpy)),
+ InputOutput, DefaultVisual(dpy, DefaultScreen(dpy)),
+ CWEventMask | CWBackPixel | CWBorderPixel, &set_attr);
if (!w) {
puts("cannot creat window.\n");
exit(-1);
@@ -127,12 +126,12 @@ int main(int argc, char**argv) {
wm_hints.flags = InputHint;
XmbSetWMProperties(dpy, w, "test", "test", NULL, 0,
- NULL, &wm_hints, &class_hints);
+ NULL, &wm_hints, &class_hints);
XMapWindow(dpy, w);
xim_im = XOpenIM(dpy, NULL, "test", "Test");
- if (!xim_im) {
- puts("cannot Open Input Manager: Try default.\n");
+ if (!xim_im) {
+ puts("cannot Open Input Manager: Try default.\n");
XSetLocaleModifiers("@im=");
xim_im = XOpenIM(dpy, NULL, "test", "Test");
if (!xim_im) {
@@ -151,11 +150,11 @@ int main(int argc, char**argv) {
}
xim_ic = XCreateIC(xim_im,
- XNInputStyle,
- (XIMPreeditNothing | XIMStatusNothing),
- XNClientWindow, w,
- XNFocusWindow, w,
- NULL);
+ XNInputStyle,
+ (XIMPreeditNothing | XIMStatusNothing),
+ XNClientWindow, w,
+ XNFocusWindow, w,
+ NULL);
if (!xim_ic) {
puts("cannot create Input Context.\n");
exit(-1);
@@ -164,26 +163,26 @@ int main(int argc, char**argv) {
XSetICFocus(xim_ic);
/***************************************************************
- * I don't recommend to use a font base name list similar
- * to the following one in a real application ;-)
- * You should use an iso8859-1 font, plus a single font for
+ * I don't recommend to use a font base name list similar
+ * to the following one in a real application ;-)
+ * You should use an iso8859-1 font, plus a single font for
* your language.
***************************************************************/
- fontset = XCreateUtf8FontStruct(dpy,
- "-*-*-*-*-*-*-*-*-*-*-*-*-iso8858-3," /* not valid */
- "-*-*-medium-r-*-*-*-*-*-*-*-*-iso8859-1,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-6,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-8,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-ksc5601.1987-0,"
- "-*-symbol-*-*-*-*-*-*-*-*-*-*-adobe-fontspecific,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-2,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-koi8-1,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0208.1983-0,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0212.1990-0,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-big5-0,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0201.1976-0,"
- "-*-unifont-*-*-*-*-*-*-*-*-*-*-iso10646-1[0x300 0x400_0x500],"
- "-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
+ fontset = XCreateUtf8FontStruct(dpy,
+ "-*-*-*-*-*-*-*-*-*-*-*-*-iso8858-3," /* not valid */
+ "-*-*-medium-r-*-*-*-*-*-*-*-*-iso8859-1,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-6,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-8,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-ksc5601.1987-0,"
+ "-*-symbol-*-*-*-*-*-*-*-*-*-*-adobe-fontspecific,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-2,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-koi8-1,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0208.1983-0,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0212.1990-0,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-big5-0,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0201.1976-0,"
+ "-*-unifont-*-*-*-*-*-*-*-*-*-*-iso10646-1[0x300 0x400_0x500],"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
/* THIS PART IS NOT REQUIERED */
nb_font = fontset->nb_font;
@@ -191,10 +190,10 @@ int main(int argc, char**argv) {
while (nb_font > 0) {
nb_font--;
if (fontset->fonts[nb_font]) {
- printf("encoding=\"\" fid=%d \n %s\n",
+ printf("encoding=\"\" fid=%d \n %s\n",
/* fontset->encodings[nb_font], */
- fontset->fonts[nb_font]->fid,
- fontset->font_name_list[nb_font]);
+ fontset->fonts[nb_font]->fid,
+ fontset->font_name_list[nb_font]);
}
}
/* END OF NOT REQUIERED PART*/
@@ -227,17 +226,17 @@ int main(int argc, char**argv) {
XSetLocaleModifiers("@im=");
xim_im = XOpenIM(dpy, NULL, "test", "Test");
if (xim_im) {
- xim_ic = XCreateIC(xim_im,
- XNInputStyle, (XIMPreeditNothing | XIMStatusNothing),
- XNClientWindow, w,
- XNFocusWindow, w,
- NULL);
+ xim_ic = XCreateIC(xim_im,
+ XNInputStyle, (XIMPreeditNothing | XIMStatusNothing),
+ XNClientWindow, w,
+ XNFocusWindow, w,
+ NULL);
} else {
- xim_ic = NULL;
+ xim_ic = NULL;
}
if (!xim_ic) {
- puts("Crash recovery failed. exiting.\n");
- exit(-1);
+ puts("Crash recovery failed. exiting.\n");
+ exit(-1);
}
}
if (xevent.type != DestroyNotify) {
@@ -247,20 +246,20 @@ int main(int argc, char**argv) {
if (xevent.type == FocusIn && xim_ic) XSetICFocus(xim_ic);
if (xevent.type == KeyPress && !filtered) {
- len = XUtf8LookupString(xim_ic, &xevent.xkey,
- buf, 127, &keysym, &status);
+ len = XUtf8LookupString(xim_ic, &xevent.xkey,
+ buf, 127, &keysym, &status);
if (len == 1 && buf[0] == '\b') {
- x -= XUtf8TextWidth(fontset, buf, len);
- XUtf8DrawImageString(dpy, w, fontset, gc,
- x, y, buf, len);
+ x -= XUtf8TextWidth(fontset, buf, len);
+ XUtf8DrawImageString(dpy, w, fontset, gc,
+ x, y, buf, len);
} else if (len == 1 && buf[0] == '\r') {
- y += fontset->ascent + fontset->descent;
- x = 0;
- XCloseIM(xim_im);
+ y += fontset->ascent + fontset->descent;
+ x = 0;
+ XCloseIM(xim_im);
} else {
- XUtf8DrawImageString(dpy, w, fontset, gc, x, y, buf, len);
- x += XUtf8TextWidth(fontset, buf, len);
+ XUtf8DrawImageString(dpy, w, fontset, gc, x, y, buf, len);
+ x += XUtf8TextWidth(fontset, buf, len);
}
XUtf8DrawString(dpy, w, fontset, gc, 0, 20, jp_txt, strlen(jp_txt));
@@ -277,7 +276,3 @@ int main(int argc, char**argv) {
XFreeUtf8FontStruct(dpy, fontset);
return 0;
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/test2.c b/src/xutf8/test2.c
index 635578058..6dc55a862 100644
--- a/src/xutf8/test2.c
+++ b/src/xutf8/test2.c
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
*
@@ -7,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
/*
@@ -26,13 +25,13 @@ XMODIFIERS="@im=kinput2"; export XMODIFIERS
LANG=ja_JP; export LANG
./test
- to open a conversion window press "Shift space"
- type some keys.
- press space.
- select glyph with arrows keys.
- press return.
- press return.
- press "Shift space" to close the window
+ to open a conversion window press "Shift space"
+ type some keys.
+ press space.
+ select glyph with arrows keys.
+ press return.
+ press return.
+ press "Shift space" to close the window
LANG=ar_AE; export LANG
LANG=he_IL; export LANG
@@ -60,10 +59,10 @@ export LD_PRELOAD="/usr/src/x11/xc/exports/lib/libX11.so /usr/src/x11/xc/exports
#include <X11/Intrinsic.h>
#include <X11/Xmd.h>
-char *jp_txt = "é UTF-8 e\xCC\x82=\xC3\xAA"
- " \357\274\270\357\274\254\357\274\246\357\274"
- "\244\345\220\215\343\201\247\346\214\207 \345\256\232"
- "\343\201\231\343\202\213";
+char *jp_txt = "é UTF-8 e\xCC\x82=\xC3\xAA"
+ " \357\274\270\357\274\254\357\274\246\357\274"
+ "\244\345\220\215\343\201\247\346\214\207 \345\256\232"
+ "\343\201\231\343\202\213";
char *rtl_txt = "->e\xCC\x82=\xC3\xAA";
@@ -102,23 +101,23 @@ int main(int argc, char**argv) {
char **missing_charset_list_return;
int missing_charset_count_return;
char *def_string_return;
-
+
if (!setlocale(LC_ALL, ""))
puts("locale not supported by C library, locale unchanged");
if (!XSetLocaleModifiers(""))
puts("X locale modifiers not supported, using default");
-
+
dpy = XOpenDisplay(0);
scr = DefaultScreen(dpy);
root = RootWindow(dpy, scr);
set_attr.event_mask = KeyPressMask|FocusChangeMask;
set_attr.background_pixel = WhitePixel(dpy, DefaultScreen(dpy));
set_attr.border_pixel = BlackPixel(dpy, DefaultScreen(dpy));
- w = XCreateWindow(dpy, root, 10,10,200,100,0,
- DefaultDepth(dpy, DefaultScreen(dpy)),
- InputOutput, DefaultVisual(dpy, DefaultScreen(dpy)),
- CWEventMask | CWBackPixel | CWBorderPixel, &set_attr);
+ w = XCreateWindow(dpy, root, 10,10,200,100,0,
+ DefaultDepth(dpy, DefaultScreen(dpy)),
+ InputOutput, DefaultVisual(dpy, DefaultScreen(dpy)),
+ CWEventMask | CWBackPixel | CWBorderPixel, &set_attr);
class_hints.res_name = "test";
class_hints.res_class = "Test";
@@ -126,7 +125,7 @@ int main(int argc, char**argv) {
wm_hints.flags = InputHint;
XmbSetWMProperties(dpy, w, "test", "test", NULL, 0,
- NULL, &wm_hints, &class_hints);
+ NULL, &wm_hints, &class_hints);
XMapWindow(dpy, w);
xim_im = XOpenIM(dpy, NULL, "test", "Test");
@@ -142,33 +141,33 @@ int main(int argc, char**argv) {
XFree(xim_styles);
xim_ic = XCreateIC(xim_im,
- XNInputStyle, (XIMPreeditNothing | XIMStatusNothing),
- XNClientWindow, w,
- XNFocusWindow, w,
- NULL);
+ XNInputStyle, (XIMPreeditNothing | XIMStatusNothing),
+ XNClientWindow, w,
+ XNFocusWindow, w,
+ NULL);
XSetICFocus(xim_ic);
/***************************************************************
- * I don't recommend to use a font base name list similar
+ * I don't recommend to use a font base name list similar
* to the following one in a real application ;-)
***************************************************************/
- fontset = XCreateFontSet(dpy,
- "-*-*-*-*-*-*-*-*-*-*-*-*-iso8858-3," /* not valid */
- "-*-*-medium-r-*-*-*-*-*-*-*-*-iso8859-1,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-6,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-8,"
- "-*-symbol-*-*-*-*-*-*-*-*-*-*-adobe-fontspecific,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-2,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-koi8-1,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0208.1983-0,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0212.1990-0,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-big5-0,"
- "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0201.1976-0,"
- "-*-unifont-*-*-*-*-*-*-*-*-*-*-iso10646-1[0x300 0x400_0x500],"
- "-*-*-*-*-*-*-*-*-*-*-*-*-*-*",
- &missing_charset_list_return,
- &missing_charset_count_return,
- &def_string_return);
+ fontset = XCreateFontSet(dpy,
+ "-*-*-*-*-*-*-*-*-*-*-*-*-iso8858-3," /* not valid */
+ "-*-*-medium-r-*-*-*-*-*-*-*-*-iso8859-1,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-6,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-8,"
+ "-*-symbol-*-*-*-*-*-*-*-*-*-*-adobe-fontspecific,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-2,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-koi8-1,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0208.1983-0,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0212.1990-0,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-big5-0,"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0201.1976-0,"
+ "-*-unifont-*-*-*-*-*-*-*-*-*-*-iso10646-1[0x300 0x400_0x500],"
+ "-*-*-*-*-*-*-*-*-*-*-*-*-*-*",
+ &missing_charset_list_return,
+ &missing_charset_count_return,
+ &def_string_return);
mask = (GCForeground | GCBackground);
xgcv.foreground = BlackPixel(dpy, DefaultScreen(dpy));
xgcv.background = WhitePixel(dpy, DefaultScreen(dpy));
@@ -192,7 +191,7 @@ int main(int argc, char**argv) {
if (xevent.type == FocusIn) XSetICFocus(xim_ic);
if (xevent.type == KeyPress && !filtered) {
- len = Xutf8LookupString(xim_ic, &xevent.xkey, buf, 127, &keysym, &status);
+ len = Xutf8LookupString(xim_ic, &xevent.xkey, buf, 127, &keysym, &status);
Xutf8DrawImageString(dpy, w, fontset, gc, x, y, buf, len);
Xutf8DrawString(dpy, w, fontset, gc, 0, 20, jp_txt, strlen(jp_txt));
Xutf8DrawString(dpy, w, fontset, gc, 50, 90, rtl_txt, strlen(rtl_txt));
@@ -208,7 +207,3 @@ int main(int argc, char**argv) {
XFreeFontSet(dpy, fontset);
return 0;
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/ucs2fontmap.c b/src/xutf8/ucs2fontmap.c
index 2cbfd3983..50f85e551 100644
--- a/src/xutf8/ucs2fontmap.c
+++ b/src/xutf8/ucs2fontmap.c
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
*
@@ -7,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
#include <stdlib.h>
@@ -53,17 +52,17 @@ typedef struct {
#include "lcUniConv/cp1251.h"
#include "headers/symbol_.h"
#include "headers/dingbats_.h"
-
+
/*************** conv_gen.c ************/
/*const*/
static int ucs2fontmap(char *s, unsigned int ucs, int enc) {
switch(enc) {
- case 0: /* iso10646-1 */
+ case 0: /* iso10646-1 */
s[0] = (char) ((ucs & 0xFF00) >> 8);
s[1] = (char) (ucs & 0xFF);
return 0;
- case 1: /* iso8859-1 */
+ case 1: /* iso8859-1 */
if (ucs <= 0x00FF) {
if (ucs >= 0x0001) {
s[0] = 0;
@@ -72,15 +71,15 @@ static int ucs2fontmap(char *s, unsigned int ucs, int enc) {
}
}
break;
- case 2: /* iso8859-2 */
+ case 2: /* iso8859-2 */
if (ucs <= 0x00a0) {
s[0] = 0;
s[1] = (char) ucs;
return 2;
} else if (ucs < 0x0180) {
if (ucs >= 0x00a0) {
- s[0] = 0;
- s[1] = (char) iso8859_2_page00[ucs-0x00a0];
+ s[0] = 0;
+ s[1] = (char) iso8859_2_page00[ucs-0x00a0];
if (s[1]) return 2;
}
} else if (ucs < 0x02e0) {
@@ -88,105 +87,105 @@ static int ucs2fontmap(char *s, unsigned int ucs, int enc) {
s[0] = 0;
s[1] = (char) iso8859_2_page02[ucs-0x02c0];
if (s[1]) return 2;
- }
+ }
}
break;
- case 3: /* iso8859-3 */
+ case 3: /* iso8859-3 */
if (iso8859_3_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 3;
- }
+ }
break;
- case 4: /* iso8859-4 */
+ case 4: /* iso8859-4 */
if (iso8859_4_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 4;
- }
+ }
break;
- case 5: /* iso8859-5 */
+ case 5: /* iso8859-5 */
if (iso8859_5_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 5;
- }
+ }
break;
- case 6: /* iso8859-6 */
+ case 6: /* iso8859-6 */
if (iso8859_6_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 6;
- }
+ }
break;
- case 7: /* iso8859-7 */
+ case 7: /* iso8859-7 */
if (iso8859_7_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 7;
- }
+ }
break;
- case 8: /* iso8859-8 */
+ case 8: /* iso8859-8 */
if (iso8859_8_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 8;
- }
+ }
break;
- case 9: /* iso8859-9 */
+ case 9: /* iso8859-9 */
if (iso8859_9_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 9;
- }
+ }
break;
- case 10: /* iso8859-10 */
+ case 10: /* iso8859-10 */
if (iso8859_10_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 10;
- }
+ }
break;
- case 25: /* iso8859-11 */
+ case 25: /* iso8859-11 */
if (iso8859_11_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 25;
- }
+ }
break;
- case 11: /* iso8859-13 */
+ case 11: /* iso8859-13 */
if (iso8859_13_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 11;
- }
+ }
break;
- case 12: /* iso8859-14 */
+ case 12: /* iso8859-14 */
if (iso8859_14_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 12;
- }
+ }
break;
- case 13: /* iso8859-15 */
+ case 13: /* iso8859-15 */
if (iso8859_15_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 13;
- }
+ }
break;
- case 14: /* koi8-r */
+ case 14: /* koi8-r */
if (koi8_r_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 14;
- }
+ }
break;
- case 15: /* big5 */
+ case 15: /* big5 */
if (big5_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 15;
- }
+ }
break;
- case 16: /* ksc5601.1987-0 */
+ case 16: /* ksc5601.1987-0 */
if (ksc5601_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 16;
- }
+ }
break;
- case 17: /* gb2312.1980-0 */
+ case 17: /* gb2312.1980-0 */
if (gb2312_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 17;
- }
+ }
break;
- case 18: /* jisx0201.1976-0 */
+ case 18: /* jisx0201.1976-0 */
if (jisx0201_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 18;
- }
+ }
break;
- case 19: /* jisx0208.1983-0 */
+ case 19: /* jisx0208.1983-0 */
if (jisx0208_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 19;
- }
+ }
break;
- case 20: /* jisx0212.1990-0 */
+ case 20: /* jisx0212.1990-0 */
if (jisx0212_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 20;
- }
+ }
break;
- case 21: /* symbol */
+ case 21: /* symbol */
if (ucs <= 0x00F7) {
if (ucs >= 0x0020) {
s[0] = 0;
@@ -237,7 +236,7 @@ static int ucs2fontmap(char *s, unsigned int ucs, int enc) {
}
}
break;
- case 22: /* dingbats */
+ case 22: /* dingbats */
if (ucs <= 0x00A0) {
if (ucs >= 0x0020) {
s[0] = 0;
@@ -276,15 +275,15 @@ static int ucs2fontmap(char *s, unsigned int ucs, int enc) {
}
}
break;
- case 23: /* koi8-u */
+ case 23: /* koi8-u */
if (koi8_u_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 23;
- }
+ }
break;
- case 24: /* microsoft-cp1251 */
+ case 24: /* microsoft-cp1251 */
if (cp1251_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
return 24;
- }
+ }
break;
case 26: /* gbk/cp936ext */
if (cp936ext_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
@@ -330,27 +329,27 @@ static int encoding_number(const char *enc) {
} else if (!strcmp(enc, "koi8-r")) {
return 14;
} else if (!strcmp(enc, "big5-0") || !strcmp(enc, "big5.eten-0") ||
- !strcmp(enc, "big5p-0"))
+ !strcmp(enc, "big5p-0"))
{
return 15;
} else if (!strcmp(enc, "ksc5601.1987-0")) {
return 16;
- } else if (!strcmp(enc, "gb2312.1980-0") || !strcmp(enc, "gb2312.80-0") ||
- !strcmp(enc, "gb2312.80&gb8565.88") || !strcmp(enc, "gb2312.80-0"))
+ } else if (!strcmp(enc, "gb2312.1980-0") || !strcmp(enc, "gb2312.80-0") ||
+ !strcmp(enc, "gb2312.80&gb8565.88") || !strcmp(enc, "gb2312.80-0"))
{
return 17;
} else if (!strcmp(enc, "jisx0201.1976-0")) {
return 18;
} else if (!strcmp(enc, "jisx0208.1983-0") || !strcmp(enc, "jisx0208.1990-0")
- || !strcmp(enc, "jisx0208.1978-0"))
+ || !strcmp(enc, "jisx0208.1978-0"))
{
return 19;
} else if (!strcmp(enc, "jisx0212.1990-0")) {
return 20;
} else if (!strcmp(enc, "symbol")) {
return 21;
- } else if (!strcmp(enc, "dingbats") || !strcmp(enc, "zapfdingbats") ||
- !strcmp(enc, "zapf dingbats") || !strcmp(enc, "itc zapf dingbats"))
+ } else if (!strcmp(enc, "dingbats") || !strcmp(enc, "zapfdingbats") ||
+ !strcmp(enc, "zapf dingbats") || !strcmp(enc, "itc zapf dingbats"))
{
return 22;
} else if (!strcmp(enc, "koi8-u")) {
@@ -364,7 +363,3 @@ static int encoding_number(const char *enc) {
};
return -1;
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/ucs2fontmap.c.mini b/src/xutf8/ucs2fontmap.c.mini
index bd94f3f92..89ed7a8b0 100644
--- a/src/xutf8/ucs2fontmap.c.mini
+++ b/src/xutf8/ucs2fontmap.c.mini
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
*
@@ -7,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
int ucs2fontmap(char *s, unsigned long ucs, int enc)
@@ -31,7 +30,3 @@ const char *encoding_name(int num)
{
return "iso10646-1";
};
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/utf8Input.c b/src/xutf8/utf8Input.c
index 231553b5d..e270adfb5 100644
--- a/src/xutf8/utf8Input.c
+++ b/src/xutf8/utf8Input.c
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
*
@@ -7,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
#include <config.h>
@@ -75,18 +74,18 @@ XConvertEucTwToUtf8(char* buffer_return, int len) {
cd = iconv_open("EUC-TW", "UTF-8");
iconv(cd, &b, &len, &buffer_return, &cdl);
iconv_close(cd);
- l -= cdl;
+ l -= cdl;
#else
while (i < len) {
unsigned int ucs;
- unsigned char c;
+ unsigned char c;
c = (unsigned char) buf[i];
if (c < 0x80) {
- ucs = c;
+ ucs = c;
i++;
} else if (c >= 0xa1 && c < 0xff && len - i > 1 ) {
-#if 0
+#if 0
unsigned char b[2];
b[0] = (unsigned char) c - 0x80;
b[1] = (unsigned char) buf[i + 1] - 0x80;
@@ -102,13 +101,13 @@ XConvertEucTwToUtf8(char* buffer_return, int len) {
b[1] = (unsigned char) buf[i + 3] - 0x80;
#endif
if (c1 >= 0xa1 && c1 <= 0xb0) {
- if (c2 >= 0xa1 && c2 < 0xff && c3 >= 0xa1 && c3 < 0xff) {
- ucs = ' '; i += 4;
- } else {
- ucs = '?'; i++;
- }
+ if (c2 >= 0xa1 && c2 < 0xff && c3 >= 0xa1 && c3 < 0xff) {
+ ucs = ' '; i += 4;
+ } else {
+ ucs = '?'; i++;
+ }
} else {
- ucs = '?'; i++;
+ ucs = '?'; i++;
}
} else {
ucs = '?';
@@ -136,19 +135,19 @@ XConvertEucKrToUtf8(char* buffer_return, int len) {
unsigned char c, c1;
c = (unsigned char) buf[i];
if (c < 0x80) {
- ucs = c;
+ ucs = c;
i++;
} else if (c >= 0xA1 && c < 0xFF && len - i > 1) {
c1 = (unsigned char) buf[i + 1];
if (c1 >= 0xa1 && c1 < 0xff) {
- unsigned char b[2];
- b[0] = c - 0x80;
- b[1] = c1 - 0x80;
- if (ksc5601_mbtowc(NULL, &ucs, b, 2) < 1) {
- ucs = '?';
- }
+ unsigned char b[2];
+ b[0] = c - 0x80;
+ b[1] = c1 - 0x80;
+ if (ksc5601_mbtowc(NULL, &ucs, b, 2) < 1) {
+ ucs = '?';
+ }
} else {
- ucs = '?';
+ ucs = '?';
}
i += 2;
} else {
@@ -201,26 +200,26 @@ XConvertCp936extToUtf8(char* buffer_return, int len)
memcpy(buf, buffer_return, (unsigned)len);
if (len == 1) {
- l += XConvertUcsToUtf8((unsigned int)buf[i], buffer_return + l);
+ l += XConvertUcsToUtf8((unsigned int)buf[i], buffer_return + l);
}
while (i + 1 < len) {
- unsigned int ucs;
- unsigned char b[2];
- b[0] = (unsigned char) buf[i];
- b[1] = (unsigned char) buf[i + 1];
- if (cp936ext_mbtowc(NULL, &ucs, b, 2) == 2) {
- i += 2;
- } else {
- if ( b[0] < 0x80) {
- ucs = b[0];
- }else{
- ucs = '?';
- }
- i++;
- }
- l += XConvertUcsToUtf8(ucs, buffer_return + l);
+ unsigned int ucs;
+ unsigned char b[2];
+ b[0] = (unsigned char) buf[i];
+ b[1] = (unsigned char) buf[i + 1];
+ if (cp936ext_mbtowc(NULL, &ucs, b, 2) == 2) {
+ i += 2;
+ } else {
+ if ( b[0] < 0x80) {
+ ucs = b[0];
+ }else{
+ ucs = '?';
+ }
+ i++;
+ }
+ l += XConvertUcsToUtf8(ucs, buffer_return + l);
}
- if(i + 1 == len) {
+ if(i + 1 == len) {
l += XConvertUcsToUtf8((unsigned int)buf[i], buffer_return + l);
}
free(buf);
@@ -276,19 +275,19 @@ XConvertEucCnToUtf8(char* buffer_return, int len) {
unsigned char c, c1;
c = (unsigned char) buf[i];
if (c < 0x80) {
- ucs = c;
+ ucs = c;
i++;
} else if (c >= 0xA1 && c < 0xFF && len - i > 1) {
c1 = (unsigned char) buf[i + 1];
- if (c1 >= 0xa1 && c1 < 0xff) {
- unsigned char b[2];
- b[0] = (unsigned char) c;
- b[1] = (unsigned char) c1;
- if (gb2312_mbtowc(NULL, &ucs, b, 2) < 1) {
- ucs = '?';
- }
+ if (c1 >= 0xa1 && c1 < 0xff) {
+ unsigned char b[2];
+ b[0] = (unsigned char) c;
+ b[1] = (unsigned char) c1;
+ if (gb2312_mbtowc(NULL, &ucs, b, 2) < 1) {
+ ucs = '?';
+ }
} else {
- ucs = '?';
+ ucs = '?';
}
i += 2;
} else {
@@ -315,53 +314,53 @@ XConvertEucJpToUtf8(char* buffer_return, int len) {
unsigned char c, c1;
c = (unsigned char) buf[i];
if (c < 0x80) {
- ucs = c;
+ ucs = c;
i++;
} else if (c >= 0xA1 && c < 0xFF && len - i > 1) {
- c1 = (unsigned char) buf[i + 1];
+ c1 = (unsigned char) buf[i + 1];
if (c < 0xF5 && c1 >= 0xa1) {
- unsigned char b[2];
- b[0] = c - 0x80;
- b[1] = c1 - 0x80;
- if (jisx0208_mbtowc(NULL, &ucs, b, 2) < 1) {
- ucs = '?';
- }
+ unsigned char b[2];
+ b[0] = c - 0x80;
+ b[1] = c1 - 0x80;
+ if (jisx0208_mbtowc(NULL, &ucs, b, 2) < 1) {
+ ucs = '?';
+ }
} else if (c1 >= 0xA1 && c1 < 0xFF) {
- ucs = 0xE000 + 94 * (c - 0xF5) + (c1 - 0xA1);
+ ucs = 0xE000 + 94 * (c - 0xF5) + (c1 - 0xA1);
} else {
- ucs = '?';
+ ucs = '?';
}
i += 2;
} else if (c == 0x8E && len - i > 1) {
- c1 = (unsigned char) buf[i + 1];
+ c1 = (unsigned char) buf[i + 1];
if (c1 >= 0xa1 && c1 <= 0xe0) {
- if (jisx0201_mbtowc(NULL, &ucs, &c1, 1) != 1) {
- ucs = '?';
- }
+ if (jisx0201_mbtowc(NULL, &ucs, &c1, 1) != 1) {
+ ucs = '?';
+ }
} else {
- ucs = '?';
+ ucs = '?';
}
i += 2;
} else if (c == 0x8F && len - i > 2) {
- c = (unsigned char) buf[i + 1];
- c1 = (unsigned char) buf[i + 2];
+ c = (unsigned char) buf[i + 1];
+ c1 = (unsigned char) buf[i + 2];
if (c >= 0xa1 && c < 0xff) {
- if (c < 0xf5 && c1 >= 0xa1 && c1 < 0xff) {
- unsigned char b[2];
- b[0] = c - 0x80;
- b[1] = c1 - 0x80;
- if (jisx0212_mbtowc(NULL, &ucs, b, 2) < 1) {
- ucs = '?';
- }
- } else {
- ucs = '?';
- }
+ if (c < 0xf5 && c1 >= 0xa1 && c1 < 0xff) {
+ unsigned char b[2];
+ b[0] = c - 0x80;
+ b[1] = c1 - 0x80;
+ if (jisx0212_mbtowc(NULL, &ucs, b, 2) < 1) {
+ ucs = '?';
+ }
+ } else {
+ ucs = '?';
+ }
} else {
- if (c1 >= 0xa1 && c1 < 0xff) {
- ucs = 0xe3ac + 94 * (c - 0xF5) + (c1 - 0xA1);
- } else {
- ucs = '?';
- }
+ if (c1 >= 0xa1 && c1 < 0xff) {
+ ucs = 0xe3ac + 94 * (c - 0xF5) + (c1 - 0xA1);
+ } else {
+ ucs = '?';
+ }
}
i += 3;
} else {
@@ -375,10 +374,10 @@ XConvertEucJpToUtf8(char* buffer_return, int len) {
}
static int
-XConvertEucToUtf8(const char* locale,
- char* buffer_return,
- int len,
- int bytes_buffer) {
+XConvertEucToUtf8(const char* locale,
+ char* buffer_return,
+ int len,
+ int bytes_buffer) {
/* if (!locale) { */
/* if (!locale || strstr(locale, "UTF") || strstr(locale, "utf")) { */
@@ -386,7 +385,7 @@ XConvertEucToUtf8(const char* locale,
return len;
}
- if (strstr(locale, "ja")) {
+ if (strstr(locale, "ja")) {
return XConvertEucJpToUtf8(buffer_return, len);
} else if (strstr(locale, "Big5") || strstr(locale, "big5")) { /* BIG5 */
return XConvertBig5ToUtf8(buffer_return, len);
@@ -395,7 +394,7 @@ XConvertEucToUtf8(const char* locale,
} else if (strstr(locale, "zh") || strstr(locale, "chinese-")) {
if (strstr(locale, "TW") || strstr(locale, "chinese-t")) {
if (strstr(locale, "EUC") || strstr(locale, "euc") || strstr(locale, "chinese-t")) {
- return XConvertEucTwToUtf8(buffer_return, len);
+ return XConvertEucTwToUtf8(buffer_return, len);
}
return XConvertBig5ToUtf8(buffer_return, len);
}
@@ -403,7 +402,7 @@ XConvertEucToUtf8(const char* locale,
return XConvertEucCnToUtf8(buffer_return, len);
}
return XConvertGb2312ToUtf8(buffer_return, len);
- } else if (strstr(locale, "ko")) {
+ } else if (strstr(locale, "ko")) {
return XConvertEucKrToUtf8(buffer_return, len);
}
return len;
@@ -411,16 +410,16 @@ XConvertEucToUtf8(const char* locale,
int
XUtf8LookupString(XIC ic,
- XKeyPressedEvent* event,
- char* buffer_return,
- int bytes_buffer,
- KeySym* keysym,
- Status* status_return) {
+ XKeyPressedEvent* event,
+ char* buffer_return,
+ int bytes_buffer,
+ KeySym* keysym,
+ Status* status_return) {
long ucs = -1;
int len;
len = XmbLookupString(ic, event, buffer_return, bytes_buffer / 5,
- keysym, status_return);
+ keysym, status_return);
if (*status_return == XBufferOverflow) {
return len * 5;
}
@@ -431,7 +430,7 @@ XUtf8LookupString(XIC ic,
ucs = (long)*keysym;
}
} else if (((*keysym >= 0x100 && *keysym <= 0xf000) ||
- (*keysym & 0xff000000U) == 0x01000000))
+ (*keysym & 0xff000000U) == 0x01000000))
{
ucs = XKeysymToUcs(*keysym);
} else {
@@ -445,14 +444,10 @@ XUtf8LookupString(XIC ic,
if (!ic) return 0;
im = XIMOfIC(ic);
if (!im) return 0;
- len = XConvertEucToUtf8(XLocaleOfIM(im), buffer_return, len, bytes_buffer);
+ len = XConvertEucToUtf8(XLocaleOfIM(im), buffer_return, len, bytes_buffer);
}
return len;
}
#endif /* X11 has UTF-8 */
#endif /* X11 only */
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/utf8Utils.c b/src/xutf8/utf8Utils.c
index ad2bc83ff..846846c93 100644
--- a/src/xutf8/utf8Utils.c
+++ b/src/xutf8/utf8Utils.c
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
*
@@ -7,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
/*
@@ -24,84 +23,84 @@
/*** NOTE : all functions are LIMITED to 24 bits Unicode values !!! ***/
-/*
- * Converts the first char of the UTF-8 string to an Unicode value
- * Returns the byte length of the converted UTF-8 char
- * Returns -1 if the UTF-8 string is not valid
+/*
+ * Converts the first char of the UTF-8 string to an Unicode value
+ * Returns the byte length of the converted UTF-8 char
+ * Returns -1 if the UTF-8 string is not valid
*/
int
XConvertUtf8ToUcs(const unsigned char *buf,
- int len,
- unsigned int *ucs) {
+ int len,
+ unsigned int *ucs) {
if (buf[0] & 0x80) {
if (buf[0] & 0x40) {
if (buf[0] & 0x20) {
- if (buf[0] & 0x10) {
- if (buf[0] & 0x08) {
- if (buf[0] & 0x04) {
- if (buf[0] & 0x02) {
- /* bad UTF-8 string */
- } else {
- /* 0x04000000 - 0x7FFFFFFF */
- }
- } else if (len > 4
- && (buf[1] & 0xC0) == 0x80
- && (buf[2] & 0xC0) == 0x80
- && (buf[3] & 0xC0) == 0x80
- && (buf[4] & 0xC0) == 0x80) {
- /* 0x00200000 - 0x03FFFFFF */
- *ucs = ((buf[0] & ~0xF8) << 24) +
- ((buf[1] & ~0x80) << 18) +
- ((buf[2] & ~0x80) << 12) +
- ((buf[3] & ~0x80) << 6) +
- (buf[4] & ~0x80);
- if (*ucs > 0x001FFFFF && *ucs < 0x01000000) return 5;
- }
- } else if (len > 3
- && (buf[1] & 0xC0) == 0x80
- && (buf[2] & 0xC0) == 0x80
- && (buf[3] & 0xC0) == 0x80) {
- /* 0x00010000 - 0x001FFFFF */
- *ucs = ((buf[0] & ~0xF0) << 18) +
- ((buf[1] & ~0x80) << 12) +
- ((buf[2] & ~0x80) << 6) +
- (buf[3] & ~0x80);
- if (*ucs > 0x0000FFFF) return 4;
- }
- } else if (len > 2
- && (buf[1] & 0xC0) == 0x80
- && (buf[2] & 0xC0) == 0x80) {
- /* 0x00000800 - 0x0000FFFF */
- *ucs = ((buf[0] & ~0xE0) << 12) +
- ((buf[1] & ~0x80) << 6) +
- (buf[2] & ~0x80);
- if (*ucs > 0x000007FF) return 3;
- }
+ if (buf[0] & 0x10) {
+ if (buf[0] & 0x08) {
+ if (buf[0] & 0x04) {
+ if (buf[0] & 0x02) {
+ /* bad UTF-8 string */
+ } else {
+ /* 0x04000000 - 0x7FFFFFFF */
+ }
+ } else if (len > 4
+ && (buf[1] & 0xC0) == 0x80
+ && (buf[2] & 0xC0) == 0x80
+ && (buf[3] & 0xC0) == 0x80
+ && (buf[4] & 0xC0) == 0x80) {
+ /* 0x00200000 - 0x03FFFFFF */
+ *ucs = ((buf[0] & ~0xF8) << 24) +
+ ((buf[1] & ~0x80) << 18) +
+ ((buf[2] & ~0x80) << 12) +
+ ((buf[3] & ~0x80) << 6) +
+ (buf[4] & ~0x80);
+ if (*ucs > 0x001FFFFF && *ucs < 0x01000000) return 5;
+ }
+ } else if (len > 3
+ && (buf[1] & 0xC0) == 0x80
+ && (buf[2] & 0xC0) == 0x80
+ && (buf[3] & 0xC0) == 0x80) {
+ /* 0x00010000 - 0x001FFFFF */
+ *ucs = ((buf[0] & ~0xF0) << 18) +
+ ((buf[1] & ~0x80) << 12) +
+ ((buf[2] & ~0x80) << 6) +
+ (buf[3] & ~0x80);
+ if (*ucs > 0x0000FFFF) return 4;
+ }
+ } else if (len > 2
+ && (buf[1] & 0xC0) == 0x80
+ && (buf[2] & 0xC0) == 0x80) {
+ /* 0x00000800 - 0x0000FFFF */
+ *ucs = ((buf[0] & ~0xE0) << 12) +
+ ((buf[1] & ~0x80) << 6) +
+ (buf[2] & ~0x80);
+ if (*ucs > 0x000007FF) return 3;
+ }
} else if (len > 1 && (buf[1] & 0xC0) == 0x80) {
- /* 0x00000080 - 0x000007FF */
- *ucs = ((buf[0] & ~0xC0) << 6) +
- (buf[1] & ~0x80);
- if (*ucs > 0x0000007F) return 2;
+ /* 0x00000080 - 0x000007FF */
+ *ucs = ((buf[0] & ~0xC0) << 6) +
+ (buf[1] & ~0x80);
+ if (*ucs > 0x0000007F) return 2;
}
}
} else if (len > 0) {
/* 0x00000000 - 0x0000007F */
*ucs = buf[0];
return 1;
- }
+ }
*ucs = (unsigned int) '?'; /* bad UTF-8 string */
return -1;
}
-/*
- * Converts an Unicode value to an UTF-8 string
- * NOTE : the buffer (buf) must be at least 5 bytes long !!!
+/*
+ * Converts an Unicode value to an UTF-8 string
+ * NOTE : the buffer (buf) must be at least 5 bytes long !!!
*/
-int
-XConvertUcsToUtf8(unsigned int ucs,
- char *buf) {
+int
+XConvertUcsToUtf8(unsigned int ucs,
+ char *buf) {
if (ucs < 0x000080) {
buf[0] = ucs;
@@ -110,7 +109,7 @@ XConvertUcsToUtf8(unsigned int ucs,
buf[0] = 0xC0 | (ucs >> 6);
buf[1] = 0x80 | (ucs & 0x3F);
return 2;
- } else if (ucs < 0x010000) {
+ } else if (ucs < 0x010000) {
buf[0] = 0xE0 | (ucs >> 12);
buf[1] = 0x80 | ((ucs >> 6) & 0x3F);
buf[2] = 0x80 | (ucs & 0x3F);
@@ -133,23 +132,23 @@ XConvertUcsToUtf8(unsigned int ucs,
return -1;
}
-/*
- * returns the byte length of the first UTF-8 char
- * (returns -1 if not valid)
+/*
+ * returns the byte length of the first UTF-8 char
+ * (returns -1 if not valid)
*/
int
XUtf8CharByteLen(const unsigned char *buf,
- int len) {
+ int len) {
unsigned int ucs;
return XConvertUtf8ToUcs(buf, len, &ucs);
}
/*
- * returns the quantity of Unicode chars in the UTF-8 string
+ * returns the quantity of Unicode chars in the UTF-8 string
*/
-int
-XCountUtf8Char(const unsigned char *buf,
- int len) {
+int
+XCountUtf8Char(const unsigned char *buf,
+ int len) {
int i = 0;
int nbc = 0;
@@ -162,66 +161,62 @@ XCountUtf8Char(const unsigned char *buf,
return nbc;
}
-/*
+/*
* Same as XConvertUtf8ToUcs but no sanity check is done.
*/
int
XFastConvertUtf8ToUcs(const unsigned char *buf,
- int len,
- unsigned int *ucs) {
+ int len,
+ unsigned int *ucs) {
if (buf[0] & 0x80) {
if (buf[0] & 0x40) {
if (buf[0] & 0x20) {
- if (buf[0] & 0x10) {
- if (buf[0] & 0x08) {
- if (buf[0] & 0x04) {
- if (buf[0] & 0x02) {
- /* bad UTF-8 string */
- } else {
- /* 0x04000000 - 0x7FFFFFFF */
- }
- } else if (len > 4) {
- /* 0x00200000 - 0x03FFFFFF */
- *ucs = ((buf[0] & ~0xF8) << 24) +
- ((buf[1] & ~0x80) << 18) +
- ((buf[2] & ~0x80) << 12) +
- ((buf[3] & ~0x80) << 6) +
- (buf[4] & ~0x80);
- return 5;
- }
- } else if (len > 3) {
- /* 0x00010000 - 0x001FFFFF */
- *ucs = ((buf[0] & ~0xF0) << 18) +
- ((buf[1] & ~0x80) << 12) +
- ((buf[2] & ~0x80) << 6) +
- (buf[3] & ~0x80);
- return 4;
- }
- } else if (len > 2) {
- /* 0x00000800 - 0x0000FFFF */
- *ucs = ((buf[0] & ~0xE0) << 12) +
- ((buf[1] & ~0x80) << 6) +
- (buf[2] & ~0x80);
- return 3;
- }
+ if (buf[0] & 0x10) {
+ if (buf[0] & 0x08) {
+ if (buf[0] & 0x04) {
+ if (buf[0] & 0x02) {
+ /* bad UTF-8 string */
+ } else {
+ /* 0x04000000 - 0x7FFFFFFF */
+ }
+ } else if (len > 4) {
+ /* 0x00200000 - 0x03FFFFFF */
+ *ucs = ((buf[0] & ~0xF8) << 24) +
+ ((buf[1] & ~0x80) << 18) +
+ ((buf[2] & ~0x80) << 12) +
+ ((buf[3] & ~0x80) << 6) +
+ (buf[4] & ~0x80);
+ return 5;
+ }
+ } else if (len > 3) {
+ /* 0x00010000 - 0x001FFFFF */
+ *ucs = ((buf[0] & ~0xF0) << 18) +
+ ((buf[1] & ~0x80) << 12) +
+ ((buf[2] & ~0x80) << 6) +
+ (buf[3] & ~0x80);
+ return 4;
+ }
+ } else if (len > 2) {
+ /* 0x00000800 - 0x0000FFFF */
+ *ucs = ((buf[0] & ~0xE0) << 12) +
+ ((buf[1] & ~0x80) << 6) +
+ (buf[2] & ~0x80);
+ return 3;
+ }
} else if (len > 1) {
- /* 0x00000080 - 0x000007FF */
- *ucs = ((buf[0] & ~0xC0) << 6) +
- (buf[1] & ~0x80);
- return 2;
+ /* 0x00000080 - 0x000007FF */
+ *ucs = ((buf[0] & ~0xC0) << 6) +
+ (buf[1] & ~0x80);
+ return 2;
}
}
} else if (len > 0) {
/* 0x00000000 - 0x0000007F */
*ucs = buf[0];
return 1;
- }
+ }
*ucs = (unsigned int) '?'; /* bad UTF-8 string */
return -1;
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/utf8Wrap.c b/src/xutf8/utf8Wrap.c
index 612c822f3..e26aef15f 100644
--- a/src/xutf8/utf8Wrap.c
+++ b/src/xutf8/utf8Wrap.c
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
*
@@ -7,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
/*
@@ -58,8 +57,8 @@ Fl_XChar2b;
/*********************************************************************/
static int
get_font_list(
- const char *base_font_name_list,
- char ***flist) {
+ const char *base_font_name_list,
+ char ***flist) {
const char *ptr;
const char *p;
int nb;
@@ -101,7 +100,7 @@ get_font_list(
/*********************************************************************/
/** get the font name used as encoding for "fontspecific" encoding **/
-/** (mainly used for adobe-symbol and adobe-zapfdingbats) **/
+/** (mainly used for adobe-symbol and adobe-zapfdingbats) **/
/*********************************************************************/
static int
font_spec_enc(char *font) {
@@ -126,12 +125,12 @@ font_spec_enc(char *font) {
/*********************************************************************/
-/** get the sub range of a iso10646-1 font **/
+/** get the sub range of a iso10646-1 font **/
/*********************************************************************/
static void
-get_range(const char *enc,
- int *min,
- int *max) {
+get_range(const char *enc,
+ int *min,
+ int *max) {
const char *ptr = enc;
const char *ptr1;
@@ -156,12 +155,12 @@ get_range(const char *enc,
}
/*********************************************************************/
-/** get the internal encoding number of each fonts **/
+/** get the internal encoding number of each fonts **/
/*********************************************************************/
static int *
-get_encodings(char **font_name_list,
- int *ranges,
- int nb_font) {
+get_encodings(char **font_name_list,
+ int *ranges,
+ int nb_font) {
int *font_encoding_list;
int i;
@@ -183,16 +182,16 @@ get_encodings(char **font_name_list,
}
while (ptr && *ptr) {
if (*ptr == '-') {
- ec++;
- if (ec == 13) {
- font_encoding_list[i] = encoding_number(ptr + 1);
- if (font_encoding_list[i] == 0) {
- get_range(ptr + 1,
- ranges + i * 2,
- ranges + i * 2 + 1);
- }
- break;
- }
+ ec++;
+ if (ec == 13) {
+ font_encoding_list[i] = encoding_number(ptr + 1);
+ if (font_encoding_list[i] == 0) {
+ get_range(ptr + 1,
+ ranges + i * 2,
+ ranges + i * 2 + 1);
+ }
+ break;
+ }
}
ptr++;
}
@@ -203,11 +202,11 @@ get_encodings(char **font_name_list,
}
/*********************************************************************/
-/** find the first font which matches the name and load it. **/
+/** find the first font which matches the name and load it. **/
/*********************************************************************/
static XFontStruct *
find_best_font(Display *dpy,
- char **name) {
+ char **name) {
char **list;
int cnt;
@@ -225,11 +224,11 @@ find_best_font(Display *dpy,
}
/*********************************************************************/
-/** load all fonts **/
+/** load all fonts **/
/*********************************************************************/
static void
-load_fonts(Display *dpy,
- XUtf8FontStruct *font_set) {
+load_fonts(Display *dpy,
+ XUtf8FontStruct *font_set) {
int i = 0;
@@ -251,10 +250,10 @@ load_fonts(Display *dpy,
if (fnt) {
font_set->fid = fnt->fid;
if (fnt->ascent > font_set->ascent) {
- font_set->ascent = fnt->ascent;
+ font_set->ascent = fnt->ascent;
}
if (fnt->descent > font_set->descent) {
- font_set->descent = fnt->descent;
+ font_set->descent = fnt->descent;
}
} else {
free(font_set->font_name_list[i]);
@@ -272,18 +271,18 @@ load_fonts(Display *dpy,
if (font_set->font_name_list[i]) {
int j;
for (j = 0; j < i; j++) {
- if (font_set->font_name_list[j] &&
- font_set->encodings[j] ==
- font_set->encodings[i] &&
- font_set->ranges[2*j] ==
- font_set->ranges[2*i] &&
- font_set->ranges[(2*j)+1] &&
- font_set->ranges[(2*i)+1]) {
- XFreeFont(dpy, font_set->fonts[i]);
- free(font_set->font_name_list[i]);
- font_set->font_name_list[i] = NULL;
- font_set->fonts[i] = 0;
- }
+ if (font_set->font_name_list[j] &&
+ font_set->encodings[j] ==
+ font_set->encodings[i] &&
+ font_set->ranges[2*j] ==
+ font_set->ranges[2*i] &&
+ font_set->ranges[(2*j)+1] &&
+ font_set->ranges[(2*i)+1]) {
+ XFreeFont(dpy, font_set->fonts[i]);
+ free(font_set->font_name_list[i]);
+ font_set->font_name_list[i] = NULL;
+ font_set->fonts[i] = 0;
+ }
}
}
}
@@ -291,11 +290,11 @@ load_fonts(Display *dpy,
/*********************************************************************/
/** Creates an array of XFontStruct acording to the comma separated **/
-/** list of fonts. XLoad all fonts. **/
+/** list of fonts. XLoad all fonts. **/
/*********************************************************************/
XUtf8FontStruct *
XCreateUtf8FontStruct(Display *dpy,
- const char *base_font_name_list) {
+ const char *base_font_name_list) {
XUtf8FontStruct *font_set;
@@ -306,7 +305,7 @@ XCreateUtf8FontStruct(Display *dpy,
}
font_set->nb_font = get_font_list(base_font_name_list,
- &font_set->font_name_list);
+ &font_set->font_name_list);
if (font_set->nb_font < 1) {
free(font_set);
@@ -320,29 +319,29 @@ XCreateUtf8FontStruct(Display *dpy,
/*****************************************************************************/
-/** draw a Right To Left UTF-8 string using multiple fonts as needed. **/
+/** draw a Right To Left UTF-8 string using multiple fonts as needed. **/
/*****************************************************************************/
void
-XUtf8DrawRtlString(Display *display,
- Drawable d,
- XUtf8FontStruct *font_set,
- GC gc,
- int x,
- int y,
- const char *string,
- int num_bytes) {
-
- int *encodings; /* encodings array */
- XFontStruct **fonts; /* fonts array */
- Fl_XChar2b buf[128]; /* drawing buffer */
- Fl_XChar2b *ptr; /* pointer to the drawing buffer */
- int fnum; /* index of the current font in the fonts array*/
- int i; /* current byte in the XChar2b buffer */
- int first; /* first valid font index */
- int last_fnum; /* font index of the previous char */
- int nb_font; /* quantity of fonts in the font array */
- char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */
- int *ranges; /* sub range of iso10646 */
+XUtf8DrawRtlString(Display *display,
+ Drawable d,
+ XUtf8FontStruct *font_set,
+ GC gc,
+ int x,
+ int y,
+ const char *string,
+ int num_bytes) {
+
+ int *encodings; /* encodings array */
+ XFontStruct **fonts; /* fonts array */
+ Fl_XChar2b buf[128]; /* drawing buffer */
+ Fl_XChar2b *ptr; /* pointer to the drawing buffer */
+ int fnum; /* index of the current font in the fonts array*/
+ int i; /* current byte in the XChar2b buffer */
+ int first; /* first valid font index */
+ int last_fnum; /* font index of the previous char */
+ int nb_font; /* quantity of fonts in the font array */
+ char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */
+ int *ranges; /* sub range of iso10646 */
nb_font = font_set->nb_font;
@@ -368,7 +367,7 @@ XUtf8DrawRtlString(Display *display,
last_fnum = fnum;
while (num_bytes > 0) {
- int ulen; /* byte length of the UTF-8 char */
+ int ulen; /* byte length of the UTF-8 char */
unsigned int ucs; /* Unicode value of the UTF-8 char */
unsigned int no_spc; /* Spacing char equivalent of a non-spacing char */
@@ -395,10 +394,10 @@ XUtf8DrawRtlString(Display *display,
fnum = first;
while (fnum < nb_font) {
if (fonts[fnum] && ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
- if (encodings[fnum] != 0 ||
- ((int)ucs >= ranges[fnum * 2] && (int)ucs <= ranges[fnum * 2 + 1])) {
- break;
- }
+ if (encodings[fnum] != 0 ||
+ ((int)ucs >= ranges[fnum * 2] && (int)ucs <= ranges[fnum * 2 + 1])) {
+ break;
+ }
}
fnum++;
}
@@ -419,7 +418,7 @@ XUtf8DrawRtlString(Display *display,
(*ptr).byte1 = glyph[0];
(*ptr).byte2 = glyph[1];
if (no_spc) {
- x += XTextWidth16(fonts[fnum], ptr, 1);
+ x += XTextWidth16(fonts[fnum], ptr, 1);
}
} else {
ptr--;
@@ -441,28 +440,28 @@ XUtf8DrawRtlString(Display *display,
/*****************************************************************************/
-/** draw an UTF-8 string using multiple fonts as needed. **/
+/** draw an UTF-8 string using multiple fonts as needed. **/
/*****************************************************************************/
void
-XUtf8DrawString(Display *display,
- Drawable d,
+XUtf8DrawString(Display *display,
+ Drawable d,
XUtf8FontStruct *font_set,
- GC gc,
- int x,
- int y,
- const char *string,
- int num_bytes) {
-
- int *encodings; /* encodings array */
- XFontStruct **fonts; /* fonts array */
- Fl_XChar2b buf[128]; /* drawing buffer */
- int fnum; /* index of the current font in the fonts array*/
- int i; /* current byte in the XChar2b buffer */
- int first; /* first valid font index */
- int last_fnum; /* font index of the previous char */
- int nb_font; /* quantity of fonts in the font array */
- char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */
- int *ranges; /* sub range of iso10646 */
+ GC gc,
+ int x,
+ int y,
+ const char *string,
+ int num_bytes) {
+
+ int *encodings; /* encodings array */
+ XFontStruct **fonts; /* fonts array */
+ Fl_XChar2b buf[128]; /* drawing buffer */
+ int fnum; /* index of the current font in the fonts array*/
+ int i; /* current byte in the XChar2b buffer */
+ int first; /* first valid font index */
+ int last_fnum; /* font index of the previous char */
+ int nb_font; /* quantity of fonts in the font array */
+ char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */
+ int *ranges; /* sub range of iso10646 */
nb_font = font_set->nb_font;
@@ -486,7 +485,7 @@ XUtf8DrawString(Display *display,
last_fnum = fnum;
while (num_bytes > 0) {
- int ulen; /* byte length of the UTF-8 char */
+ int ulen; /* byte length of the UTF-8 char */
unsigned int ucs; /* Unicode value of the UTF-8 char */
unsigned int no_spc; /* Spacing char equivalent of a non-spacing char */
@@ -512,11 +511,11 @@ XUtf8DrawString(Display *display,
fnum = first;
while (fnum < nb_font) {
if (fonts[fnum] && ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
- if (encodings[fnum] != 0 ||
- ((int)ucs >= ranges[fnum * 2] &&
- (int)ucs <= ranges[fnum * 2 + 1])) {
- break;
- }
+ if (encodings[fnum] != 0 ||
+ ((int)ucs >= ranges[fnum * 2] &&
+ (int)ucs <= ranges[fnum * 2 + 1])) {
+ break;
+ }
}
fnum++;
}
@@ -536,7 +535,7 @@ XUtf8DrawString(Display *display,
(*buf).byte1 = glyph[0];
(*buf).byte2 = glyph[1];
if (no_spc) {
- x -= XTextWidth16(fonts[fnum], buf, 1);
+ x -= XTextWidth16(fonts[fnum], buf, 1);
}
} else {
(*(buf + i)).byte1 = glyph[0];
@@ -560,26 +559,26 @@ XUtf8DrawString(Display *display,
/*****************************************************************************/
void
XUtf8_measure_extents(
- Display *display,
- Drawable d,
+ Display *display,
+ Drawable d,
XUtf8FontStruct *font_set,
- GC gc,
- int *xx, /* x-offset from origin */
- int *yy, /* y-offset from origin */
- int *ww, /* overall inked width */
- int *hh, /* maximum inked height */
- const char *string, /* text to measure */
- int num_bytes) {
- int *encodings; /* encodings array */
- XFontStruct **fonts; /* fonts array */
- Fl_XChar2b buf[128]; /* drawing buffer */
- int fnum; /* index of the current font in the fonts array*/
- int i; /* current byte in the XChar2b buffer */
- int first; /* first valid font index */
- int last_fnum; /* font index of the previous char */
- int nb_font; /* quantity of fonts in the font array */
- char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */
- int *ranges; /* sub range of iso10646 */
+ GC gc,
+ int *xx, /* x-offset from origin */
+ int *yy, /* y-offset from origin */
+ int *ww, /* overall inked width */
+ int *hh, /* maximum inked height */
+ const char *string, /* text to measure */
+ int num_bytes) {
+ int *encodings; /* encodings array */
+ XFontStruct **fonts; /* fonts array */
+ Fl_XChar2b buf[128]; /* drawing buffer */
+ int fnum; /* index of the current font in the fonts array*/
+ int i; /* current byte in the XChar2b buffer */
+ int first; /* first valid font index */
+ int last_fnum; /* font index of the previous char */
+ int nb_font; /* quantity of fonts in the font array */
+ char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */
+ int *ranges; /* sub range of iso10646 */
int wd = 0; /* accumulates the width of the text */
int ht = 0; /* used to find max height in text */
@@ -615,7 +614,7 @@ XUtf8_measure_extents(
last_fnum = fnum;
while (num_bytes > 0) {
- int ulen; /* byte length of the UTF-8 char */
+ int ulen; /* byte length of the UTF-8 char */
unsigned int ucs; /* Unicode value of the UTF-8 char */
unsigned int no_spc; /* Spacing char equivalent of a non-spacing char */
@@ -645,11 +644,11 @@ XUtf8_measure_extents(
fnum = first;
while (fnum < nb_font) {
if (fonts[fnum] && ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
- if (encodings[fnum] != 0 ||
- ((int)ucs >= ranges[fnum * 2] &&
- (int)ucs <= ranges[fnum * 2 + 1])) {
- break;
- }
+ if (encodings[fnum] != 0 ||
+ ((int)ucs >= ranges[fnum * 2] &&
+ (int)ucs <= ranges[fnum * 2 + 1])) {
+ break;
+ }
}
fnum++;
}
@@ -673,7 +672,7 @@ XUtf8_measure_extents(
(*buf).byte1 = glyph[0];
(*buf).byte2 = glyph[1];
if (no_spc) {
- wd -= XTextWidth16(fonts[fnum], buf, 1);
+ wd -= XTextWidth16(fonts[fnum], buf, 1);
}
} else {
(*(buf + i)).byte1 = glyph[0];
@@ -701,24 +700,24 @@ XUtf8_measure_extents(
/*****************************************************************************/
-/** returns the pixel width of a UTF-8 string **/
+/** returns the pixel width of a UTF-8 string **/
/*****************************************************************************/
int
-XUtf8TextWidth(XUtf8FontStruct *font_set,
- const char *string,
- int num_bytes) {
-
- int x;
- int *encodings; /* encodings array */
- XFontStruct **fonts; /* fonts array */
- Fl_XChar2b buf[128]; /* drawing buffer */
- int fnum; /* index of the current font in the fonts array*/
- int i; /* current byte in the XChar2b buffer */
- int first; /* first valid font index */
- int last_fnum; /* font index of the previous char */
- int nb_font; /* quantity of fonts in the font array */
- char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */
- int *ranges; /* sub range of iso10646 */
+XUtf8TextWidth(XUtf8FontStruct *font_set,
+ const char *string,
+ int num_bytes) {
+
+ int x;
+ int *encodings; /* encodings array */
+ XFontStruct **fonts; /* fonts array */
+ Fl_XChar2b buf[128]; /* drawing buffer */
+ int fnum; /* index of the current font in the fonts array*/
+ int i; /* current byte in the XChar2b buffer */
+ int first; /* first valid font index */
+ int last_fnum; /* font index of the previous char */
+ int nb_font; /* quantity of fonts in the font array */
+ char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */
+ int *ranges; /* sub range of iso10646 */
nb_font = font_set->nb_font;
x = 0;
@@ -744,7 +743,7 @@ XUtf8TextWidth(XUtf8FontStruct *font_set,
last_fnum = fnum;
while (num_bytes > 0) {
- int ulen; /* byte length of the UTF-8 char */
+ int ulen; /* byte length of the UTF-8 char */
unsigned int ucs; /* Unicode value of the UTF-8 char */
unsigned int no_spc; /* Spacing char equivalent of a non-spacing char */
@@ -770,11 +769,11 @@ XUtf8TextWidth(XUtf8FontStruct *font_set,
fnum = first;
while (fnum < nb_font) {
if (fonts[fnum] && ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
- if (encodings[fnum] != 0 ||
- ((int)ucs >= ranges[fnum * 2] &&
- (int)ucs <= ranges[fnum * 2 + 1])) {
- break;
- }
+ if (encodings[fnum] != 0 ||
+ ((int)ucs >= ranges[fnum * 2] &&
+ (int)ucs <= ranges[fnum * 2 + 1])) {
+ break;
+ }
}
fnum++;
}
@@ -792,8 +791,8 @@ XUtf8TextWidth(XUtf8FontStruct *font_set,
(*buf).byte1 = glyph[0];
(*buf).byte2 = glyph[1];
if (no_spc) {
- /* go back to draw the non-spacing char over the previous char */
- x -= XTextWidth16(fonts[fnum], buf, 1);
+ /* go back to draw the non-spacing char over the previous char */
+ x -= XTextWidth16(fonts[fnum], buf, 1);
}
} else {
(*(buf + i)).byte1 = glyph[0];
@@ -815,16 +814,16 @@ XUtf8TextWidth(XUtf8FontStruct *font_set,
/*****************************************************************************/
int
fl_XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set,
- unsigned int ucs,
- XFontStruct **fnt,
- unsigned short *id) {
+ unsigned int ucs,
+ XFontStruct **fnt,
+ unsigned short *id) {
int *encodings; /* encodings array */
XFontStruct **fonts; /* fonts array */
int fnum; /* index of the current font in the fonts array*/
int first; /* first valid font index */
int nb_font; /* quantity of fonts in the font array */
- char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */
+ char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */
int *ranges; /* sub range of iso10646 */
nb_font = font_set->nb_font;
@@ -855,8 +854,8 @@ fl_XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set,
if (fonts[fnum] && ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
if (encodings[fnum] != 0 ||
((int)ucs >= ranges[fnum * 2] &&
- (int)ucs <= ranges[fnum * 2 + 1])) {
- break;
+ (int)ucs <= ranges[fnum * 2 + 1])) {
+ break;
}
}
fnum++;
@@ -875,21 +874,21 @@ fl_XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set,
}
/*****************************************************************************/
-/** returns the pixel width of a UCS char **/
+/** returns the pixel width of a UCS char **/
/*****************************************************************************/
int
XUtf8UcsWidth(XUtf8FontStruct *font_set,
- unsigned int ucs) {
-
- int x;
- int *encodings; /* encodings array */
- XFontStruct **fonts; /* fonts array */
- Fl_XChar2b buf[8]; /* drawing buffer */
- int fnum; /* index of the current font in the fonts array*/
- int first; /* first valid font index */
- int nb_font; /* quantity of fonts in the font array */
- char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */
- int *ranges; /* sub range of iso10646 */
+ unsigned int ucs) {
+
+ int x;
+ int *encodings; /* encodings array */
+ XFontStruct **fonts; /* fonts array */
+ Fl_XChar2b buf[8]; /* drawing buffer */
+ int fnum; /* index of the current font in the fonts array*/
+ int first; /* first valid font index */
+ int nb_font; /* quantity of fonts in the font array */
+ char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */
+ int *ranges; /* sub range of iso10646 */
unsigned int no_spc;
nb_font = font_set->nb_font;
@@ -923,10 +922,10 @@ XUtf8UcsWidth(XUtf8FontStruct *font_set,
fnum = first;
while (fnum < nb_font) {
if (fonts[fnum] &&
- ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
+ ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
if (encodings[fnum] != 0 || ((int)ucs >= ranges[fnum * 2] &&
- (int)ucs <= ranges[fnum * 2 + 1])) {
- break;
+ (int)ucs <= ranges[fnum * 2 + 1])) {
+ break;
}
}
fnum++;
@@ -948,17 +947,17 @@ XUtf8UcsWidth(XUtf8FontStruct *font_set,
}
/*****************************************************************************/
-/** draw an UTF-8 string and clear the background. **/
+/** draw an UTF-8 string and clear the background. **/
/*****************************************************************************/
void
XUtf8DrawImageString(Display *display,
- Drawable d,
- XUtf8FontStruct *font_set,
- GC gc,
- int x,
- int y,
- const char *string,
- int num_bytes) {
+ Drawable d,
+ XUtf8FontStruct *font_set,
+ GC gc,
+ int x,
+ int y,
+ const char *string,
+ int num_bytes) {
/* FIXME: must be improved ! */
int w;
@@ -971,7 +970,7 @@ XUtf8DrawImageString(Display *display,
w = XUtf8TextWidth(font_set, string, num_bytes);
XGetGCValues(display, gc,
- GCFunction|GCForeground|GCBackground|GCFillStyle, &xgcv);
+ GCFunction|GCForeground|GCBackground|GCFillStyle, &xgcv);
function = xgcv.function;
fill_style = xgcv.fill_style;
@@ -984,10 +983,10 @@ XUtf8DrawImageString(Display *display,
xgcv.fill_style = FillSolid;
XChangeGC(display, gc,
- GCFunction|GCForeground|GCBackground|GCFillStyle, &xgcv);
+ GCFunction|GCForeground|GCBackground|GCFillStyle, &xgcv);
XFillRectangle(display, d, gc, x, y - font_set->ascent,
- (unsigned)w, (unsigned)(font_set->ascent + font_set->descent));
+ (unsigned)w, (unsigned)(font_set->ascent + font_set->descent));
xgcv.function = function;
xgcv.foreground = foreground;
@@ -995,7 +994,7 @@ XUtf8DrawImageString(Display *display,
xgcv.fill_style = fill_style;
XChangeGC(display, gc,
- GCFunction|GCForeground|GCBackground|GCFillStyle, &xgcv);
+ GCFunction|GCForeground|GCBackground|GCFillStyle, &xgcv);
XUtf8DrawString(display, d, font_set, gc, x, y, string, num_bytes);
}
@@ -1004,15 +1003,15 @@ XUtf8DrawImageString(Display *display,
/** free the XFontSet and others things created by XCreateUtf8FontSet **/
/*****************************************************************************/
void
-XFreeUtf8FontStruct(Display *dpy,
- XUtf8FontStruct *font_set) {
+XFreeUtf8FontStruct(Display *dpy,
+ XUtf8FontStruct *font_set) {
int i;
i = 0;
while (i < font_set->nb_font) {
if (font_set->fonts[i]) {
- XFreeFont(dpy, font_set->fonts[i]);
- free(font_set->font_name_list[i]);
+ XFreeFont(dpy, font_set->fonts[i]);
+ free(font_set->font_name_list[i]);
}
i++;
}
@@ -1022,7 +1021,3 @@ XFreeUtf8FontStruct(Display *dpy,
free(font_set->encodings);
free(font_set);
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/utils/Makefile b/src/xutf8/utils/Makefile
index 3bed422c7..8c6f1de74 100644
--- a/src/xutf8/utils/Makefile
+++ b/src/xutf8/utils/Makefile
@@ -1,7 +1,7 @@
euc_tw: euc_tw.c
gcc euc_tw.c -o euc_tw
-all: convert_map create_table conv_gen
+all: convert_map create_table conv_gen
./tbl_gen.sh
./non_spacing.sh
./case.sh
@@ -18,5 +18,5 @@ create_table: create_table.c
clean:
rm -f *.o convert_map create_table conv_gen euc_tw
-
+
diff --git a/src/xutf8/utils/case.sh b/src/xutf8/utils/case.sh
index 4ccb51bb1..dbc20c90f 100755
--- a/src/xutf8/utils/case.sh
+++ b/src/xutf8/utils/case.sh
@@ -9,7 +9,7 @@ IFS="
#echo "#
# List of case chars
#
-#
+#
# Format: Three tab-separated columns
# Column #1 is the non-spacing Unicode (in hex as 0xXXXX)
# Column #2 is the spacing Unicode (in hex as 0xXXXX)
@@ -23,7 +23,7 @@ for line in ${nopsc}
do
ucs=`echo ${line} | cut -d\; -f1`
name=`echo ${line} | cut -d\; -f2 | cut -d\; -f1| sed s/CAPITAL/SMALL/`
- small=`grep ";${name};" ../UnicodeData-2.txt`
+ small=`grep ";${name};" ../UnicodeData-2.txt`
if test "X${small}" != X ;then
tbl=`echo ${small} | cut -d\; -f1`
# echo "0x${ucs} 0x${tbl} # ${name}" >> space.txt
@@ -51,11 +51,11 @@ cat >../case.c << ENDOFTEXT
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
#include "headers/case.h"
@@ -63,7 +63,7 @@ cat >../case.c << ENDOFTEXT
ENDOFTEXT
echo "
-int
+int
XUtf8Tolower(
int ucs)
{
@@ -72,7 +72,7 @@ XUtf8Tolower(
tables=`cat ../headers/case_tbl.txt`
-for line in ${tables}
+for line in ${tables}
do
tbl=`echo ${line} | cut -d']' -f1`
bot=`echo ${line} | cut -d'_' -f3 | cut -d'[' -f1`
diff --git a/src/xutf8/utils/conv_gen.c b/src/xutf8/utils/conv_gen.c
index 833790269..8766971e1 100644
--- a/src/xutf8/utils/conv_gen.c
+++ b/src/xutf8/utils/conv_gen.c
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
*
@@ -7,14 +6,14 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
-/*
+/*
* generate the "if(){} else if ..." structure of ucs2fontmap()
*/
#include <wchar.h>
@@ -37,9 +36,9 @@ int main(int argc, char **argv) {
puts(" /*************** conv_gen.c ************/");
buffer[len] = '\0';
ptr = buffer;
-
+
printf("const int ucs2fontmap"
- "(char *s, unsigned int ucs, int enc)\n");
+ "(char *s, unsigned int ucs, int enc)\n");
printf("{\n");
printf(" switch(enc) {\n");
printf(" case 0:\n");
@@ -49,7 +48,7 @@ int main(int argc, char **argv) {
while (len > 0) {
unsigned char *p = ptr;
unsigned char *f, *t;
-
+
while (*p != ']') {
i++;
p++;
@@ -88,7 +87,7 @@ int main(int argc, char **argv) {
while (*ptr != '\n') {
ptr++;
len--;
- }
+ }
ptr++;
len--;
}
@@ -112,21 +111,21 @@ int main(int argc, char **argv) {
ptr--;
while (ptr != encode[i]) {
if (*ptr == '_') {
- *ptr = '-';
- ptr--;
- break;
+ *ptr = '-';
+ ptr--;
+ break;
}
ptr--;
}
while (ptr != encode[i]) {
if (*ptr == '_') {
- *ptr = '.';
+ *ptr = '.';
}
ptr--;
}
printf(" } else if (!strcmp(enc, \"%s\")", encode[i] +11);
- if (!strcmp(encode[i] + 11, "big5-0")) {
+ if (!strcmp(encode[i] + 11, "big5-0")) {
printf(" || !strcmp(enc, \"big5.eten-0\")");
} else if (!strcmp(encode[i] + 11, "dingbats")) {
printf(" || !strcmp(enc, \"zapfdingbats\")");
@@ -140,11 +139,11 @@ int main(int argc, char **argv) {
printf(" return %d;\n", i);
i++;
}
- printf(" };\n");
- printf(" return -1;\n");
- printf("};\n\n");
+ printf(" };\n");
+ printf(" return -1;\n");
+ printf("};\n\n");
- printf("/*\n");
+ printf("/*\n");
printf("const char *encoding_name(int num)\n{\n");
printf(" switch (num) {\n");
i = 1;
@@ -156,10 +155,6 @@ int main(int argc, char **argv) {
printf(" };\n");
printf(" return \"iso10646-1\";\n");
printf("};\n\n");
- printf("*/\n");
+ printf("*/\n");
return 0;
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/utils/convert_map.c b/src/xutf8/utils/convert_map.c
index c672d5423..df7a091b2 100644
--- a/src/xutf8/utils/convert_map.c
+++ b/src/xutf8/utils/convert_map.c
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
*
@@ -7,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
/*
@@ -34,9 +33,9 @@ int JIS0208(unsigned char * ptr) {
while(*ptr != '\0') { ptr++; i++; }
i++; ptr++; *(ptr+6) = '\0';
ucs = (unsigned int)strtoul(ptr, NULL, 16);
- if (ucs)
- printf("/* U+%04X */ 0x%02X, 0x%02X,\n", ucs,
- (fmap & 0xFF00) >> 8, fmap & 0xFF);
+ if (ucs)
+ printf("/* U+%04X */ 0x%02X, 0x%02X,\n", ucs,
+ (fmap & 0xFF00) >> 8, fmap & 0xFF);
while(*ptr != '\0') { ptr++; i++; }
i++; ptr++;
while(*ptr != '\n') { ptr++; i++; }
@@ -104,8 +103,8 @@ int JIS0212(unsigned char * ptr) {
abort();
}
if (ucs)
- printf("/* U+%04X */ 0x%02X, 0x%02X,\n", ucs,
- (fmap & 0xFF00) >> 8, fmap & 0xFF);
+ printf("/* U+%04X */ 0x%02X, 0x%02X,\n", ucs,
+ (fmap & 0xFF00) >> 8, fmap & 0xFF);
while(*ptr != '\0') { ptr++; i++; }
i++; ptr++;
while(*ptr != '\n') { ptr++; i++; }
@@ -153,7 +152,7 @@ int main(int argc, char **argv) {
} else if (!strcmp("koi8-1", argv[1])) {
nb = JIS0201(ptr);
} else if (!strcmp("dingbats", argv[1]) ||
- !strcmp("symbol", argv[1]))
+ !strcmp("symbol", argv[1]))
{
nb = ADOBE(ptr);
} else {
@@ -164,7 +163,3 @@ int main(int argc, char **argv) {
}
return 0;
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/utils/create_table.c b/src/xutf8/utils/create_table.c
index bf75631a5..4c2cda399 100644
--- a/src/xutf8/utils/create_table.c
+++ b/src/xutf8/utils/create_table.c
@@ -1,5 +1,4 @@
-/* "$Id$"
- *
+/*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
*
@@ -7,11 +6,11 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
#include <wchar.h>
@@ -57,30 +56,30 @@ int main(int argc, char **argv) {
}
if (i != ucs - 1 || !i) {
if ((ucs - i) > MAX_DELTA || !i) {
- if (i) {
- printf("};\n");
- fprintf(stderr, "\t/* end: U+%04X */\n", i);
- }
- if (strcmp(argv[1], "spacing")) {
- printf("\nstatic const char unicode_to_%s_%db_%04X[] = {\n",
- argv[1], nbb, ucs);
- fprintf(stderr, "unicode_to_%s_%db_%04X[]; ",
- argv[1], nbb, ucs);
- } else {
- printf("\nstatic const unsigned short"
- " ucs_table_%04X[]"
- " = {\n", ucs);
- fprintf(stderr, "ucs_table_%04X[]; ", ucs);
- }
+ if (i) {
+ printf("};\n");
+ fprintf(stderr, "\t/* end: U+%04X */\n", i);
+ }
+ if (strcmp(argv[1], "spacing")) {
+ printf("\nstatic const char unicode_to_%s_%db_%04X[] = {\n",
+ argv[1], nbb, ucs);
+ fprintf(stderr, "unicode_to_%s_%db_%04X[]; ",
+ argv[1], nbb, ucs);
+ } else {
+ printf("\nstatic const unsigned short"
+ " ucs_table_%04X[]"
+ " = {\n", ucs);
+ fprintf(stderr, "ucs_table_%04X[]; ", ucs);
+ }
} else {
- while (i < ucs - 1) {
- i++;
- if (nbb == 1) {
- printf("0x00,\n");
- } else {
- printf("0x00, 0x00,\n");
- }
- };
+ while (i < ucs - 1) {
+ i++;
+ if (nbb == 1) {
+ printf("0x00,\n");
+ } else {
+ printf("0x00, 0x00,\n");
+ }
+ };
}
}
i = ucs;
@@ -97,7 +96,3 @@ int main(int argc, char **argv) {
fprintf(stderr, "\t/* end: U+%04X */\n", i);
return 0;
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/utils/euc_tw.c b/src/xutf8/utils/euc_tw.c
index 3d6a1e1e9..258524dc9 100644
--- a/src/xutf8/utils/euc_tw.c
+++ b/src/xutf8/utils/euc_tw.c
@@ -6,14 +6,14 @@
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
-/*
+/*
* generate the "if(){} else if ..." structure of ucs2fontmap()
*/
@@ -52,7 +52,3 @@ int main(int argc, char **argv) {
iconv_close(cd);
return 0;
}
-
-/*
- * End of "$Id$".
- */
diff --git a/src/xutf8/utils/non_spacing.sh b/src/xutf8/utils/non_spacing.sh
index 5fef9c6d8..993095b07 100755
--- a/src/xutf8/utils/non_spacing.sh
+++ b/src/xutf8/utils/non_spacing.sh
@@ -9,7 +9,7 @@ IFS="
#echo "#
# List of non-spacing chars
#
-#
+#
# Format: Three tab-separated columns
# Column #1 is the non-spacing Unicode (in hex as 0xXXXX)
# Column #2 is the spacing Unicode (in hex as 0xXXXX)
@@ -23,7 +23,7 @@ for line in ${nopsc}
do
ucs=`echo ${line} | cut -d\; -f1`
name=`echo ${line} | cut -d\; -f2`
- space=`grep " 0020 ${ucs};" ../UnicodeData-2.txt`
+ space=`grep " 0020 ${ucs};" ../UnicodeData-2.txt`
if test "X${space}" != X ;then
tbl=`echo ${space} | cut -d\; -f1`
# echo "0x${ucs} 0x${tbl} # ${name}" >> space.txt
@@ -51,11 +51,11 @@ cat >../is_spacing.c << ENDOFTEXT
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
#include "headers/spacing.h"
@@ -63,7 +63,7 @@ cat >../is_spacing.c << ENDOFTEXT
ENDOFTEXT
echo "
-unsigned short
+unsigned short
XUtf8IsNonSpacing(
unsigned int ucs)
{
@@ -71,7 +71,7 @@ XUtf8IsNonSpacing(
tables=`cat ../headers/spacing_tbl.txt`
-for line in ${tables}
+for line in ${tables}
do
tbl=`echo ${line} | cut -d']' -f1`
bot=`echo ${line} | cut -d'_' -f3 | cut -d'[' -f1`
diff --git a/src/xutf8/utils/tbl_gen.sh b/src/xutf8/utils/tbl_gen.sh
index f764d3af0..aa9942610 100755
--- a/src/xutf8/utils/tbl_gen.sh
+++ b/src/xutf8/utils/tbl_gen.sh
@@ -9,11 +9,11 @@
# * the file "COPYING" which should have been included with this file. If this
# * file is missing or damaged, see the license at:
# *
-# * http://www.fltk.org/COPYING.php
+# * https://www.fltk.org/COPYING.php
# *
-# * Please report all bugs and problems on the following page:
+# * Please see the following page on how to report bugs and issues:
# *
-# * http://www.fltk.org/str.php
+# * https://www.fltk.org/bugs.php
# */
#
@@ -32,7 +32,7 @@ for enc in ${encode}
do
echo ${enc}
- case ${enc} in
+ case ${enc} in
ksc5601.1987-0)
# cat ../MAPPINGS/EASTASIA/KSC/KSC5601.TXT | \
cat ../MAPPINGS/EASTASIA/KSC/KSX1001.TXT | \
@@ -125,7 +125,7 @@ do
esac
nm=`echo ${enc} |tr '.' '_' | tr '-' '_'`
cat ${enc}.txt | sort | uniq | \
- ./create_table "${nm}" >> ../headers/${nm}_.h 2>> ../headers/tbl.txt
+ ./create_table "${nm}" >> ../headers/${nm}_.h 2>> ../headers/tbl.txt
rm -f ${enc}.txt
enc=" "
done
@@ -139,11 +139,11 @@ cat > ../ucs2fontmap.c << ENDOFTEXT
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
- * http://www.fltk.org/COPYING.php
+ * https://www.fltk.org/COPYING.php
*
- * Please report all bugs and problems on the following page:
+ * Please see the following page on how to report bugs and issues:
*
- * http://www.fltk.org/str.php
+ * https://www.fltk.org/bugs.php
*/
ENDOFTEXT