[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.3 and 1.7

version 1.3, 2009/03/23 15:20:51 version 1.7, 2009/03/25 16:07:36
Line 56  man_macro(struct man *man, int tok, int line, 
Line 56  man_macro(struct man *man, int tok, int line, 
                 man->next = MAN_NEXT_SIBLING;                  man->next = MAN_NEXT_SIBLING;
         }          }
   
         /* TODO: validate. */          /*
         /* TODO: validate. */           * Note that when TH is pruned, we'll be back at the root, so
            * make sure that we don't clobber as its sibling.
            */
   
         man->last = n;          for ( ; man->last; man->last = man->last->parent) {
         man->next = MAN_NEXT_SIBLING;                  if (man->last == n)
                           break;
                   if (man->last->type == MAN_ROOT)
                           break;
                   if ( ! man_valid_post(man))
                           return(0);
                   if ( ! man_action_post(man))
                           return(0);
           }
   
           assert(man->last);
   
           /*
            * Same here regarding whether we're back at the root.
            */
   
           if (man->last->type != MAN_ROOT && ! man_valid_post(man))
                   return(0);
           if (man->last->type != MAN_ROOT && ! man_action_post(man))
                   return(0);
           if (man->last->type != MAN_ROOT)
                   man->next = MAN_NEXT_SIBLING;
   
         return(1);          return(1);
 }  }
   
   
 /* ARGSUSED */  
 int  int
   man_macroend(struct man *m)
   {
   
           for ( ; m->last && m->last != m->first;
                           m->last = m->last->parent) {
                   if ( ! man_valid_post(m))
                           return(0);
                   if ( ! man_action_post(m))
                           return(0);
           }
           assert(m->last == m->first);
   
           if ( ! man_valid_post(m))
                   return(0);
           if ( ! man_action_post(m))
                   return(0);
   
           return(1);
   }
   
   
   /* ARGSUSED */
   static int
 man_args(struct man *man, int line,  man_args(struct man *man, int line,
                 int *pos, char *buf, char **v)                  int *pos, char *buf, char **v)
 {  {

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.7

CVSweb