[BACK]Return to mdoc.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/mdoc.c between version 1.34 and 1.35

version 1.34, 2010/02/18 02:11:26 version 1.35, 2010/03/02 00:38:59
Line 118 
Line 118 
         /* LINTED */          /* LINTED */
         "Dx",           "%Q",           "br",           "sp",          "Dx",           "%Q",           "br",           "sp",
         /* LINTED */          /* LINTED */
         "%U"          "%U",           "eos"
         };          };
   
 const   char *const __mdoc_argnames[MDOC_ARG_MAX] = {  const   char *const __mdoc_argnames[MDOC_ARG_MAX] = {
Line 641 
Line 641 
         if (j != i && ! pstring(m, line, j, &buf[j], (size_t)(i - j)))          if (j != i && ! pstring(m, line, j, &buf[j], (size_t)(i - j)))
                 return(0);                  return(0);
   
           /*
            * Mark the end of a sentence.  Only works when you respect
            * Jason's rule: "new sentence, new line".
            */
           if ('.' == buf[i-1] || '!' == buf[i-1] || '?' == buf[i-1]) {
                   m->next = MDOC_NEXT_SIBLING;
                   if ( ! mdoc_elem_alloc(m, line, i, MDOC_eos, NULL))
                           return(0);
           }
   
         m->next = MDOC_NEXT_SIBLING;          m->next = MDOC_NEXT_SIBLING;
         return(1);          return(1);
 }  }
Line 668 
Line 678 
 {  {
         int               i, j, c;          int               i, j, c;
         char              mac[5];          char              mac[5];
           struct mdoc_node *n;
           char             *t;
   
         /* Empty lines are ignored. */          /* Empty lines are ignored. */
   
Line 732 
Line 744 
          */           */
         if ( ! mdoc_macro(m, c, ln, 1, &i, buf))          if ( ! mdoc_macro(m, c, ln, 1, &i, buf))
                 goto err;                  goto err;
   
           /*
            * Mark the end of a sentence, but be careful not to insert
            * markers into reference blocks.
            */
           n = m->last;
           if (n->child)
                   n = n->child;
           while (n->next)
                   n = n->next;
           if (MDOC_TEXT == n->type && m->last->parent->tok != MDOC_Rs) {
                   t = n->string;
                   while (t && t[1])
                           t++;
                   if ('.' == *t || '!' == *t || '?' == *t) {
                           if ( ! mdoc_elem_alloc(m, ln, i, MDOC_eos, NULL))
                                   return(0);
                           m->next = MDOC_NEXT_SIBLING;
                   }
           }
   
         return(1);          return(1);
   

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35