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

Diff for /mandoc/mdoc.c between version 1.43 and 1.44

version 1.43, 2009/01/20 20:56:21 version 1.44, 2009/01/21 11:35:26
Line 305  mdoc_parseln(struct mdoc *mdoc, int line, char *buf)
Line 305  mdoc_parseln(struct mdoc *mdoc, int line, char *buf)
         mdoc->linetok = 0;          mdoc->linetok = 0;
   
         if ('.' != *buf) {          if ('.' != *buf) {
                 if ( ! (MDOC_BODYPARSE & mdoc->flags))                  if (SEC_PROLOGUE == mdoc->lastnamed)
                         return(mdoc_perr(mdoc, line, 0, "text disallowed"));                          return(mdoc_perr(mdoc, line, 0, "text disallowed in document prologue"));
                 if ( ! mdoc_word_alloc(mdoc, line, 0, buf))                  if ( ! mdoc_word_alloc(mdoc, line, 0, buf))
                         return(0);                          return(0);
                 mdoc->next = MDOC_NEXT_SIBLING;                  mdoc->next = MDOC_NEXT_SIBLING;
Line 407  mdoc_macro(struct mdoc *mdoc, int tok, 
Line 407  mdoc_macro(struct mdoc *mdoc, int tok, 
   
         assert(mdoc_macros[tok].fp);          assert(mdoc_macros[tok].fp);
   
         if ( ! (MDOC_PROLOGUE & mdoc_macros[tok].flags) &&          if (MDOC_PROLOGUE & mdoc_macros[tok].flags &&
                         ! (MDOC_BODYPARSE & mdoc->flags))                          SEC_PROLOGUE != mdoc->lastnamed)
                 return(mdoc_perr(mdoc, ln, ppos, "macro disallowed: not in document body"));                  return(mdoc_perr(mdoc, ln, ppos, "macro disallowed in document body"));
           if ( ! (MDOC_PROLOGUE & mdoc_macros[tok].flags) &&
                           SEC_PROLOGUE == mdoc->lastnamed)
                   return(mdoc_perr(mdoc, ln, ppos, "macro disallowed in document prologue"));
         if (1 != ppos && ! (MDOC_CALLABLE & mdoc_macros[tok].flags))          if (1 != ppos && ! (MDOC_CALLABLE & mdoc_macros[tok].flags))
                 return(mdoc_perr(mdoc, ln, ppos, "macro not callable"));                  return(mdoc_perr(mdoc, ln, ppos, "macro not callable"));
         return((*mdoc_macros[tok].fp)(mdoc, tok, ln, ppos, pos, buf));          return((*mdoc_macros[tok].fp)(mdoc, tok, ln, ppos, pos, buf));

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44

CVSweb