summaryrefslogtreecommitdiff
path: root/src/mktable.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-11-20 20:10:50 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-11-20 20:10:50 +0100
commit35e13e4c9637f5bf7bef6039c8c813207780a174 (patch)
treef2ea0b1aa455bb2552ffe8a7bb083f24e86d1f34 /src/mktable.c
parentdb6f38bc1b73930f1da954525464cf1986f43a28 (diff)
New upstream version 6.9.9upstream/6.9.9upstream
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;