summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--wcwidthcallback.patch39
3 files changed, 31 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index df58b95f76e0..fee19d504d11 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = rxvt-unicode-wcwidthcallback
pkgdesc = rxvt-unicode terminal emulator (urxvt) with wcwidth callback for better wide glyph handling of Xft fonts
pkgver = 9.22
- pkgrel = 1
+ pkgrel = 2
url = http://software.schmorp.de/pkg/rxvt-unicode.html
arch = i686
arch = x86_64
@@ -26,7 +26,7 @@ pkgbase = rxvt-unicode-wcwidthcallback
sha1sums = cd204d608d114d39c80331efe0af0231ad6b7e18
sha1sums = b7fde1c46af45e831828738874f14b092b1e795f
sha1sums = dfbc8729c545105eff21e20ef3a4a3841a68a192
- sha1sums = 1c138cb00670bbac7ef918d5f0050e17792bcbfb
+ sha1sums = af4cf72f84d07a35b7d99ab8030e7042450a305b
pkgname = rxvt-unicode-wcwidthcallback
diff --git a/PKGBUILD b/PKGBUILD
index fc2e8001ee41..5dd54c2f560c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@
_pkgname=rxvt-unicode
pkgname=rxvt-unicode-wcwidthcallback
pkgver=9.22
-pkgrel=1
+pkgrel=2
pkgdesc='rxvt-unicode terminal emulator (urxvt) with wcwidth callback for better wide glyph handling of Xft fonts'
arch=('i686' 'x86_64')
url='http://software.schmorp.de/pkg/rxvt-unicode.html'
@@ -41,7 +41,7 @@ sha1sums=('e575b869782fbfed955f84f48b204ec888d91ba1'
'cd204d608d114d39c80331efe0af0231ad6b7e18'
'b7fde1c46af45e831828738874f14b092b1e795f'
'dfbc8729c545105eff21e20ef3a4a3841a68a192'
- '1c138cb00670bbac7ef918d5f0050e17792bcbfb')
+ 'af4cf72f84d07a35b7d99ab8030e7042450a305b')
prepare() {
cd $_pkgname-$pkgver
diff --git a/wcwidthcallback.patch b/wcwidthcallback.patch
index 342501c501ad..956aea42713e 100644
--- a/wcwidthcallback.patch
+++ b/wcwidthcallback.patch
@@ -1,6 +1,6 @@
diff --git a/README.md b/README.md
new file mode 100644
-index 0000000..02243e9
+index 0000000..ef17fa7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,100 @@
@@ -49,8 +49,8 @@ index 0000000..02243e9
+
+See README.configure for the general/other options.
+
-+A PKGBUILD for Arch is available at:
-+https://github.com/blueyed/PKGBUILD-rxvt-unicode-wcwidthcallback
++A package for Arch Linux is available in the AUR:
++https://aur.archlinux.org/packages/rxvt-unicode-wcwidthcallback
+
+### Setup
+
@@ -713,10 +713,10 @@ index efb1509..24ea81e 100644
const text_t *text, int len,
diff --git a/src/rxvtwcwidth.C b/src/rxvtwcwidth.C
new file mode 100644
-index 0000000..21d949a
+index 0000000..da7c8bc
--- /dev/null
+++ b/src/rxvtwcwidth.C
-@@ -0,0 +1,209 @@
+@@ -0,0 +1,224 @@
+/*
+ * Shared object to override wcwidth/wcswidth, which asks rxvt-unicode for the
+ * width of a char.
@@ -757,6 +757,21 @@ index 0000000..21d949a
+
+int _wcwidth(wchar_t c)
+{
++ int orig_width;
++
++ // Handle zero-width combining characters (e.g. \u0301) properly first,
++ // but calling the original wcwidth(3).
++ // This is used by zsh's ./configure to detect brokwn wcwidth. We would
++ // report 1 for it via e.g. "DejaVu Sans Mono".
++ orig_width = orig_wcwidth(c);
++ if (orig_width < 1)
++ {
++#ifdef DEBUG_WCWIDTH_CLIENT
++ fprintf(stderr, "_wcwidth: using orig_width for %lc: %i\n", c, orig_width);
++#endif
++ return orig_width;
++ }
++
+ const char *wcwidth_socket_name = getenv("RXVT_WCWIDTH_SOCKET");
+ if (!wcwidth_socket_name)
+ {
@@ -768,14 +783,14 @@ index 0000000..21d949a
+#endif
+ }
+ SOCKET_STATUS = 0;
-+ return orig_wcwidth(c);
++ return orig_width;
+ }
+ /*
+ * connect errors etc, allowing to re-activate by via setting and unsetting
+ * the socket name.
+ */
+ if (SOCKET_STATUS == -2)
-+ return orig_wcwidth(c);
++ return orig_width;
+
+ if (SOCKET_STATUS == 0)
+ {
@@ -800,7 +815,7 @@ index 0000000..21d949a
+ if (wcwidth_socket_fd == -1) {
+ perror("wcwidth: could not open socket");
+ SOCKET_STATUS = -2;
-+ return orig_wcwidth(c);
++ return orig_width;
+ }
+
+ /* Bind socket to socket name. */
@@ -857,7 +872,7 @@ index 0000000..21d949a
+ }
+ SOCKET_STATUS = -2;
+ close(wcwidth_socket_fd);
-+ return orig_wcwidth(c);
++ return orig_width;
+ } while (1);
+ }
+ else
@@ -866,7 +881,7 @@ index 0000000..21d949a
+ wcwidth_socket_name, strerror(errno));
+ SOCKET_STATUS = -2;
+ close(wcwidth_socket_fd);
-+ return orig_wcwidth(c);
++ return orig_width;
+ }
+ }
+ fcntl(wcwidth_socket_fd, F_SETFL, orig_flags);
@@ -879,7 +894,7 @@ index 0000000..21d949a
+ int width;
+ if (ret == -1) {
+ perror("write");
-+ width = orig_wcwidth(c);
++ width = orig_width;
+ }
+ else
+ {
@@ -890,7 +905,7 @@ index 0000000..21d949a
+ if (ret == -1)
+ {
+ perror("read");
-+ width = orig_wcwidth(c);
++ width = orig_width;
+ }
+ else
+ {