pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/editors/nvi Patches to avoid lvalue casting. Fixes PR/...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/09b780e9111b
branches:  trunk
changeset: 522528:09b780e9111b
user:      dogcow <dogcow%pkgsrc.org@localhost>
date:      Tue Dec 12 03:37:30 2006 +0000

description:
Patches to avoid lvalue casting. Fixes PR/35179 and issues with gcc4.
No new functionality.

diffstat:

 editors/nvi/distinfo         |   8 ++++-
 editors/nvi/patches/patch-af |  76 ++++++++++++++++++++++++++++++++++++++++++++
 editors/nvi/patches/patch-ag |  34 +++++++++++++++++++
 editors/nvi/patches/patch-ah |  13 +++++++
 editors/nvi/patches/patch-ai |  23 +++++++++++++
 editors/nvi/patches/patch-aj |  20 +++++++++++
 editors/nvi/patches/patch-ak |  16 +++++++++
 7 files changed, 189 insertions(+), 1 deletions(-)

diffs (225 lines):

diff -r cdc3bf999d05 -r 09b780e9111b editors/nvi/distinfo
--- a/editors/nvi/distinfo      Mon Dec 11 23:16:33 2006 +0000
+++ b/editors/nvi/distinfo      Tue Dec 12 03:37:30 2006 +0000
@@ -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-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 -r cdc3bf999d05 -r 09b780e9111b editors/nvi/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/nvi/patches/patch-af      Tue Dec 12 03:37:30 2006 +0000
@@ -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 -r cdc3bf999d05 -r 09b780e9111b editors/nvi/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/nvi/patches/patch-ag      Tue Dec 12 03:37:30 2006 +0000
@@ -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 -r cdc3bf999d05 -r 09b780e9111b editors/nvi/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/nvi/patches/patch-ah      Tue Dec 12 03:37:30 2006 +0000
@@ -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 -r cdc3bf999d05 -r 09b780e9111b editors/nvi/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/nvi/patches/patch-ai      Tue Dec 12 03:37:30 2006 +0000
@@ -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 -r cdc3bf999d05 -r 09b780e9111b editors/nvi/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/nvi/patches/patch-aj      Tue Dec 12 03:37:30 2006 +0000
@@ -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 -r cdc3bf999d05 -r 09b780e9111b editors/nvi/patches/patch-ak
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/nvi/patches/patch-ak      Tue Dec 12 03:37:30 2006 +0000
@@ -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;
+       }
+ 



Home | Main Index | Thread Index | Old Index