projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kernel tracing
[unix-history]
/
usr
/
src
/
usr.bin
/
more
/
command.c
diff --git
a/usr/src/usr.bin/more/command.c
b/usr/src/usr.bin/more/command.c
index
012b105
..
a654489
100644
(file)
--- a/
usr/src/usr.bin/more/command.c
+++ b/
usr/src/usr.bin/more/command.c
@@
-18,7
+18,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)command.c 5.1
5
(Berkeley) %G%";
+static char sccsid[] = "@(#)command.c 5.1
6
(Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
@@
-195,8
+195,10
@@
prompt()
}
else
putstr(": END");
}
else
putstr(": END");
- else if (linenums) {
- (void)sprintf(pbuf, ": %d", currline(TOP));
+ else if (!ispipe &&
+ (pos = position(BOTTOM)) != NULL_POSITION &&
+ (len = ch_length())) {
+ (void)sprintf(pbuf, " (%ld%%)", ((100 * pos) / len));
putstr(pbuf);
}
so_exit();
putstr(pbuf);
}
so_exit();