[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Corrections for 20020901
From: |
Philippe Blain |
Subject: |
Corrections for 20020901 |
Date: |
Tue, 3 Sep 2002 06:04:00 +0200 |
>From Philippe Blain, Bordeaux, FRANCE.
My old computer: P133 - 8,4 Go - 32 Mo Red Hat Linux 7.0
To maintainers of 'ncurses'.(and to Mr Dickey)
Subject: Corrections for ncurses-5.2-20020901+
Here are some problems I found :
----------------------------------------------------------------------------
----
File : ncurses/tinfo/comp_err.c
Function _nc_set_type() :
Here, good correction was :
if (termtype == 0) termtype = typeMalloc(char, MAX_NAME_SIZE + 1);
----------------------------------------------------------------------------
----
File : ncurses/base/lib_screen.c
Function : getwin()
Missing :
........
==> nwin->_notimeout = tmp._notimeout;
==> nwin->_idcok = tmp._idcok;
==> nwin->_idlok = tmp._idlok;
........
----------------------------------------------------------------------------
----
File : ncurses/base/lib_screen.c
Function : putwin()
Change chtype to NCURSES_CH_T,
push 'len' out of the for(...) loop :
........
==> len = (win->_maxx + 1);
for (n = 0; n <= win->_maxy; n++) {
==> if (fwrite(win->_line[n].text, sizeof(NCURSES_CH_T), len, filep) !=
len
|| ferror(filep))
returnCode(code);
}
----------------------------------------------------------------------------
----
File : ncurses/base/lib_window.c
Function : dupwin()
Missing :
........
==> nwin->_notimeout = win->._notimeout;
==> nwin->_idcok = win->._idcok;
==> nwin->_idlok = win->._idlok;
........
----------------------------------------------------------------------------
----
File : ncurses/base/lib_tparm.c
No need to conserve the not-inlined function 'really_get_space()'.
Incorporate directly in the inlined 'get_space()' for speed.
Function parse_format() :
Assignement of width and prec (precision) are inverted.
['width' contains the true precision value, and 'prec' the true width value]
No consequences, because maximum is returned in 'len'.
............
case '.':
*format++ = *s++;
if (dot) {
err = TRUE;
}
else {
dot = TRUE;
==> prec = value; // should be width
}
value = 0;
break;
............
if (dot)
==> width = value; // should be prec
else
==> prec = value; // should be width
*format = '\0';
/* return maximum string length in print */
*len = (prec > width) ? prec : width;
return s;
}
Function tparam_internal() [lines 394 to 473]:
According to the text :
* ............................... We will only accept string parameters
* if they appear as a %l or %s format following an explicit parameter
* reference (e.g., %p2%s). .................................
A positive 'lastpop' variable indicates that a parameter reference has just
been
decoded. And in all other cases, we should have a line 'lastpop = -1;'
Think that line is missing for
case 'P': case 'g':
case L_BRACE:
default :
Rectify 'number' of pops (if termcap used) :
Add [line 428]
case 'P':
==> number++;
case 'g':
Modify [line 458]
............
case '>':
lastpop = -1;
number += 2;
break;
case '!':
case '~':
lastpop = -1;
==> number++; // only one pop for these cases
break;
----------------------------------------------------------------------------
----
- Philippe
- Corrections for 20020901,
Philippe Blain <=