SOURCES: nvi-gcc4.patch (NEW) - added

aredridel aredridel at pld-linux.org
Wed Apr 4 20:47:46 CEST 2007


Author: aredridel                    Date: Wed Apr  4 18:47:46 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- added

---- Files affected:
SOURCES:
   nvi-gcc4.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/nvi-gcc4.patch
diff -u /dev/null SOURCES/nvi-gcc4.patch:1.1
--- /dev/null	Wed Apr  4 20:47:46 2007
+++ SOURCES/nvi-gcc4.patch	Wed Apr  4 20:47:41 2007
@@ -0,0 +1,172 @@
+--- nvi-1.81.5/cl/cl_funcs.c
++++ nvi-1.81.5/cl/cl_funcs.c
+@@ -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. */
+--- nvi-1.81.5/cl/cl_screen.c
++++ nvi-1.81.5/cl/cl_screen.c
+@@ -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);
+--- nvi-1.81.5/common/db.c
++++ nvi-1.81.5/common/db.c
+@@ -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));
+--- nvi-1.81.5/common/key.c
++++ nvi-1.81.5/common/key.c
+@@ -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);
+ }
+--- nvi-1.81.5/common/mem.h
++++ nvi-1.81.5/common/mem.h
+@@ -25,9 +25,10 @@
+ 		lp = L__bincp;						\
+ 	}								\
+ }
+-#define	BINC_GOTOW(sp, lp, llen, nlen) {					\
+-	CHAR_T *L__bp = lp;						\
+-	BINC_GOTO(sp, (char *)lp, llen, (nlen) * sizeof(CHAR_T))    	\
++#define	BINC_GOTOW(sp, lp, llen, nlen) {				\
++	char *L__bp = (char *) lp;					\
++	BINC_GOTO(sp, L__bp, llen, (nlen) * sizeof(CHAR_T))		\
++	lp = (CHAR_T *) L__bp;						\
+ }
+ #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__bp = (char *) lp;					\
++	BINC_RET(sp, L__bp, llen, (nlen) * sizeof(CHAR_T)) 	   	\
++	lp = (CHAR_T *) L__bp;						\
+ }
+ 
+ /*
+@@ -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, bp, blen, (nlen) * sizeof(CHAR_T))		\
++	bp = (CHAR_T *) L__bp;						\
+ }
+ 
+ /* Free a GET_SPACE returned buffer. */
+--- nvi-1.81.5/vi/v_txt.c
++++ nvi-1.81.5/vi/v_txt.c
+@@ -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 = (char *) vip->rep;
++		BINC_GOTO(sp, rep,
+ 		    vip->rep_len, (rcol + 1) * sizeof(EVENT));
++		vip->rep = (EVENT *) rep;
+ 		vip->rep[rcol++] = *evp;
+ 	}
+ 
================================================================


More information about the pld-cvs-commit mailing list