summaryrefslogtreecommitdiff
path: root/editors/nvi
diff options
context:
space:
mode:
authordogcow <dogcow@pkgsrc.org>2006-12-12 03:37:30 +0000
committerdogcow <dogcow@pkgsrc.org>2006-12-12 03:37:30 +0000
commit6687c8d8036bfe764a5212414994a684d284645f (patch)
tree4b83ab9a5d8b230c5b0ef2934fc7412b9ea26f46 /editors/nvi
parent68bbe6d1beec427c163b6bf21ea20dc263274879 (diff)
downloadpkgsrc-6687c8d8036bfe764a5212414994a684d284645f.tar.gz
Patches to avoid lvalue casting. Fixes PR/35179 and issues with gcc4.
No new functionality.
Diffstat (limited to 'editors/nvi')
-rw-r--r--editors/nvi/distinfo8
-rw-r--r--editors/nvi/patches/patch-af76
-rw-r--r--editors/nvi/patches/patch-ag34
-rw-r--r--editors/nvi/patches/patch-ah13
-rw-r--r--editors/nvi/patches/patch-ai23
-rw-r--r--editors/nvi/patches/patch-aj20
-rw-r--r--editors/nvi/patches/patch-ak16
7 files changed, 189 insertions, 1 deletions
diff --git a/editors/nvi/distinfo b/editors/nvi/distinfo
index f2d76a1c7cb..9c85488a0ec 100644
--- a/editors/nvi/distinfo
+++ b/editors/nvi/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2006/09/16 15:29:35 hira Exp $
+$NetBSD: distinfo,v 1.7 2006/12/12 03:37:30 dogcow Exp $
SHA1 (nvi-1.81.5.tar.bz2) = 63a5837cf9e726c10a9927323b451390e267765e
RMD160 (nvi-1.81.5.tar.bz2) = a3c37e0e2bb87353547af37d6f736d1dd1d3c6ad
@@ -8,3 +8,9 @@ SHA1 (patch-ab) = d5cb1cccb2799bb21822dcd0e11d7208c60f40b6
SHA1 (patch-ac) = 239764397e64323edfba6fcf4ae99846cebbdbe1
SHA1 (patch-ad) = 3cdd8ea5ad6c9c4e6a2d1f77d0b28f80fae44fd0
SHA1 (patch-ae) = 28441e05bd1bbaa89a1df516decc583898eb1a23
+SHA1 (patch-af) = 63ad95807e1d0011f82df0bf602330aa0204cf9b
+SHA1 (patch-ag) = decdf31882e718441f59e024ca1a8dcc5e469a62
+SHA1 (patch-ah) = c0c0feaacab0b88afe0a101bc70e25b3e772b280
+SHA1 (patch-ai) = 01ec27bb9313e98503f650630cf868745098ea32
+SHA1 (patch-aj) = 4ef7015132c4b7d30548f6a37ec8e221e47d4ee8
+SHA1 (patch-ak) = a0cb43f9077a58538401d1ca25f03919168b950e
diff --git a/editors/nvi/patches/patch-af b/editors/nvi/patches/patch-af
new file mode 100644
index 00000000000..484258f8c2b
--- /dev/null
+++ b/editors/nvi/patches/patch-af
@@ -0,0 +1,76 @@
+$NetBSD: patch-af,v 1.1 2006/12/12 03:37:30 dogcow Exp $
+
+--- ../common/mem.h.orig 2000-08-20 19:12:59.000000000 +1000
++++ ../common/mem.h 2006-12-03 15:21:22.000000000 +1000
+@@ -26,8 +26,9 @@
+ } \
+ }
+ #define BINC_GOTOW(sp, lp, llen, nlen) { \
+- CHAR_T *L__bp = lp; \
+- BINC_GOTO(sp, (char *)lp, llen, (nlen) * sizeof(CHAR_T)) \
++ char *L__lp = (char *)lp; \
++ BINC_GOTO(sp, L__lp, llen, (nlen) * sizeof(CHAR_T)) \
++ lp = (CHAR_T *) L__lp; \
+ }
+ #define BINC_RET(sp, lp, llen, nlen) { \
+ char *L__p = lp; \
+@@ -43,8 +44,9 @@
+ } \
+ }
+ #define BINC_RETW(sp, lp, llen, nlen) { \
+- CHAR_T *L__bp = lp; \
+- BINC_RET(sp, (char *)lp, llen, (nlen) * sizeof(CHAR_T)) \
++ char *L__lp = (char *)lp; \
++ BINC_RET(sp, L__lp, llen, (nlen) * sizeof(CHAR_T)) \
++ lp = (CHAR_T *) L__lp; \
+ }
+
+ /*
+@@ -66,8 +68,9 @@
+ } \
+ }
+ #define GET_SPACE_GOTOW(sp, bp, blen, nlen) { \
+- CHAR_T *L__bp = bp; \
+- GET_SPACE_GOTO(sp, (char *)bp, blen, (nlen) * sizeof(CHAR_T)) \
++ char *L__bp = (char *)bp; \
++ GET_SPACE_GOTO(sp, L__bp, blen, (nlen) * sizeof(CHAR_T)) \
++ bp = (CHAR_T *) L__bp; \
+ }
+ #define GET_SPACE_RET(sp, bp, blen, nlen) { \
+ WIN *L__wp = (sp) == NULL ? NULL : (sp)->wp; \
+@@ -83,8 +86,9 @@
+ } \
+ }
+ #define GET_SPACE_RETW(sp, bp, blen, nlen) { \
+- CHAR_T *L__bp = bp; \
+- GET_SPACE_RET(sp, (char *)bp, blen, (nlen) * sizeof(CHAR_T)) \
++ char *L__bp = (char *)bp; \
++ GET_SPACE_RET(sp, L__bp, blen, (nlen) * sizeof(CHAR_T)) \
++ bp = (CHAR_T *) L__bp; \
+ }
+
+ /*
+@@ -103,8 +107,9 @@
+ BINC_GOTO(sp, bp, blen, nlen); \
+ }
+ #define ADD_SPACE_GOTOW(sp, bp, blen, nlen) { \
+- CHAR_T *L__bp = bp; \
+- ADD_SPACE_GOTO(sp, (char *)bp, blen, (nlen) * sizeof(CHAR_T)) \
++ char *L__bp = (char *)bp; \
++ ADD_SPACE_GOTO(sp, L__bp, blen, (nlen) * sizeof(CHAR_T)) \
++ bp = (CHAR_T *) L__bp; \
+ }
+ #define ADD_SPACE_RET(sp, bp, blen, nlen) { \
+ WIN *L__wp = (sp) == NULL ? NULL : (sp)->wp; \
+@@ -118,8 +123,9 @@
+ BINC_RET(sp, bp, blen, nlen); \
+ }
+ #define ADD_SPACE_RETW(sp, bp, blen, nlen) { \
+- CHAR_T *L__bp = bp; \
+- ADD_SPACE_RET(sp, (char *)bp, blen, (nlen) * sizeof(CHAR_T)) \
++ char *L__bp = (char *)bp; \
++ ADD_SPACE_RET(sp, L__bp, blen, (nlen) * sizeof(CHAR_T)) \
++ bp = (CHAR_T *) L__bp; \
+ }
+
+ /* Free a GET_SPACE returned buffer. */
diff --git a/editors/nvi/patches/patch-ag b/editors/nvi/patches/patch-ag
new file mode 100644
index 00000000000..5a0be084ed5
--- /dev/null
+++ b/editors/nvi/patches/patch-ag
@@ -0,0 +1,34 @@
+$NetBSD: patch-ag,v 1.1 2006/12/12 03:37:30 dogcow Exp $
+
+--- ../cl/cl_funcs.c.orig 2001-06-26 01:19:05.000000000 +1000
++++ ../cl/cl_funcs.c 2006-12-03 15:21:22.000000000 +1000
+@@ -381,7 +381,7 @@
+
+ if (CLSP(discardp)) {
+ delwin(CLSP(discardp));
+- CLSP(discardp) = NULL;
++ discardp->cl_private = NULL;
+ }
+ }
+
+@@ -395,7 +395,7 @@
+
+ if (CLSP(tsp))
+ delwin(CLSP(tsp));
+- CLSP(tsp) = subwin(stdscr, tsp->rows, tsp->cols,
++ tsp->cl_private = subwin(stdscr, tsp->rows, tsp->cols,
+ tsp->roff, tsp->coff);
+ }
+
+@@ -716,9 +716,9 @@
+ if (CLSP(origp))
+ delwin(CLSP(origp));
+
+- CLSP(origp) = subwin(stdscr, origp->rows, origp->cols,
++ origp->cl_private = subwin(stdscr, origp->rows, origp->cols,
+ origp->roff, origp->coff);
+- CLSP(newp) = subwin(stdscr, newp->rows, newp->cols,
++ newp->cl_private = subwin(stdscr, newp->rows, newp->cols,
+ newp->roff, newp->coff);
+
+ /* origp is the original screen, giving up space to newp. */
diff --git a/editors/nvi/patches/patch-ah b/editors/nvi/patches/patch-ah
new file mode 100644
index 00000000000..f3db22d6118
--- /dev/null
+++ b/editors/nvi/patches/patch-ah
@@ -0,0 +1,13 @@
+$NetBSD: patch-ah,v 1.1 2006/12/12 03:37:30 dogcow Exp $
+
+--- ../cl/cl_screen.c.orig 2001-06-26 01:19:06.000000000 +1000
++++ ../cl/cl_screen.c 2006-12-03 15:21:22.000000000 +1000
+@@ -56,7 +56,7 @@
+ if (F_ISSET(gp, G_SRESTART)) {
+ if (CLSP(sp)) {
+ delwin(CLSP(sp));
+- CLSP(sp) = NULL;
++ sp->cl_private = NULL;
+ }
+ if (cl_quit(gp))
+ return (1);
diff --git a/editors/nvi/patches/patch-ai b/editors/nvi/patches/patch-ai
new file mode 100644
index 00000000000..74f04c71049
--- /dev/null
+++ b/editors/nvi/patches/patch-ai
@@ -0,0 +1,23 @@
+$NetBSD: patch-ai,v 1.1 2006/12/12 03:37:30 dogcow Exp $
+
+--- ../common/db.c.orig 2001-08-19 07:52:00.000000000 +1000
++++ ../common/db.c 2006-12-03 15:21:22.000000000 +1000
+@@ -94,6 +94,7 @@
+ CHAR_T *wp;
+ size_t wlen;
+ size_t nlen;
++ char *c_lp;
+
+ /*
+ * The underlying recno stuff handles zero by returning NULL, but
+@@ -164,7 +165,9 @@
+ nlen = 1024;
+ retry:
+ /* data.size contains length in bytes */
+- BINC_GOTO(sp, (char *)ep->c_lp, ep->c_blen, nlen);
++ c_lp = (char *) ep->c_lp;
++ BINC_GOTO(sp, c_lp, ep->c_blen, nlen);
++ ep->c_lp = (CHAR_T *) c_lp;
+
+ /* Get the line from the underlying database. */
+ memset(&key, 0, sizeof(key));
diff --git a/editors/nvi/patches/patch-aj b/editors/nvi/patches/patch-aj
new file mode 100644
index 00000000000..50b11691287
--- /dev/null
+++ b/editors/nvi/patches/patch-aj
@@ -0,0 +1,20 @@
+$NetBSD: patch-aj,v 1.1 2006/12/12 03:37:30 dogcow Exp $
+
+--- ../common/key.c.orig 2001-06-26 01:19:10.000000000 +1000
++++ ../common/key.c 2006-12-03 15:21:22.000000000 +1000
+@@ -829,11 +829,14 @@
+ {
+ WIN *wp;
+ size_t new_nelem, olen;
++ char *i_event;
+
+ wp = sp->wp;
+ new_nelem = wp->i_nelem + add;
+ olen = wp->i_nelem * sizeof(wp->i_event[0]);
+- BINC_RET(sp, (char *)wp->i_event, olen, new_nelem * sizeof(wp->i_event[0]));
++ i_event = (char *)wp->i_event;
++ BINC_RET(sp, i_event, olen, new_nelem * sizeof(wp->i_event[0]));
++ wp->i_event = (EVENT *) i_event;
+ wp->i_nelem = olen / sizeof(wp->i_event[0]);
+ return (0);
+ }
diff --git a/editors/nvi/patches/patch-ak b/editors/nvi/patches/patch-ak
new file mode 100644
index 00000000000..9b63514118d
--- /dev/null
+++ b/editors/nvi/patches/patch-ak
@@ -0,0 +1,16 @@
+$NetBSD: patch-ak,v 1.1 2006/12/12 03:37:30 dogcow Exp $
+
+--- ../vi/v_txt.c.orig 2001-07-27 03:15:53.000000000 +1000
++++ ../vi/v_txt.c 2006-12-03 15:21:22.000000000 +1000
+@@ -589,8 +589,10 @@
+
+ /* Check to see if the character fits into the replay buffers. */
+ if (LF_ISSET(TXT_RECORD)) {
+- BINC_GOTO(sp, (char *)vip->rep,
++ char *rep = vip->rep;
++ BINC_GOTO(sp, rep,
+ vip->rep_len, (rcol + 1) * sizeof(EVENT));
++ vip->rep = (EVENT *) rep;
+ vip->rep[rcol++] = *evp;
+ }
+