[BACK]Return to term_ascii.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/term_ascii.c between version 1.51 and 1.52

version 1.51, 2015/10/13 22:59:54 version 1.52, 2015/11/12 21:50:03
Line 88  ascii_init(enum termenc enc, const struct manoutput *o
Line 88  ascii_init(enum termenc enc, const struct manoutput *o
   
 #if HAVE_WCHAR  #if HAVE_WCHAR
         if (TERMENC_ASCII != enc) {          if (TERMENC_ASCII != enc) {
   
                   /*
                    * Do not change any of this to LC_ALL.  It might break
                    * the formatting by subtly changing the behaviour of
                    * various functions, for example strftime(3).  As a
                    * worst case, it might even cause buffer overflows.
                    */
   
                 v = TERMENC_LOCALE == enc ?                  v = TERMENC_LOCALE == enc ?
                     setlocale(LC_ALL, "") :                      setlocale(LC_CTYPE, "") :
                     setlocale(LC_CTYPE, "en_US.UTF-8");                      setlocale(LC_CTYPE, "en_US.UTF-8");
                 if (NULL != v && MB_CUR_MAX > 1) {                  if (NULL != v && MB_CUR_MAX > 1) {
                         p->enc = enc;                          p->enc = enc;

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52

CVSweb