[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.61 and 1.67

version 1.61, 2009/07/24 12:47:35 version 1.67, 2009/08/19 14:45:56
Line 26 
Line 26 
 #include "term.h"  #include "term.h"
 #include "mdoc.h"  #include "mdoc.h"
   
 /* FIXME: macro arguments can be escaped. */  #define INDENT            5
   #define HALFINDENT        3
   
 #define TTYPE_PROG        0  #define TTYPE_PROG        0
 #define TTYPE_CMD_FLAG    1  #define TTYPE_CMD_FLAG    1
Line 674  fmt_block_vspace(struct termp *p, 
Line 675  fmt_block_vspace(struct termp *p, 
   
         if (MDOC_Bl == bl->tok && arg_hasattr(MDOC_Compact, bl))          if (MDOC_Bl == bl->tok && arg_hasattr(MDOC_Compact, bl))
                 return;                  return;
           assert(node);
   
         /*          /*
          * Search through our prior nodes.  If we follow a `Ss' or `Sh',           * Search through our prior nodes.  If we follow a `Ss' or `Sh',
Line 819  termp_it_pre(DECL_ARGS)
Line 821  termp_it_pre(DECL_ARGS)
         /*          /*
          * List-type can override the width in the case of fixed-head           * List-type can override the width in the case of fixed-head
          * values (bullet, dash/hyphen, enum).  Tags need a non-zero           * values (bullet, dash/hyphen, enum).  Tags need a non-zero
          * offset.  FIXME: double-check that correct.           * offset.
          */           */
   
         switch (type) {          switch (type) {
Line 858  termp_it_pre(DECL_ARGS)
Line 860  termp_it_pre(DECL_ARGS)
   
         switch (type) {          switch (type) {
         case (MDOC_Diag):          case (MDOC_Diag):
                 term_word(p, "\\ \\ ");                  if (MDOC_BODY == node->type)
                           term_word(p, "\\ \\ ");
                 break;                  break;
         case (MDOC_Inset):          case (MDOC_Inset):
                 if (MDOC_BODY == node->type)                  if (MDOC_BODY == node->type)
Line 1396  termp_fd_post(DECL_ARGS)
Line 1399  termp_fd_post(DECL_ARGS)
 static int  static int
 termp_sh_pre(DECL_ARGS)  termp_sh_pre(DECL_ARGS)
 {  {
           /*
            * XXX: undocumented: using two `Sh' macros in sequence has no
            * vspace between calls, only a newline.
            */
         switch (node->type) {          switch (node->type) {
         case (MDOC_HEAD):          case (MDOC_BLOCK):
                   if (node->prev && MDOC_Sh == node->prev->tok)
                           if (NULL == node->prev->body->child)
                                   break;
                 term_vspace(p);                  term_vspace(p);
                   break;
           case (MDOC_HEAD):
                 pair->flag |= ttypes[TTYPE_SECTION];                  pair->flag |= ttypes[TTYPE_SECTION];
                 break;                  break;
         case (MDOC_BODY):          case (MDOC_BODY):

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.67

CVSweb