bug-ncurses
[Top][All Lists]
Advanced

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

Corrections for 20030726


From: Philippe Blain
Subject: Corrections for 20030726
Date: Fri, 1 Aug 2003 07:08:57 +0200

>From Philippe Blain, Bordeaux, France.
My antique computer: P133 - 8,4 Go - 32 Mo Red Hat Linux 7.0

Subject: Corrections for ncurses-5.3-20030726+

1-----------------------------------------------------------------------
File : ncurses/base/tty_update.c

Function _nc_scrolln()
At lines 1715, 1750, 1761, 'change_scroll_region' has a padding NOT
proportionnal to the number of lines affected.
Should be :

        putp(tparm(change_scroll_region, XXX, YYY));

2-----------------------------------------------------------------------
File : ncurses/tinfo/strings.c

In _nc_safe_strcat(), s_size is decremented even if s_tail is NULL, and
src not copied.  Should be :

NCURSES_EXPORT (bool)
_nc_safe_strcat (string_desc * dst, const char *src)
{
    if (src != 0) {
        size_t len = strlen (src);

        if (len < dst->s_size) {
            if (dst->s_tail != 0) {
                strcpy (dst->s_tail, src);
                dst->s_tail += len;
==>             dst->s_size -= len;
==>             return TRUE;
==>         }
        }
    }
    return FALSE;
}

3-----------------------------------------------------------------------
File : ncurses/curses.priv.h

macro InsCharCost()
The cost returned is not exact (based on InsStr()).  Should be :

#define InsCharCost(count) \
        ((parm_ich) ? SP->_ich_cost \
        : ((enter_insert_mode && exit_insert_mode) \
          ? SP->_smir_cost + SP->_rmir_cost + (SP->_ip_cost * count) \
==>     : ((insert_character) ? ((SP->_ich1_cost + SP->_ip_cost) * count) \
        : INFINITY)))

Same thing in     ncurses/tty/tty_display.h

NOTE that ncurses does not use the capabilities
 smdc/rmdc (enter/exit delete mode) in DelChar() like
 smir/rmir (enter/exit insert mode) used in InsStr().

------------------------------------------------------------------------
- Philippe






reply via email to

[Prev in Thread] Current Thread [Next in Thread]