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

Diff for /src/usr.bin/mandoc/main.c between version 1.51 and 1.52

version 1.51, 2010/10/26 22:13:58 version 1.52, 2010/10/26 22:28:56
Line 173 
Line 173 
         "argument count wrong, violates syntax",          "argument count wrong, violates syntax",
         "child violates parent syntax",          "child violates parent syntax",
         "argument count wrong, violates syntax",          "argument count wrong, violates syntax",
           "invalid path in include directive",
         "no document body",          "no document body",
         "no document prologue",          "no document prologue",
         "static buffer exhausted",          "static buffer exhausted",
Line 181 
Line 182 
 static  void              pdesc(struct curparse *);  static  void              pdesc(struct curparse *);
 static  void              fdesc(struct curparse *);  static  void              fdesc(struct curparse *);
 static  void              ffile(const char *, struct curparse *);  static  void              ffile(const char *, struct curparse *);
   static  int               pfile(const char *, struct curparse *, int);
 static  int               moptions(enum intt *, char *);  static  int               moptions(enum intt *, char *);
 static  int               mmsg(enum mandocerr, void *,  static  int               mmsg(enum mandocerr, void *,
                                 int, int, const char *);                                  int, int, const char *);
Line 306 
Line 308 
                 perror(curp->file);                  perror(curp->file);
 }  }
   
   static int
   pfile(const char *file, struct curparse *curp, int ln)
   {
           const char      *savefile;
           int              fd, savefd;
   
           if (-1 == (fd = open(file, O_RDONLY, 0))) {
                   perror(file);
                   exit_status = MANDOCLEVEL_SYSERR;
                   return(0);
           }
   
           savefile = curp->file;
           savefd = curp->fd;
   
           curp->file = file;
           curp->fd = fd;
   
           pdesc(curp);
   
           curp->file = savefile;
           curp->fd = savefd;
   
           if (-1 == close(fd))
                   perror(file);
   
           return(MANDOCLEVEL_FATAL > exit_status ? 1 : 0);
   }
   
   
 static void  static void
 resize_buf(struct buf *buf, size_t initial)  resize_buf(struct buf *buf, size_t initial)
 {  {
Line 629 
Line 660 
                 } else if (ROFF_ERR == re) {                  } else if (ROFF_ERR == re) {
                         assert(MANDOCLEVEL_FATAL <= exit_status);                          assert(MANDOCLEVEL_FATAL <= exit_status);
                         break;                          break;
                   } else if (ROFF_SO == re) {
                           if (pfile(ln.buf + of, curp, lnn_start))
                                   continue;
                           else
                                   break;
                 }                  }
   
                 /*                  /*

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52