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

Diff for /mandoc/mdoc_man.c between version 1.82 and 1.86

version 1.82, 2015/01/23 14:21:01 version 1.86, 2015/02/11 14:15:12
Line 1006  pre_bl(DECL_ARGS)
Line 1006  pre_bl(DECL_ARGS)
                 return(1);                  return(1);
         }          }
   
         print_line(".TS", MMAN_nl);          if (n->nchild) {
         for (icol = 0; icol < n->norm->Bl.ncols; icol++)                  print_line(".TS", MMAN_nl);
                 print_word("l");                  for (icol = 0; icol < n->norm->Bl.ncols; icol++)
         print_word(".");                          print_word("l");
                   print_word(".");
           }
         outflags |= MMAN_nl;          outflags |= MMAN_nl;
         return(1);          return(1);
 }  }
Line 1020  post_bl(DECL_ARGS)
Line 1022  post_bl(DECL_ARGS)
   
         switch (n->norm->Bl.type) {          switch (n->norm->Bl.type) {
         case LIST_column:          case LIST_column:
                 print_line(".TE", 0);                  if (n->nchild)
                           print_line(".TE", 0);
                 break;                  break;
         case LIST_enum:          case LIST_enum:
                 n->norm->Bl.count = 0;                  n->norm->Bl.count = 0;
Line 1131  static int
Line 1134  static int
 pre_eo(DECL_ARGS)  pre_eo(DECL_ARGS)
 {  {
   
         outflags &= ~(MMAN_spc | MMAN_nl);          if (n->end == ENDBODY_NOT &&
               n->parent->head->child == NULL &&
               n->child != NULL &&
               n->child->end != ENDBODY_NOT)
                   print_word("\\&");
           else if (n->end != ENDBODY_NOT ? n->child != NULL :
               n->parent->head->child != NULL && (n->child != NULL ||
               (n->parent->tail != NULL && n->parent->tail->child != NULL)))
                   outflags &= ~(MMAN_spc | MMAN_nl);
         return(1);          return(1);
 }  }
   
 static void  static void
 post_eo(DECL_ARGS)  post_eo(DECL_ARGS)
 {  {
           int      body, tail;
   
         if (n->end != ENDBODY_SPACE)          if (n->end != ENDBODY_NOT) {
                   outflags |= MMAN_spc;
                   return;
           }
   
           body = n->child != NULL || n->parent->head->child != NULL;
           tail = n->parent->tail != NULL && n->parent->tail->child != NULL;
   
           if (body && tail)
                 outflags &= ~MMAN_spc;                  outflags &= ~MMAN_spc;
           else if ( ! (body || tail))
                   print_word("\\&");
           else if ( ! tail)
                   outflags |= MMAN_spc;
 }  }
   
 static int  static int
Line 1259  pre_fo(DECL_ARGS)
Line 1283  pre_fo(DECL_ARGS)
                 pre_syn(n);                  pre_syn(n);
                 break;                  break;
         case MDOC_HEAD:          case MDOC_HEAD:
                   if (n->child == NULL)
                           return(0);
                 if (MDOC_SYNPRETTY & n->flags)                  if (MDOC_SYNPRETTY & n->flags)
                         print_block(".HP 4n", MMAN_nl);                          print_block(".HP 4n", MMAN_nl);
                 font_push('B');                  font_push('B');
                 break;                  break;
         case MDOC_BODY:          case MDOC_BODY:
                 outflags &= ~MMAN_spc;                  outflags &= ~(MMAN_spc | MMAN_nl);
                 print_word("(");                  print_word("(");
                 outflags &= ~MMAN_spc;                  outflags &= ~MMAN_spc;
                 break;                  break;
Line 1280  post_fo(DECL_ARGS)
Line 1306  post_fo(DECL_ARGS)
   
         switch (n->type) {          switch (n->type) {
         case MDOC_HEAD:          case MDOC_HEAD:
                 font_pop();                  if (n->child != NULL)
                           font_pop();
                 break;                  break;
         case MDOC_BODY:          case MDOC_BODY:
                 post_fn(meta, n);                  post_fn(meta, n);

Legend:
Removed from v.1.82  
changed lines
  Added in v.1.86

CVSweb