prompt.c (170259) | prompt.c (191930) |
---|---|
1/* $FreeBSD: head/contrib/less/prompt.c 170259 2007-06-04 01:43:11Z delphij $ */ | 1/* $FreeBSD: head/contrib/less/prompt.c 191930 2009-05-09 01:35:27Z delphij $ */ |
2/* | 2/* |
3 * Copyright (C) 1984-2007 Mark Nudelman | 3 * Copyright (C) 1984-2008 Mark Nudelman |
4 * 5 * You may distribute under the terms of either the GNU General Public 6 * License or the Less License, as specified in the README file. 7 * 8 * For more information about less, or for information on how to 9 * contact the author, see the README file. 10 */ 11 --- 6 unchanged lines hidden (view full) --- 18 * A prompt is a message composed of various pieces, such as the 19 * name of the file being viewed, the percentage into the file, etc. 20 */ 21 22#include "less.h" 23#include "position.h" 24 25extern int pr_type; | 4 * 5 * You may distribute under the terms of either the GNU General Public 6 * License or the Less License, as specified in the README file. 7 * 8 * For more information about less, or for information on how to 9 * contact the author, see the README file. 10 */ 11 --- 6 unchanged lines hidden (view full) --- 18 * A prompt is a message composed of various pieces, such as the 19 * name of the file being viewed, the percentage into the file, etc. 20 */ 21 22#include "less.h" 23#include "position.h" 24 25extern int pr_type; |
26extern int hit_eof; | |
27extern int new_file; 28extern int sc_width; 29extern int so_s_width, so_e_width; 30extern int linenums; 31extern int hshift; 32extern int sc_height; 33extern int jump_sline; 34extern int less_is_more; --- 157 unchanged lines hidden (view full) --- 192 { 193 case 'a': /* Anything in the message yet? */ 194 return (mp > message); 195 case 'b': /* Current byte offset known? */ 196 return (curr_byte(where) != NULL_POSITION); 197 case 'c': 198 return (hshift != 0); 199 case 'e': /* At end of file? */ | 26extern int new_file; 27extern int sc_width; 28extern int so_s_width, so_e_width; 29extern int linenums; 30extern int hshift; 31extern int sc_height; 32extern int jump_sline; 33extern int less_is_more; --- 157 unchanged lines hidden (view full) --- 191 { 192 case 'a': /* Anything in the message yet? */ 193 return (mp > message); 194 case 'b': /* Current byte offset known? */ 195 return (curr_byte(where) != NULL_POSITION); 196 case 'c': 197 return (hshift != 0); 198 case 'e': /* At end of file? */ |
200 return (hit_eof); | 199 return (eof_displayed()); |
201 case 'f': /* Filename known? */ 202 return (strcmp(get_filename(curr_ifile), "-") != 0); 203 case 'l': /* Line number known? */ 204 case 'd': /* Same as l */ 205 return (linenums); 206 case 'L': /* Final line number known? */ 207 case 'D': /* Final page number known? */ 208 return (linenums && ch_length() != NULL_POSITION); --- 377 unchanged lines hidden --- | 200 case 'f': /* Filename known? */ 201 return (strcmp(get_filename(curr_ifile), "-") != 0); 202 case 'l': /* Line number known? */ 203 case 'd': /* Same as l */ 204 return (linenums); 205 case 'L': /* Final line number known? */ 206 case 'D': /* Final page number known? */ 207 return (linenums && ch_length() != NULL_POSITION); --- 377 unchanged lines hidden --- |