--- gforth/prim 2008/10/09 16:30:56 1.237 +++ gforth/prim 2009/05/12 16:54:58 1.242 @@ -1662,7 +1662,11 @@ ucols=cols; wcwidth ( u -- n ) gforth ""The number of fixed-width characters per unicode character u"" +#ifdef HAVE_WCWIDTH n = wcwidth(u); +#else +n = 1; +#endif flush-icache ( c_addr u -- ) gforth flush_icache ""Make sure that the instruction cache of the processor (if there is @@ -1694,6 +1698,7 @@ c_addr2 = (Char *)getenv(cstr(c_addr1,u1 u2 = (c_addr2 == NULL ? 0 : strlen((char *)c_addr2)); open-pipe ( c_addr u wfam -- wfileid wior ) gforth open_pipe +fflush(stdout); wfileid=(Cell)popen(cstr(c_addr,u,1),pfileattr[wfam]); /* ~ expansion of 1st arg? */ wior = IOR(wfileid==0); /* !! the man page says that errno is not set reliably */ @@ -2145,6 +2150,7 @@ int flag; int decpt; sig=ecvt(r, u, &decpt, &flag); n=(r==0. ? 1 : decpt); +flag=signbit(r); /* not all ecvt()s do this as desired */ f1=FLAG(flag!=0); f2=FLAG(isdigit((unsigned)(sig[0]))!=0); siglen=strlen((char *)sig);