=/^G show total bytes now; document may not always work
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 23 Nov 1988 09:41:29 +0000 (01:41 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 23 Nov 1988 09:41:29 +0000 (01:41 -0800)
SCCS-vsn: usr.bin/more/command.c 5.11
SCCS-vsn: usr.bin/more/more.1 5.6

usr/src/usr.bin/more/command.c
usr/src/usr.bin/more/more.1

index 6454dba..48a0e42 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)command.c  5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)command.c  5.11 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -206,15 +206,15 @@ prompt()
                        putstr(pbuf);
                }
                if (linenums) {
                        putstr(pbuf);
                }
                if (linenums) {
-                       (void)sprintf(pbuf, " line %d", currline(TOP));
+                       (void)sprintf(pbuf, " line %d", currline(BOTTOM));
                        putstr(pbuf);
                }
                        putstr(pbuf);
                }
-               if ((pos = position(TOP)) != NULL_POSITION) {
+               if ((pos = position(BOTTOM)) != NULL_POSITION) {
                        (void)sprintf(pbuf, " byte %ld", pos);
                        putstr(pbuf);
                        if (!ispipe && (len = ch_length())) {
                        (void)sprintf(pbuf, " byte %ld", pos);
                        putstr(pbuf);
                        if (!ispipe && (len = ch_length())) {
-                               (void)sprintf(pbuf, " pct %ld%%",
-                                   ((100 * pos) / len));
+                               (void)sprintf(pbuf, "/%ld pct %ld%%",
+                                   len, ((100 * pos) / len));
                                putstr(pbuf);
                        }
                }
                                putstr(pbuf);
                        }
                }
index cdb5b2c..d143c90 100644 (file)
@@ -16,7 +16,7 @@
 .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
-.\"    @(#)more.1      5.5 (Berkeley) %G%
+.\"    @(#)more.1      5.6 (Berkeley) %G%
 .\"
 .TH MORE 1
 .SH NAME
 .\"
 .TH MORE 1
 .SH NAME
@@ -211,9 +211,13 @@ or defaults to
 .PP
 .IP "= or ^G"
 These options print out the number of the file currently being displayed
 .PP
 .IP "= or ^G"
 These options print out the number of the file currently being displayed
-relative to the total number of files there are to display, the line
-number, the byte number, and what percentage of the file has been displayed
-if possible.  All of these are for the bottom line on the screen.
+relative to the total number of files there are to display, the current
+line number, the current byte number and the total bytes to display, and
+what percentage of the file has been displayed.  If
+.I more
+is reading from stdin, or the file is shorter than a single screen, some
+of these items may not be available.  Note, all of these items reference
+the first byte of the last line displayed on the screen.
 .PP
 .IP "q or :q or ZZ"
 Exits
 .PP
 .IP "q or :q or ZZ"
 Exits