From 35e13e4c9637f5bf7bef6039c8c813207780a174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 20 Nov 2023 20:10:50 +0100 Subject: New upstream version 6.9.9 --- src/mktable.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/mktable.c') 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; -- cgit v1.2.3