summaryrefslogtreecommitdiff
path: root/src/mktable.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-12-19 08:12:44 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-12-19 08:12:44 +0100
commit7547c5a1405dff1aac1ab054a24907b3ae724c12 (patch)
tree4ca475fcd4511e8cd245ce31349f4efb56089aaf /src/mktable.c
parent9d10df3f441724d605cd8729c8e8d3ba1ad816f4 (diff)
parente87df9b5e9eea77d2155767952c996f91b5eebfc (diff)
Merge branch 'release/debian/6.9.9-1'HEADdebian/6.9.9-1master
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;