diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-06-04 04:45:02 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-06-04 04:45:02 +0000 |
commit | 499b9d56475dcbf7fda50405517de8ac909a0025 (patch) | |
tree | 10d08889871957c1e6387c00804e1bbb0d8e54b7 | |
parent | 6354f391a0cca0b34d54f8735d8865b71d0d8808 (diff) |
It turns out that POSIX specifies more should prompt with the file name,
not --More-- like the old UCB more did. Back out a hack I did to
make the prompt look like the old UCB more.
-rw-r--r-- | usr.bin/less/main.c | 1 | ||||
-rw-r--r-- | usr.bin/less/prompt.c | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/less/main.c b/usr.bin/less/main.c index af90ced8aaa..09cbb9d9665 100644 --- a/usr.bin/less/main.c +++ b/usr.bin/less/main.c @@ -121,6 +121,7 @@ main(argc, argv) scan_option("-E"); scan_option("-G"); scan_option("-L"); + scan_option("-m"); s = lgetenv("MORE"); } else s = lgetenv("LESS"); diff --git a/usr.bin/less/prompt.c b/usr.bin/less/prompt.c index 157012d4382..ddc5eaca025 100644 --- a/usr.bin/less/prompt.c +++ b/usr.bin/less/prompt.c @@ -28,7 +28,6 @@ extern int sc_width; extern int so_s_width, so_e_width; extern int linenums; extern int hshift; -extern int ismore; extern int sc_height; extern int jump_sline; extern IFILE curr_ifile; @@ -47,8 +46,6 @@ static constant char m_proto[] = "?f%f .?m(%T %i of %m) ..?e(END) ?x- Next\\: %x.:?pB%pB\\%:byte %bB?s/%s...%t"; static constant char M_proto[] = "?f%f .?n?m(%T %i of %m) ..?ltlines %lt-%lb?L/%L. :byte %bB?s/%s. .?e(END) ?x- Next\\: %x.:?pB%pB\\%..%t"; -static constant char more_proto[] = - "--More--.?e(END) ?x- Next\\: %x.:(?pB%pB\\%:byte %bB?s/%s..).%t"; static constant char e_proto[] = "?f%f .?m(%T %i of %m) .?ltlines %lt-%lb?L/%L. .byte %bB?s/%s. ?e(END) :?pB%pB\\%..%t"; static constant char h_proto[] = @@ -70,7 +67,7 @@ static char *mp; public void init_prompt() { - prproto[0] = save(ismore ? more_proto : s_proto); + prproto[0] = save(s_proto); prproto[1] = save(m_proto); prproto[2] = save(M_proto); eqproto = save(e_proto); |