[arch-commits] Commit in vi/repos (4 files)
Tobias Kieslich
tobias at archlinux.org
Thu Jun 25 06:52:15 UTC 2009
Date: Thursday, June 25, 2009 @ 02:52:15
Author: tobias
Revision: 43550
Merged revisions 43543,43549 via svnmerge from
svn+ssh://svn.archlinux.org/srv/svn-packages/vi/trunk
........
r43543 | tobias | 2009-06-24 22:36:30 -0700 (Wed, 24 Jun 2009) | 1 line
upgpkg: vi 1.81.6-2
........
r43549 | tobias | 2009-06-24 23:51:45 -0700 (Wed, 24 Jun 2009) | 1 line
upgpkg: vi 1.81.6-2
........
Added:
vi/repos/testing-i686/c_locale.patch
(from rev 43549, vi/trunk/c_locale.patch)
vi/repos/testing-i686/widechar.patch
(from rev 43549, vi/trunk/widechar.patch)
Modified:
vi/repos/testing-i686/ (properties)
vi/repos/testing-i686/PKGBUILD
----------------+
PKGBUILD | 11 +++++----
c_locale.patch | 30 ++++++++++++++++++++++++
widechar.patch | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 104 insertions(+), 4 deletions(-)
Property changes on: vi/repos/testing-i686
___________________________________________________________________
Modified: svnmerge-integrated
- /vi/trunk:1-38461
+ /vi/trunk:1-43549
Modified: testing-i686/PKGBUILD
===================================================================
--- testing-i686/PKGBUILD 2009-06-25 06:51:45 UTC (rev 43549)
+++ testing-i686/PKGBUILD 2009-06-25 06:52:15 UTC (rev 43550)
@@ -5,7 +5,7 @@
pkgname=vi
_pkgname=nvi
pkgver=1.81.6
-pkgrel=1
+pkgrel=2
pkgdesc='A reimplementation of the ex/vi text editors with unicode support.'
arch=('i686' 'x86_64')
url='http://www.kotnet.org/~skimo/nvi/'
@@ -15,12 +15,15 @@
depends=('bash' 'db')
options=(!libtool force)
source=(http://www.kotnet.org/~skimo/nvi/devel/${_pkgname}-${pkgver}.tar.bz2 \
- db47-hack.patch)
-md5sums=('88d1e23115ee9f2961186b62e55f5704' 'f9dd0ee3b00e1a9915c49acc5a241a6d')
+ db47-hack.patch widechar.patch c_locale.patch)
+md5sums=('88d1e23115ee9f2961186b62e55f5704' 'f9dd0ee3b00e1a9915c49acc5a241a6d' \
+ '36855b815a7bf701632bc7c2b0777570' 'c2fba3fde17835bb9c90ed661231c807')
build() {
cd ${srcdir}/${_pkgname}-${pkgver}/
- patch -p1 <../db47-hack.patch
+ patch -p1 -i../db47-hack.patch || return 1
+ patch -Np1 -i ../widechar.patch || return 1
+ patch -Np1 -i ../c_locale.patch || return 1
cd ./build.unix
../dist/configure --prefix=/usr --program-prefix= --enable-widechar
make || return 1
Copied: vi/repos/testing-i686/c_locale.patch (from rev 43549, vi/trunk/c_locale.patch)
===================================================================
--- testing-i686/c_locale.patch (rev 0)
+++ testing-i686/c_locale.patch 2009-06-25 06:52:15 UTC (rev 43550)
@@ -0,0 +1,30 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 27support_C_locale.dpatch by <hesso at pool.math.tu-berlin.de>
+##
+## DP: Allow users to edit 8-bit files even under LC_CTYPE=C.
+
+ at DPATCH@
+--- nvi-1.81.6.orig/common/conv.c 2007-11-18 17:41:42.000000000 +0100
++++ nvi-1.81.6/common/conv.c 2009-03-09 16:45:37.812022582 +0100
+@@ -322,11 +322,16 @@
+ else {
+ setlocale(LC_ALL, "");
+ #ifdef USE_WIDECHAR
+- sp->conv.sys2int = cs_char2int;
+- sp->conv.int2sys = cs_int2char;
+- sp->conv.file2int = fe_char2int;
+- sp->conv.int2file = fe_int2char;
+- sp->conv.input2int = ie_char2int;
++ if (!strcmp(LANGCODESET, "ANSI_X3.4-1968")) {
++ sp->conv.file2int = sp->conv.input2int = sp->conv.sys2int = raw2int;
++ sp->conv.int2sys = sp->conv.int2file = int2raw;
++ } else {
++ sp->conv.sys2int = cs_char2int;
++ sp->conv.int2sys = cs_int2char;
++ sp->conv.file2int = fe_char2int;
++ sp->conv.int2file = fe_int2char;
++ sp->conv.input2int = ie_char2int;
++ }
+ #endif
+ #ifdef USE_ICONV
+ o_set(sp, O_FILEENCODING, OS_STRDUP, nl_langinfo(CODESET), 0);
Copied: vi/repos/testing-i686/widechar.patch (from rev 43549, vi/trunk/widechar.patch)
===================================================================
--- testing-i686/widechar.patch (rev 0)
+++ testing-i686/widechar.patch 2009-06-25 06:52:15 UTC (rev 43550)
@@ -0,0 +1,67 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 13widechar_horrors.dpatch by <hesso at pool.math.tu-berlin.de>
+##
+## DP: This patch tries to cope with the fact that widechar support
+## DP: in nvi is at best rudimentary.
+## DP: Hunk 1)
+## DP: * Due to "ch = *t", this code is not wide-char aware, so
+## DP: cast the value to a proper type so the KEY_ macros make
+## DP: the right choice.
+## DP: Hunk 2)
+## DP: * Printing of the in-/decreased number back into the screen
+## DP: buffer is not widechar-aware, either. Add a dirty fix.
+## DP: Cf. #497349.
+
+ at DPATCH@
+--- nvi-1.81.6.orig/vi/vs_msg.c 2007-11-18 17:41:42.000000000 +0100
++++ nvi-1.81.6/vi/vs_msg.c 2009-03-01 14:51:08.211414132 +0100
+@@ -472,10 +472,10 @@
+ */
+ if (ch == '\t')
+ ch = ' ';
+- chlen = KEY_LEN(sp, ch);
++ chlen = KEY_LEN(sp, (unsigned char)ch);
+ if (cbp + chlen >= ecbp)
+ FLUSH;
+- for (kp = KEY_NAME(sp, ch); chlen--;)
++ for (kp = KEY_NAME(sp, (unsigned char)ch); chlen--;)
+ *cbp++ = *kp++;
+ }
+ if (cbp > cbuf)
+--- nvi-1.81.6.orig/vi/v_increment.c 2007-11-18 17:41:42.000000000 +0100
++++ nvi-1.81.6/vi/v_increment.c 2009-03-01 15:12:50.950415874 +0100
+@@ -57,7 +57,7 @@
+ long change, ltmp, lval;
+ size_t beg, blen, end, len, nlen, wlen;
+ int base, isempty, rval;
+- char *ntype, nbuf[100];
++ char *ntype, nbuf[100 * sizeof(CHAR_T)];
+ CHAR_T *bp, *p, *t;
+
+ /* Validate the operator. */
+@@ -202,7 +202,7 @@
+ /* If we cross 0, signed numbers lose their sign. */
+ if (lval == 0 && ntype == fmt[SDEC])
+ ntype = fmt[DEC];
+- nlen = snprintf(nbuf, sizeof(nbuf), ntype, lval);
++ nlen = snprintf(nbuf, sizeof(nbuf)/sizeof(CHAR_T), ntype, lval);
+ } else {
+ if ((nret = nget_uslong(sp, &ulval, t, NULL, base)) != NUM_OK)
+ goto err;
+@@ -224,7 +224,15 @@
+ if (base == 16)
+ wlen -= 2;
+
+- nlen = snprintf(nbuf, sizeof(nbuf), ntype, wlen, ulval);
++ nlen = snprintf(nbuf, sizeof(nbuf)/sizeof(CHAR_T), ntype, wlen, ulval);
++ }
++
++ /* Inflate the printed char buffer to CHAR_T elements if necessary */
++ if (sizeof(CHAR_T) > sizeof(char)) {
++ int nlen_inflate;
++ for (nlen_inflate = nlen; nlen_inflate >= 0; nlen_inflate--) {
++ ((CHAR_T *)nbuf)[nlen_inflate] = nbuf[nlen_inflate];
++ }
+ }
+
+ /* Build the new line. */
More information about the arch-commits
mailing list