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

Diff for /mandoc/mdoc_term.c between version 1.237 and 1.238

version 1.237, 2011/11/03 20:36:59 version 1.238, 2011/11/13 13:15:14
Line 34 
Line 34 
 #include "mdoc.h"  #include "mdoc.h"
 #include "main.h"  #include "main.h"
   
 #define INDENT            5  
 #define HALFINDENT        3  
   
 struct  termpair {  struct  termpair {
         struct termpair  *ppair;          struct termpair  *ppair;
         int               count;          int               count;
Line 259  terminal_mdoc(void *arg, const struct mdoc *mdoc)
Line 256  terminal_mdoc(void *arg, const struct mdoc *mdoc)
   
         p = (struct termp *)arg;          p = (struct termp *)arg;
   
           if (0 == p->defindent)
                   p->defindent = 5;
   
         p->overstep = 0;          p->overstep = 0;
         p->maxrmargin = p->defrmargin;          p->maxrmargin = p->defrmargin;
         p->tabwidth = term_len(p, 5);          p->tabwidth = term_len(p, 5);
Line 562  a2offs(const struct termp *p, const char *v)
Line 562  a2offs(const struct termp *p, const char *v)
         else if (0 == strcmp(v, "left"))          else if (0 == strcmp(v, "left"))
                 return(0);                  return(0);
         else if (0 == strcmp(v, "indent"))          else if (0 == strcmp(v, "indent"))
                 return(term_len(p, INDENT + 1));                  return(term_len(p, p->defindent + 1));
         else if (0 == strcmp(v, "indent-two"))          else if (0 == strcmp(v, "indent-two"))
                 return(term_len(p, (INDENT + 1) * 2));                  return(term_len(p, (p->defindent + 1) * 2));
         else if ( ! a2roffsu(v, &su, SCALE_MAX))          else if ( ! a2roffsu(v, &su, SCALE_MAX))
                 SCALE_HS_INIT(&su, term_strlen(p, v));                  SCALE_HS_INIT(&su, term_strlen(p, v));
   
Line 1424  termp_sh_pre(DECL_ARGS)
Line 1424  termp_sh_pre(DECL_ARGS)
                 term_fontpush(p, TERMFONT_BOLD);                  term_fontpush(p, TERMFONT_BOLD);
                 break;                  break;
         case (MDOC_BODY):          case (MDOC_BODY):
                 p->offset = term_len(p, INDENT);                  p->offset = term_len(p, p->defindent);
                 break;                  break;
         default:          default:
                 break;                  break;
Line 1492  termp_d1_pre(DECL_ARGS)
Line 1492  termp_d1_pre(DECL_ARGS)
         if (MDOC_BLOCK != n->type)          if (MDOC_BLOCK != n->type)
                 return(1);                  return(1);
         term_newln(p);          term_newln(p);
         p->offset += term_len(p, (INDENT + 1));          p->offset += term_len(p, p->defindent + 1);
         return(1);          return(1);
 }  }
   
Line 1797  termp_ss_pre(DECL_ARGS)
Line 1797  termp_ss_pre(DECL_ARGS)
                 break;                  break;
         case (MDOC_HEAD):          case (MDOC_HEAD):
                 term_fontpush(p, TERMFONT_BOLD);                  term_fontpush(p, TERMFONT_BOLD);
                 p->offset = term_len(p, HALFINDENT);                  p->offset = term_len(p, (p->defindent+1)/2);
                 break;                  break;
         default:          default:
                 break;                  break;

Legend:
Removed from v.1.237  
changed lines
  Added in v.1.238

CVSweb