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

Diff for /mandoc/term.c between version 1.28 and 1.29

version 1.28, 2009/02/28 19:15:28 version 1.29, 2009/02/28 20:13:06
Line 25 
Line 25 
   
 #include "term.h"  #include "term.h"
   
 #define INDENT            8  #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 174  const struct termact __termacts[MDOC_MAX] = {
Line 174  const struct termact __termacts[MDOC_MAX] = {
         { termp_ss_pre, termp_ss_post }, /* Ss */          { termp_ss_pre, termp_ss_post }, /* Ss */
         { termp_pp_pre, NULL }, /* Pp */          { termp_pp_pre, NULL }, /* Pp */
         { termp_d1_pre, termp_d1_post }, /* D1 */          { termp_d1_pre, termp_d1_post }, /* D1 */
         { NULL, NULL }, /* Dl */          { termp_d1_pre, termp_d1_post }, /* Dl */
         { termp_bd_pre, termp_bd_post }, /* Bd */          { termp_bd_pre, termp_bd_post }, /* Bd */
         { NULL, NULL }, /* Ed */          { NULL, NULL }, /* Ed */
         { NULL, termp_bl_post }, /* Bl */          { NULL, termp_bl_post }, /* Bl */
Line 208  const struct termact __termacts[MDOC_MAX] = {
Line 208  const struct termact __termacts[MDOC_MAX] = {
         { termp_vt_pre, termp_vt_post }, /* Vt */          { termp_vt_pre, termp_vt_post }, /* Vt */
         { termp_xr_pre, NULL }, /* Xr */          { termp_xr_pre, NULL }, /* Xr */
         { NULL, termp____post }, /* %A */          { NULL, termp____post }, /* %A */
         { NULL, NULL }, /* %B */          { NULL, termp____post }, /* %B */
         { NULL, termp____post }, /* %D */          { NULL, termp____post }, /* %D */
         { NULL, NULL }, /* %I */          { NULL, termp____post }, /* %I */
         { NULL, termp____post }, /* %J */          { NULL, termp____post }, /* %J */
         { NULL, NULL }, /* %N */          { NULL, termp____post }, /* %N */
         { NULL, NULL }, /* %O */          { NULL, termp____post }, /* %O */
         { NULL, NULL }, /* %P */          { NULL, termp____post }, /* %P */
         { NULL, NULL }, /* %R */          { NULL, termp____post }, /* %R */
         { termp__t_pre, termp__t_post }, /* %T */          { termp__t_pre, termp__t_post }, /* %T */
         { NULL, NULL }, /* %V */          { NULL, termp____post }, /* %V */
         { NULL, NULL }, /* Ac */          { NULL, NULL }, /* Ac */
         { termp_aq_pre, termp_aq_post }, /* Ao */          { termp_aq_pre, termp_aq_post }, /* Ao */
         { termp_aq_pre, termp_aq_post }, /* Aq */          { termp_aq_pre, termp_aq_post }, /* Aq */
Line 303  arg_width(const struct mdoc_arg *arg)
Line 303  arg_width(const struct mdoc_arg *arg)
                 }                  }
   
         }          }
         return(strlen(*arg->value) + 1);          return(strlen(*arg->value) + 2);
 }  }
   
   
Line 395  termp_it_pre(DECL_ARGS)
Line 395  termp_it_pre(DECL_ARGS)
         bl = &n->data.block;          bl = &n->data.block;
   
         if (MDOC_BLOCK == node->type) {          if (MDOC_BLOCK == node->type) {
                 if (arg_hasattr(MDOC_Compact, bl->argc, bl->argv))                  newln(p);
                         newln(p);                  if ( ! arg_hasattr(MDOC_Compact, bl->argc, bl->argv))
                 else                          if (node->prev || n->prev)
                         vspace(p);                                  vspace(p);
                 return(1);                  return(1);
         }          }
   
Line 563  static int
Line 563  static int
 termp_nm_pre(DECL_ARGS)  termp_nm_pre(DECL_ARGS)
 {  {
   
           if (SEC_SYNOPSIS == node->sec)
                   newln(p);
   
         TERMPAIR_SETFLAG(pair, ttypes[TTYPE_PROG]);          TERMPAIR_SETFLAG(pair, ttypes[TTYPE_PROG]);
         if (NULL == node->child)          if (NULL == node->child)
                 word(p, meta->name);                  word(p, meta->name);
Line 587  static int
Line 590  static int
 termp_ar_pre(DECL_ARGS)  termp_ar_pre(DECL_ARGS)
 {  {
   
         TERMPAIR_SETFLAG(pair, ttypes[TTYPE_CMD_ARG]);          if (node->child) {
         if (NULL == node->child)                  TERMPAIR_SETFLAG(pair, ttypes[TTYPE_CMD_ARG]);
                 word(p, "...");                  return(1);
           }
           p->flags |= ttypes[TTYPE_CMD_ARG];
           word(p, "file");
           word(p, "...");
           p->flags &= ~ttypes[TTYPE_CMD_ARG];
         return(1);          return(1);
 }  }
   

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

CVSweb