[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bugs report
From: |
Philippe Blain |
Subject: |
Bugs report |
Date: |
Mon, 29 Jul 2002 06:03:02 +0200 |
>From Philippe Blain, Bordeaux, FRANCE - pblain @ free.fr
My old computer:P133 - 8, 4 Go - 32 Mo Red Hat Linux 7.0
To maintainers of 'ncurses'.(and to Mr Dickey)
Subject: Minor corrections for ncurses-5.2-20020720+
Here are some problems I found:
----------------------------------------------------------------------------
----
File : ncurses/base/lib_pad.c
Think lines 156, 157 should be :
( If 24 x 80 --> lines 0 to 23, columns 0 to 79. )
==> if (smaxrow >= screen_lines
==> || smaxcol >= screen_columns
|| sminrow > smaxrow
|| smincol > smaxcol)
returnCode(ERR);
----------------------------------------------------------------------------
----
File : ncurses/tty/lib_twait.c
Function : _nc_timed_wait(int mode, int milliseconds, int *timeleft)
OK, code is good.
Except for the case :
* If the milliseconds given are -1, the wait blocks until activity on the
* descriptors.
(Used in lib_getch for mouse support)
Conflicts with line 124 :
if (milliseconds < 0) milliseconds = 0; /* make milliseconds POSITIVE
*/
And 124 with line 202 :
if (milliseconds >= 0) {
struct timeval ntimeout;
ntimeout.tv_sec = milliseconds / 1000;
ntimeout.tv_usec = (milliseconds % 1000) * 1000;
result = select (count, &set, NULL, NULL, &ntimeout);
}
else {
/* Infinite timeout but NEVER pass here if select() used */
result = select (count, &set, NULL, NULL, NULL);
}
Also, I wonder if line 124, milliseconds can become NEGATIVE,
when given small values (0, 1 or 2 millis) because of system response time.
if (milliseconds >= 0) milliseconds -= (returntime - starttime);
This would have no consequence, except returning a negative value for time
left.
----------------------------------------------------------------------------
----
- Philippe
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bugs report,
Philippe Blain <=