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

Diff for /mandoc/mdoc.c between version 1.163 and 1.168

version 1.163, 2010/08/20 01:02:07 version 1.168, 2010/12/06 11:01:19
Line 286  mdoc_macro(MACRO_PROT_ARGS)
Line 286  mdoc_macro(MACRO_PROT_ARGS)
                         ! (MDOC_PBODY & m->flags)) {                          ! (MDOC_PBODY & m->flags)) {
                 if ( ! mdoc_pmsg(m, line, ppos, MANDOCERR_BADPROLOG))                  if ( ! mdoc_pmsg(m, line, ppos, MANDOCERR_BADPROLOG))
                         return(0);                          return(0);
                   if (NULL == m->meta.msec)
                           m->meta.msec = mandoc_strdup("1");
                 if (NULL == m->meta.title)                  if (NULL == m->meta.title)
                         m->meta.title = mandoc_strdup("UNKNOWN");                          m->meta.title = mandoc_strdup("UNKNOWN");
                 if (NULL == m->meta.vol)                  if (NULL == m->meta.vol)
Line 328  node_append(struct mdoc *mdoc, struct mdoc_node *p)
Line 330  node_append(struct mdoc *mdoc, struct mdoc_node *p)
   
         if ( ! mdoc_valid_pre(mdoc, p))          if ( ! mdoc_valid_pre(mdoc, p))
                 return(0);                  return(0);
         if ( ! mdoc_action_pre(mdoc, p))  
                 return(0);  
   
         switch (p->type) {          switch (p->type) {
         case (MDOC_HEAD):          case (MDOC_HEAD):
Line 356  node_append(struct mdoc *mdoc, struct mdoc_node *p)
Line 356  node_append(struct mdoc *mdoc, struct mdoc_node *p)
         case (MDOC_TEXT):          case (MDOC_TEXT):
                 if ( ! mdoc_valid_post(mdoc))                  if ( ! mdoc_valid_post(mdoc))
                         return(0);                          return(0);
                 if ( ! mdoc_action_post(mdoc))  
                         return(0);  
                 break;                  break;
         default:          default:
                 break;                  break;
Line 691  mdoc_ptext(struct mdoc *m, int line, char *buf, int of
Line 689  mdoc_ptext(struct mdoc *m, int line, char *buf, int of
                         return(0);                          return(0);
   
                 /*                  /*
                  * Insert a `Pp' in the case of a blank line.  Technically,                   * Insert a `sp' in the case of a blank line.  Technically,
                  * blank lines aren't allowed, but enough manuals assume this                   * blank lines aren't allowed, but enough manuals assume this
                  * behaviour that we want to work around it.                   * behaviour that we want to work around it.
                  */                   */
                 if ( ! mdoc_elem_alloc(m, line, offs, MDOC_Pp, NULL))                  if ( ! mdoc_elem_alloc(m, line, offs, MDOC_sp, NULL))
                         return(0);                          return(0);
   
                 m->next = MDOC_NEXT_SIBLING;                  m->next = MDOC_NEXT_SIBLING;
Line 768  mdoc_pmacro(struct mdoc *m, int ln, char *buf, int off
Line 766  mdoc_pmacro(struct mdoc *m, int ln, char *buf, int off
   
         tok = (j > 1 || j < 4) ? mdoc_hash_find(mac) : MDOC_MAX;          tok = (j > 1 || j < 4) ? mdoc_hash_find(mac) : MDOC_MAX;
         if (MDOC_MAX == tok) {          if (MDOC_MAX == tok) {
                 mdoc_vmsg(m, MANDOCERR_MACRO, ln, sv,                  mdoc_vmsg(m, MANDOCERR_MACRO, ln, sv, "%s", buf + sv - 1);
                     "unknown macro: %s%s",  
                     buf, strlen(buf) > 3 ? "..." : "");  
                 return(1);                  return(1);
         }          }
   

Legend:
Removed from v.1.163  
changed lines
  Added in v.1.168

CVSweb