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

Diff for /mandoc/term.c between version 1.133 and 1.135

version 1.133, 2010/05/12 16:01:01 version 1.135, 2010/05/16 01:35:37
Line 34 
Line 34 
 #include "mdoc.h"  #include "mdoc.h"
 #include "main.h"  #include "main.h"
   
 static  struct termp     *term_alloc(enum termenc);  static  struct termp     *term_alloc(enum termenc, size_t);
 static  void              term_free(struct termp *);  static  void              term_free(struct termp *);
 static  void              spec(struct termp *, const char *, size_t);  static  void              spec(struct termp *, const char *, size_t);
 static  void              res(struct termp *, const char *, size_t);  static  void              res(struct termp *, const char *, size_t);
Line 45  static void    encode(struct termp *, const char *, si
Line 45  static void    encode(struct termp *, const char *, si
   
   
 void *  void *
 ascii_alloc(void)  ascii_alloc(size_t width)
 {  {
   
         return(term_alloc(TERMENC_ASCII));          return(term_alloc(TERMENC_ASCII, width));
 }  }
   
   
Line 74  term_free(struct termp *p)
Line 74  term_free(struct termp *p)
   
   
 static struct termp *  static struct termp *
 term_alloc(enum termenc enc)  term_alloc(enum termenc enc, size_t width)
 {  {
         struct termp *p;          struct termp *p;
   
Line 84  term_alloc(enum termenc enc)
Line 84  term_alloc(enum termenc enc)
                 exit(EXIT_FAILURE);                  exit(EXIT_FAILURE);
         }          }
         p->enc = enc;          p->enc = enc;
           /* Enforce some lower boundary. */
           if (width < 60)
                   width = 60;
           p->defrmargin = width - 2;
         return(p);          return(p);
 }  }
   
Line 229  term_flushln(struct termp *p)
Line 233  term_flushln(struct termp *p)
                 for ( ; i < (int)p->col; i++)                  for ( ; i < (int)p->col; i++)
                         if (' ' == p->buf[i])                          if (' ' == p->buf[i])
                                 break;                                  break;
                         else if (31 == p->buf[i])                          else if (ASCII_NBRSP == p->buf[i])
                                 putchar(' ');                                  putchar(' ');
                         else                          else
                                 putchar(p->buf[i]);                                  putchar(p->buf[i]);

Legend:
Removed from v.1.133  
changed lines
  Added in v.1.135

CVSweb