diff options
author | dd <dd@FreeBSD.org> | 2001-07-10 06:33:14 +0800 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2001-07-10 06:33:14 +0800 |
commit | fb8f676b3260eac47d4d49c3ea681398f1a43851 (patch) | |
tree | b65f4a375d75c03248b07d2a2ce3ef05264e2059 /editors/nvi-devel | |
parent | bfdfd934e22ca6764e0373aa3366b275fbea3adc (diff) | |
download | freebsd-ports-gnome-fb8f676b3260eac47d4d49c3ea681398f1a43851.tar.gz freebsd-ports-gnome-fb8f676b3260eac47d4d49c3ea681398f1a43851.tar.zst freebsd-ports-gnome-fb8f676b3260eac47d4d49c3ea681398f1a43851.zip |
Remove my hack and replace it with a better, more correct patch from
the vendor.
Diffstat (limited to 'editors/nvi-devel')
-rw-r--r-- | editors/nvi-devel/files/patch-lr-num | 19 | ||||
-rw-r--r-- | editors/nvi-devel/files/patch-vi-relative | 57 |
2 files changed, 57 insertions, 19 deletions
diff --git a/editors/nvi-devel/files/patch-lr-num b/editors/nvi-devel/files/patch-lr-num deleted file mode 100644 index acad5ed93860..000000000000 --- a/editors/nvi-devel/files/patch-lr-num +++ /dev/null @@ -1,19 +0,0 @@ -# This fixes an infinite loop in the case of: -# -# :set leftright -# :set number -# -# See PR 28687. Patch has been submitted to maintainer. - -diff -ru nvi-1.81.4.orig/vi/vs_refresh.c nvi-1.81.4/vi/vs_refresh.c ---- nvi-1.81.4.orig/vi/vs_refresh.c Wed Jul 19 10:05:20 2000 -+++ nvi-1.81.4/vi/vs_refresh.c Sat Jul 7 16:11:51 2001 -@@ -573,7 +573,7 @@ - * for the number option offset. - */ - cnt = vs_columns(sp, NULL, LNO, &CNO, NULL); -- if (O_ISSET(sp, O_NUMBER)) -+ if (O_ISSET(sp, O_NUMBER) && cnt >= O_NUMBER_LENGTH) - cnt -= O_NUMBER_LENGTH; - - /* Adjust the window towards the beginning of the line. */ diff --git a/editors/nvi-devel/files/patch-vi-relative b/editors/nvi-devel/files/patch-vi-relative new file mode 100644 index 000000000000..735dc464c03d --- /dev/null +++ b/editors/nvi-devel/files/patch-vi-relative @@ -0,0 +1,57 @@ +# Vendor patch to fix FreeBSD PR 28687. + +diff -ru nvi-1.81.4.orig/vi/vs_relative.c nvi-1.81.4/vi/vs_relative.c +--- nvi-1.81.4.orig/vi/vs_relative.c Wed Jul 19 10:05:20 2000 ++++ nvi-1.81.4/vi/vs_relative.c Mon Jul 9 15:26:39 2001 +@@ -10,7 +10,7 @@ + #include "config.h" + + #ifndef lint +-static const char sccsid[] = "$Id: vs_relative.c,v 10.16 2000/07/19 17:05:20 skimo Exp $ (Berkeley) $Date: 2000/07/19 17:05:20 $"; ++static const char sccsid[] = "$Id: vs_relative.c,v 10.18 2001/07/08 13:02:48 skimo Exp $ (Berkeley) $Date: 2001/07/08 13:02:48 $"; + #endif /* not lint */ + + #include <sys/types.h> +@@ -111,6 +111,15 @@ + int ch, leftright, listset; + CHAR_T *p; + ++ /* ++ * Initialize the screen offset. ++ */ ++ scno = 0; ++ ++ /* Leading number if O_NUMBER option set. */ ++ if (O_ISSET(sp, O_NUMBER)) ++ scno += O_NUMBER_LENGTH; ++ + /* Need the line to go any further. */ + if (lp == NULL) { + (void)db_get(sp, lno, 0, &lp, &len); +@@ -122,7 +131,7 @@ + if (lp == NULL) { + done: if (diffp != NULL) /* XXX */ + *diffp = 0; +- return (0); ++ return scno; + } + + /* Store away the values of the list and leftright edit options. */ +@@ -130,15 +139,10 @@ + leftright = O_ISSET(sp, O_LEFTRIGHT); + + /* +- * Initialize the pointer into the buffer and screen and current +- * offsets. ++ * Initialize the pointer into the buffer and current offset. + */ + p = lp; +- curoff = scno = 0; +- +- /* Leading number if O_NUMBER option set. */ +- if (O_ISSET(sp, O_NUMBER)) +- scno += O_NUMBER_LENGTH; ++ curoff = 0; + + /* Macro to return the display length of any signal character. */ + #define CHLEN(val) (ch = *(UCHAR_T *)p++) == '\t' && \ |