grow buffer from 8K to 32K.
authorJay Lepreau <lepreau@ucbvax.Berkeley.EDU>
Fri, 10 Jan 1986 20:24:10 +0000 (12:24 -0800)
committerJay Lepreau <lepreau@ucbvax.Berkeley.EDU>
Fri, 10 Jan 1986 20:24:10 +0000 (12:24 -0800)
SCCS-vsn: usr.bin/tail/tail.c 5.2

usr/src/usr.bin/tail/tail.c

index 6d34d96..bdf481b 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)tail.c     5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)tail.c     5.2 (Berkeley) %G%";
 #endif not lint
 
 /* tail command 
 #endif not lint
 
 /* tail command 
@@ -36,9 +36,9 @@ static char sccsid[] = "@(#)tail.c    5.1 (Berkeley) %G%";
 #include       <sys/file.h>
 #include       <errno.h>
 
 #include       <sys/file.h>
 #include       <errno.h>
 
-#define LBIN 8193
+#define LBIN 32769
 #undef BUFSIZ
 #undef BUFSIZ
-#define        BUFSIZ  LBIN-1
+#define        BUFSIZ  8192
 struct stat    statb;
 int    follow;
 int    piped;
 struct stat    statb;
 int    follow;
 int    piped;
@@ -155,7 +155,7 @@ keep:
        if(!piped) {
                (void)fstat(0,&statb);
                /* If by lines, back up 1 buffer: else back up as needed */
        if(!piped) {
                (void)fstat(0,&statb);
                /* If by lines, back up 1 buffer: else back up as needed */
-               di = bylines?BUFSIZ:n;
+               di = bylines?LBIN-1:n;
                if(statb.st_size > di)
                        (void)lseek(0,(off_t)-di,L_XTND);
                if(!bylines)
                if(statb.st_size > di)
                        (void)lseek(0,(off_t)-di,L_XTND);
                if(!bylines)