home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 036 / less232.zip / VERSION.C < prev    next >
Text File  |  1994-09-23  |  21KB  |  424 lines

  1. /*
  2.  * Copyright (c) 1984,1985,1989,1994  Mark Nudelman
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms, with or without
  6.  * modification, are permitted provided that the following conditions
  7.  * are met:
  8.  * 1. Redistributions of source code must retain the above copyright
  9.  *    notice, this list of conditions and the following disclaimer.
  10.  * 2. Redistributions in binary form must reproduce the above copyright
  11.  *    notice in the documentation and/or other materials provided with 
  12.  *    the distribution.
  13.  *
  14.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
  15.  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  16.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
  17.  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
  18.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
  19.  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
  20.  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
  21.  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
  22.  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
  23.  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 
  24.  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25.  */
  26.  
  27.  
  28. /*
  29.  *    ----------------------- CHANGE HISTORY --------------------------
  30.  *
  31.  *        Allowed use on standard input        1/29/84   markn
  32.  *        Added E, N, P commands            2/1/84    markn
  33.  *        Added '=' command, 'stop' signal handling    4/17/84   markn
  34.  *        Added line folding                4/20/84   markn
  35.  *    v2: Fixed '=' command to use BOTTOM_PLUS_ONE, 
  36.  *        instead of TOP, added 'p' & 'v' commands    4/27/84   markn
  37.  *    v3: Added -m and -t options, '-' command    5/3/84    markn
  38.  *    v4: Added LESS environment variable        5/3/84    markn
  39.  *    v5: New comments, fixed '-' command slightly    5/3/84    markn
  40.  *    v6: Added -Q, visual bell            5/15/84   markn
  41.  *    v7: Fixed jump_back(n) bug: n should count real
  42.  *        lines, not folded lines.  Also allow number
  43.  *        on G command.                5/24/84   markn
  44.  *    v8: Re-do -q and -Q commands            5/30/84   markn
  45.  *    v9: Added "+<cmd>" argument            9/25/84   markn
  46.  *    v10: Fixed bug in -b<n> argument processing    10/10/84  markn
  47.  *    v11: Made error() ring bell if \n not entered.    10/18/84  markn
  48.  *    -----------------------------------------------------------------
  49.  *    v12: Reorganized signal handling and made
  50.  *         portable to 4.2bsd.            2/13/85   mark
  51.  *    v13: Reword error message for '-' command.    2/16/85   mark
  52.  *    v14: Added -bf and -bp variants of -b.        2/22/85   mark
  53.  *    v15: Miscellaneous changes.            2/25/85   mark
  54.  *    v16: Added -u flag for backspace processing.    3/13/85   mark
  55.  *    v17: Added j and k commands, 
  56.  *        changed -t default.            4/13/85   mark
  57.  *    v18: Rewrote signal handling code.        4/20/85   mark
  58.  *    v19: Got rid of "verbose" eq_message().        5/2/85    mark
  59.  *         Made search() scroll in some cases.
  60.  *    v20: Fixed screen.c ioctls for System V.    5/21/85   mark
  61.  *    v21: Fixed some first_cmd bugs.            5/23/85   mark
  62.  *    v22: Added support for no RECOMP nor REGCMP.    5/24/85   mark
  63.  *     v23: Miscellanous changes and prettying up.    5/25/85   mark
  64.  *        Posted to USENET.
  65.  *    -----------------------------------------------------------------
  66.  *      v24: Added ti,te terminal init & de-init       6/3/85 Mike Kersenbrock
  67.  *    v25: Added -U flag, standout mode underlining.    6/8/85    mark
  68.  *    v26: Added -M flag.                6/9/85    mark
  69.  *         Use underline termcap (us) if it exists.
  70.  *    v27: Renamed some variables to make unique in    6/15/85   mark
  71.  *         6 chars.  Minor fix to -m.
  72.  *    v28: Fixed right margin bug.            6/28/85   mark
  73.  *    v29: Incorporated M.Rose's changes to signal.c    6/28/85   mark
  74.  *    v30: Fixed stupid bug in argument processing.    6/29/85   mark
  75.  *    v31: Added -p flag, changed repaint algorithm.  7/15/85   mark
  76.  *         Added kludge for magic cookie terminals.
  77.  *    v32: Added cat_file if output not a tty.    7/16/85   mark
  78.  *    v33: Added -e flag and EDITOR.            7/23/85   mark
  79.  *    v34: Added -s flag.                7/26/85   mark
  80.  *    v35: Rewrote option handling; added option.c.    7/27/85   mark
  81.  *    v36: Fixed -e flag to work if not last file.    7/29/85   mark
  82.  *    v37: Added -x flag.                8/10/85   mark
  83.  *    v38: Changed prompting; created prompt.c.    8/19/85   mark
  84.  *    v39: (Not -p) does not initially clear screen.    8/24/85   mark
  85.  *    v40: Added "skipping" indicator in forw().    8/26/85   mark
  86.  *        Posted to USENET.
  87.  *    -----------------------------------------------------------------
  88.  *    v41: ONLY_RETURN, control char commands,    9/17/85   mark
  89.  *         faster search, other minor fixes.
  90.  *    v42: Added ++ command line syntax;        9/25/85   mark
  91.  *         ch_fsize for pipes.
  92.  *    v43: Added -h flag, changed prim.c algorithms.    10/15/85  mark
  93.  *    v44: Made END print in all cases of eof;    10/16/85  mark
  94.  *         ignore SIGTTOU after receiving SIGTSTP.
  95.  *    v45: Never print backspaces unless -u.        10/16/85  mark
  96.  *    v46: Backwards scroll in jump_loc.        10/24/85  mark
  97.  *    v47: Fixed bug in edit(): *first_cmd==0        10/30/85  mark
  98.  *    v48: Use TIOCSETN instead of TIOCSETP.        11/16/85  mark
  99.  *         Added marks (m and ' commands).
  100.  *        Posted to USENET.
  101.  *    -----------------------------------------------------------------
  102.  *    v49: Fixed bug: signal didn't clear mcc.    1/9/86    mark
  103.  *    v50: Added ' (quote) to gomark.            1/15/86   mark
  104.  *    v51: Added + cmd, fixed problem if first_cmd
  105.  *         fails, made g cmd sort of "work" on pipes
  106.  *         even if bof is no longer buffered.        1/16/86   mark
  107.  *    v52: Made short files work better.        1/17/86   mark
  108.  *    v53: Added -P option.                1/20/86   mark
  109.  *    v54: Changed help to use HELPFILE.        1/20/86   mark
  110.  *    v55: Messages work better if not tty output.    1/23/86   mark
  111.  *    v56: Added -l option.                1/24/86   mark
  112.  *    v57: Fixed -l to get confirmation before
  113.  *         overwriting an existing file.        1/31/86   mark
  114.  *    v58: Added filename globbing.            8/28/86   mark
  115.  *    v59: Fixed some bugs with very long filenames.    9/15/86   mark
  116.  *    v60: Incorporated changes from Leith (Casey)
  117.  *         Leedom for boldface and -z option.        9/26/86   mark
  118.  *    v61: Got rid of annoying repaints after ! cmd.    9/26/86   mark
  119.  *        Posted to USENET.
  120.  *    -----------------------------------------------------------------
  121.  *    v62: Added is_directory(); change -z default to
  122.  *         -1 instead of 24; cat-and-exit if -e and
  123.  *         file is less than a screenful.        12/23/86  mark
  124.  *    v63: Fixed bug in cat-and-exit if > 1 file.    1/8/87    mark
  125.  *    v64: Changed puts/putstr, putc/putchr, 
  126.  *         getc/getchr to avoid name conflict with 
  127.  *         stdio functions.                1/12/87  mark
  128.  *    v65: Allowed '-' command to change NUMBER
  129.  *         valued options (thanks to Gary Puckering)    1/26/87  mark
  130.  *    v66: Fixed bug: prepaint should use force=1.    2/13/87  mark
  131.  *    v67: Added !! and % expansion to ! command.    2/24/87  mark
  132.  *    v68: Added SIGWINCH and TIOCGWINSZ support;
  133.  *         changed is_directory to bad_file.
  134.  *         (thanks to J. Robert Ward)            2/25/87  mark
  135.  *    v69: Added SIGWIND and WIOCGETD (for Unix PC).    2/25/87  mark
  136.  *    v70: Changed help cmd from 'h' to 'H'; better 
  137.  *         error msgs in bad_file, errno_message.    3/13/87  mark
  138.  *    v71: Changed -p to -c, made triple -c/-C
  139.  *         for clear-eol like more's -c.        5/11/87  mark
  140.  *    v72: Added -E, -L, use $SHELL in lsystem().    6/26/87  mark
  141.  *         (thanks to Steve Spearman)
  142.  *    v73: Allow Examine "#" for previous file.    6/26/87  mark
  143.  *        Posted to USENET 8/25/87.
  144.  *    -----------------------------------------------------------------
  145.  *    v74: Fix conflict in EOF symbol with stdio.h,    9/18/87  mark
  146.  *         Make os.c more portable to BSD.
  147.  *    v75: Fix problems in get_term (thanks to     9/23/87  mark
  148.  *         Paul Eggert); new backwards scrolling in
  149.  *         jump_loc (thanks to Marion Hakanson).
  150.  *    v76: Added -i flag; allow single "!" to        9/23/87  mark
  151.  *         invoke a shell (thanks to Franco Barber).
  152.  *    v77: Added -n flag and line number support.    9/24/87  mark
  153.  *    v78: Fixed problem with prompts longer than    9/25/87  mark
  154.  *         the screen width.    
  155.  *    v79: Added the _ command.            9/29/87  mark
  156.  *    v80: Allow signal to break out of linenum scan.    10/6/87  mark
  157.  *    v81: Allow -b to be changed from within less.    10/6/87  mark
  158.  *    v82: Add cmd_decode to use a table for key    10/7/87  mark
  159.  *         binding (thanks to David Nason).
  160.  *    v83: Allow .less file for user-defined keys.    10/9/87  mark
  161.  *    v84: Fix -e/-E problems (thanks to Felix Lee).    10/11/87 mark
  162.  *    v85: Search now keeps track of line numbers.    10/15/87 mark
  163.  *    v86: Added -B option and autobuf; fixed        10/20/87 mark
  164.  *         "pipe error" bug.
  165.  *    v87: Fix bug re BSD signals while reading file.    3/1/88   mark
  166.  *    v88: Use new format for -P option (thanks to    3/12/88  mark
  167.  *         der Mouse), allow "+-c" without message,
  168.  *         fix bug re BSD hangup.
  169.  *    v89: Turn off line numbers if linenum scan    3/18/88  mark
  170.  *         is interrupted.
  171.  *    v90: Allow -P from within less.            3/30/88  mark
  172.  *    v91: Added tags file support (new -t option)    3/30/88  mark
  173.  *         (thanks to Brian Campbell).
  174.  *    v92: Added -+option syntax.            4/4/88   mark
  175.  *    v93: Add support for slow input (thanks to    4/11/88  mark
  176.  *         Joe Orost & apologies for taking almost
  177.  *         3 years to get this in!)
  178.  *    v94: Redo reading/signal stuff.            4/11/88  mark
  179.  *    v95: Repaint screen better after signal.    4/20/88  mark
  180.  *    v96: Add /! and ?! commands.            4/21/88  mark
  181.  *    v97: Allow -l/-L from within less.        5/17/88  mark
  182.  *         Eliminate some static arrays (use calloc).
  183.  *        Posted to USENET.
  184.  *    -----------------------------------------------------------------
  185.  *    v98: Fix incorrect calloc call; uninitialized    10/14/88 mark
  186.  *         var in exec_mca; core dump on unknown TERM.
  187.  *         Make v cmd work if past last line of file.
  188.  *         Fix some signal bugs.
  189.  *    v99: Allow space between -X and string,        10/29/88 mark
  190.  *         when X is a string-valued option.
  191.  *    v100: Fix globbing bug when $SHELL not set;    1/5/89   mark
  192.  *          allow spaces after -t command.
  193.  *    v101: Fix problem with long (truncated) lines    1/6/89   mark
  194.  *          in tags file (thanks to Neil Dixon).
  195.  *    v102: Fix bug with E# when no prev file;    1/6/89   mark
  196.  *          allow spaces after -l command.
  197.  *    v103: Add -N, -f and -? options.  Add z and w    3/14/89  mark
  198.  *          commands.  Add %L for prompt strings.
  199.  *    v104: Added EDITPROTO.                3/16/89  mark
  200.  *    v105: Fix bug in find_linenum which cached    3/20/89  mark
  201.  *          incorrectly on long lines.
  202.  *    v106: Added -k option and multiple lesskey      3/31/89  mark
  203.  *          files.
  204.  *    v107: Add 8-bit char support and -g option.    4/27/89  mark
  205.  *          Split option code into 3 files.
  206.  *    v108: Allocate position table dynamically       5/5/89   mark
  207.  *          (thanks to Paul Eggert); change % command
  208.  *          from "percent" to vi-style brace finder.
  209.  *    v109: Added ESC-% command, split prim.c.    5/10/89  mark
  210.  *    v110: Fixed bug in + option; fixed repaint bug    5/24/89  mark
  211.  *          under Sun windows (thanks to Paul Eggert).
  212.  *    v111: Generalized # and % expansion; use     5/25/89  mark
  213.  *          calloc for some error messages.
  214.  *    v112: Get rid of ESC-%, add {}()[] commands.    5/30/89  mark
  215.  *    v113: Optimize lseeks (thanks to Paul Eggert).    5/31/89  mark
  216.  *    v114: Added ESC-/ and ESC-/! commands.        7/25/89  mark
  217.  *    v115: Added ESC-n command.            7/26/89  mark
  218.  *    v116: Added find_pos to optimize g command.    7/31/89  mark
  219.  *    v117: Change -f option to -r.            8/1/89   mark
  220.  *    v118: Save positions for all previous files,    8/2/89   mark
  221.  *          not just the immediately previous one.
  222.  *    v119: Save marks across file boundaries.    8/7/89   mark
  223.  *          Add file handle stuff.
  224.  *    v120: Add :ta command.                8/11/89  mark
  225.  *    v121: Add -f option.                8/16/89  mark
  226.  *    v122: Fix performance with many buffers.    8/30/89  mark
  227.  *    v123: Verbose prompts for string options.    8/31/89  mark
  228.  *        Posted beta to USENET.
  229.  *    -----------------------------------------------------------------
  230.  *    v124: Reorganize search commands,        9/18/89  mark
  231.  *          N = rev, ESC-n = span, add ESC-N.
  232.  *    v125: Fix tab bug (thanks to Alex Liu).        9/18/89  mark
  233.  *          Fix EOF bug when both -w and -c.
  234.  *    v126: Add -j option.                10/25/89 mark
  235.  *    v127: Fix problems with blank lines before BOF.    10/27/89 mark
  236.  *    v128: Add %bj, etc. to prompt strings.        10/27/89 mark
  237.  *    v129: Add -+,-- commands; add set-option and    11/3/89  mark
  238.  *          unset-option to lesskey.
  239.  *    v130: Generalize A_EXTRA to string, remove    11/6/89  mark
  240.  *          set-option, unset-option from lesskey.
  241.  *    v131: Changed name of EDITPROTO to LESSEDIT.    11/7/89  mark
  242.  *    v132: Allow editing of command prefix.        11/8/89  mark
  243.  *    v133: Add -y option (thanks to Jeff Sullivan).    11/16/89 mark
  244.  *    v134: Glob filenames in the -l command.        12/1/89  mark
  245.  *    v135: Combined {}()[] commands into one, and    12/5/89  mark
  246.  *          added ESC-^F and ESC-^B commands.
  247.  *    v136: Added -S, -R flags.  Added | command.    1/20/90  mark
  248.  *          Added warning for binary files. (thanks 
  249.  *          to Richard Brittain and J. Sullivan).
  250.  *    v137: Rewrote horrible pappend code.        1/21/90  mark
  251.  *          Added * notation for hi-bit chars.
  252.  *    v138: Fix magic cookie terminal handling.    1/24/90  mark
  253.  *          Get rid of "cleanup" loop in ch_get.
  254.  *    v139: Added MSDOS support.  (many thanks    1/27/90  mark
  255.  *          to Richard Brittain).
  256.  *    v140: Editing a new file adds it to the        2/7/90   mark
  257.  *          command line list.
  258.  *    v141: Add edit_list for editing >1 file.    2/8/90   mark
  259.  *    v142: Add :x command.                2/10/90  mark
  260.  *    v143: Add * and @ modifies to search cmds.    2/11/90  mark
  261.  *          Change ESC-/ cmd from /@* to / *.
  262.  *    v144: Messed around with ch_zero;         3/1/90   mark
  263.  *          no real change.
  264.  *    v145: Added -R and -v/-V for MSDOS;        3/2/90   mark
  265.  *          renamed FILENAME to avoid conflict.
  266.  *    v146: Pull cmdbuf functions out of command.c    3/5/90   mark
  267.  *    v147: Implement ?@; fix multi-file edit bugs.    3/7/90   mark
  268.  *    v148: Fixed bug in :e<file> then :e#.        3/29/90  mark
  269.  *    v149: Change error,ierror,query to use PARG.    4/3/90   mark
  270.  *    v150: Add LESS_CHARSET, LESS_CHARDEF.        4/6/90   mark
  271.  *    v151: Remove -g option; clean up ispipe.    4/13/90  mark
  272.  *    v152: lsystem() closes input file, for        4/14/90  mark
  273.  *          editors which require exclusive open.
  274.  *    v153: Fix bug if SHELL unset;             4/18/90  mark
  275.  *          fix bug in overstrike control char.
  276.  *    v154: Output to fd 2 via buffer.        4/25/90  mark
  277.  *    v155: Ignore -i if uppercase in pattern        4/30/90  mark
  278.  *          (thanks to Michael Rendell.)
  279.  *    v156: Remove scroll limits in forw() & back();    5/3/90   mark
  280.  *          causes problems with -c.
  281.  *    v157: Forward search starts at next real line    5/4/90   mark
  282.  *          (not screen line) after jump target.
  283.  *    v158: Added F command.                6/14/90  mark
  284.  *    v159: Fix bug in exiting: output not flushed.    7/29/90  mark
  285.  *    v160: Clear screen before initial output w/ -c.    7/29/90  mark
  286.  *    v161: Add -T flag.                7/29/90  mark
  287.  *    v162: Fix bug with +F on command line.        8/14/90  mark
  288.  *    v163: Added LESSBINFMT variable.        8/21/90  mark
  289.  *    v164: Added -p, LINES, COLUMNS and        9/5/90   mark
  290.  *          unset mark ' == BOF, for 1003.2 D5.
  291.  *    v165: At EOF with -c set, don't display empty    9/6/90   mark
  292.  *          screen when try to page forward.
  293.  *    v166: Fix G when final line in file wraps.    9/6/90   mark
  294.  *    v167: Translate CR/LF -> LF for 1003.2.        9/11/90  mark
  295.  *    v168: Return to curr file if "tag not found".    9/13/90  mark
  296.  *    v169: G goes to EOF even if file has grown.    12/12/90 mark
  297.  *    v170: Add optimization for BSD _setjmp;        1/17/91  mark
  298.  *          fix #include ioctl.h TERMIO problem.
  299.  *          (thanks to Paul Eggert)
  300.  *        Posted to USENET.
  301.  *    -----------------------------------------------------------------
  302.  *    v171: Fix -? bug in get_filename.        3/6/91    mark
  303.  *    v172: Fix G bug in empty file.            3/15/91   mark
  304.  *          Fix bug with ?\n and -i and uppercase
  305.  *          pattern at EOF!
  306.  *          (thanks to Paul Eggert)
  307.  *    v173: Change N cmd to not permanently change    3/17/91   mark
  308.  *          direction. (thanks to Brian Matthews)
  309.  *    v174: Fix bug with namelogfile not getting    3/18/91   mark
  310.  *          cleared when change files.
  311.  *    v175: Fix bug with ++cmd on command line.    3/18/91   mark
  312.  *          (thanks to Jim Meyering)
  313.  *    v176: Change | to not force current screen,    4/2/91    mark
  314.  *          include marked line, start/end from 
  315.  *          top of screen.  Improve search speed.
  316.  *          (thanks to Don Mears)
  317.  *    v177: Add LESSHELP variable.            4/2/91    mark
  318.  *          Fix bug with F command with -e.
  319.  *          Try /dev/tty for input before using fd 2.
  320.  *        Patches posted to USENET  4/2/91.
  321.  *    -----------------------------------------------------------------
  322.  *    v178: Fixed bug in globbing logfile name.    4/8/91
  323.  *          (thanks to Jim Meyering)
  324.  *    v179: Allow negative -z for screen-relative.    4/9/91
  325.  *    v180: Clear to eos rather than eol if "db";    4/9/91
  326.  *          don't use "sr" if "da".
  327.  *          (thanks to Tor Lillqvist)
  328.  *    v181: Fixed bug with "negative" chars 80 - FF.    4/18/91
  329.  *          (thanks to Benny Sander Hofmann)
  330.  *    v182: Fixed bug with attribute at EOL.        5/16/91
  331.  *          (thanks to Brian Matthews)
  332.  *    v183: Rewrite linstall to do smart config.    6/1/91
  333.  *    v184: Process \b in searches based on -u    7/11/91
  334.  *          rather than -i.
  335.  *    v185: -Pxxx sets short prompt; assume SIGWINCH    7/11/91
  336.  *          after a SIGSTOP. (thanks to Ken Laprade)
  337.  *    -----------------------------------------------------------------
  338.  *    v186: Port to MS-DOS (Microsoft C).        4/20/92
  339.  *    v187: Added -D option & TAB_COMPLETE_FILENAME.    4/23/92
  340.  *    v188: Added command line editing features.    4/28/92
  341.  *    v189: Fix mem overrun in anscreen.c:init;     12/8/92
  342.  *          fix edit_list to recover from bin file.
  343.  *    v190: Make TAB enter one filename at a time;    2/13/93
  344.  *          create ^L with old TAB functionality.
  345.  *    v191: Defer creating "flash" page for MS-DOS.    3/10/93
  346.  *    v192: Add BACK-TAB.                9/6/93
  347.  *    v193: Simplify binary_file handling.        9/17/93
  348.  *    v194: Add rudiments of alt_filename handling.    1/4/94
  349.  *    v195: Port back to Unix; support keypad.    1/11/94
  350.  *    -----------------------------------------------------------------
  351.  *    v196: Fix bug with bad filename; fix IFILE    6/7/94
  352.  *          type problem. (thanks to David MacKenzie)
  353.  *    v197: Fix bug with .less tables inserted wrong.    6/7/94
  354.  *    v198: Use autoconf installation technology.    6/23/94
  355.  *          (thanks to David MacKenzie)
  356.  *    v199: Fix MS-DOS build (thanks to Tim Wiegman).    6/29/94
  357.  *    v200: Clean up copyright, minor fixes.        7/25/94
  358.  *        Posted to prep.ai.mit.edu
  359.  *    -----------------------------------------------------------------
  360.  *    v201: Check for no memcpy; add casts to calloc;    7/27/94
  361.  *          look for regcmp in libgen.a.
  362.  *          (thanks to Kaveh Ghazi).
  363.  *    v202: Fix bug in edit_next/edit_prev with     7/28/94
  364.  *          non-existant files.
  365.  *    v203: Fix a variety of configuration bugs on    8/2/94
  366.  *          various systems. (thanks to Sakai 
  367.  *          Kiyotaka, Harald Koenig, Bjorn Brox,
  368.  *          Teemu Rantanen, and Thorsten Lockert)
  369.  *    v204: Use strerror if available.        8/3/94
  370.  *          (thanks to J.T. Conklin)
  371.  *    v205: Fix bug in finding "me" termcap entry.    8/5/94
  372.  *          (thanks to Andreas Stolcke)
  373.  *    v205+: Change BUFSIZ to LBUFSIZE to avoid name    8/10/94
  374.  *          conflict with stdio.h.
  375.  *        Posted to prep.ai.mit.edu
  376.  *    -----------------------------------------------------------------
  377.  *    v206: Use initial_scrpos for -t to avoid    8/10/94
  378.  *          displaying first page before init().
  379.  *          (thanks to Dominique Petitpierre)
  380.  *    v207: Fix bug if stdout is not tty.        8/12/94
  381.  *    v208: Fix bug in close_altfile if goto err1    8/16/94
  382.  *          in edit_ifile. (Thanks to M.J. Hewitt)
  383.  *    v209: Change scroll to wscroll to avoid     8/16/94
  384.  *          conflict with library function.
  385.  *    v210: Fix bug with bold on 8 bit chars.        8/16/94
  386.  *          (thanks to Vitor Duarte)
  387.  *    v211: Don't quit on EOI in jump_loc / forw.    8/16/94
  388.  *    v212: Use time_t if available.            8/18/94
  389.  *    v213: Allow ospeed to be defined in termcap.h.    8/20/94
  390.  *    v214: Added HILITE_SEARCH, -F, ESC-u cmd.    8/20/94
  391.  *          (thanks to Paul Lew and Bob Byrnes)
  392.  *    v215: Fix -i toggle behavior.            8/23/94
  393.  *    v216: Process BS in all searches, not only -u.    8/23/94
  394.  *    v217: Added -X flag.                8/24/94
  395.  *    v218: Reimplement undo_search.            8/24/94
  396.  *    v219: Find tags marked with line number        8/24/94
  397.  *          instead of pattern.
  398.  *    v220: Stay at same position after SIG_WINCH.    8/24/94
  399.  *    v221: Fix bug in file percentage in big file.    8/24/94
  400.  *    v222: Do better if can't reopen current file.    8/25/94
  401.  *    v223: Support setlocale.            8/27/94
  402.  *          (thanks to Robert Joop)
  403.  *    v224: Revert v216: process BS in search        8/29/94
  404.  *          only if -u.
  405.  *    v225: Rewrite undo_search again: toggle.    9/6/94
  406.  *    v226: Configuration fixes.             9/15/94
  407.  *          (thanks to David MacKenzie)
  408.  *    v227: Fixed strerror config problem.        9/19/94
  409.  *        Posted to prep.ai.mit.edu
  410.  *    -----------------------------------------------------------------
  411.  *    v228: Fix bug in signals: repeated calls to    9/21/94
  412.  *          get_editkeys overflowed st_edittable.
  413.  *    v229: Fix "Nothing to search" error if -a    9/21/94
  414.  *          and SRCH_PAST_EOF.
  415.  *    v230: Don't print extra error msg in search    9/21/94
  416.  *          after regerror().
  417.  *    v231: Fix hilite bug if search matches 0 chars.    9/22/94
  418.  *          (thanks to John Polstra)
  419.  *    v232: Deal with weird systems that have     9/23/94
  420.  *          termios.h but not tcgetattr().
  421.  */
  422.  
  423. char version[] = "@(#) less  version 232";
  424.