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

Diff for /mandoc/mdoc.c between version 1.49 and 1.50

version 1.49, 2009/03/01 23:14:15 version 1.50, 2009/03/02 17:14:46
Line 180  mdoc_endparse(struct mdoc *mdoc)
Line 180  mdoc_endparse(struct mdoc *mdoc)
 }  }
   
   
   /*
    * Main line-parsing routine.  If the line is a macro-line (started with
    * a '.' control character), then pass along to the parser, which parses
    * subsequent macros until the end of line.  If normal text, simply
    * append the entire line to the chain.
    */
 int  int
 mdoc_parseln(struct mdoc *mdoc, int line, char *buf)  mdoc_parseln(struct mdoc *mdoc, int line, char *buf)
 {  {
Line 191  mdoc_parseln(struct mdoc *mdoc, int line, char *buf)
Line 197  mdoc_parseln(struct mdoc *mdoc, int line, char *buf)
   
         mdoc->linetok = 0;          mdoc->linetok = 0;
   
         /*  
          * FIXME: should puke on whitespace in non-literal displays.  
          */  
   
         if ('.' != *buf) {          if ('.' != *buf) {
                   /*
                    * Free-form text.  Not allowed in the prologue.
                    */
                 if (SEC_PROLOGUE == mdoc->lastnamed)                  if (SEC_PROLOGUE == mdoc->lastnamed)
                         return(mdoc_perr(mdoc, line, 0,                          return(mdoc_perr(mdoc, line, 0,
                                 "no text in document prologue"));                                          "no text in 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;
                 return(1);                  return(1);
         }          }
   
           /*
            * Control-character detected.  Begin the parsing sequence.
            */
   
         if (buf[1] && '\\' == buf[1])          if (buf[1] && '\\' == buf[1])
                 if (buf[2] && '\"' == buf[2])                  if (buf[2] && '\"' == buf[2])
                         return(1);                          return(1);
Line 238  mdoc_parseln(struct mdoc *mdoc, int line, char *buf)
Line 248  mdoc_parseln(struct mdoc *mdoc, int line, char *buf)
                 mdoc->flags |= MDOC_HALT;                  mdoc->flags |= MDOC_HALT;
                 return(0);                  return(0);
         }          }
   
         return(1);          return(1);
 }  }
   

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

CVSweb