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

Diff for /mandoc/man_macro.c between version 1.105 and 1.108

version 1.105, 2015/04/18 16:06:40 version 1.108, 2015/04/19 14:57:38
Line 29 
Line 29 
 #include "roff.h"  #include "roff.h"
 #include "man.h"  #include "man.h"
 #include "libmandoc.h"  #include "libmandoc.h"
   #include "roff_int.h"
 #include "libman.h"  #include "libman.h"
   
 static  void             blk_close(MACRO_PROT_ARGS);  static  void             blk_close(MACRO_PROT_ARGS);
Line 110  man_unscope(struct roff_man *man, const struct roff_no
Line 111  man_unscope(struct roff_man *man, const struct roff_no
                                 }                                  }
                                 man->last = n;                                  man->last = n;
                                 n = n->parent;                                  n = n->parent;
                                 man_node_delete(man, man->last);                                  roff_node_delete(man, man->last);
                                 continue;                                  continue;
                         }                          }
                         if (n->type == ROFFT_BLOCK &&                          if (n->type == ROFFT_BLOCK &&
Line 258  blk_exp(MACRO_PROT_ARGS)
Line 259  blk_exp(MACRO_PROT_ARGS)
         int              la;          int              la;
   
         rew_scope(man, tok);          rew_scope(man, tok);
         man_block_alloc(man, line, ppos, tok);          roff_block_alloc(man, line, ppos, tok);
         man_head_alloc(man, line, ppos, tok);          head = roff_head_alloc(man, line, ppos, tok);
         head = man->last;  
   
         la = *pos;          la = *pos;
         if (man_args(man, line, pos, buf, &p))          if (man_args(man, line, pos, buf, &p))
                 man_word_alloc(man, line, la, p);                  roff_word_alloc(man, line, la, p);
   
         if (buf[*pos] != '\0')          if (buf[*pos] != '\0')
                 mandoc_vmsg(MANDOCERR_ARG_EXCESS,                  mandoc_vmsg(MANDOCERR_ARG_EXCESS,
Line 272  blk_exp(MACRO_PROT_ARGS)
Line 272  blk_exp(MACRO_PROT_ARGS)
                     man_macronames[tok], buf + *pos);                      man_macronames[tok], buf + *pos);
   
         man_unscope(man, head);          man_unscope(man, head);
         man_body_alloc(man, line, ppos, tok);          roff_body_alloc(man, line, ppos, tok);
 }  }
   
 /*  /*
Line 289  blk_imp(MACRO_PROT_ARGS)
Line 289  blk_imp(MACRO_PROT_ARGS)
         struct roff_node *n;          struct roff_node *n;
   
         rew_scope(man, tok);          rew_scope(man, tok);
         man_block_alloc(man, line, ppos, tok);          n = roff_block_alloc(man, line, ppos, tok);
         man_head_alloc(man, line, ppos, tok);          if (n->tok == MAN_SH || n->tok == MAN_SS)
         n = man->last;                  man->flags &= ~MAN_LITERAL;
           n = roff_head_alloc(man, line, ppos, tok);
   
         /* Add line arguments. */          /* Add line arguments. */
   
Line 299  blk_imp(MACRO_PROT_ARGS)
Line 300  blk_imp(MACRO_PROT_ARGS)
                 la = *pos;                  la = *pos;
                 if ( ! man_args(man, line, pos, buf, &p))                  if ( ! man_args(man, line, pos, buf, &p))
                         break;                          break;
                 man_word_alloc(man, line, la, p);                  roff_word_alloc(man, line, la, p);
         }          }
   
         /*          /*
Line 317  blk_imp(MACRO_PROT_ARGS)
Line 318  blk_imp(MACRO_PROT_ARGS)
         /* Close out the head and open the body. */          /* Close out the head and open the body. */
   
         man_unscope(man, n);          man_unscope(man, n);
         man_body_alloc(man, line, ppos, tok);          roff_body_alloc(man, line, ppos, tok);
 }  }
   
 void  void
Line 327  in_line_eoln(MACRO_PROT_ARGS)
Line 328  in_line_eoln(MACRO_PROT_ARGS)
         char            *p;          char            *p;
         struct roff_node *n;          struct roff_node *n;
   
         man_elem_alloc(man, line, ppos, tok);          roff_elem_alloc(man, line, ppos, tok);
         n = man->last;          n = man->last;
   
         for (;;) {          for (;;) {
Line 350  in_line_eoln(MACRO_PROT_ARGS)
Line 351  in_line_eoln(MACRO_PROT_ARGS)
                         break;                          break;
                 if (man_macros[tok].flags & MAN_JOIN &&                  if (man_macros[tok].flags & MAN_JOIN &&
                     man->last->type == ROFFT_TEXT)                      man->last->type == ROFFT_TEXT)
                         man_word_append(man, p);                          roff_word_append(man, p);
                 else                  else
                         man_word_alloc(man, line, la, p);                          roff_word_alloc(man, line, la, p);
         }          }
   
         /*          /*

Legend:
Removed from v.1.105  
changed lines
  Added in v.1.108

CVSweb