summaryrefslogtreecommitdiff
path: root/src/mktable.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-11-20 20:10:53 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-11-20 20:10:53 +0100
commit5fc8746a80a7bc6fe88845e1aae3a69903d21cdb (patch)
treee59de9241eef0f0ecb27038f7c85df6619309999 /src/mktable.c
parentc9281d179754ffffe24ba9a718d2c4f2e1b4bd5e (diff)
parent35e13e4c9637f5bf7bef6039c8c813207780a174 (diff)
Update upstream source from tag 'upstream/6.9.9'
Update to upstream version '6.9.9' with Debian dir 5b0f8b561f5675106115901f41e387c12471c40a
Diffstat (limited to 'src/mktable.c')
-rw-r--r--src/mktable.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/mktable.c b/src/mktable.c
index 5f36ee3..1a624e7 100644
--- a/src/mktable.c
+++ b/src/mktable.c
@@ -2,7 +2,7 @@
mktable.c
**********************************************************************/
/*-
- * Copyright (c) 2002-2019 K.Kosako
+ * Copyright (c) 2002-2022 K.Kosako
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -638,24 +638,28 @@ static int IsPunct(int enc, int c)
if (enc == ASCII)
return ispunct(c);
- if (enc == UNICODE_ISO_8859_1) {
- if (c == 0x24 || c == 0x2b || c == 0x5e || c == 0x60 ||
- c == 0x7c || c == 0x7e) return 1;
- if (c >= 0x3c && c <= 0x3e) return 1;
- }
-
if (c >= 0x21 && c <= 0x2f) return 1;
if (c >= 0x3a && c <= 0x40) return 1;
if (c >= 0x5b && c <= 0x60) return 1;
if (c >= 0x7b && c <= 0x7e) return 1;
+ if (enc == UNICODE_ISO_8859_1) {
+ if (c < 0x80) return 0;
+
+ if (c >= 0xa1 && c <= 0xa9) return 1;
+ if (c >= 0xab && c <= 0xac) return 1;
+ if (c >= 0xae && c <= 0xb1) return 1;
+ if (c == 0xb4) return 1;
+ if (c >= 0xb6 && c <= 0xb8) return 1;
+ if (c == 0xbb || c == 0xbf || c == 0xd7 || c == 0xf7) return 1;
+ return 0;
+ }
+
switch (enc) {
case ISO_8859_1:
case ISO_8859_9:
case ISO_8859_15:
if (c == 0xad) return 1;
- /* fall */
- case UNICODE_ISO_8859_1:
if (c == 0xa1) return 1;
if (c == 0xab) return 1;
if (c == 0xb7) return 1;