[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with ncurses-5.2-20010603.patch.gz
From: |
Sven Verdoolaege |
Subject: |
Re: Problems with ncurses-5.2-20010603.patch.gz |
Date: |
Tue, 5 Jun 2001 11:55:54 +0200 |
User-agent: |
Mutt/1.3.17i |
On Mon, Jun 04, 2001 at 02:50:03PM -0400, Larry W. Virden wrote:
> "/volws/lwv26/ldatae/gnu/ncurses-5.2/ncurses/base/lib_addch.c", line 245:
> non-constant initializer: op "U*"
It seem gcc spoiled me.
skimo
--- ./ncurses/base/lib_addch.c.orig Tue Jun 5 11:36:41 2001
+++ ./ncurses/base/lib_addch.c Tue Jun 5 11:39:23 2001
@@ -242,7 +242,8 @@
break;
default:
while (*s) {
- NCURSES_CH_T sch = NewChar2(*s++, AttrOf(ch));
+ NCURSES_CH_T sch;
+ SetChar(sch, *s++, AttrOf(ch));
if (waddch_literal(win, sch) == ERR)
return ERR;
}
@@ -293,7 +294,8 @@
waddch(WINDOW *win, const chtype ch)
{
int code = ERR;
- NCURSES_CH_T wch = NewChar(ch);
+ NCURSES_CH_T wch;
+ SetChar2(wch,ch);
TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("waddch(%p, %s)"), win,
_tracechtype(ch)));
@@ -311,7 +313,8 @@
wechochar(WINDOW *win, const chtype ch)
{
int code = ERR;
- NCURSES_CH_T wch = NewChar(ch);
+ NCURSES_CH_T wch;
+ SetChar2(wch, ch);
TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"), win,
_tracechtype(ch)));
--- ./ncurses/base/lib_addstr.c.orig Tue Jun 5 11:39:59 2001
+++ ./ncurses/base/lib_addstr.c Tue Jun 5 11:40:44 2001
@@ -156,7 +156,8 @@
n = (int) wcslen(str);
while ((n-- > 0) && (*str != '\0')) {
- NCURSES_CH_T ch = NewChar2(*str++, A_NORMAL);
+ NCURSES_CH_T ch;
+ SetChar(ch, *str++, A_NORMAL);
TR(TRACE_VIRTPUT, ("*str = %#x", *str));
if (_nc_waddch_nosync(win, ch) == ERR) {
code = ERR;
--- ./ncurses/base/lib_bkgd.c.orig Tue Jun 5 11:41:31 2001
+++ ./ncurses/base/lib_bkgd.c Tue Jun 5 11:41:46 2001
@@ -62,7 +62,8 @@
NCURSES_EXPORT(void)
wbkgdset(WINDOW *win, chtype ch)
{
- NCURSES_CH_T wch = NewChar(ch);
+ NCURSES_CH_T wch;
+ SetChar2(wch, ch);
wbkgrndset(win, CHREF(wch));
}
@@ -108,7 +109,8 @@
NCURSES_EXPORT(int)
wbkgd(WINDOW *win, const chtype ch)
{
- NCURSES_CH_T wch = NewChar(ch);
+ NCURSES_CH_T wch;
+ SetChar2(wch, ch);
return wbkgrnd(win, CHREF(wch));
}
--- ./ncurses/base/lib_box.c.orig Tue Jun 5 11:42:42 2001
+++ ./ncurses/base/lib_box.c Tue Jun 5 11:43:33 2001
@@ -115,7 +115,7 @@
}
#define WIDEVAR(v) \
- NCURSES_CH_T w ## v = NewChar(v)
+ SetChar2(w ## v,v)
#define WIDEPASS(v) \
(v ? CHREF(w ## v) : (ARG_CH_T) 0)
@@ -124,6 +124,7 @@
chtype ls, chtype rs, chtype ts, chtype bs,
chtype tl, chtype tr, chtype bl, chtype br)
{
+ NCURSES_CH_T wls, wrs, wts, wbs, wtl, wtr, wbl, wbr;
WIDEVAR(ls);
WIDEVAR(rs);
WIDEVAR(ts);
--- ./ncurses/base/lib_insch.c.orig Tue Jun 5 11:44:32 2001
+++ ./ncurses/base/lib_insch.c Tue Jun 5 11:44:25 2001
@@ -54,7 +54,8 @@
NCURSES_CH_T *end = &(line->text[win->_curx]);
NCURSES_CH_T *temp1 = &(line->text[win->_maxx]);
NCURSES_CH_T *temp2 = temp1 - 1;
- NCURSES_CH_T wch = NewChar(c);
+ NCURSES_CH_T wch;
+ SetChar2(wch,c);
CHANGED_TO_EOL(line, win->_curx, win->_maxx);
while (temp1 > end)
--- ./ncurses/base/lib_insstr.c.orig Tue Jun 5 11:44:46 2001
+++ ./ncurses/base/lib_insstr.c Tue Jun 5 11:44:55 2001
@@ -59,7 +59,8 @@
ox = win->_curx;
for (cp = str; *cp && (n <= 0 || (cp - str) < n); cp++) {
if (*cp == '\n' || *cp == '\r' || *cp == '\t' || *cp == '\b') {
- NCURSES_CH_T wch = NewChar(*cp);
+ NCURSES_CH_T wch;
+ SetChar2(wch, *cp);
_nc_waddch_nosync(win, wch);
} else if (is7bits(*cp) && iscntrl(*cp)) {
winsch(win, ' ' + (chtype) (*cp));
--- ./ncurses/curses.priv.h.orig Tue Jun 5 11:38:20 2001
+++ ./ncurses/curses.priv.h Tue Jun 5 11:51:10 2001
@@ -516,8 +516,8 @@
#define NewChar2(c,a) { a, { c } }
#define CharEq(a,b) (!memcmp(&a, &b, sizeof(a)))
#define SetChar(ch,c,a) do {
\
- NCURSES_CH_T *cp = &ch;
\
- memset(cp,0,sizeof(ch)); cp->chars[0] = c; cp->attr
= a; \
+ NCURSES_CH_T *_cp = &ch;
\
+ memset(_cp,0,sizeof(ch)); _cp->chars[0] = c;
_cp->attr = a; \
} while (0)
#define CHREF(wch) (&wch)
#define CHDEREF(wch) (*wch)
@@ -567,6 +567,7 @@
#define AttrOfD(ch) AttrOf(CHDEREF(ch))
#define CharOfD(ch) CharOf(CHDEREF(ch))
+#define SetChar2(wch,ch) SetChar(wch,ChCharOf(ch),ChAttrOf(ch))
#define BLANK_ATTR A_NORMAL
#define BLANK_TEXT L(' ')