ports/69434: Added vendor patches to readline port
Frank Laszlo
laszlof at vonostingroup.com
Thu Jul 22 14:30:30 UTC 2004
The following reply was made to PR ports/69434; it has been noted by GNATS.
From: Frank Laszlo <laszlof at vonostingroup.com>
To: freebsd-gnats-submit at FreeBSD.org, laszlof at vonostingroup.com
Cc:
Subject: Re: ports/69434: Added vendor patches to readline port
Date: Thu, 22 Jul 2004 10:21:31 -0500
This is a multi-part message in MIME format.
--------------080002060008030805060408
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
After submitting this PR, I realized the patch I made was BEFORE the
vendor patch 001 was commited. Here is a diff of the most current ports
tree.
-Frank Laszlo
--------------080002060008030805060408
Content-Type: text/plain;
name="readline.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="readline.patch"
diff -rNU3 readline.old/CVS/Entries readline/CVS/Entries
--- readline.old/CVS/Entries Thu Jul 22 10:17:32 2004
+++ readline/CVS/Entries Wed Dec 31 19:00:00 1969
@@ -1,5 +0,0 @@
-/Makefile/1.2/Thu Jul 22 07:17:14 2004//
-/distinfo/1.2/Thu Mar 18 18:00:19 2004//
-/pkg-descr/1.1/Sun Dec 28 10:32:48 2003//
-/pkg-plist/1.1/Sun Dec 28 10:32:48 2003//
-D/files////
diff -rNU3 readline.old/CVS/Repository readline/CVS/Repository
--- readline.old/CVS/Repository Thu Jul 22 10:17:32 2004
+++ readline/CVS/Repository Wed Dec 31 19:00:00 1969
@@ -1 +0,0 @@
-ports/devel/readline
diff -rNU3 readline.old/CVS/Root readline/CVS/Root
--- readline.old/CVS/Root Thu Jul 22 10:17:32 2004
+++ readline/CVS/Root Wed Dec 31 19:00:00 1969
@@ -1 +0,0 @@
-/usr/cvs
diff -rNU3 readline.old/Makefile readline/Makefile
--- readline.old/Makefile Thu Jul 22 03:17:14 2004
+++ readline/Makefile Thu Jul 22 08:58:27 2004
@@ -7,7 +7,7 @@
PORTNAME= readline
PORTVERSION= 4.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= ftp://ftp.cwru.edu/pub/bash/
diff -rNU3 readline.old/files/CVS/Entries readline/files/CVS/Entries
--- readline.old/files/CVS/Entries Thu Jul 22 10:17:32 2004
+++ readline/files/CVS/Entries Wed Dec 31 19:00:00 1969
@@ -1,2 +0,0 @@
-/patch-aa/1.1/Thu Jul 22 07:17:14 2004//
-D
diff -rNU3 readline.old/files/CVS/Repository readline/files/CVS/Repository
--- readline.old/files/CVS/Repository Thu Jul 22 10:17:32 2004
+++ readline/files/CVS/Repository Wed Dec 31 19:00:00 1969
@@ -1 +0,0 @@
-ports/devel/readline/files
diff -rNU3 readline.old/files/CVS/Root readline/files/CVS/Root
--- readline.old/files/CVS/Root Thu Jul 22 10:17:32 2004
+++ readline/files/CVS/Root Wed Dec 31 19:00:00 1969
@@ -1 +0,0 @@
-/usr/cvs
diff -rNU3 readline.old/files/patch-ab readline/files/patch-ab
--- readline.old/files/patch-ab Wed Dec 31 19:00:00 1969
+++ readline/files/patch-ab Thu Jul 22 08:57:27 2004
@@ -0,0 +1,10 @@
+*** readline-4.3/readline.c Wed Mar 13 17:10:46 2002
+--- readline.c Tue Jul 30 17:46:44 2002
+***************
+*** 685,688 ****
+--- 685,689 ----
+ #if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
++ key != ANYOTHERKEY &&
+ _rl_vi_textmod_command (key))
+ _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
diff -rNU3 readline.old/files/patch-ac readline/files/patch-ac
--- readline.old/files/patch-ac Wed Dec 31 19:00:00 1969
+++ readline/files/patch-ac Thu Jul 22 08:57:27 2004
@@ -0,0 +1,68 @@
+*** readline-4.3/mbutil.c Tue Jun 4 11:54:29 2002
+--- mbutil.c Mon Aug 5 11:20:39 2002
+***************
+*** 206,210 ****
+ {
+ /* shorted to compose multibyte char */
+! memset (ps, 0, sizeof(mbstate_t));
+ return -2;
+ }
+--- 206,211 ----
+ {
+ /* shorted to compose multibyte char */
+! if (ps)
+! memset (ps, 0, sizeof(mbstate_t));
+ return -2;
+ }
+***************
+*** 213,217 ****
+ /* invalid to compose multibyte char */
+ /* initialize the conversion state */
+! memset (ps, 0, sizeof(mbstate_t));
+ return -1;
+ }
+--- 214,219 ----
+ /* invalid to compose multibyte char */
+ /* initialize the conversion state */
+! if (ps)
+! memset (ps, 0, sizeof(mbstate_t));
+ return -1;
+ }
+***************
+*** 226,232 ****
+ int
+ _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2)
+! char *buf1, *buf2;
+! mbstate_t *ps1, *ps2;
+! int pos1, pos2;
+ {
+ int i, w1, w2;
+--- 228,237 ----
+ int
+ _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2)
+! char *buf1;
+! int pos1;
+! mbstate_t *ps1;
+! char *buf2;
+! int pos2;
+! mbstate_t *ps2;
+ {
+ int i, w1, w2;
+***************
+*** 277,282 ****
+ /* clear the state of the byte sequence, because
+ in this case effect of mbstate is undefined */
+! memset (ps, 0, sizeof (mbstate_t));
+ }
+ else
+ pos += tmp;
+--- 282,290 ----
+ /* clear the state of the byte sequence, because
+ in this case effect of mbstate is undefined */
+! if (ps)
+! memset (ps, 0, sizeof (mbstate_t));
+ }
++ else if (tmp == 0)
++ pos++;
+ else
+ pos += tmp;
diff -rNU3 readline.old/files/patch-ad readline/files/patch-ad
--- readline.old/files/patch-ad Wed Dec 31 19:00:00 1969
+++ readline/files/patch-ad Thu Jul 22 08:57:27 2004
@@ -0,0 +1,90 @@
+*** readline-4.3/display.c Tue Jun 4 10:54:47 2002
+--- display.c Fri Sep 13 16:22:57 2002
+***************
+*** 71,75 ****
+
+ #if defined (HANDLE_MULTIBYTE)
+! static int _rl_col_width PARAMS((char *, int, int));
+ static int *_rl_wrapped_line;
+ #else
+--- 71,75 ----
+
+ #if defined (HANDLE_MULTIBYTE)
+! static int _rl_col_width PARAMS((const char *, int, int));
+ static int *_rl_wrapped_line;
+ #else
+***************
+*** 1349,1355 ****
+ _rl_output_some_chars (nfd + lendiff, temp - lendiff);
+ #if 0
+- _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff) - col_lendiff;
+- #else
+ _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
+ #endif
+ }
+--- 1349,1355 ----
+ _rl_output_some_chars (nfd + lendiff, temp - lendiff);
+ #if 0
+ _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
++ #else
++ _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff);
+ #endif
+ }
+***************
+*** 1511,1516 ****
+ /* If we have multibyte characters, NEW is indexed by the buffer point in
+ a multibyte string, but _rl_last_c_pos is the display position. In
+! this case, NEW's display position is not obvious. */
+! if ((MB_CUR_MAX == 1 || rl_byte_oriented ) && _rl_last_c_pos == new) return;
+ #else
+ if (_rl_last_c_pos == new) return;
+--- 1511,1523 ----
+ /* If we have multibyte characters, NEW is indexed by the buffer point in
+ a multibyte string, but _rl_last_c_pos is the display position. In
+! this case, NEW's display position is not obvious and must be
+! calculated. */
+! if (MB_CUR_MAX == 1 || rl_byte_oriented)
+! {
+! if (_rl_last_c_pos == new)
+! return;
+! }
+! else if (_rl_last_c_pos == _rl_col_width (data, 0, new))
+! return;
+ #else
+ if (_rl_last_c_pos == new) return;
+***************
+*** 1595,1603 ****
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+! {
+! tputs (_rl_term_cr, 1, _rl_output_character_function);
+! for (i = 0; i < new; i++)
+! putc (data[i], rl_outstream);
+! }
+ else
+ _rl_backspace (_rl_last_c_pos - new);
+--- 1602,1606 ----
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+! _rl_backspace (_rl_last_c_pos - _rl_col_width (data, 0, new));
+ else
+ _rl_backspace (_rl_last_c_pos - new);
+***************
+*** 2118,2122 ****
+ static int
+ _rl_col_width (str, start, end)
+! char *str;
+ int start, end;
+ {
+--- 2121,2125 ----
+ static int
+ _rl_col_width (str, start, end)
+! const char *str;
+ int start, end;
+ {
+***************
+*** 2194,2196 ****
+ }
+ #endif /* HANDLE_MULTIBYTE */
+-
+--- 2197,2198 ----
diff -rNU3 readline.old/files/patch-ae readline/files/patch-ae
--- readline.old/files/patch-ae Wed Dec 31 19:00:00 1969
+++ readline/files/patch-ae Thu Jul 22 08:57:27 2004
@@ -0,0 +1,31 @@
+*** readline-4.3/vi_mode.c Thu May 23 13:27:58 2002
+--- vi_mode.c Tue Feb 4 15:11:07 2003
+***************
+*** 681,685 ****
+ {
+ wchar_t wc;
+! char mb[MB_LEN_MAX];
+ mbstate_t ps;
+
+--- 681,686 ----
+ {
+ wchar_t wc;
+! char mb[MB_LEN_MAX+1];
+! int mblen;
+ mbstate_t ps;
+
+***************
+*** 704,708 ****
+ if (wc)
+ {
+! wctomb (mb, wc);
+ rl_begin_undo_group ();
+ rl_delete (1, 0);
+--- 705,711 ----
+ if (wc)
+ {
+! mblen = wctomb (mb, wc);
+! if (mblen >= 0)
+! mb[mblen] = '\0';
+ rl_begin_undo_group ();
+ rl_delete (1, 0);
--------------080002060008030805060408--
More information about the freebsd-ports-bugs
mailing list