input.c (60786) | input.c (63128) |
---|---|
1/* 2 * Copyright (C) 1984-2000 Mark Nudelman 3 * 4 * You may distribute under the terms of either the GNU General Public 5 * License or the Less License, as specified in the README file. 6 * 7 * For more information about less, or for information on how to 8 * contact the author, see the README file. --- 9 unchanged lines hidden (view full) --- 18 * We use the term "raw line" to refer to lines simply 19 * delimited by newlines; not processed with respect to screen width. 20 */ 21 22#include "less.h" 23 24extern int squeeze; 25extern int chopline; | 1/* 2 * Copyright (C) 1984-2000 Mark Nudelman 3 * 4 * You may distribute under the terms of either the GNU General Public 5 * License or the Less License, as specified in the README file. 6 * 7 * For more information about less, or for information on how to 8 * contact the author, see the README file. --- 9 unchanged lines hidden (view full) --- 18 * We use the term "raw line" to refer to lines simply 19 * delimited by newlines; not processed with respect to screen width. 20 */ 21 22#include "less.h" 23 24extern int squeeze; 25extern int chopline; |
26extern int hshift; |
|
26extern int quit_if_one_screen; 27extern int sigs; 28extern int ignore_eoi; 29extern POSITION start_attnpos; 30extern POSITION end_attnpos; 31#if HILITE_SEARCH 32extern int hilite_search; 33extern int size_linebuf; --- 72 unchanged lines hidden (view full) --- 106 */ 107 if (pappend(c, ch_tell()-1)) 108 { 109 /* 110 * The char won't fit in the line; the line 111 * is too long to print in the screen width. 112 * End the line here. 113 */ | 27extern int quit_if_one_screen; 28extern int sigs; 29extern int ignore_eoi; 30extern POSITION start_attnpos; 31extern POSITION end_attnpos; 32#if HILITE_SEARCH 33extern int hilite_search; 34extern int size_linebuf; --- 72 unchanged lines hidden (view full) --- 107 */ 108 if (pappend(c, ch_tell()-1)) 109 { 110 /* 111 * The char won't fit in the line; the line 112 * is too long to print in the screen width. 113 * End the line here. 114 */ |
114 if (chopline) | 115 if (chopline || hshift > 0) |
115 { 116 do 117 { 118 c = ch_forw_get(); 119 } while (c != '\n' && c != EOI); 120 new_pos = ch_tell(); 121 endline = TRUE; 122 quit_if_one_screen = FALSE; --- 161 unchanged lines hidden (view full) --- 284 } 285 if (pappend(c, ch_tell()-1)) 286 { 287 /* 288 * Got a full printable line, but we haven't 289 * reached our curr_pos yet. Discard the line 290 * and start a new one. 291 */ | 116 { 117 do 118 { 119 c = ch_forw_get(); 120 } while (c != '\n' && c != EOI); 121 new_pos = ch_tell(); 122 endline = TRUE; 123 quit_if_one_screen = FALSE; --- 161 unchanged lines hidden (view full) --- 285 } 286 if (pappend(c, ch_tell()-1)) 287 { 288 /* 289 * Got a full printable line, but we haven't 290 * reached our curr_pos yet. Discard the line 291 * and start a new one. 292 */ |
292 if (chopline) | 293 if (chopline || hshift > 0) |
293 { 294 endline = TRUE; 295 quit_if_one_screen = FALSE; 296 break; 297 } 298 pdone(0); 299 (void) ch_back_get(); 300 new_pos--; --- 42 unchanged lines hidden --- | 294 { 295 endline = TRUE; 296 quit_if_one_screen = FALSE; 297 break; 298 } 299 pdone(0); 300 (void) ch_back_get(); 301 new_pos--; --- 42 unchanged lines hidden --- |