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

Diff for /src/usr.bin/mandoc/read.c between version 1.163 and 1.164

version 1.163, 2017/07/08 17:52:42 version 1.164, 2017/07/20 14:36:32
Line 22 
Line 22 
   
 #include <assert.h>  #include <assert.h>
 #include <ctype.h>  #include <ctype.h>
 #include <err.h>  
 #include <errno.h>  #include <errno.h>
 #include <fcntl.h>  #include <fcntl.h>
 #include <stdarg.h>  #include <stdarg.h>
Line 556 
Line 555 
         size_t           off;          size_t           off;
         ssize_t          ssz;          ssize_t          ssz;
   
         if (fstat(fd, &st) == -1)          if (fstat(fd, &st) == -1) {
                 err((int)MANDOCLEVEL_SYSERR, "%s", file);                  mandoc_vmsg(MANDOCERR_FILE, curp, 0, 0,
                       "fstat: %s", strerror(errno));
                   return 0;
           }
   
         /*          /*
          * If we're a regular file, try just reading in the whole entry           * If we're a regular file, try just reading in the whole entry
Line 579 
Line 581 
         }          }
   
         if (curp->gzip) {          if (curp->gzip) {
                 if ((gz = gzdopen(fd, "rb")) == NULL)                  if ((gz = gzdopen(fd, "rb")) == NULL) {
                         err((int)MANDOCLEVEL_SYSERR, "%s", file);                          mandoc_vmsg(MANDOCERR_FILE, curp, 0, 0,
                               "gzdopen: %s", strerror(errno));
                           return 0;
                   }
         } else          } else
                 gz = NULL;                  gz = NULL;
   
Line 609 
Line 614 
                         fb->sz = off;                          fb->sz = off;
                         return 1;                          return 1;
                 }                  }
                 if (ssz == -1)                  if (ssz == -1) {
                         err((int)MANDOCLEVEL_SYSERR, "%s", file);                          mandoc_vmsg(MANDOCERR_FILE, curp, 0, 0,
                               "read: %s", strerror(errno));
                           break;
                   }
                 off += (size_t)ssz;                  off += (size_t)ssz;
         }          }
   

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