summaryrefslogtreecommitdiff
path: root/src/xutf8/utils
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/utils
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/utils')
-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
8 files changed, 84 insertions, 103 deletions
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