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

Diff for /src/usr.bin/tail/forward.c between version 1.3 and 1.4

version 1.3, 1996/06/26 05:40:15 version 1.4, 1997/01/12 23:43:05
Line 49 
Line 49 
 #include <sys/time.h>  #include <sys/time.h>
 #include <sys/mman.h>  #include <sys/mman.h>
   
 #include <limits.h>  #include <err.h>
 #include <fcntl.h>  
 #include <errno.h>  #include <errno.h>
 #include <unistd.h>  #include <fcntl.h>
   #include <limits.h>
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <unistd.h>
   
 #include "extern.h"  #include "extern.h"
   
 static void rlines __P((FILE *, long, struct stat *));  static void rlines __P((FILE *, long, struct stat *));
Line 182 
Line 184 
                 second.tv_sec = 1;                  second.tv_sec = 1;
                 second.tv_usec = 0;                  second.tv_usec = 0;
                 if (select(0, NULL, NULL, NULL, &second) == -1)                  if (select(0, NULL, NULL, NULL, &second) == -1)
                         err(1, "select: %s", strerror(errno));                          err(1, "select");
                 clearerr(fp);                  clearerr(fp);
         }          }
 }  }
Line 204 
Line 206 
                 return;                  return;
   
         if (size > SIZE_T_MAX) {          if (size > SIZE_T_MAX) {
                 err(0, "%s: %s", fname, strerror(EFBIG));                  errx(0, "%s: %s", fname, strerror(EFBIG));
                 return;                  return;
         }          }
   
         if ((start = mmap(NULL, (size_t)size,          if ((start = mmap(NULL, (size_t)size,
             PROT_READ, 0, fileno(fp), (off_t)0)) == (caddr_t)-1) {              PROT_READ, 0, fileno(fp), (off_t)0)) == (caddr_t)-1) {
                 err(0, "%s: %s", fname, strerror(EFBIG));                  errx(0, "%s: %s", fname, strerror(EFBIG));
                 return;                  return;
         }          }
   
Line 229 
Line 231 
                 return;                  return;
         }          }
         if (munmap(start, (size_t)sbp->st_size)) {          if (munmap(start, (size_t)sbp->st_size)) {
                 err(0, "%s: %s", fname, strerror(errno));                  err(0, fname);
                 return;                  return;
         }          }
 }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4