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

Diff for /mandoc/mdoc.c between version 1.119 and 1.120

version 1.119, 2010/04/03 13:02:35 version 1.120, 2010/04/05 08:59:46
Line 26 
Line 26 
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <time.h>
   
 #include "libmdoc.h"  #include "libmdoc.h"
 #include "libmandoc.h"  #include "libmandoc.h"
Line 351  mdoc_macro(struct mdoc *m, enum mdoct tok, 
Line 352  mdoc_macro(struct mdoc *m, enum mdoct tok, 
          * we're in the body, deny prologue calls.           * we're in the body, deny prologue calls.
          */           */
         if (MDOC_PROLOGUE & mdoc_macros[tok].flags &&          if (MDOC_PROLOGUE & mdoc_macros[tok].flags &&
                         MDOC_PBODY & m->flags)                          MDOC_PBODY & m->flags) {
                 return(mdoc_perr(m, ln, pp, EPROLBODY));                  if ( ! mdoc_pwarn(m, ln, pp, EBODYPROL))
                           return(0);
                   /*
                    * FIXME: do this in mdoc_action.c.
                    */
                   if (NULL == m->meta.title)
                           m->meta.title = mandoc_strdup("unknown");
                   if (NULL == m->meta.vol)
                           m->meta.vol = mandoc_strdup("local");
                   if (NULL == m->meta.os)
                           m->meta.os = mandoc_strdup("local");
                   if (0 == m->meta.date)
                           m->meta.date = time(NULL);
                   m->flags |= MDOC_PBODY;
           }
         if ( ! (MDOC_PROLOGUE & mdoc_macros[tok].flags) &&          if ( ! (MDOC_PROLOGUE & mdoc_macros[tok].flags) &&
                         ! (MDOC_PBODY & m->flags))                          ! (MDOC_PBODY & m->flags))
                 return(mdoc_perr(m, ln, pp, EBODYPROL));                  return(mdoc_perr(m, ln, pp, EBODYPROL));

Legend:
Removed from v.1.119  
changed lines
  Added in v.1.120

CVSweb