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

Diff for /mandoc/read.c between version 1.83 and 1.84

version 1.83, 2014/09/06 22:39:36 version 1.84, 2014/09/06 23:24:32
Line 69  struct mparse {
Line 69  struct mparse {
         int               line; /* line number in the file */          int               line; /* line number in the file */
 };  };
   
   static  void      choose_parser(struct mparse *);
 static  void      resize_buf(struct buf *, size_t);  static  void      resize_buf(struct buf *, size_t);
 static  void      mparse_buf_r(struct mparse *, struct buf, int);  static  void      mparse_buf_r(struct mparse *, struct buf, int);
 static  void      pset(const char *, int, struct mparse *);  
 static  int       read_whole_file(struct mparse *, const char *, int,  static  int       read_whole_file(struct mparse *, const char *, int,
                                 struct buf *, int *);                                  struct buf *, int *);
 static  void      mparse_end(struct mparse *);  static  void      mparse_end(struct mparse *);
Line 247  resize_buf(struct buf *buf, size_t initial)
Line 247  resize_buf(struct buf *buf, size_t initial)
 }  }
   
 static void  static void
 pset(const char *buf, int pos, struct mparse *curp)  choose_parser(struct mparse *curp)
 {  {
         char            *cp, *ep;          char            *cp, *ep;
         int              format;          int              format;
         int              i;  
   
         if ('.' == buf[0] || '\'' == buf[0]) {  
                 for (i = 1; buf[i]; i++)  
                         if (' ' != buf[i] && '\t' != buf[i])  
                                 break;  
                 if ('\0' == buf[i])  
                         return;  
         }  
   
         /*          /*
          * If neither command line arguments -mdoc or -man select           * If neither command line arguments -mdoc or -man select
          * a parser nor the roff parser found a .Dd or .TH macro           * a parser nor the roff parser found a .Dd or .TH macro
Line 550  rerun:
Line 541  rerun:
                  */                   */
   
                 if ( ! (curp->man || curp->mdoc))                  if ( ! (curp->man || curp->mdoc))
                         pset(ln.buf + of, pos - of, curp);                          choose_parser(curp);
   
                 /*                  /*
                  * Lastly, push down into the parsers themselves.  One                   * Lastly, push down into the parsers themselves.
                  * of these will have already been set in the pset()  
                  * routine.  
                  * If libroff returns ROFF_TBL, then add it to the                   * If libroff returns ROFF_TBL, then add it to the
                  * currently open parse.  Since we only get here if                   * currently open parse.  Since we only get here if
                  * there does exist data (see tbl_data.c), we're                   * there does exist data (see tbl_data.c), we're

Legend:
Removed from v.1.83  
changed lines
  Added in v.1.84

CVSweb