1238730Sdelphij/* 2330571Sdelphij * Copyright (C) 1984-2017 Mark Nudelman 3238730Sdelphij * 4238730Sdelphij * You may distribute under the terms of either the GNU General Public 5238730Sdelphij * License or the Less License, as specified in the README file. 6238730Sdelphij * 7238730Sdelphij * For more information, see the README file. 8238730Sdelphij */ 960786Sps 1060786Sps 1160786Sps/* 1260786Sps----------------------- CHANGE HISTORY -------------------------- 1360786Sps 14191930Sdelphij 1/29/84 Allowed use on standard input 15191930Sdelphij 2/1/84 Added E, N, P commands 16191930Sdelphij 4/17/84 Added '=' command, 'stop' signal handling 17191930Sdelphij 4/20/84 Added line folding 18191930Sdelphijv2 4/27/84 Fixed '=' command to use BOTTOM_PLUS_ONE, 19191930Sdelphij instead of TOP, added 'p' & 'v' commands 20191930Sdelphijv3 5/3/84 Added -m and -t options, '-' command 21191930Sdelphijv4 5/3/84 Added LESS environment variable 22191930Sdelphijv5 5/3/84 New comments, fixed '-' command slightly 23191930Sdelphijv6 5/15/84 Added -Q, visual bell 24191930Sdelphijv7 5/24/84 Fixed jump_back(n) bug: n should count real 25191930Sdelphij lines, not folded lines. Also allow number on G command. 26191930Sdelphijv8 5/30/84 Re-do -q and -Q commands 27191930Sdelphijv9 9/25/84 Added "+<cmd>" argument 28191930Sdelphijv10 10/10/84 Fixed bug in -b<n> argument processing 29191930Sdelphijv11 10/18/84 Made error() ring bell if \n not entered. 3060786Sps----------------------------------------------------------------- 31191930Sdelphijv12 2/13/85 Reorganized signal handling and made portable to 4.2bsd. 32191930Sdelphijv13 2/16/85 Reword error message for '-' command. 33191930Sdelphijv14 2/22/85 Added -bf and -bp variants of -b. 34191930Sdelphijv15 2/25/85 Miscellaneous changes. 35191930Sdelphijv16 3/13/85 Added -u flag for backspace processing. 36191930Sdelphijv17 4/13/85 Added j and k commands, changed -t default. 37191930Sdelphijv18 4/20/85 Rewrote signal handling code. 38191930Sdelphijv19 5/2/85 Got rid of "verbose" eq_message(). 39191930Sdelphij Made search() scroll in some cases. 40191930Sdelphijv20 5/21/85 Fixed screen.c ioctls for System V. 41191930Sdelphijv21 5/23/85 Fixed some first_cmd bugs. 42191930Sdelphijv22 5/24/85 Added support for no RECOMP nor REGCMP. 43191930Sdelphijv23 5/25/85 Miscellanous changes and prettying up. 44191930Sdelphij Posted to USENET. 4560786Sps----------------------------------------------------------------- 46191930Sdelphijv24 6/3/85 Added ti,te terminal init & de-init. 47191930Sdelphij (Thanks to Mike Kersenbrock) 48191930Sdelphijv25 6/8/85 Added -U flag, standout mode underlining. 49191930Sdelphijv26 6/9/85 Added -M flag. 50191930Sdelphij Use underline termcap (us) if it exists. 51191930Sdelphijv27 6/15/85 Renamed some variables to make unique in 52191930Sdelphij 6 chars. Minor fix to -m. 53191930Sdelphijv28 6/28/85 Fixed right margin bug. 54191930Sdelphijv29 6/28/85 Incorporated M.Rose's changes to signal.c 55191930Sdelphijv30 6/29/85 Fixed stupid bug in argument processing. 56191930Sdelphijv31 7/15/85 Added -p flag, changed repaint algorithm. 57191930Sdelphij Added kludge for magic cookie terminals. 58191930Sdelphijv32 7/16/85 Added cat_file if output not a tty. 59191930Sdelphijv33 7/23/85 Added -e flag and EDITOR. 60191930Sdelphijv34 7/26/85 Added -s flag. 61191930Sdelphijv35 7/27/85 Rewrote option handling; added option.c. 62191930Sdelphijv36 7/29/85 Fixed -e flag to work if not last file. 63191930Sdelphijv37 8/10/85 Added -x flag. 64191930Sdelphijv38 8/19/85 Changed prompting; created prompt.c. 65191930Sdelphijv39 8/24/85 (Not -p) does not initially clear screen. 66191930Sdelphijv40 8/26/85 Added "skipping" indicator in forw(). 67191930Sdelphij Posted to USENET. 6860786Sps----------------------------------------------------------------- 69191930Sdelphijv41 9/17/85 ONLY_RETURN, control char commands, 70191930Sdelphij faster search, other minor fixes. 71191930Sdelphijv42 9/25/85 Added ++ command line syntax; 72191930Sdelphij ch_fsize for pipes. 73191930Sdelphijv43 10/15/85 Added -h flag, changed prim.c algorithms. 74191930Sdelphijv44 10/16/85 Made END print in all cases of eof; 75191930Sdelphij ignore SIGTTOU after receiv ing SIGTSTP. 76191930Sdelphijv45 10/16/85 Never print backspaces unless -u. 77191930Sdelphijv46 10/24/85 Backwards scroll in jump_loc. 78191930Sdelphijv47 10/30/85 Fixed bug in edit(): *first_cmd==0 79191930Sdelphijv48 11/16/85 Use TIOCSETN instead of TIOCSETP. 80191930Sdelphij Added marks (m and ' commands). 81191930Sdelphij Posted to USENET. 8260786Sps----------------------------------------------------------------- 83191930Sdelphijv49 1/9/86 Fixed bug: signal didn't clear mcc. 84191930Sdelphijv50 1/15/86 Added ' (quote) to gomark. 85191930Sdelphijv51 1/16/86 Added + cmd, fixed problem if first_cmd 86191930Sdelphij fails, made g cmd sort of "work" on pipes 87191930Sdelphij ev en if bof is no longer buffered. 88191930Sdelphijv52 1/17/86 Made short files work better. 89191930Sdelphijv53 1/20/86 Added -P option. 90191930Sdelphijv54 1/20/86 Changed help to use HELPFILE. 91191930Sdelphijv55 1/23/86 Messages work better if not tty output. 92191930Sdelphijv56 1/24/86 Added -l option. 93191930Sdelphijv57 1/31/86 Fixed -l to get confirmation before 94191930Sdelphij ov erwriting an existing file. 95191930Sdelphijv58 8/28/86 Added filename globbing. 96191930Sdelphijv59 9/15/86 Fixed some bugs with very long filenames. 97191930Sdelphijv60 9/26/86 Incorporated changes from Leith (Casey) 98191930Sdelphij Leedom for boldface and -z option. 99191930Sdelphijv61 9/26/86 Got rid of annoying repaints after ! cmd. 100191930Sdelphij Posted to USENET. 10160786Sps----------------------------------------------------------------- 102191930Sdelphijv62 12/23/86 Added is_directory(); change -z default to 103191930Sdelphij -1 instead of 24; cat-and-exit if -e and 104191930Sdelphij file is less than a screenful. 105191930Sdelphijv63 1/8/87 Fixed bug in cat-and-exit if > 1 file. 106191930Sdelphijv64 1/12/87 Changed puts/putstr, putc/putchr, 107191930Sdelphij getc/getchr to av oid name conflict with 108191930Sdelphij stdio functions. 109191930Sdelphijv65 1/26/87 Allowed '-' command to change NUMBER 110191930Sdelphij v alued options (thanks to Gary Puckering) 111191930Sdelphijv66 2/13/87 Fixed bug: prepaint should use force=1. 112191930Sdelphijv67 2/24/87 Added !! and % expansion to ! command. 113191930Sdelphijv68 2/25/87 Added SIGWINCH and TIOCGWINSZ support; 114191930Sdelphij changed is_directory to bad_file. 115191930Sdelphij (thanks to J. Robert Ward) 116191930Sdelphijv69 2/25/87 Added SIGWIND and WIOCGETD (for Unix PC). 117191930Sdelphijv70 3/13/87 Changed help cmd from 'h' to 'H'; better 118191930Sdelphij error msgs in bad_file, errno_message. 119191930Sdelphijv71 5/11/87 Changed -p to -c, made triple -c/-C 120191930Sdelphij for clear-eol like more's -c. 121191930Sdelphijv72 6/26/87 Added -E, -L, use $SHELL in lsystem(). 122191930Sdelphij (thanks to Stev e Spearman) 123191930Sdelphijv73 6/26/87 Allow Examine "#" for previous file. 124191930Sdelphij Posted to USENET 8/25/87. 12560786Sps----------------------------------------------------------------- 126191930Sdelphijv74 9/18/87 Fix conflict in EOF symbol with stdio.h, 127191930Sdelphij Make os.c more portable to BSD. 128191930Sdelphijv75 9/23/87 Fix problems in get_term (thanks to 129191930Sdelphij Paul Eggert); new backwards scrolling in 130191930Sdelphij jump_loc (thanks to Marion Hakanson). 131191930Sdelphijv76 9/23/87 Added -i flag; allow single "!" to 132191930Sdelphij inv oke a shell (thanks to Franco Barber). 133191930Sdelphijv77 9/24/87 Added -n flag and line number support. 134191930Sdelphijv78 9/25/87 Fixed problem with prompts longer than 135191930Sdelphij the screen width. 136191930Sdelphijv79 9/29/87 Added the _ command. 137191930Sdelphijv80 10/6/87 Allow signal to break out of linenum scan. 138191930Sdelphijv81 10/6/87 Allow -b to be changed from within less. 139191930Sdelphijv82 10/7/87 Add cmd_decode to use a table for key 140191930Sdelphij binding (thanks to Dav id Nason). 141191930Sdelphijv83 10/9/87 Allow .less file for user-defined keys. 142191930Sdelphijv84 10/11/87 Fix -e/-E problems (thanks to Felix Lee). 143191930Sdelphijv85 10/15/87 Search now keeps track of line numbers. 144191930Sdelphijv86 10/20/87 Added -B option and autobuf; fixed 145191930Sdelphij "pipe error" bug. 146191930Sdelphijv87 3/1/88 Fix bug re BSD signals while reading file. 147191930Sdelphijv88 3/12/88 Use new format for -P option (thanks to 148191930Sdelphij der Mouse), allow "+-c" without message, 149191930Sdelphij fix bug re BSD hangup. 150191930Sdelphijv89 3/18/88 Turn off line numbers if linenum scan 151191930Sdelphij is interrupted. 152191930Sdelphijv90 3/30/88 Allow -P from within less. 153191930Sdelphijv91 3/30/88 Added tags file support (new -t option) 154191930Sdelphij (thanks to Brian Campbell). 155191930Sdelphijv92 4/4/88 Added -+option syntax. 156191930Sdelphijv93 4/11/88 Add support for slow input (thanks to 157191930Sdelphij Joe Orost & apologies for taking almost 158191930Sdelphij 3 years to get this in!) 159191930Sdelphijv94 4/11/88 Redo reading/signal stuff. 160191930Sdelphijv95 4/20/88 Repaint screen better after signal. 161191930Sdelphijv96 4/21/88 Add /! and ?! commands. 162191930Sdelphijv97 5/17/88 Allow -l/-L from within less. 163191930Sdelphij Eliminate some static arrays (use calloc). 164191930Sdelphij Posted to USENET. 16560786Sps----------------------------------------------------------------- 166191930Sdelphijv98 10/14/88 Fix incorrect calloc call; uninitialized 167191930Sdelphij var in exec_mca; core dump on unknown TERM. 168191930Sdelphij Make v cmd work if past last line of file. 169191930Sdelphij Fix some signal bugs. 170191930Sdelphijv99 10/29/88 Allow space between -X and string, 171191930Sdelphij when X is a string-valued option. 172191930Sdelphijv100 1/5/89 Fix globbing bug when $SHELL not set; 173191930Sdelphij allow spaces after -t command. 174191930Sdelphijv101 1/6/89 Fix problem with long (truncated) lines 175191930Sdelphij in tags file (thanks to Neil Dixon). 176191930Sdelphijv102 1/6/89 Fix bug with E# when no prev file; 177191930Sdelphij allow spaces after -l command. 178191930Sdelphijv103 3/14/89 Add -N, -f and -? options. Add z and w 179191930Sdelphij commands. Add %L for prompt strings. 180191930Sdelphijv104 3/16/89 Added EDITPROTO. 181191930Sdelphijv105 3/20/89 Fix bug in find_linenum which cached 182191930Sdelphij incorrectly on long lines. 183191930Sdelphijv106 3/31/89 Added -k option and multiple lesskey 184191930Sdelphij files. 185191930Sdelphijv107 4/27/89 Add 8-bit char support and -g option. 186191930Sdelphij Split option code into 3 files. 187191930Sdelphijv108 5/5/89 Allocate position table dynamically 188191930Sdelphij (thanks to Paul Eggert); change % command 189191930Sdelphij from "percent" to vi-style brace finder. 190191930Sdelphijv109 5/10/89 Added ESC-% command, split prim.c. 191191930Sdelphijv110 5/24/89 Fixed bug in + option; fixed repaint bug 192191930Sdelphij under Sun windows (thanks to Paul Eggert). 193191930Sdelphijv111 5/25/89 Generalized # and % expansion; use 194191930Sdelphij calloc for some error messages. 195191930Sdelphijv112 5/30/89 Get rid of ESC-%, add {}()[] commands. 196191930Sdelphijv113 5/31/89 Optimize lseeks (thanks to Paul Eggert). 197191930Sdelphijv114 7/25/89 Added ESC-/ and ESC-/! commands. 198191930Sdelphijv115 7/26/89 Added ESC-n command. 199191930Sdelphijv116 7/31/89 Added find_pos to optimize g command. 200191930Sdelphijv117 8/1/89 Change -f option to -r. 201191930Sdelphijv118 8/2/89 Save positions for all previous files, 202191930Sdelphij not just the immediately previous one. 203191930Sdelphijv119 8/7/89 Save marks across file boundaries. 204191930Sdelphij Add file handle stuff. 205191930Sdelphijv120 8/11/89 Add :ta command. 206191930Sdelphijv121 8/16/89 Add -f option. 207191930Sdelphijv122 8/30/89 Fix performance with many buffers. 208191930Sdelphijv123 8/31/89 Verbose prompts for string options. 209191930Sdelphij Posted beta to USENET. 21060786Sps----------------------------------------------------------------- 211191930Sdelphijv124 9/18/89 Reorganize search commands, 212191930Sdelphij N = rev, ESC-n = span, add ESC-N. 213191930Sdelphijv125 9/18/89 Fix tab bug (thanks to Alex Liu). 214191930Sdelphij Fix EOF bug when both -w and -c. 215191930Sdelphijv126 10/25/89 Add -j option. 216191930Sdelphijv127 10/27/89 Fix problems with blank lines before BOF. 217191930Sdelphijv128 10/27/89 Add %bj, etc. to prompt strings. 218191930Sdelphijv129 11/3/89 Add -+,-- commands; add set-option and 219191930Sdelphij unset-option to lesskey. 220191930Sdelphijv130 11/6/89 Generalize A_EXTRA to string, remove 221191930Sdelphij set-option, unset-option from lesskey. 222191930Sdelphijv131 11/7/89 Changed name of EDITPROTO to LESSEDIT. 223191930Sdelphijv132 11/8/89 Allow editing of command prefix. 224191930Sdelphijv133 11/16/89 Add -y option (thanks to Jeff Sullivan). 225191930Sdelphijv134 12/1/89 Glob filenames in the -l command. 226191930Sdelphijv135 12/5/89 Combined {}()[] commands into one, and 227191930Sdelphij added ESC-^F and ESC-^B commands. 228191930Sdelphijv136 1/20/90 Added -S, -R flags. Added | command. 229191930Sdelphij Added warning for binary files. (thanks 230191930Sdelphij to Richard Brittain and J. Sullivan). 231191930Sdelphijv137 1/21/90 Rewrote horrible pappend code. 232191930Sdelphij Added * notation for hi-bit chars. 233191930Sdelphijv138 1/24/90 Fix magic cookie terminal handling. 234191930Sdelphij Get rid of "cleanup" loop in ch_get. 235191930Sdelphijv139 1/27/90 Added MSDOS support. (many thanks 236191930Sdelphij to Richard Brittain). 237191930Sdelphijv140 2/7/90 Editing a new file adds it to the 238191930Sdelphij command line list. 239191930Sdelphijv141 2/8/90 Add edit_list for editing >1 file. 240191930Sdelphijv142 2/10/90 Add :x command. 241191930Sdelphijv143 2/11/90 Add * and @ modifies to search cmds. 242191930Sdelphij Change ESC-/ cmd from /@* to / *. 243191930Sdelphijv144 3/1/90 Messed around with ch_zero; 244191930Sdelphij no real change. 245191930Sdelphijv145 3/2/90 Added -R and -v/-V for MSDOS; 246191930Sdelphij renamed FILENAME to avoid conflict. 247191930Sdelphijv146 3/5/90 Pull cmdbuf functions out of command.c 248191930Sdelphijv147 3/7/90 Implement ?@; fix multi-file edit bugs. 249191930Sdelphijv148 3/29/90 Fixed bug in :e<file> then :e#. 250191930Sdelphijv149 4/3/90 Change error,ierror,query to use PARG. 251191930Sdelphijv150 4/6/90 Add LESS_CHARSET, LESS_CHARDEF. 252191930Sdelphijv151 4/13/90 Remove -g option; clean up ispipe. 253191930Sdelphijv152 4/14/90 lsystem() closes input file, for 254191930Sdelphij editors which require exclusive open. 255191930Sdelphijv153 4/18/90 Fix bug if SHELL unset; 256191930Sdelphij fix bug in overstrike control char. 257191930Sdelphijv154 4/25/90 Output to fd 2 via buffer. 258191930Sdelphijv155 4/30/90 Ignore -i if uppercase in pattern 259191930Sdelphij (thanks to Michael Rendell.) 260191930Sdelphijv156 5/3/90 Remove scroll limits in forw() & back(); 261191930Sdelphij causes problems with -c. 262191930Sdelphijv157 5/4/90 Forward search starts at next real line 263191930Sdelphij (not screen line) after jump target. 264191930Sdelphijv158 6/14/90 Added F command. 265191930Sdelphijv159 7/29/90 Fix bug in exiting: output not flushed. 266191930Sdelphijv160 7/29/90 Clear screen before initial output w/ -c. 267191930Sdelphijv161 7/29/90 Add -T flag. 268191930Sdelphijv162 8/14/90 Fix bug with +F on command line. 269191930Sdelphijv163 8/21/90 Added LESSBINFMT variable. 270191930Sdelphijv164 9/5/90 Added -p, LINES, COLUMNS and 271191930Sdelphij unset mark ' == BOF, for 1003.2 D5. 272191930Sdelphijv165 9/6/90 At EOF with -c set, don't display empty 273191930Sdelphij screen when try to page forward. 274191930Sdelphijv166 9/6/90 Fix G when final line in file wraps. 275191930Sdelphijv167 9/11/90 Translate CR/LF -> LF for 1003.2. 276191930Sdelphijv168 9/13/90 Return to curr file if "tag not found". 277191930Sdelphijv169 12/12/90 G goes to EOF even if file has grown. 278191930Sdelphijv170 1/17/91 Add optimization for BSD _setjmp; 279191930Sdelphij fix #include ioctl.h TERMIO problem. 280191930Sdelphij (thanks to Paul Eggert) 281191930Sdelphij Posted to USENET. 28260786Sps----------------------------------------------------------------- 283191930Sdelphijv171 3/6/91 Fix -? bug in get_filename. 284191930Sdelphijv172 3/15/91 Fix G bug in empty file. 285191930Sdelphij Fix bug with ?\n and -i and uppercase 286191930Sdelphij pattern at EOF! 287191930Sdelphij (thanks to Paul Eggert) 288191930Sdelphijv173 3/17/91 Change N cmd to not permanently change 289191930Sdelphij direction. (thanks to Brian Matthews) 290191930Sdelphijv174 3/18/91 Fix bug with namelogfile not getting 291191930Sdelphij cleared when change files. 292191930Sdelphijv175 3/18/91 Fix bug with ++cmd on command line. 293191930Sdelphij (thanks to Jim Meyering) 294191930Sdelphijv176 4/2/91 Change | to not force current screen, 295191930Sdelphij include marked line, start/end from 296191930Sdelphij top of screen. Improve search speed. 297191930Sdelphij (thanks to Don Mears) 298191930Sdelphijv177 4/2/91 Add LESSHELP variable. 299191930Sdelphij Fix bug with F command with -e. 300191930Sdelphij Try /dev/tty for input before using fd 2. 301191930Sdelphij Patches posted to USENET 4/2/91. 30260786Sps----------------------------------------------------------------- 303191930Sdelphijv178 4/8/91 Fixed bug in globbing logfile name. 304191930Sdelphij (thanks to Jim Meyering) 305191930Sdelphijv179 4/9/91 Allow negative -z for screen-relative. 306191930Sdelphijv180 4/9/91 Clear to eos rather than eol if "db"; 307191930Sdelphij don't use "sr" if "da". 308191930Sdelphij (thanks to Tor Lillqvist) 309191930Sdelphijv181 4/18/91 Fixed bug with "negative" chars 80 - FF. 310191930Sdelphij (thanks to Benny Sander Hofmann) 311191930Sdelphijv182 5/16/91 Fixed bug with attribute at EOL. 312191930Sdelphij (thanks to Brian Matthews) 313191930Sdelphijv183 6/1/91 Rewrite linstall to do smart config. 314191930Sdelphijv184 7/11/91 Process \b in searches based on -u 315191930Sdelphij rather than -i. 316191930Sdelphijv185 7/11/91 -Pxxx sets short prompt; assume SIGWINCH 317191930Sdelphij after a SIGSTOP. (thanks to Ken Laprade) 31860786Sps----------------------------------------------------------------- 319191930Sdelphijv186 4/20/92 Port to MS-DOS (Microsoft C). 320191930Sdelphijv187 4/23/92 Added -D option & TAB_COMPLETE_FILENAME. 321191930Sdelphijv188 4/28/92 Added command line editing features. 322191930Sdelphijv189 12/8/92 Fix mem overrun in anscreen.c:init; 323191930Sdelphij fix edit_list to recover from bin file. 324191930Sdelphijv190 2/13/93 Make TAB enter one filename at a time; 325191930Sdelphij create ^L with old TAB functionality. 326191930Sdelphijv191 3/10/93 Defer creating "flash" page for MS-DOS. 327191930Sdelphijv192 9/6/93 Add BACK-TAB. 328191930Sdelphijv193 9/17/93 Simplify binary_file handling. 329191930Sdelphijv194 1/4/94 Add rudiments of alt_filename handling. 330191930Sdelphijv195 1/11/94 Port back to Unix; support keypad. 33160786Sps----------------------------------------------------------------- 332191930Sdelphijv196 6/7/94 Fix bug with bad filename; fix IFILE 333191930Sdelphij type problem. (thanks to David MacKenzie) 334191930Sdelphijv197 6/7/94 Fix bug with .less tables inserted wrong. 335191930Sdelphijv198 6/23/94 Use autoconf installation technology. 336191930Sdelphij (thanks to David MacKenzie) 337191930Sdelphijv199 6/29/94 Fix MS-DOS build (thanks to Tim Wiegman). 338191930Sdelphijv200 7/25/94 Clean up copyright, minor fixes. 339191930Sdelphij Posted to prep.ai.mit.edu 34060786Sps----------------------------------------------------------------- 341191930Sdelphijv201 7/27/94 Check for no memcpy; add casts to calloc; 342191930Sdelphij look for regcmp in libgen.a. 343191930Sdelphij (thanks to Kaveh Ghazi). 344191930Sdelphijv202 7/28/94 Fix bug in edit_next/edit_prev with 345237613Sdelphij non-existent files. 346191930Sdelphijv203 8/2/94 Fix a variety of configuration bugs on 347191930Sdelphij various systems. (thanks to Sakai 348191930Sdelphij Kiyotaka, Harald Koenig, Bjorn Brox, 349191930Sdelphij Teemu Rantanen, and Thorsten Lockert) 350191930Sdelphijv204 8/3/94 Use strerror if available. 351191930Sdelphij (thanks to J.T. Conklin) 352191930Sdelphijv205 8/5/94 Fix bug in finding "me" termcap entry. 353191930Sdelphij (thanks to Andreas Stolcke) 354191930Sdelphij8/10/94 v205+: Change BUFSIZ to LBUFSIZE to avoid name 355191930Sdelphij conflict with stdio.h. 356191930Sdelphij Posted to prep.ai.mit.edu 35760786Sps----------------------------------------------------------------- 358191930Sdelphijv206 8/10/94 Use initial_scrpos for -t to avoid 359191930Sdelphij displaying first page before init(). 360191930Sdelphij (thanks to Dominique Petitpierre) 361191930Sdelphijv207 8/12/94 Fix bug if stdout is not tty. 362191930Sdelphijv208 8/16/94 Fix bug in close_altfile if goto err1 363191930Sdelphij in edit_ifile. (Thanks to M.J. Hewitt) 364191930Sdelphijv209 8/16/94 Change scroll to wscroll to avoid 365191930Sdelphij conflict with library function. 366191930Sdelphijv210 8/16/94 Fix bug with bold on 8 bit chars. 367191930Sdelphij (thanks to Vitor Duarte) 368191930Sdelphijv211 8/16/94 Don't quit on EOI in jump_loc / forw. 369191930Sdelphijv212 8/18/94 Use time_t if available. 370191930Sdelphijv213 8/20/94 Allow ospeed to be defined in termcap.h. 371191930Sdelphijv214 8/20/94 Added HILITE_SEARCH, -F, ESC-u cmd. 372191930Sdelphij (thanks to Paul Lew and Bob Byrnes) 373191930Sdelphijv215 8/23/94 Fix -i toggle behavior. 374191930Sdelphijv216 8/23/94 Process BS in all searches, not only -u. 375191930Sdelphijv217 8/24/94 Added -X flag. 376191930Sdelphijv218 8/24/94 Reimplement undo_search. 377191930Sdelphijv219 8/24/94 Find tags marked with line number 378191930Sdelphij instead of pattern. 379191930Sdelphijv220 8/24/94 Stay at same position after SIG_WINCH. 380191930Sdelphijv221 8/24/94 Fix bug in file percentage in big file. 381191930Sdelphijv222 8/25/94 Do better if can't reopen current file. 382191930Sdelphijv223 8/27/94 Support setlocale. 383191930Sdelphij (thanks to Robert Joop) 384191930Sdelphijv224 8/29/94 Revert v216: process BS in search 385191930Sdelphij only if -u. 386191930Sdelphijv225 9/6/94 Rewrite undo_search again: toggle. 387191930Sdelphijv226 9/15/94 Configuration fixes. 388191930Sdelphij (thanks to David MacKenzie) 389191930Sdelphijv227 9/19/94 Fixed strerror config problem. 390191930Sdelphij Posted to prep.ai.mit.edu 39160786Sps----------------------------------------------------------------- 392191930Sdelphijv228 9/21/94 Fix bug in signals: repeated calls to 393191930Sdelphij get_editkeys overflowed st_edittable. 394191930Sdelphijv229 9/21/94 Fix "Nothing to search" error if -a 395191930Sdelphij and SRCH_PAST_EOF. 396191930Sdelphijv230 9/21/94 Don't print extra error msg in search 397191930Sdelphij after regerror(). 398191930Sdelphijv231 9/22/94 Fix hilite bug if search matches 0 chars. 399191930Sdelphij (thanks to John Polstra) 400191930Sdelphijv232 9/23/94 Deal with weird systems that have 401191930Sdelphij termios.h but not tcgetattr(). 402191930Sdelphij Posted to prep.ai.mit.edu 40360786Sps----------------------------------------------------------------- 404191930Sdelphijv233 9/26/94 Use get_term() instead of pos_init() in 405191930Sdelphij psignals to re-get lower_left termcap. 406191930Sdelphij (Thanks to John Malecki) 407191930Sdelphijv234 9/26/94 Make MIDDLE closer to middle of screen. 408191930Sdelphijv235 9/27/94 Use local strchr if system doesn't have. 409191930Sdelphijv236 9/28/94 Don't use libucb; use libterm if 410191930Sdelphij libtermcap & libcurses doesn't work. 411191930Sdelphij (Fix for Solaris; thanks to Frank Kaefer) 412191930Sdelphijv237 9/30/94 Use system isupper() etc if provided. 413191930Sdelphij Posted to prep.ai.mit.edu 41460786Sps----------------------------------------------------------------- 415191930Sdelphijv238 10/6/94 Make binary non-blinking if LESSBINFMT 416191930Sdelphij is set to a string without a *. 417191930Sdelphijv239 10/7/94 Don't let delimit_word run back past 418191930Sdelphij beginning of cmdbuf. 419191930Sdelphijv240 10/10/94 Don't write into termcap buffer. 420191930Sdelphij (Thanks to Benoit Speckel) 421191930Sdelphijv241 10/13/94 New lesskey file format. 422191930Sdelphij Don't expand filenames in search command. 423191930Sdelphijv242 10/14/94 Allow lesskey specification of "literal". 424191930Sdelphijv243 10/14/94 Add #stop command to lesskey. 425191930Sdelphijv244 10/16/94 Add -f flag to lesskey. 426191930Sdelphijv245 10/25/94 Allow TAB_COMPLETE_FILENAME to be undefd. 427191930Sdelphijv246 10/27/94 Move help file to /usr/local/share. 428191930Sdelphijv247 10/27/94 Add -V option. 429191930Sdelphijv248 11/5/94 Add -V option to lesskey. 430191930Sdelphijv249 11/5/94 Remove -f flag from lesskey; default 431191930Sdelphij input file is ~/.lesskey.in, not stdin. 432191930Sdelphijv250 11/7/94 Lesskey input file "-" means stdin. 433191930Sdelphijv251 11/9/94 Convert cfgetospeed result to ospeed. 434191930Sdelphij (Thanks to Andrew Chernov) 435191930Sdelphijv252 11/16/94 Change default lesskey input file from 436191930Sdelphij .lesskey.in to .lesskey. 437191930Sdelphij Posted to prep.ai.mit.edu 43860786Sps----------------------------------------------------------------- 439191930Sdelphijv253 11/21/94 Fix bug when tags file has a backslash. 440191930Sdelphijv254 12/6/94 Fix -k option. 441191930Sdelphijv255 12/8/94 Add #define EXAMINE to disable :e etc. 442191930Sdelphijv256 12/10/94 Change highlighting: only highlite search 443191930Sdelphij results (but now it is reliable). 444191930Sdelphijv257 12/10/94 Add goto_line and repaint_highlight 445191930Sdelphij to optimize highlight repaints. 446191930Sdelphijv258 12/12/94 Fixup in hilite_line if BS_SPECIAL. 447191930Sdelphijv259 12/12/94 Convert to autoconf 2.0. 448191930Sdelphijv260 12/13/94 Add SECURE define. 449191930Sdelphijv261 12/14/94 Use system WERASE char as EC_W_BACKSPACE. 450191930Sdelphijv262 12/16/94 Add -g/-G flag and screen_hilite. 451191930Sdelphijv263 12/20/94 Reimplement/optimize -G flag behavior. 452191930Sdelphijv264 12/23/94 Allow EXTRA string after line-edit cmd 453191930Sdelphij in lesskey file. 454191930Sdelphijv265 12/24/94 Add LESSOPEN=|cmd syntax. 455191930Sdelphijv266 12/26/94 Add -I flag. 456191930Sdelphijv267 12/28/94 Formalize the four-byte header emitted 457191930Sdelphij by a LESSOPEN pipe. 458191930Sdelphijv268 12/28/94 Get rid of four-byte header. 459191930Sdelphijv269 1/2/95 Close alt file before open new one. 460191930Sdelphij Avoids multiple popen(). 461191930Sdelphijv270 1/3/95 Use VISUAL; use S_ISDIR/S_ISREG; fix 462191930Sdelphij config problem with Solaris POSIX regcomp. 463191930Sdelphijv271 1/4/95 Don't quit on read error. 464191930Sdelphijv272 1/5/95 Get rid of -L. 465191930Sdelphijv273 1/6/95 Fix ch_ungetchar bug; don't call 466191930Sdelphij LESSOPEN on a pipe. 467191930Sdelphijv274 1/6/95 Ported to OS/2 (thanks to Kai Uwe Rommel) 468191930Sdelphijv275 1/18/95 Fix bug if toggle -G at EOF. 469191930Sdelphijv276 1/30/95 Fix OS/2 version. 470191930Sdelphijv277 1/31/95 Add "next" charset; don't display ^X 471191930Sdelphij for X > 128. 472191930Sdelphijv278 2/14/95 Change default for -G. 473191930Sdelphij Posted to prep.ai.mit.edu 47460786Sps----------------------------------------------------------------- 475191930Sdelphijv279 2/22/95 Add GNU options --help, --version. 476191930Sdelphij Minor config fixes. 477191930Sdelphijv280 2/24/95 Clean up calls to glob(); don't set # 478191930Sdelphij if we can't open the new file. 479191930Sdelphijv281 2/24/95 Repeat search should turn on hilites. 480191930Sdelphijv282 3/2/95 Minor fixes. 481191930Sdelphijv283 3/2/95 Fix homefile; make OS2 look in $HOME. 482191930Sdelphijv284 3/2/95 Error if "v" on LESSOPENed file; 483191930Sdelphij "%" figures out file size on pipe. 484191930Sdelphijv285 3/7/95 Don't set # in lsystem; 485191930Sdelphij lesskey try $HOME first. 486191930Sdelphijv286 3/7/95 Reformat change history (too much free time?). 487191930Sdelphijv287 3/8/95 Fix hilite bug if overstrike multiple chars. 488191930Sdelphijv288 3/8/95 Allow lesskey to override get_editkey keys. 489191930Sdelphijv289 3/9/95 Fix adj_hilite bug when line gets processed by 490191930Sdelphij hilite_line more than once. 491191930Sdelphijv290 3/9/95 Make configure automatically. Fix Sequent problem 492191930Sdelphij with incompatible sigsetmask(). 493191930Sdelphij Posted to prep.ai.mit.edu 49460786Sps----------------------------------------------------------------- 495191930Sdelphijv291 3/21/95 Add #env to lesskey. Fix MS-DOS build. 496191930Sdelphij Posted to simtel. 49760786Sps----------------------------------------------------------------- 498191930Sdelphijv292 4/24/95 Add MS-DOS support for Borland C. 499191930Sdelphij Fix arrow keys in MS-DOS versions. 500191930Sdelphijv293 4/28/95 Add auto-versioning stuff to make dist. 501191930Sdelphijv294 5/12/95 Fix Borland build. 502191930Sdelphijv295 1/20/96 Fix search on squished file; add /@@. 503191930Sdelphijv296 1/23/96 Allow cmdbuf larger than screen width. 504191930Sdelphijv297 1/24/96 Don't call termcap if tgetent fails; 505191930Sdelphij add #defines for buffers. 506191930Sdelphijv298 1/24/96 Change @@ to ^K. 507191930Sdelphij Add alternate search modifiers ^N, ^F, ^E. 508191930Sdelphijv299 1/25/96 Fix percent overflow in jump_percent (thanks to Brent Wiese); 509191930Sdelphij don't send "ti" after shell command till RETURN pressed. 510191930Sdelphijv300 1/25/96 Change -U to print tabs as ^I. 511191930Sdelphijv301 1/30/96 Make hilites work in cmd F output. 512191930Sdelphijv302 1/31/96 Fix cmd F to notice window-change signals. 513191930Sdelphijv303 1/31/96 Add ESC-SPACE command. 514191930Sdelphijv304 2/1/96 Add ^R search modifier; add LESSSECURE. 515191930Sdelphijv305 2/2/96 Workaround Linux /proc kernel bug; add LESSKEY. 516191930Sdelphijv306 3/16/96 Minor fixes. 517191930Sdelphijv307 3/25/96 Allow cmd line arg "--"; fix DOS & OS/2 defines.h. 518191930Sdelphijv308 4/4/96 Port to OS-9 (thanks to Boisy Pitre); fix -d. 519191930Sdelphijv309 4/9/96 Fix OS-9 version; fix tags bug with "$". 520191930Sdelphijv310 4/10/96 Get rid of HELPFILE. 521191930Sdelphijv311 4/22/96 Add Windows32 support; merge doscreen.c into screen.c. 522191930Sdelphijv312 4/24/96 Don't quit after "cannot reopen" error. 523191930Sdelphijv313 4/25/96 Added horizontal scrolling. 524191930Sdelphijv314 4/26/96 Modified -e to quit on reaching end of a squished file. 525191930Sdelphijv315 4/26/96 Fix "!;TAB" bug. 526191930Sdelphijv316 5/2/96 Make "|a" when (a < curr screen) go to end of curr screen. 527191930Sdelphijv317 5/14/96 Various fixes for the MS-DOS and OS/2 builds. 528191930Sdelphij Added ## and %% handling for filenames 529191930Sdelphijv318 5/29/96 Port to OS-9 Microware compiler; minor fixes 530191930Sdelphij (thanks to Martin Gregorie). 531191930Sdelphijv319 7/8/96 Fix Windows port (thanks to Jeff Paquette). 532191930Sdelphijv320 7/11/96 Final fixes for Windows port. 533191930Sdelphijv321 7/18/96 Minor fixes. 534191930Sdelphij Posted to Web page. 53560786Sps----------------------------------------------------------------- 536191930Sdelphijv322 8/13/96 Fix bug in shell escape from help file; add support for 537191930Sdelphij Microsoft Visual C under Windows; numerous small fixes. 538191930Sdelphijv323 8/19/96 Fixes for Windows version (thanks to Simon Munton); 539191930Sdelphij fix for Linux library weirdness (thanks to Jim Diamond); 540191930Sdelphij port to DJGPP (thanks to Eli Zaretskii). 541191930Sdelphijv324 8/21/96 Add support for spaces in filenames (thanks to Simon Munton). 542191930Sdelphijv325 8/21/96 Add lessecho, for spaces in filenames under Unix. 543191930Sdelphijv326 8/27/96 Fix DJGPP version. 544191930Sdelphijv327 9/1/96 Reorganize lglob, make spaces in filenames work better in Unix. 545191930Sdelphijv328 10/7/96 Append / to directory name in filename completion. 546191930Sdelphij Fix MS-DOS and OS-9 versions. 547191930Sdelphijv329 10/11/96 Fix more MS-DOS bugs; add LESSSEPARATOR; add -" option. 548191930Sdelphij Add LESSMETACHARS, LESSMETAESCAPE. 549191930Sdelphijv330 10/21/96 Minor fixes. 550191930Sdelphij Posted to Web page. 55160786Sps----------------------------------------------------------------- 552191930Sdelphijv331 4/22/97 Various Windows fixes (thanks to Gurusamy Sarathy). 553191930Sdelphijv332 4/22/97 Enter filenames from cmd line into edit history. 554191930Sdelphij Posted to Web page. 55560786Sps----------------------------------------------------------------- 556191930Sdelphijv333 3/4/99 Changed -w to highlite new line after forward movement. 557191930Sdelphijv334 3/9/99 Avoid overflowing prompt buffer; add %d and %D. 558191930Sdelphijv335 3/20/99 Add EBCDIC support (thanks to Thomas Dorner). 559191930Sdelphij Use HOMEDRIVE/HOMEPATH on Windows (thanks to Preston Bannister). 560191930Sdelphij Posted to Web page. 56160786Sps----------------------------------------------------------------- 562191930Sdelphijv336 4/8/99 Fix installation bugs. 563191930Sdelphijv337 4/9/99 Fix another installation bug. 564191930Sdelphij Posted to Web page. 56560786Sps----------------------------------------------------------------- 566191930Sdelphijv338 4/13/99 Add support for long option names. 567191930Sdelphijv339 4/18/99 Add \k, long option names to lesskey. Add -^P. Add :d. 568191930Sdelphijv340 4/21/99 Add regexec2. Fix Windows build. 569191930Sdelphij Posted to Web page. 57060786Sps----------------------------------------------------------------- 57160786Spsv341 5/6/99 Add -F option; %c & ?c prompt escapes. 572191930Sdelphij (Thanks to Michele Maltoni) 57360786Spsv342 7/22/99 Add system-wide lesskey file; allow GPL or Less License. 574191930Sdelphijv343 9/23/99 Support UTF-8 (Thanks to Robert Brady). 575191930Sdelphij Add %P and ?P in prompts. 576191930Sdelphijv344 10/27/99 -w highlights target line of g and p commands. 577191930Sdelphijv345 10/29/99 Make -R pass thru ESC but not other control chars. 578191930Sdelphij Posted to Web page. 57960786Sps----------------------------------------------------------------- 58060786Spsv346 11/4/99 Fix bugs in long option processing; R cmd should clear hilites. 581191930Sdelphij Posted to Web page. 58260786Sps----------------------------------------------------------------- 583191930Sdelphijv347 12/13/99 Fixes for DJGPP version (thanks to Eli Zaretskii). 584191930Sdelphijv348 12/28/99 Fix deleting file with marks (thanks to Dimitar Jekov). 585191930Sdelphij Fix color problem in DJGPP version (thanks to Eli Zaretskii). 586191930Sdelphijv349 1/24/00 Fix minor DJGPP bugs; check environment vars for UTF-8; 587191930Sdelphij add --with-editor (thanks to Eli, Markus Kuhn, Thomas Schoepf). 588191930Sdelphijv350 3/1/00 Fix clear-while-standout bug. 589191930Sdelphijv351 3/5/00 Change -M and = prompts to show top & bottom line number. 590191930Sdelphij Posted to Web page. 59160786Sps----------------------------------------------------------------- 592191930Sdelphijv352 3/8/00 Fix scan_option NULL dereference. 59360786Sps----------------------------------------------------------------- 594191930Sdelphijv353 3/20/00 Fix SECURE compile bug, allow space after numeric option. 595191930Sdelphijv354 3/23/00 Add support for PCRE; add --with-regex configure option. 59663128Sps----------------------------------------------------------------- 597191930Sdelphijv355 6/28/00 Add -# option (thanks to Andy Levinson). 598191930Sdelphijv356 7/5/00 Add -J option. 599191930Sdelphijv357 7/6/00 Support sigprocmask. 60063128Sps----------------------------------------------------------------- 601191930Sdelphijv358 7/8/00 Fix problems with #stop in lesskey file. 602191930Sdelphij Posted to Web page. 60389019Sps----------------------------------------------------------------- 604191930Sdelphijv359 9/10/00 Fixes for Win32 display problems (thanks to Maurizio Vairani). 605191930Sdelphijv360 1/17/01 Move sysless to etc. 606191930Sdelphijv361 12/4/01 Add IBM-1047 charset & EBCDIC fixes (thanks to Thomas Dorner). 607191930Sdelphij Fix 32 bit dependencies (thanks to Paul Eggert). 608191930Sdelphij Fix UTF-8 overstriking (thanks to Robert Brady). 609191930Sdelphijv362 12/4/01 Make status column show search targets. 610191930Sdelphijv363 12/6/01 Add --no-keypad option. 611191930Sdelphij Add variable width tabstops (thanks to Peter Samuelson). 612191930Sdelphijv364 12/10/01 Better handling of very long lines in input; 613191930Sdelphij Fix horizontal shifting of colored text. 614191930Sdelphijv365 12/11/01 Fix overstriking of tabs; 615191930Sdelphij Add support for global(1) and multiple tag matches 616191930Sdelphij (thanks to Shigio Yamaguchi and Tim Vanderhoek). 617191930Sdelphijv366 12/11/01 Fixes for OS/2 (thanks to Kyosuke Tokoro). 618191930Sdelphijv367 12/13/01 Allow -D and -x options to terminate without dollar sign; 619191930Sdelphij Right/left arrow when entering N are shift cmds, not line edit. 620191930Sdelphijv368 12/18/01 Update lesskey commands. 621191930Sdelphijv370 12/23/01 Fix tags error messages. 622191930Sdelphij Posted to Web page. 62389019Sps----------------------------------------------------------------- 624191930Sdelphijv371 12/26/01 Fix new_file bug; use popen in Windows version; 625191930Sdelphij fix some compiler warnings. 626191930Sdelphijv372 12/29/01 Make -b be in units of 1K. 627191930Sdelphijv373 1/14/02 Improve handling of filenames containing shell metachars. 628191930Sdelphijv374 2/7/02 Fix memory leak; fix bug in -x argument parsing. 629191930Sdelphijv375 4/7/02 Fix searching for SGR sequences; fix SECURE build; 630191930Sdelphij add SGR support to DJGPP version (thanks to Eli Zaretskii). 631191930Sdelphijv376 6/10/02 Fix bug in overstriking mulitbyte UTF-8 characters 632191930Sdelphij (thanks to Jungshik Shin). 633191930Sdelphij Posted to Web page. 634128345Stjr----------------------------------------------------------------- 635191930Sdelphijv377 9/10/02 Fix bug in Windows version when file contains CR; 636191930Sdelphij fix bug in search highlights with -R; 637191930Sdelphij make initial buffer limit really be 64K not unlimited. 638191930Sdelphijv378 9/30/02 Misc bug fixes and compiler warning cleanup. 639191930Sdelphij Posted to Web page. 640128345Stjr----------------------------------------------------------------- 641191930Sdelphijv379 11/23/02 Add -L option; fix bug with ctrl-K in lesskey files; 642191930Sdelphij improve UTF-8 overstriking and underscore overstriking; 643191930Sdelphij fix minor man page problems; change to autoconf 2.54. 644191930Sdelphijv380 11/24/02 Make LINENUM same as POSITION. 645191930Sdelphijv381 11/28/02 Make -N use 7 columns for line number if possible. 646161475Sdelphij----------------------------------------------------------------- 647191930Sdelphijv382 2/3/04 Remove copyrighted code. 648161475Sdelphij----------------------------------------------------------------- 649191930Sdelphijv383 2/16/04 Add history file; add -K option; improve UTF-8 handling; 650191930Sdelphij fix some signed char bugs (thanks to Christian Biere); 651191930Sdelphij fix some upper/lower case bugs (thanks to Bjoern Jacke); 652191930Sdelphij add erase2 char (thanks to David Lawrence); 653191930Sdelphij add windows charset (thanks to Dimitar Zhekov). 654191930Sdelphijv384 2/20/04 Improvements in UTF-8 handling. 655191930Sdelphijv385 2/23/04 Fix UTF-8 output bug. 656161475Sdelphij----------------------------------------------------------------- 657191930Sdelphijv386 9/13/05 Improvements to UTF-8 shift & color (thanks to Charles Levert); 658191930Sdelphij protect against invalid LESSOPEN and LESSCLOSE values. 659191930Sdelphijv387 9/14/05 Update Charles Levert's UTF-8 patch. 660191930Sdelphijv388 9/14/05 Change history behavior; change most sprintf calls to snprintf. 661191930Sdelphijv389 9/14/05 Fix copy & paste with long lines; improve performance of 662191930Sdelphij expand_linebuf; fix crash in init_mlist; 663191930Sdelphijv390 9/15/05 Show search matches in status column even if -G is set. 664161475Sdelphij----------------------------------------------------------------- 665191930Sdelphijv391 9/17/05 Fix bugs. 666191930Sdelphijv392 10/14/05 Fix line wrapping bug. 667191930Sdelphijv393 10/19/05 Allow multiple attributes per char; fix bold+underline bug 668191930Sdelphij (thanks again to Charles Levert). 669191930Sdelphijv394 11/8/05 Fix prompt bug; fix compile problem in Windows build. 670170256Sdelphij----------------------------------------------------------------- 671191930Sdelphijv395 1/12/07 Update Unicode tables (thanks to Charles Levert); 672191930Sdelphij don't chmod if LESSHISTFILE = /dev/null; 673191930Sdelphij make -f work for directories; support DESTDIR in Makefile; 674191930Sdelphij fix sigset_t detection in configure; 675191930Sdelphij make "t" cmd traverse tags in correct order 676191930Sdelphijv396 1/13/07 Add compatibility with POSIX more. 677191930Sdelphijv397 3/21/07 Allow decimal point in number for % command; 678191930Sdelphij Allow decimal point in number for -j option; 679191930Sdelphij Allow n command to fetch last search pattern from history 680191930Sdelphij (thanks to arno). 681191930Sdelphijv398 3/22/07 Don't rewrite history file if not necessary; 682191930Sdelphij fix bug when filenames contain "$". 683191930Sdelphijv399 3/22/07 Don't move to bottom of screen at startup; 684191930Sdelphij don't output extraneous newlines. 685191930Sdelphijv400 3/23/07 Allow search to find pattern after null byte (PCRE and no-regex) 686191930Sdelphij (thanks to Michael Constant). 687170256Sdelphij----------------------------------------------------------------- 688191930Sdelphijv401 3/24/07 Minor documentation fixes. 689191930Sdelphijv402 3/30/07 Fix autoconf bug when memcpy etc are inline; 690191930Sdelphij fix bug in terminating number following -j option. 691191930Sdelphijv403 5/25/07 Fix Windows build. 692191930Sdelphijv404 6/5/07 Fix display bug with F command and long lines. 693191930Sdelphijv405 6/17/07 Fix display bug when using -w option. 694191930Sdelphijv406 6/17/07 Fix secure build. 695191930Sdelphijv407 8/16/07 Fix bugs; support CSI chars. 696191930Sdelphijv408 10/1/07 Fix bug in -i with non-ASCII chars. 697191930Sdelphijv409 10/12/07 Fix crash when viewing text with invalid UTF-8 sequences. 698191930Sdelphijv411 11/6/07 Fix case-insensitive searching with non-ASCII text. 699191930Sdelphijv412 11/6/07 Use symbolic SEEK constants. 700191930Sdelphijv413 11/6/07 Fix search highlight bug with non-ASCII text. 701191930Sdelphijv414 11/6/07 Fix display bug with no-wrap terminals. 702191930Sdelphijv415 11/14/07 Add --follow-name option. 703191930Sdelphijv416 11/22/07 Fix crash when searching text with invalid UTF-8 sequences. 704191930Sdelphijv417 12/31/07 Don't support single-char CSI in UTF-8 mode; 705191930Sdelphij fix bug with -R and invalid CSI sequences; 706191930Sdelphij fix bug searching text with SGR sequences with -r; 707191930Sdelphij emulate SGR sequences in WIN32 build. 708191930Sdelphijv418 12/31/07 Clean up. 709191930Sdelphij----------------------------------------------------------------- 710191930Sdelphijv419 1/16/08 Make CSI char 0x9B work in UTF-8 mode (thanks to Colin Watson). 711191930Sdelphijv420 2/24/08 Add & command; fix -F option; fix '' after G. 712191930Sdelphijv421 2/24/08 Ignore filtered lines when searching. 713191930Sdelphijv422 3/2/08 Output CR at startup. 714191930Sdelphijv423 5/27/08 Clean up. 715191930Sdelphijv424 6/16/08 Fix compile bug with pcre; don't filter help file. 716191930Sdelphijv425 7/14/08 Fix non-ANSI code in list handling in ch.c. 717191930Sdelphijv426 10/27/08 Fix ignaw terminal handling (thanks to Per Hedeland); 718191930Sdelphij fix binary file detection in UTF-8 mode. 719191930Sdelphijv427 3/16/09 A few Win32 fixes (thanks to Jason Hood). 720191930Sdelphijv428 3/30/09 Add "|-" syntax to LESSOPEN. 721191930Sdelphijv429 4/10/09 Fix search highlighting bug with underlined text. 722195941Sdelphij----------------------------------------------------------------- 723195941Sdelphijv430 4/22/09 Don't pass "-" to non-pipe LESSOPEN unless it starts with "-". 724195941Sdelphijv431 4/29/09 Fix highlight bug when match is at end of line. 725195941Sdelphijv432 6/27/09 Better fix for highlight bugs; 726195941Sdelphij fix new problems with ignaw terminals. 727195941Sdelphijv433 6/28/09 Cleanup search code. 728195941Sdelphijv434 6/29/09 More cleanup. 729195941Sdelphijv435 7/04/09 Fix bugs with non-regex filtering. 730195941Sdelphijv436 7/05/09 Fix memory leak. 731221715Sdelphij----------------------------------------------------------------- 732221715Sdelphijv437 7/14/09 Fix bug in handling some long option names; 733221715Sdelphij make percentage calculation more accurate. 734221715Sdelphijv438 12/29/10 Fix bugs with -i/-I and & filtering; 735221715Sdelphij exit with status 2 on ctrl-C with -K. 736221715Sdelphijv439 12/31/10 Add -A option. 737221715Sdelphijv440 1/5/11 Fix bug displaying prompt after = command. 738221715Sdelphijv441 1/21/11 Fix semi-infinite loop if no newlines in file; 739221715Sdelphij make new -A behavior the default. 740221715Sdelphij----------------------------------------------------------------- 741221715Sdelphijv442 3/2/11 Fix search bug. 742221715Sdelphij Add ctrl-G line edit command. 743221715Sdelphijv443 4/9/11 Fix Windows build. 744222906Sdelphijv444 6/8/11 Fix ungetc bug; remove vestiges of obsolete -l option. 745237613Sdelphij----------------------------------------------------------------- 746237613Sdelphijv445 10/19/11 Fix hilite bug in backwards scroll with -J. 747237613Sdelphij Fix hilite bug with backspaces. 748237613Sdelphij Fix bugs handling SGR sequences in Win32 (thanks to Eric Lee). 749237613Sdelphij Add support for GNU regex (thanks to Reuben Thomas). 750237613Sdelphijv446 5/15/12 Up/down arrows in cmd editing search for matching cmd. 751237613Sdelphijv447 5/21/12 Add ESC-F command, two-pipe LESSOPEN syntax. 752237613Sdelphijv448 6/15/12 Print name of regex library in version message. 753237613Sdelphijv449 6/23/12 Allow config option --with-regex=none. 754238730Sdelphijv450 7/4/12 Fix EOF bug with ESC-F. 755238730Sdelphijv451 7/20/12 Fix typo. 756242584Sdelphij----------------------------------------------------------------- 757250592Sdelphijv452 10/19/12 Fix --with-regex=none, fix "stty 0", fix Win32. 758242584Sdelphij Don't quit if errors in cmd line options. 759250592Sdelphijv453 10/27/12 Increase buffer sizes. 760250592Sdelphijv454 11/5/12 Fix typo. 761250592Sdelphijv455 11/5/12 Fix typo. 762250592Sdelphijv456 11/8/12 Fix option string incompatibility. 763250592Sdelphijv457 12/8/12 Use new option string syntax only after --use-backslash. 764250592Sdelphijv458 4/4/13 Fix display bug in using up/down in cmd buffer. 765294286Sdelphij----------------------------------------------------------------- 766294286Sdelphijv459 5/6/13 Fix ++ bug. 767294286Sdelphijv460 6/19/13 Automate construction of Unicode tables. 768294286Sdelphijv461 6/21/13 Collapse multiple CRs before LF. 769294286Sdelphijv462 11/26/13 Don't overwrite history file, just append to it. 770294286Sdelphijv463 7/13/14 Misc. fixes. 771294286Sdelphijv464 7/19/14 Fix bugs & improve performance in & filtering 772294286Sdelphij (thanks to John Sullivan). 773294286Sdelphijv465 8/9/14 More fixes from John Sullivan. 774294286Sdelphijv466 8/23/14 Add colon to LESSANSIMIDCHARS. 775294286Sdelphijv467 9/18/14 Misc. fixes. 776294286Sdelphijv468 9/18/14 Fix typo 777294286Sdelphijv469 10/2/14 Allow extra string in command to append to a multichar 778294286Sdelphij cmd without executing it; fix bug using GNU regex. 779294286Sdelphijv470 10/5/14 Fix some compiler warnings. 780294286Sdelphijv471 12/14/14 Fix unget issues with prompt. Allow disabling history 781294286Sdelphij when compiled value of LESSHISTFILE = "-". 782294286Sdelphijv473 12/19/14 Fix prompt bug with stdin and -^P in lesskey extra string. 783294286Sdelphijv474 1/30/15 Fix bug in backwards search with match on bottom line. 784294286Sdelphij Make follow mode reopen file if file shrinks. 785294286Sdelphijv475 3/2/15 Fix possible buffer overrun with invalid UTF-8; 786294286Sdelphij fix bug when compiled with no regex; fix non-match search. 787294286Sdelphijv476 5/3/15 Update man pages. 788294286Sdelphijv477 5/19/15 Fix off-by-one in jump_forw_buffered; 789294286Sdelphij don't add FAKE_* files to cmd history. 790294286Sdelphijv478 5/21/15 Fix nonportable pointer usage in hilite tree. 791294286Sdelphijv479 7/6/15 Allow %% escapes in LESSOPEN variable. 792330571Sdelphijv480 7/24/15 Fix bug in no-regex searches; support MSVC v1900. 793330571Sdelphijv481 8/20/15 Fix broken -g option. 794330571Sdelphij----------------------------------------------------------------- 795330571Sdelphijv482 2/25/16 Update Unicode database to "2015-06-16, 20:24:00 GMT [KW]". 796330571Sdelphijv483 2/27/16 Regenerate hilite when change search caselessness. 797330571Sdelphij (Thanks to Jason Hood) 798330571Sdelphij Fix bug when terminal has no "cm". (Thanks to Noel Cragg) 799330571Sdelphijv484 9/20/16 Update to Unicode 9.0.0 database. 800330571Sdelphijv485 10/21/16 Fix "nothing to search" bug when top/bottom line is empty; 801330571Sdelphij Display line numbers in bold. (thanks to Jason Hood); 802330571Sdelphij Fix incorrect display when entering double-width chars in 803330571Sdelphij search string. 804330571Sdelphijv486 10/22/16 New commands ESC-{ and ESC-} to shift to start/end of 805330571Sdelphij displayed lines; new option -Da in Windows version to 806330571Sdelphij enable SGR mode (thanks to Jason Hood). 807330571Sdelphijv487 10/23/16 configure --help formatting. 808330571Sdelphij----------------------------------------------------------------- 809330571Sdelphijv488 2/23/17 Fix memory leaks in search (thanks to John Brooks). 810330571Sdelphijv489 3/30/17 Make -F not do init/deinit if file fits on one screen 811330571Sdelphij (thanks to Jindrich Novy). 812330571Sdelphijv490 4/5/17 Switch to ANSI prototypes in funcs.h; remove "register". 813330571Sdelphijv491 4/7/17 Fix signed char bug. 814330571Sdelphijv492 4/21/17 Handle SIGTERM. 815330571Sdelphijv493 6/22/17 Fix bug initializing charset in MSDOS build. 816330571Sdelphijv494 6/26/17 Update Unicode tables; make Cf chars composing not binary. 817330571Sdelphijv495 7/3/17 Improve binary file detection (thanks to Bela Lubkin); 818330571Sdelphij do -R filter when matching tags (thanks to Matthew Malcomson). 819330571Sdelphijv496 7/5/17 Add LESSRSCROLL marker. 820330571Sdelphijv497 7/5/17 Sync. 821330571Sdelphijv498 7/7/17 Fix early truncation of text if last char is double-width. 822330571Sdelphijv499 7/10/17 Misc fixes. 823330571Sdelphijv500 7/11/17 Fix bug where certain env variables couldn't be set in lesskey. 824330571Sdelphijv501 7/12/17 Make sure rscroll char is standout by default. 825330571Sdelphijv502 7/13/17 Control rscroll char via command line option not env variable. 826330571Sdelphijv503 7/13/17 Switch to git. 827330571Sdelphijv504 7/13/17 Call opt_rscroll at startup; change mkhelp.c to mkhelp.pl. 828330571Sdelphijv505 7/17/17 Add M and ESC-M commands; 829330571Sdelphij fix buffer handling with stdin and LESSOPEN. 830330571Sdelphijv506 7/17/17 On Windows, convert UTF-8 to multibyte if console is not UTF-8; 831330571Sdelphij handle extended chars on input (thanks to Jason Hood). 832330571Sdelphijv507 7/18/17 Fix some bugs handling filenames containing shell metachars. 833330571Sdelphijv508 7/19/17 Fix bugs when using LESSOPEN to read stdin. 834330571Sdelphijv509 7/19/17 Fix another stdin bug. 835330571Sdelphijv510 7/20/17 Fix bug in determining when to reopen a file. 836330571Sdelphijv511 7/25/17 Fix bugs in recent MSDOS changes (thanks to Jason Hood). 837330571Sdelphijv512 7/26/17 Fix MSDOS build. 838330571Sdelphijv513 7/26/17 Fix switch to normal attr at end of line with -R and rscroll. 839330571Sdelphijv514 7/27/17 Fix bug in fcomplete when pattern does not match a file. 840330571Sdelphijv515 7/28/17 Allow 'u' in -D option on Windows. 841330571Sdelphijv516 7/29/17 Fix bug using LESSOPEN with filename containing metachars. 842330571Sdelphijv517 7/30/17 Status column shows matches even if hiliting is disabled via -G. 843330571Sdelphijv518 8/1/17 Use underline in sgr mode in MSDOS (thanks to Jason Hood). 844330571Sdelphijv519 8/10/17 Fix rscroll bug when last char of line starts coloration. 845330571Sdelphijv520 9/3/17 Fix compiler warning. 846330571Sdelphijv521 10/20/17 Fix binary file warning in UTF-8 files with SGI sequences. 847330571Sdelphijv522 10/20/17 Handle keypad ENTER key properly. 848330571Sdelphijv523 10/23/17 Cleanup. 849330571Sdelphijv524 10/24/17 Fix getcc bug. 850330571Sdelphijv525 10/24/17 Change M command to mark last displayed line. 851330571Sdelphijv526 10/25/17 Fix search hilite bug introduced in v517. 852330571Sdelphijv527 10/30/17 Fix search hilite bug on last page with -a. 853330571Sdelphijv528 11/3/17 Make second ESC-u clear status column. 854330571Sdelphijv529 11/12/17 Display Unicode formatting chars in hex if -U is set. 855330571Sdelphijv530 12/2/17 Minor doc change and add missing VOID_PARAM. 85660786Sps*/ 85760786Sps 858330571Sdelphijchar version[] = "530"; 859