source: scripts/patches/ncurses-5.5-fixes-1.patch @ 63b3dd5

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 63b3dd5 was 63b3dd5, checked in by Jim Gifford <clfs@…>, 18 years ago

r2508@server (orig r1247): ryan | 2006-03-10 02:07:51 -0800

r1297@rei: lfs | 2006-03-09 18:43:59 +1100
Add ncurses-5.5-fixes-1.patch
-----------------------------
Submitted by: Alexander E. Patrakov
Date: 2005-12-07
Initial Package Version: 5.5
Upstream Status: Backport
Origin: Cherry-picked from ftp://invisible-island.net/ncurses/5.5/*.gz
Description: Fixes the following bugs:




  • Property mode set to 100644
File size: 8.0 KB
  • ncurses/base/MKkeyname.awk

    Submitted by: Alexander E. Patrakov
    Date: 2005-12-07
    Initial Package Version: 5.5
    Upstream Status: Backport
    Origin: Cherry-picked from ftp://invisible-island.net/ncurses/5.5/*.gz
    Description: Fixes the following bugs:
    
    * memory leak in keyname()
    * mishandling of overlapped wide characters, http://bugs.debian.org/316663
    * problems with line-drawing characters on cygwin, http://bugs.debian.org/338234
    * mishandling of EINTR in tcgetattr/tcsetattr, http://bugs.debian.org/339518
    * mishandling of single-column multibyte characters, http://bugs.debian.org/341661
    
    old new  
    9797        print "                                         break;"
    9898        print "                                 }"
    9999        print "                         }"
     100        print "                         free(bound);"
    100101        print "                         if (result != 0)"
    101102        print "                                 break;"
    102103        print "                 }"
  • ncurses/base/lib_addch.c

    old new  
    315315             * setup though.
    316316             */
    317317            for (i = 0; i < len; ++i) {
    318                 if (isWidecBase(win->_line[y].text[i])) {
     318                if (isWidecBase(win->_line[y].text[x + i])) {
    319319                    break;
    320320                } else if (isWidecExt(win->_line[y].text[x + i])) {
    321321                    for (j = i; x + j <= win->_maxx; ++j) {
     
    334334            for (i = 0; i < len; ++i) {
    335335                NCURSES_CH_T value = ch;
    336336                SetWidecExt(value, i);
    337                 TR(TRACE_VIRTPUT, ("multicolumn %d:%d", i + 1, len));
     337                TR(TRACE_VIRTPUT, ("multicolumn %d:%d (%d,%d)",
     338                                   i + 1, len,
     339                                   win->_begy + y, win->_begx + x));
    338340                line->text[x] = value;
    339341                CHANGED_CELL(line, x);
    340342                ++x;
  • ncurses/base/lib_bkgd.c

    old new  
    131131
    132132        for (y = 0; y <= win->_maxy; y++) {
    133133            for (x = 0; x <= win->_maxx; x++) {
    134                 if (CharEq(win->_line[y].text[x], old_bkgrnd))
     134                if (CharEq(win->_line[y].text[x], old_bkgrnd)) {
    135135                    win->_line[y].text[x] = win->_nc_bkgd;
    136                 else {
     136                } else {
    137137                    NCURSES_CH_T wch = win->_line[y].text[x];
    138                     RemAttr(wch, (~A_ALTCHARSET));
     138                    RemAttr(wch, (~(A_ALTCHARSET | A_CHARTEXT)));
    139139                    win->_line[y].text[x] = _nc_render(win, wch);
    140140                }
    141141            }
  • ncurses/base/lib_erase.c

    old new  
    5859            start = win->_line[y].text;
    5960            end = &start[win->_maxx];
    6061
     62            /*
     63             * If this is a derived window, we have to handle the case where
     64             * a multicolumn character extends into the window that we are
     65             * erasing.
     66             */
     67            if_WIDEC({
     68                if (isWidecExt(start[0])) {
     69                    int x = (win->_parent != 0) ? (win->_begx) : 0;
     70                    while (x-- > 0) {
     71                        if (isWidecBase(start[-1])) {
     72                            --start;
     73                            break;
     74                        }
     75                        --start;
     76                    }
     77                }
     78            });
     79
    6180            for (sp = start; sp <= end; sp++)
    6281                *sp = blank;
    6382
  • misc/terminfo.src

    old new  
    47314731#   civis [make cursor invisible] causes everything to stackdump? \E[?25l\E[?1c
    47324732#   ech   [erase characters param] broken \E[%p1%dX
    47334733#   kcbt  [back-tab key] not implemented in cygwin?  \E[Z
     4734#
     4735# 2005/11/12 -TD
     4736#       Remove cbt since it does not work in current cygwin
     4737#       Add 'mir' and 'in' flags based on tack
    47344738cygwin|ansi emulation for Cygwin,
    4735         am, hs, in, msgr, xon,
     4739        am, hs, mir, msgr, xon,
    47364740        colors#8, it#8, pairs#64,
    47374741        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
    4738         bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, cr=^M,
    4739         cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
    4740         cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
    4741         cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
    4742         dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, fsl=^G,
    4743         home=\E[H, hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@,
    4744         ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m,
    4745         kb2=\E[G, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C,
    4746         kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A,
    4747         kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
    4748         kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
    4749         kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~,
    4750         kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~,
    4751         kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~,
    4752         knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, op=\E[39;49m,
    4753         rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m,
    4754         rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmpch=\E[10m,
    4755         rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7,
    4756         setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
     4742        bel=^G, bold=\E[1m, clear=\E[H\E[J, cr=^M, cub=\E[%p1%dD,
     4743        cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC,
     4744        cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA,
     4745        cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
     4746        dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, fsl=^G, home=\E[H,
     4747        hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, ich1=\E[@,
     4748        il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, kb2=\E[G,
     4749        kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
     4750        kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, kf10=\E[21~,
     4751        kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
     4752        kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~,
     4753        kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D,
     4754        kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
     4755        khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kspd=^Z,
     4756        nel=^M^J, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
     4757        rmacs=\E[10m, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l,
     4758        rmpch=\E[10m, rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R,
     4759        sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
    47574760        sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
    4758         sgr0=\E[0;10m, smacs=\E11m, smcup=\E7\E[?47h, smir=\E[4h,
    4759         smpch=\E[11m, smso=\E[7m, smul=\E[4m, tsl=\E];,
     4761        sgr0=\E[0;10m, smacs=\E[11m, smcup=\E7\E[?47h,
     4762        smir=\E[4h, smpch=\E[11m, smso=\E[7m, smul=\E[4m, tsl=\E];,
    47604763        u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c,
    47614764        vpa=\E[%i%p1%dd,
    47624765
  • ncurses/tinfo/lib_ttyflags.c

    old new  
    5959NCURSES_EXPORT(int)
    6060_nc_get_tty_mode(TTY * buf)
    6161{
    62     if (cur_term == 0
    63         || GET_TTY(cur_term->Filedes, buf) != 0) {
    64         memset(buf, 0, sizeof(*buf));
    65         return (ERR);
     62    int result = OK;
     63
     64    if (cur_term == 0) {
     65        result = ERR;
     66    } else {
     67        for (;;) {
     68            if (GET_TTY(cur_term->Filedes, buf) != 0) {
     69                if (errno == EINTR)
     70                    continue;
     71                result = ERR;
     72            }
     73            break;
     74        }
    6675    }
     76
     77    if (result == ERR)
     78        memset(buf, 0, sizeof(*buf));
     79
    6780    TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s",
    6881                    cur_term->Filedes, _nc_trace_ttymode(buf)));
    69     return (OK);
     82    return (result);
    7083}
    7184
    7285NCURSES_EXPORT(int)
    7386_nc_set_tty_mode(TTY * buf)
    7487{
    75     if (cur_term == 0
    76         || SET_TTY(cur_term->Filedes, buf) != 0) {
    77         if ((errno == ENOTTY) && (SP != 0))
    78             SP->_notty = TRUE;
    79         return (ERR);
     88    int result = OK;
     89
     90    if (cur_term == 0) {
     91        result = ERR;
     92    } else {
     93        for (;;) {
     94            if (SET_TTY(cur_term->Filedes, buf) != 0) {
     95                if (errno == EINTR)
     96                    continue;
     97                if ((errno == ENOTTY) && (SP != 0))
     98                    SP->_notty = TRUE;
     99                result = ERR;
     100            }
     101            break;
     102        }
    80103    }
    81104    TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s",
    82105                    cur_term->Filedes, _nc_trace_ttymode(buf)));
    83     return (OK);
     106    return (result);
    84107}
    85108
    86109NCURSES_EXPORT(int)
  • ncurses/widechar/lib_ins_wch.c

    old new  
    117117            for (cp = wstr; *cp && ((cp - wstr) < n); cp++) {
    118118                int len = wcwidth(*cp);
    119119
    120                 if (len != 1) {
     120                if (len != 1 || !is8bits(*cp)) {
    121121                    cchar_t tmp_cchar;
    122122                    wchar_t tmp_wchar = *cp;
    123123                    memset(&tmp_cchar, 0, sizeof(tmp_cchar));
Note: See TracBrowser for help on using the repository browser.