[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.53

version 1.51, 2015/10/13 22:59:54 version 1.53, 2016/07/08 22:29:05
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;
Line 155  ascii_setwidth(struct termp *p, int iop, int width)
Line 163  ascii_setwidth(struct termp *p, int iop, int width)
 }  }
   
 void  void
 ascii_sepline(void *arg)  terminal_sepline(void *arg)
 {  {
         struct termp    *p;          struct termp    *p;
         size_t           i;          size_t           i;
   
         p = (struct termp *)arg;          p = (struct termp *)arg;
         p->line += 3;          (*p->endline)(p);
         putchar('\n');  
         for (i = 0; i < p->defrmargin; i++)          for (i = 0; i < p->defrmargin; i++)
                 putchar('-');                  (*p->letter)(p, '-');
         putchar('\n');          (*p->endline)(p);
         putchar('\n');          (*p->endline)(p);
 }  }
   
 static size_t  static size_t

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

CVSweb