=/^G show total bytes now; document may not always work
[unix-history] / usr / src / usr.bin / more / command.c
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);
                        }
                }