diff options
author | delphij <delphij@FreeBSD.org> | 2007-06-04 01:42:54 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2007-06-04 01:42:54 +0000 |
commit | 7672cb6e48e2ed472cbd72caaa0eb155608a644d (patch) | |
tree | ee770081db4ef1d4b6022e0608a222ea35319caa /contrib/less/prompt.c | |
parent | 5297f4bc59da861bbe3beb5ee12839fa05e79882 (diff) | |
download | FreeBSD-src-7672cb6e48e2ed472cbd72caaa0eb155608a644d.zip FreeBSD-src-7672cb6e48e2ed472cbd72caaa0eb155608a644d.tar.gz |
/home/delphij/m
Diffstat (limited to 'contrib/less/prompt.c')
-rw-r--r-- | contrib/less/prompt.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/less/prompt.c b/contrib/less/prompt.c index ee34b28..67b5ddc 100644 --- a/contrib/less/prompt.c +++ b/contrib/less/prompt.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2004 Mark Nudelman + * Copyright (C) 1984-2007 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -30,6 +30,7 @@ extern int linenums; extern int hshift; extern int sc_height; extern int jump_sline; +extern int less_is_more; extern IFILE curr_ifile; #if EDITOR extern char *editor; @@ -52,6 +53,8 @@ static constant char h_proto[] = "HELP -- ?eEND -- Press g to see it again:Press RETURN for more., or q when done"; static constant char w_proto[] = "Waiting for data"; +static constant char more_proto[] = + "--More--(?eEND ?x- Next\\: %x.:?pB%pB\\%:byte %bB?s/%s...%t)"; public char *prproto[3]; public char constant *eqproto = e_proto; @@ -68,7 +71,7 @@ static char *mp; init_prompt() { prproto[0] = save(s_proto); - prproto[1] = save(m_proto); + prproto[1] = save(less_is_more ? more_proto : m_proto); prproto[2] = save(M_proto); eqproto = save(e_proto); hproto = save(h_proto); @@ -561,9 +564,11 @@ eq_message() pr_string() { char *prompt; + int type; + type = (!less_is_more) ? pr_type : pr_type ? 0 : 1; prompt = pr_expand((ch_getflags() & CH_HELPFILE) ? - hproto : prproto[pr_type], + hproto : prproto[type], sc_width-so_s_width-so_e_width-2); new_file = 0; return (prompt); |