On Sun, Apr 03, 2011 at 11:41:47PM +0100, Nicholas Marriott wrote: > Again so it is a cchar_t so I'm not sure it is valid for it to be > nonprintable but this doesn't do any harm. > > Might want to run this stuff past upstream first though? It is better if > we stay in sync if they do want to take it.
Now that you've pointed it out I think it's pretty obvious that upstream is using their cchar_t to avoid such issues in the first place. So I don't think we'll need this diff either. > > > On Sun, Apr 03, 2011 at 11:51:53PM +0200, Stefan Sperling wrote: > > Some callers of myWCWIDTH(), a macro alias for cell_width(), > > won't cope with -1. > > > > Index: frm_driver.c > > =================================================================== > > RCS file: /cvs/src/lib/libform/frm_driver.c,v > > retrieving revision 1.10 > > diff -u -p -r1.10 frm_driver.c > > --- frm_driver.c 18 Jan 2011 18:57:51 -0000 1.10 > > +++ frm_driver.c 3 Apr 2011 21:48:02 -0000 > > @@ -322,7 +322,7 @@ cell_width(WINDOW *win, int y, int x) > > result = wcwidth(CharOf(CHDEREF(data))); > > } > > } > > - return result; > > + return result == -1 ? 0 : result; > > } > > > > /*