summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hahler2016-11-27 17:13:33 +0100
committerDaniel Hahler2016-11-27 17:13:56 +0100
commit441ddaea5ec5180ddd2a01349d7576dc1faf4dc1 (patch)
tree5a1a526cc6b54a248f32ccfd0e3460f0e7cb2985
parentd77e25f9ae65324fdc18d5d88192e04cfbb86bf6 (diff)
downloadaur-441ddaea5ec5180ddd2a01349d7576dc1faf4dc1.tar.gz
Retry on EINTR
-rw-r--r--.SRCINFO4
-rw-r--r--Makefile2
-rw-r--r--PKGBUILD4
-rw-r--r--wcwidthcallback.patch27
4 files changed, 22 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f008c6efb86..25d502fdc85 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 = 3
+ pkgrel = 4
url = http://software.schmorp.de/pkg/rxvt-unicode.html
arch = i686
arch = x86_64
@@ -28,7 +28,7 @@ pkgbase = rxvt-unicode-wcwidthcallback
sha1sums = b7fde1c46af45e831828738874f14b092b1e795f
sha1sums = dfbc8729c545105eff21e20ef3a4a3841a68a192
sha1sums = 6dfa49a211c48193c8d87fb9993ed459b2b4387b
- sha1sums = af4cf72f84d07a35b7d99ab8030e7042450a305b
+ sha1sums = c884f2be45073624c7f34ed6011e0a7dad3ffb22
pkgname = rxvt-unicode-wcwidthcallback
diff --git a/Makefile b/Makefile
index 7af7ddc8d6e..d54fb81d732 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
update: clean wcwidthcallback.patch PKGBUILD .SRCINFO
-
+
PKGBUILD: wcwidthcallback.patch
updpkgsums
diff --git a/PKGBUILD b/PKGBUILD
index 1ad33cc11ff..046c893b9ed 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@
_pkgname=rxvt-unicode
pkgname=rxvt-unicode-wcwidthcallback
pkgver=9.22
-pkgrel=3
+pkgrel=4
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'
@@ -43,7 +43,7 @@ sha1sums=('e575b869782fbfed955f84f48b204ec888d91ba1'
'b7fde1c46af45e831828738874f14b092b1e795f'
'dfbc8729c545105eff21e20ef3a4a3841a68a192'
'6dfa49a211c48193c8d87fb9993ed459b2b4387b'
- 'af4cf72f84d07a35b7d99ab8030e7042450a305b')
+ 'c884f2be45073624c7f34ed6011e0a7dad3ffb22')
prepare() {
cd $_pkgname-$pkgver
diff --git a/wcwidthcallback.patch b/wcwidthcallback.patch
index 956aea42713..94fa9cc1177 100644
--- a/wcwidthcallback.patch
+++ b/wcwidthcallback.patch
@@ -1,9 +1,9 @@
diff --git a/README.md b/README.md
new file mode 100644
-index 0000000..ef17fa7
+index 0000000..3d3e64f
--- /dev/null
+++ b/README.md
-@@ -0,0 +1,100 @@
+@@ -0,0 +1,97 @@
+# Modified rxvt-unicode to get widths of glyphs from the font itself
+
+This is an experimental/modified version of rxvt-unicode to fix issues with
@@ -36,9 +36,8 @@ index 0000000..ef17fa7
+## Installation
+
+There is no (working) `configure` switch to enable/disable it yet, so you can
-+do the normal `./configure`, e.g.
-+
-+ ./configure --enable-unicode3 --enable-256-color --disable-smart-resize
++do the normal `./configure`, see README.configure for the general/other
++options.
+
+There is however `--enable-debug-wcwidth`, which will output debugging
+information to stderr, from where rxvt-unicode was started from. It is
@@ -47,8 +46,6 @@ index 0000000..ef17fa7
+`--enable-wcwidthpreload` can be used to automatically set `LD_PRELOAD` for the
+rxvt-unicode client.
+
-+See README.configure for the general/other options.
-+
+A package for Arch Linux is available in the AUR:
+https://aur.archlinux.org/packages/rxvt-unicode-wcwidthcallback
+
@@ -713,10 +710,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..da7c8bc
+index 0000000..1300be4
--- /dev/null
+++ b/src/rxvtwcwidth.C
-@@ -0,0 +1,224 @@
+@@ -0,0 +1,234 @@
+/*
+ * Shared object to override wcwidth/wcswidth, which asks rxvt-unicode for the
+ * width of a char.
@@ -904,8 +901,18 @@ index 0000000..da7c8bc
+ ret = read(wcwidth_socket_fd, &width, sizeof(int));
+ if (ret == -1)
+ {
-+ perror("read");
++#ifdef DEBUG_WCWIDTH_CLIENT
++ fprintf(stderr, "_wcwidth: read error: %s\n", strerror(errno));
++#endif
++ // Handle "Interrupted system call" once; might happen occasionally.
++ if (errno == EINTR)
++ ret = read(wcwidth_socket_fd, &width, sizeof(int));
++
++ if (ret == -1)
++ {
++ perror("_wcwidth: read");
+ width = orig_width;
++ }
+ }
+ else
+ {