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

Diff for /mandoc/term.c between version 1.25 and 1.27

version 1.25, 2009/02/26 16:08:11 version 1.27, 2009/02/27 09:39:40
Line 25 
Line 25 
   
 #include "term.h"  #include "term.h"
   
 #define INDENT            4  #define INDENT            6
   
 /*  /*
  * Performs actions on nodes of the abstract syntax tree.  Both pre- and   * Performs actions on nodes of the abstract syntax tree.  Both pre- and
Line 277  const struct termact *termacts = __termacts;
Line 277  const struct termact *termacts = __termacts;
 static size_t  static size_t
 arg_width(const struct mdoc_arg *arg)  arg_width(const struct mdoc_arg *arg)
 {  {
         size_t           len, i, v;          size_t           v;
           int              i, len;
   
         /* TODO */  
         assert(*arg->value);          assert(*arg->value);
         if (0 == strcmp(*arg->value, "indent"))          if (0 == strcmp(*arg->value, "indent"))
                 return(INDENT);                  return(INDENT);
         if (0 == strcmp(*arg->value, "indent-two"))          if (0 == strcmp(*arg->value, "indent-two"))
                 return(INDENT * 2);                  return(INDENT * 2);
   
         len = strlen(*arg->value);          len = (int)strlen(*arg->value);
         assert(len > 0);          assert(len > 0);
   
         for (i = 0; i < len - 1; i++)          for (i = 0; i < len - 1; i++)
Line 1330  termp_bq_pre(DECL_ARGS)
Line 1330  termp_bq_pre(DECL_ARGS)
   
         if (MDOC_BODY != node->type)          if (MDOC_BODY != node->type)
                 return(1);                  return(1);
         word(p, "[");          word(p, "\\[");
         p->flags |= TERMP_NOSPACE;          p->flags |= TERMP_NOSPACE;
         return(1);          return(1);
 }  }
Line 1354  termp_pq_pre(DECL_ARGS)
Line 1354  termp_pq_pre(DECL_ARGS)
   
         if (MDOC_BODY != node->type)          if (MDOC_BODY != node->type)
                 return(1);                  return(1);
         word(p, "(");          word(p, "\\&(");
         p->flags |= TERMP_NOSPACE;          p->flags |= TERMP_NOSPACE;
         return(1);          return(1);
 }  }

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.27

CVSweb