tech-userlevel archive

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

Re: nvi i18n



Hi,

> i found following patch make all good for wcwidth > 1 character.

> any comments?

That looks good to me.  We could also reduce the HAVE_WCHAR differences
with the following.

Thanks,

J

  - - 8< - - - - - - - - - - - - - Cut here - - - - - - - - - - - - - >8 - -
--- /usr/src/lib/libcurses/cr_put.c     2007-05-29 07:07:52.000000000 +0100
+++ cr_put.c    2008-06-18 14:28:24.000000000 +0100
@@ -402,16 +402,11 @@
                        if (plodflg)    /* Avoid a complex calculation. */
                                plodcnt--;
                        else {
-#ifndef HAVE_WCHAR
-                               i = curscr->lines[outline]->line[outcol].ch
-                                   & __CHARTEXT;
                                if (curscr->lines[outline]->line[outcol].attr
-                                   == curscr->wattr)
-                                       __cputchar(i);
+                                   == curscr->wattr) {
+#ifndef HAVE_WCHAR
+                                       
__cputchar(curscr->lines[outline]->line[outcol].ch & __CHARTEXT);
 #else
-                               if ((curscr->lines[outline]->line[outcol].attr
-                                   & WA_ATTRIBUTES)
-                                   == curscr->wattr ) {
                                        if 
(WCOL(curscr->lines[outline]->line[outcol]) > 0) {
                                                
__cputwchar(curscr->lines[outline]->line[outcol].ch);
                                                
__cursesi_putnsp(curscr->lines[outline]->line[outcol].nsp,
@@ -426,9 +421,8 @@
                                                    
curscr->lines[outline]->line[outcol].ch);
 #endif /* DEBUG */
                                        }
-                               }
 #endif /* HAVE_WCHAR */
-                               else
+                               } else
                                        goto nondes;
                        }
                else
  - - 8< - - - - - - - - - - - - - Cut here - - - - - - - - - - - - - >8 - -

-- 
  My other computer also runs NetBSD    /        Sailing at Newbiggin
        http://www.netbsd.org/        /   http://www.newbigginsailingclub.org/


Home | Main Index | Thread Index | Old Index