Print this page
2964 need POSIX 2008 locale object support

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/port/locale/wcwidth.c
          +++ new/usr/src/lib/libc/port/locale/wcwidth.c
↓ open down ↓ 57 lines elided ↑ open up ↑
  58   58          x = ((wc < 0 || wc >= _CACHED_RUNES) ? ___runetype(wc) :
  59   59              _CurrentRuneLocale->__runetype[wc]) & (_CTYPE_SWM|_CTYPE_R);
  60   60  
  61   61          if ((x & _CTYPE_SWM) != 0)
  62   62                  return ((x & _CTYPE_SWM) >> _CTYPE_SWS);
  63   63          return ((x & _CTYPE_R) != 0 ? 1 : -1);
  64   64  }
  65   65  
  66   66  #pragma weak _scrwidth = scrwidth
  67   67  
       68 +int
       69 +wcwidth(wchar_t wc, locale_t locale)
       70 +{
       71 +        /* XXX */
       72 +        return (0);
       73 +}
       74 +
  68   75  /*
  69   76   * This is a Solaris extension.  It never returns a negative width, even for
  70   77   * non-printable characters.  It is used internally by the printf
  71   78   * implementation for %ws.
  72   79   */
  73   80  int
  74   81  scrwidth(wchar_t wc)
  75   82  {
  76   83          int     v = wcwidth(wc);
  77   84          return (v > 0 ? v : 0);
  78   85  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX