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

Diff for /mandoc/mdoc_macro.c between version 1.188 and 1.189

version 1.188, 2015/04/05 23:04:41 version 1.189, 2015/04/18 16:06:40
Line 42  static void  in_line_argn(MACRO_PROT_ARGS);
Line 42  static void  in_line_argn(MACRO_PROT_ARGS);
 static  void            in_line(MACRO_PROT_ARGS);  static  void            in_line(MACRO_PROT_ARGS);
 static  void            phrase_ta(MACRO_PROT_ARGS);  static  void            phrase_ta(MACRO_PROT_ARGS);
   
 static  void            append_delims(struct mdoc *, int, int *, char *);  static  void            append_delims(struct roff_man *, int, int *, char *);
 static  void            dword(struct mdoc *, int, int, const char *,  static  void            dword(struct roff_man *, int, int, const char *,
                                 enum mdelim, int);                                  enum mdelim, int);
 static  int             find_pending(struct mdoc *, int, int, int,  static  int             find_pending(struct roff_man *, int, int, int,
                                 struct roff_node *);                                  struct roff_node *);
 static  int             lookup(struct mdoc *, int, int, int, const char *);  static  int             lookup(struct roff_man *, int, int, int, const char *);
 static  int             macro_or_word(MACRO_PROT_ARGS, int);  static  int             macro_or_word(MACRO_PROT_ARGS, int);
 static  int             parse_rest(struct mdoc *, int, int, int *, char *);  static  int             parse_rest(struct roff_man *, int, int, int *, char *);
 static  int             rew_alt(int);  static  int             rew_alt(int);
 static  void            rew_elem(struct mdoc *, int);  static  void            rew_elem(struct roff_man *, int);
 static  void            rew_last(struct mdoc *, const struct roff_node *);  static  void            rew_last(struct roff_man *, const struct roff_node *);
 static  void            rew_pending(struct mdoc *, const struct roff_node *);  static  void            rew_pending(struct roff_man *,
                                   const struct roff_node *);
   
 const   struct mdoc_macro __mdoc_macros[MDOC_MAX] = {  const   struct mdoc_macro __mdoc_macros[MDOC_MAX] = {
         { in_line_argn, MDOC_CALLABLE | MDOC_PARSED | MDOC_JOIN }, /* Ap */          { in_line_argn, MDOC_CALLABLE | MDOC_PARSED | MDOC_JOIN }, /* Ap */
Line 208  const struct mdoc_macro * const mdoc_macros = __mdoc_m
Line 209  const struct mdoc_macro * const mdoc_macros = __mdoc_m
  * are errors.   * are errors.
  */   */
 void  void
 mdoc_macroend(struct mdoc *mdoc)  mdoc_macroend(struct roff_man *mdoc)
 {  {
         struct roff_node *n;          struct roff_node *n;
   
Line 233  mdoc_macroend(struct mdoc *mdoc)
Line 234  mdoc_macroend(struct mdoc *mdoc)
  * or as a line macro if from == MDOC_MAX.   * or as a line macro if from == MDOC_MAX.
  */   */
 static int  static int
 lookup(struct mdoc *mdoc, int from, int line, int ppos, const char *p)  lookup(struct roff_man *mdoc, int from, int line, int ppos, const char *p)
 {  {
         int      res;          int      res;
   
Line 254  lookup(struct mdoc *mdoc, int from, int line, int ppos
Line 255  lookup(struct mdoc *mdoc, int from, int line, int ppos
  * Rewind up to and including a specific node.   * Rewind up to and including a specific node.
  */   */
 static void  static void
 rew_last(struct mdoc *mdoc, const struct roff_node *to)  rew_last(struct roff_man *mdoc, const struct roff_node *to)
 {  {
         struct roff_node *n, *np;          struct roff_node *n, *np;
   
         if (to->flags & MDOC_VALID)          if (to->flags & MDOC_VALID)
                 return;                  return;
   
         mdoc->next = MDOC_NEXT_SIBLING;          mdoc->next = ROFF_NEXT_SIBLING;
         while (mdoc->last != to) {          while (mdoc->last != to) {
                 /*                  /*
                  * Save the parent here, because we may delete the                   * Save the parent here, because we may delete the
Line 283  rew_last(struct mdoc *mdoc, const struct roff_node *to
Line 284  rew_last(struct mdoc *mdoc, const struct roff_node *to
  * Rewind up to a specific block, including all blocks that broke it.   * Rewind up to a specific block, including all blocks that broke it.
  */   */
 static void  static void
 rew_pending(struct mdoc *mdoc, const struct roff_node *n)  rew_pending(struct roff_man *mdoc, const struct roff_node *n)
 {  {
   
         for (;;) {          for (;;) {
Line 364  rew_alt(int tok)
Line 365  rew_alt(int tok)
 }  }
   
 static void  static void
 rew_elem(struct mdoc *mdoc, int tok)  rew_elem(struct roff_man *mdoc, int tok)
 {  {
         struct roff_node *n;          struct roff_node *n;
   
Line 382  rew_elem(struct mdoc *mdoc, int tok)
Line 383  rew_elem(struct mdoc *mdoc, int tok)
  * the rew_pending() call closing out the sub-block.   * the rew_pending() call closing out the sub-block.
  */   */
 static int  static int
 find_pending(struct mdoc *mdoc, int tok, int line, int ppos,  find_pending(struct roff_man *mdoc, int tok, int line, int ppos,
         struct roff_node *target)          struct roff_node *target)
 {  {
         struct roff_node        *n;          struct roff_node        *n;
Line 419  find_pending(struct mdoc *mdoc, int tok, int line, int
Line 420  find_pending(struct mdoc *mdoc, int tok, int line, int
  * Punctuation consists of those tokens found in mdoc_isdelim().   * Punctuation consists of those tokens found in mdoc_isdelim().
  */   */
 static void  static void
 dword(struct mdoc *mdoc, int line, int col, const char *p,  dword(struct roff_man *mdoc, int line, int col, const char *p,
                 enum mdelim d, int may_append)                  enum mdelim d, int may_append)
 {  {
   
Line 453  dword(struct mdoc *mdoc, int line, int col, const char
Line 454  dword(struct mdoc *mdoc, int line, int col, const char
 }  }
   
 static void  static void
 append_delims(struct mdoc *mdoc, int line, int *pos, char *buf)  append_delims(struct roff_man *mdoc, int line, int *pos, char *buf)
 {  {
         char            *p;          char            *p;
         int              la;          int              la;
Line 617  blk_exp_close(MACRO_PROT_ARGS)
Line 618  blk_exp_close(MACRO_PROT_ARGS)
                          */                           */
   
                         if (maxargs)                          if (maxargs)
                                 mdoc->next = MDOC_NEXT_CHILD;                                  mdoc->next = ROFF_NEXT_CHILD;
                         break;                          break;
                 }                  }
   
Line 1386  in_line_eoln(MACRO_PROT_ARGS)
Line 1387  in_line_eoln(MACRO_PROT_ARGS)
         if ((tok == MDOC_Pp || tok == MDOC_Lp) &&          if ((tok == MDOC_Pp || tok == MDOC_Lp) &&
             ! (mdoc->flags & MDOC_SYNOPSIS)) {              ! (mdoc->flags & MDOC_SYNOPSIS)) {
                 n = mdoc->last;                  n = mdoc->last;
                 if (mdoc->next == MDOC_NEXT_SIBLING)                  if (mdoc->next == ROFF_NEXT_SIBLING)
                         n = n->parent;                          n = n->parent;
                 if (n->tok == MDOC_Nm)                  if (n->tok == MDOC_Nm)
                         rew_last(mdoc, mdoc->last->parent);                          rew_last(mdoc, mdoc->last->parent);
Line 1412  in_line_eoln(MACRO_PROT_ARGS)
Line 1413  in_line_eoln(MACRO_PROT_ARGS)
  * or until the next macro, call that macro, and return 1.   * or until the next macro, call that macro, and return 1.
  */   */
 static int  static int
 parse_rest(struct mdoc *mdoc, int tok, int line, int *pos, char *buf)  parse_rest(struct roff_man *mdoc, int tok, int line, int *pos, char *buf)
 {  {
         int              la;          int              la;
   

Legend:
Removed from v.1.188  
changed lines
  Added in v.1.189

CVSweb