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

Diff for /mandoc/Attic/mlg.c between version 1.23 and 1.24

version 1.23, 2008/12/09 17:09:12 version 1.24, 2008/12/10 00:52:46
Line 24 
Line 24 
 #include <stdio.h>  #include <stdio.h>
 #include <string.h>  #include <string.h>
   
 #include "private.h"  
 #include "ml.h"  #include "ml.h"
   
 /* TODO: literal tokens. */  /* TODO: literal tokens. */
   
 #define COLUMNS           72  
 #define INDENT            4  
 #define MAXINDENT         10  
   
 enum    md_tok {  enum    md_tok {
         MD_TEXT,          MD_TEXT,
         MD_INLINE_IN,          MD_INLINE_IN,
Line 239  mlg_endtag(struct md_mlg *p, enum md_ns ns, int tok)
Line 234  mlg_endtag(struct md_mlg *p, enum md_ns ns, int tok)
 static int  static int
 mlg_indent(struct md_mlg *p)  mlg_indent(struct md_mlg *p)
 {  {
         size_t           count;  
   
         count = p->indent > MAXINDENT ?  
                 (size_t)MAXINDENT : p->indent;  
         count *= INDENT;  
   
         assert(0 == p->pos);          assert(0 == p->pos);
         return(ml_putchars(p->mbuf, ' ', count, &p->pos));          return(ml_putchars(p->mbuf, ' ', INDENT_SZ *
                                   INDENT(p->indent), &p->pos));
 }  }
   
   
Line 325  mlg_data(struct md_mlg *p, int space, 
Line 316  mlg_data(struct md_mlg *p, int space, 
                 if ( ! mlg_nstring(p, start, buf, sz))                  if ( ! mlg_nstring(p, start, buf, sz))
                         return(0);                          return(0);
   
                 if (p->indent * INDENT + sz >= COLUMNS)                  if (INDENT(p->indent) * INDENT_SZ + sz >= COLUMNS)
                         if ( ! mlg_newline(p))                          if ( ! mlg_newline(p))
                                 return(0);                                  return(0);
   

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

CVSweb