summaryrefslogtreecommitdiff
path: root/lib/uniwidth
diff options
context:
space:
mode:
Diffstat (limited to 'lib/uniwidth')
-rw-r--r--lib/uniwidth/cjk.h4
-rw-r--r--lib/uniwidth/u16-strwidth.c4
-rw-r--r--lib/uniwidth/u16-width.c4
-rw-r--r--lib/uniwidth/u32-strwidth.c4
-rw-r--r--lib/uniwidth/u32-width.c4
-rw-r--r--lib/uniwidth/u8-strwidth.c4
-rw-r--r--lib/uniwidth/u8-width.c4
-rw-r--r--lib/uniwidth/width.c50
8 files changed, 48 insertions, 30 deletions
diff --git a/lib/uniwidth/cjk.h b/lib/uniwidth/cjk.h
index c187715..0751c26 100644
--- a/lib/uniwidth/cjk.h
+++ b/lib/uniwidth/cjk.h
@@ -1,5 +1,5 @@
/* Test for CJK encoding.
- Copyright (C) 2001-2002, 2005-2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2005-2007, 2009-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or
@@ -22,7 +22,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include "streq.h"
diff --git a/lib/uniwidth/u16-strwidth.c b/lib/uniwidth/u16-strwidth.c
index 23787f7..05b936d 100644
--- a/lib/uniwidth/u16-strwidth.c
+++ b/lib/uniwidth/u16-strwidth.c
@@ -1,5 +1,5 @@
/* Determine display width of UTF-16 string.
- Copyright (C) 2001-2002, 2006, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006, 2009-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or
@@ -22,7 +22,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/uniwidth/u16-width.c b/lib/uniwidth/u16-width.c
index c43e386..5c32ce4 100644
--- a/lib/uniwidth/u16-width.c
+++ b/lib/uniwidth/u16-width.c
@@ -1,5 +1,5 @@
/* Determine display width of UTF-16 string.
- Copyright (C) 2001-2002, 2006-2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006-2007, 2009-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or
@@ -22,7 +22,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/uniwidth/u32-strwidth.c b/lib/uniwidth/u32-strwidth.c
index b4f7a3e..b2ffd53 100644
--- a/lib/uniwidth/u32-strwidth.c
+++ b/lib/uniwidth/u32-strwidth.c
@@ -1,5 +1,5 @@
/* Determine display width of UTF-32 string.
- Copyright (C) 2001-2002, 2006, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006, 2009-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or
@@ -22,7 +22,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/uniwidth/u32-width.c b/lib/uniwidth/u32-width.c
index a6fde33..2c59abf 100644
--- a/lib/uniwidth/u32-width.c
+++ b/lib/uniwidth/u32-width.c
@@ -1,5 +1,5 @@
/* Determine display width of UTF-32 string.
- Copyright (C) 2001-2002, 2006, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006, 2009-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or
@@ -22,7 +22,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/uniwidth/u8-strwidth.c b/lib/uniwidth/u8-strwidth.c
index a773f2c..59993c8 100644
--- a/lib/uniwidth/u8-strwidth.c
+++ b/lib/uniwidth/u8-strwidth.c
@@ -1,5 +1,5 @@
/* Determine display width of UTF-8 string.
- Copyright (C) 2001-2002, 2006, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006, 2009-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or
@@ -22,7 +22,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/uniwidth/u8-width.c b/lib/uniwidth/u8-width.c
index 1bd4121..70c3679 100644
--- a/lib/uniwidth/u8-width.c
+++ b/lib/uniwidth/u8-width.c
@@ -1,5 +1,5 @@
/* Determine display width of UTF-8 string.
- Copyright (C) 2001-2002, 2006-2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006-2007, 2009-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or
@@ -22,7 +22,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/uniwidth/width.c b/lib/uniwidth/width.c
index 9e1f0ea..a78a6c9 100644
--- a/lib/uniwidth/width.c
+++ b/lib/uniwidth/width.c
@@ -1,5 +1,5 @@
/* Determine display width of Unicode character.
- Copyright (C) 2001-2002, 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or
@@ -22,7 +22,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -41,7 +41,7 @@
* - Zero width characters; generated from
* "grep '^[^;]*;ZERO WIDTH ' UnicodeData.txt"
*/
-static const unsigned char nonspacing_table_data[36*64] = {
+static const unsigned char nonspacing_table_data[38*64] = {
/* 0x0000-0x01ff */
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0000-0x003f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x0040-0x007f */
@@ -82,7 +82,7 @@ static const unsigned char nonspacing_table_data[36*64] = {
0x00, 0x00, 0xc0, 0xfb, 0xef, 0x3e, 0x00, 0x00, /* 0x0800-0x083f */
0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, /* 0x0840-0x087f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0880-0x08bf */
- 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, /* 0x08c0-0x08ff */
+ 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x08c0-0x08ff */
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, /* 0x0900-0x093f */
0xfe, 0x21, 0xfe, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0940-0x097f */
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0980-0x09bf */
@@ -144,7 +144,7 @@ static const unsigned char nonspacing_table_data[36*64] = {
/* 0x1800-0x19ff */
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1800-0x183f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1840-0x187f */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /* 0x1880-0x18bf */
+ 0x60, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /* 0x1880-0x18bf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18c0-0x18ff */
0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x04, 0x0e, /* 0x1900-0x193f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1940-0x197f */
@@ -167,7 +167,7 @@ static const unsigned char nonspacing_table_data[36*64] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d00-0x1d3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d40-0x1d7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d80-0x1dbf */
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf0, /* 0x1dc0-0x1dff */
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8, /* 0x1dc0-0x1dff */
/* 0x2000-0x21ff */
0x00, 0xf8, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, /* 0x2000-0x203f */
0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0x00, 0x00, /* 0x2040-0x207f */
@@ -208,7 +208,7 @@ static const unsigned char nonspacing_table_data[36*64] = {
0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, /* 0xa800-0xa83f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa840-0xa87f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa880-0xa8bf */
- 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, /* 0xa8c0-0xa8ff */
+ 0x30, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, /* 0xa8c0-0xa8ff */
0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, /* 0xa900-0xa93f */
0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa940-0xa97f */
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x13, /* 0xa980-0xa9bf */
@@ -277,7 +277,7 @@ static const unsigned char nonspacing_table_data[36*64] = {
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, /* 0x11180-0x111bf */
0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x111c0-0x111ff */
/* 0x11200-0x113ff */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd3, 0x00, /* 0x11200-0x1123f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd3, 0x40, /* 0x11200-0x1123f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11240-0x1127f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11280-0x112bf */
0x00, 0x00, 0x00, 0x80, 0xf8, 0x07, 0x00, 0x00, /* 0x112c0-0x112ff */
@@ -286,8 +286,8 @@ static const unsigned char nonspacing_table_data[36*64] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11380-0x113bf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x113c0-0x113ff */
/* 0x11400-0x115ff */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11400-0x1143f */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11440-0x1147f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, /* 0x11400-0x1143f */
+ 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11440-0x1147f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x85, /* 0x11480-0x114bf */
0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x114c0-0x114ff */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11500-0x1153f */
@@ -303,6 +303,15 @@ static const unsigned char nonspacing_table_data[36*64] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11740-0x1177f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11780-0x117bf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x117c0-0x117ff */
+ /* 0x11c00-0x11dff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x3f, /* 0x11c00-0x11c3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11c40-0x11c7f */
+ 0x00, 0x00, 0xfc, 0xff, 0xff, 0xfc, 0x6d, 0x00, /* 0x11c80-0x11cbf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11cc0-0x11cff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11d00-0x11d3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11d40-0x11d7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11d80-0x11dbf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11dc0-0x11dff */
/* 0x16a00-0x16bff */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16a00-0x16a3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16a40-0x16a7f */
@@ -357,13 +366,22 @@ static const unsigned char nonspacing_table_data[36*64] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1db40-0x1db7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1db80-0x1dbbf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1dbc0-0x1dbff */
+ /* 0x1e000-0x1e1ff */
+ 0x7f, 0xff, 0xff, 0xf9, 0xdb, 0x07, 0x00, 0x00, /* 0x1e000-0x1e03f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e040-0x1e07f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e080-0x1e0bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e0c0-0x1e0ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e100-0x1e13f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e140-0x1e17f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e180-0x1e1bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e1c0-0x1e1ff */
/* 0x1e800-0x1e9ff */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e800-0x1e83f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e840-0x1e87f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e880-0x1e8bf */
0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e8c0-0x1e8ff */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e900-0x1e93f */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e940-0x1e97f */
+ 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e940-0x1e97f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e980-0x1e9bf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* 0x1e9c0-0x1e9ff */
};
@@ -385,20 +403,20 @@ static const signed char nonspacing_table_ind[248] = {
-1, -1, -1, -1, -1, -1, -1, -1, /* 0xe000-0xefff */
-1, -1, -1, -1, -1, 20, -1, 21, /* 0xf000-0xffff */
22, 23, -1, -1, -1, 24, -1, -1, /* 0x10000-0x10fff */
- 25, 26, 27, 28, -1, -1, -1, -1, /* 0x11000-0x11fff */
+ 25, 26, 27, 28, -1, -1, 29, -1, /* 0x11000-0x11fff */
-1, -1, -1, -1, -1, -1, -1, -1, /* 0x12000-0x12fff */
-1, -1, -1, -1, -1, -1, -1, -1, /* 0x13000-0x13fff */
-1, -1, -1, -1, -1, -1, -1, -1, /* 0x14000-0x14fff */
-1, -1, -1, -1, -1, -1, -1, -1, /* 0x15000-0x15fff */
- -1, -1, -1, -1, -1, 29, -1, 30, /* 0x16000-0x16fff */
+ -1, -1, -1, -1, -1, 30, -1, 31, /* 0x16000-0x16fff */
-1, -1, -1, -1, -1, -1, -1, -1, /* 0x17000-0x17fff */
-1, -1, -1, -1, -1, -1, -1, -1, /* 0x18000-0x18fff */
-1, -1, -1, -1, -1, -1, -1, -1, /* 0x19000-0x19fff */
-1, -1, -1, -1, -1, -1, -1, -1, /* 0x1a000-0x1afff */
- -1, -1, -1, -1, -1, -1, 31, -1, /* 0x1b000-0x1bfff */
+ -1, -1, -1, -1, -1, -1, 32, -1, /* 0x1b000-0x1bfff */
-1, -1, -1, -1, -1, -1, -1, -1, /* 0x1c000-0x1cfff */
- 32, 33, -1, -1, -1, 34, -1, -1, /* 0x1d000-0x1dfff */
- -1, -1, -1, -1, 35, -1, -1, -1 /* 0x1e000-0x1efff */
+ 33, 34, -1, -1, -1, 35, -1, -1, /* 0x1d000-0x1dfff */
+ 36, -1, -1, -1, 37, -1, -1, -1 /* 0x1e000-0x1efff */
};
/* Determine number of column positions required for UC. */