home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / memacs / ue311c.arc / HISTORY.C < prev    next >
Text File  |  1991-03-25  |  74KB  |  1,555 lines

  1. /*
  2.  *    HISTORY.C:    Revision History for
  3.  *
  4.  *    MicroEMACS 3.11
  5.  *        written by Daniel M. Lawrence
  6.  *        based on code by Dave G. Conroy.
  7.  *
  8.  *    (C)Copyright 1988,1989,1990,1991 by Daniel M. Lawrence
  9.  *    MicroEMACS 3.11 can be copied and distributed freely for any
  10.  *    non-commercial purposes. MicroEMACS 3.11 can only be incorporated
  11.  *    into commercial software with the permission of the current author.
  12.  *
  13.  * REVISION HISTORY:
  14.  *
  15.  * 1.0    Steve Wilhite, 30-Nov-85
  16.  *    - Removed the old LK201 and VT100 logic. Added code to support the
  17.  *      DEC Rainbow keyboard (which is a LK201 layout) using the the Level
  18.  *      1 Console In ROM INT. See "rainbow.h" for the function key defs
  19.  *    Steve Wilhite, 1-Dec-85
  20.  *    - massive cleanup on code in display.c and search.c
  21.  *
  22.  * 2.0    George Jones, 12-Dec-85
  23.  *    - Ported to Amiga.
  24.  *
  25.  * 3.0    Daniel Lawrence, 29-Dec-85
  26.  *    - rebound keys/added new fast buffered I/O for AMIGA
  27.  *    - added META- repeat commands
  28.  *    - added reposition default to center screen (yeah!)
  29.  *    - changed exit with modified buffers message
  30.  *    - made filesave tell us what it is doing
  31.  *    - changed search string entry to terminate with <ESC>
  32.  *      so we can use <NL> in search/replace strings
  33.  *    - updated version number in mode line to 3.0
  34.  *    12-Jan-86
  35.  *    - Added code to reconize the search/replace functions
  36.  *    - Added code to perform search/replace & query functions
  37.  *    14-Jan-86
  38.  *    - moved search logic to separate function in search.c
  39.  *    - added replace and query replace functions
  40.  *    - separated out control key expansions to be used by others in search.c
  41.  *    15-Jan-86
  42.  *    - changed "visiting" to finding
  43.  *    - changed yes/no responses to not need return
  44.  *    - cleaned up various messages
  45.  *    16-jan-86
  46.  *    - fixed spurious spawn message in MSDOS
  47.  *    - added ^X-S synonym to save command
  48.  *    - moved escape to shell to ^X-C
  49.  *    21-jan-86
  50.  *    - added code to suspend shell under BSD
  51.  *    22-jan-86
  52.  *    - added function key support (SPEC) under MSDOS
  53.  *    - Abort now prints [Aborted] on message line
  54.  *    23-jan-86
  55.  *    - Added modes and commands to set/unset them
  56.  *    24-jan-86
  57.  *    - Added Goto Line command
  58.  *    - added Rename Buffer command
  59.  *    28-jan-86
  60.  *    - added goto beginning and end of paragraph commands (META-P/META-N)
  61.  *    - re-wrote kdelete to use realloc. Gained MUCH speed here when
  62.  *      doing large wipes on both UNIX and MSDOS. Changed kill buffer
  63.  *      allocation block size from 256 bytes to 1 k
  64.  *    29-jan-86
  65.  *    - moved extern function declarations to efunc.h
  66.  *    - made name[] name binding table
  67.  *    30-jan-86
  68.  *    - fixed Previous/Next paragraph command not to wrap around EOF
  69.  *    - added Fill Paragraph command (META-Q)
  70.  *    4-feb-86
  71.  *    - added code to properly display long lines, scrolling them right
  72.  *      to left
  73.  *    5-feb-85
  74.  *    - rewrote code to right/left scroll...much better
  75.  *    - added shifted arrow keys on IBMPC
  76.  *    6-feb-85
  77.  *    - add option to allow forward-word to jump to beginning of
  78.  *      next word instead of end of current one. This is different from
  79.  *      other emacs' but can be configured off in estruct.h
  80.  *    - added VIEW mode to allow a buffer to be read only
  81.  *       (-v switch on command line will activate this)
  82.  *    - changed quick exit to write out ALL changed buffers!!!
  83.  *      MAKE SURE YOU KNOW THIS WHEN META-Zing
  84.  *    10-feb-86
  85.  *    - added handling of lines longer than allowed on file read in
  86.  *      (they wrap on additional lines)
  87.  *    - made having space clear the message line and NOT insert itself
  88.  *      a configuration option in ed.h
  89.  *    11-feb-86
  90.  *    - added Describe-command and Help commands.
  91.  *    13-feb-86
  92.  *    - added View file command (^X ^V) and finished HELP command
  93.  *    14-feb-86
  94.  *    - added option to let main loop skip update if type ahead commands
  95.  *       are queued up
  96.  *    16-feb-86
  97.  *    - added Insert File command
  98.  *    17-feb-86
  99.  *    - added scroll next window up/down commands
  100.  *    18-feb-86
  101.  *    - added CMODE indentation
  102.  *    - re-arranged header files to standardize extern and global
  103.  *      definitions
  104.  *    - changed version number to 3.2
  105.  *    - added numeric arguments to search, reverse search and
  106.  *      search and replace
  107.  *    24-feb-86
  108.  *    - added Bind To Key function (^C for now) to allow the user
  109.  *      to change his command keys
  110.  *    - added Unbind key function (M-^C for now)
  111.  *    - added execute named command to execute unbound commands (M-X)
  112.  *    - added describe bindings command (not bound)
  113.  *    - changed version number to 3.3
  114.  *    25-feb-86
  115.  *    - scrapped CERROR mode (too many compilers)
  116.  *    - added EXACT mode for case sensitive searchers
  117.  *    26-feb-86
  118.  *    - added command completion on execute named command and
  119.  *      all routined grabbing a command name
  120.  *    - adding execute-command-line command and its support functions
  121.  *      (in preparation for sourcing files)
  122.  *    - added Execute Buffer command
  123.  *    27-feb-86
  124.  *    - added execute(source) file command and added code to automatically
  125.  *      execute emacs.rc (or .emacsrc on UNIX) before initial read in
  126.  *    - changed version number to 3.4
  127.  *    4-mar-86
  128.  *    - changed word delete to be consistant with word move (it gets
  129.  *      rid of the inter word space now) This is configurable with the
  130.  *      NFWORD symbol in estruct.h
  131.  *    - added B_ACTIVE entry to the buffer table. Let emacs read multiple
  132.  *      file names from the command line and only read them in as needed
  133.  *    5-mar-85
  134.  *    - rewrote command line parser to get rid of my patchy code
  135.  *    - changed version number to 3.5
  136.  *    1-apr-86
  137.  *    - added support for Aztec C 3.20e under MSDOS
  138.  *    - fixed bug in mlwrite on ADM3's and their ilk under V7
  139.  *    - added insertion of pounds in column one under CMODE
  140.  *    - changed version number to 3.6
  141.  *    3-apr-86
  142.  *    - added next-buffer command (^X-X)
  143.  *    5-apr-86
  144.  *    - added kill paragraph command (M-^W)
  145.  *    - changed fill-paragraph to leave 2 spaces after a period at the
  146.  *      end of a word.
  147.  *    - added OVERWRITE mode
  148.  *    7-apr-86
  149.  *    - fixed overwrite mode to handle tabs
  150.  *    8-apr-86
  151.  *    - added add/delete global mode (<ESC>M & <ESC> ^M) commands
  152.  *    9-apr-86
  153.  *    - added insert space command
  154.  *    - moved bindings around     ^C    insert space
  155.  *                    M-K    bind-to-key
  156.  *                    INSERT    insert space
  157.  *                    DELETE    forwdel
  158.  *    - added hunt forward and hunt reverse commands
  159.  *    10-apr-86
  160.  *    - fixed bug in DOBUF with non-terminated command string
  161.  *    15-apr-86
  162.  *    - fixed tab expansion bug in DISPLAY which hung the AMIGA
  163.  *      (sent in by Dawn Banks)
  164.  *    - fixed curcol problen if forwline/backline during keyboard
  165.  *      macro execution (sent in by Ernst Christen)
  166.  *    - added AMIGA function/cursor key support
  167.  *    - fixed nonterminating <NL> replacement bug
  168.  *    - fixed word wrapping problems
  169.  *    16-apr-86
  170.  *    - updated documentation and froze development for 3.6 net release
  171.  *    23-apr-86    version 3.6a
  172.  *    - added foreground and background colors. Setable with the
  173.  *      add mode commands for the moment
  174.  *    24-apr-86
  175.  *    - added command to pipe CLI output to a buffer
  176.  *    25-apr-86
  177.  *    - added Dana Hoggatt's code to replace Lattice's sick system()
  178.  *      function. Now we no longer care what the switchar is.
  179.  *    - cleaned up the positioning on several of the spawing commands
  180.  *    26-apr-86
  181.  *    - added an output flush in vttidy(). Unix really appreciates this.
  182.  *    - added filter-buffer (^X#) command to send a buffer through
  183.  *      a DOS filter
  184.  *    - made automatic CMODE on .c and .h file compilation dependant
  185.  *      in estruct.h
  186.  *    1-may-86
  187.  *    - optimized some code in update(). It certainly needs a lot more.
  188.  *    - added Aztec profiling capabilities. These are conditional on
  189.  *      the APROF symbol in estruct.h
  190.  *    2-may-86
  191.  *    - added (u)ndo command in query-replace. undoes last repalce.
  192.  *    6-may-86
  193.  *    - re-organized and wrote the update() function in display.c
  194.  *      Now my color hacks are in the right places and the code can be
  195.  *      understood.
  196.  *    [Released version 3.6f for BETA test sites]
  197.  *    8-may-86
  198.  *    - fixed bug in new display routine to wrap cursor on extended
  199.  *      lines at the right time
  200.  *    - modified the buffer-position command to give reasonable info
  201.  *    9-may-86
  202.  *    - improved the word wrap algorithm as not to discard non-space
  203.  *      delimiters. The backscan now looks for white space rather than
  204.  *      !inword().
  205.  *    [Released version 3.6g to Krannert]
  206.  *    10-may-86
  207.  *    - Added IBMPC.C an IBM-PC specific display driver. This makes paging
  208.  *      4-6 times faster. Also made some conditional changes to DISPLAY.C
  209.  *      to eliminate the pscreen[] if using the PC driver.
  210.  *    [changed version number to 3.6i]
  211.  *    12-may-86
  212.  *    - added delete-window (^X 0) command to dispose of a single window
  213.  *    - fixed problem with multiple prefixes from a command line which
  214.  *      was reported by John Gamble
  215.  *    14-may-86
  216.  *    - Added Aztec support for the IBMPC display driver. Had to
  217.  *      readjust some includes and defines for this.
  218.  *    - fixed bug in delete-window.
  219.  *    - fixed some bizarre behavior with the cursor after coming back
  220.  *      from spawn calls.
  221.  *    [changed version number to 3.7 freezing development for net release]
  222.  *    15-may-86
  223.  *    - (that didn't last long...) Added execute-macro-(1 thru 20) commands
  224.  *      to execute macro buffers (named "[Macro nn]")
  225.  *    - changed BFTEMP to BFINVS and cleaned up treatment of invisible
  226.  *      buffers.
  227.  *    16-may-86
  228.  *    - added store-macro (unbound) to store any executed command lines to
  229.  *      macro buffer.
  230.  *    - added clear-message-line (unbound) command to do just that
  231.  *    - added resize-window command to change a window's size to the
  232.  *      specified argument
  233.  *    - improved help's logic not to re-read the file if it was already
  234.  *      in a buffer
  235.  *    - added MAGIC mode to all structures and command tables, but the
  236.  *      regular expression code that John Gamble is writing is not ready.
  237.  *    18-may-86
  238.  *    - added interactive prompt requests in command line execution (i.e.
  239.  *      while executing a macro, a parameter starting with an at sign (@)
  240.  *      causes emacs to prompt with the rest of the parameter and return
  241.  *      the resulting input as the value of the parameter).
  242.  *    - added arguments to split-current-window to force the cursor into
  243.  *      the upper or lower window.
  244.  *    20-may-86
  245.  *    - added support for the Microsoft C compiler as per the changes
  246.  *      sent in by Oliver Sharp
  247.  *    - made some upgrades and fixes for VMS sent in by Guy Streeter
  248.  *    21-may-86
  249.  *    - fixed an Aztec bug in ttgetc by clearing the upper byte
  250.  *    - fixed buf in CMODE with #preprocesser input (bug fix submitted by
  251.  *      Willis of unknown path)
  252.  *    - added support of alternative startup file ( @<filename> ) in
  253.  *      the command line
  254.  *    - added ^Q quoting in interactive input (mltreply()).
  255.  *    - added re-binding of meta-prefix and ctlx-prefix
  256.  *    22-may-86
  257.  *    - reorganized getkey routines to make more sense and let prefix
  258.  *      binding work properly.
  259.  *    23-may-86
  260.  *    - checked new code on BSD4.2 and made a few fixes
  261.  *    - added optional fence matching while in CMODE
  262.  *    - added goto and search command line arguments by Mike Spitzer
  263.  *    26-may-86
  264.  *    - added parameter fetching from buffers
  265.  *    27-may-86
  266.  *    - fixed some HP150 bugs......
  267.  *    31-may-86
  268.  *    - Added Wang PC keyboard support from modifications by
  269.  *      Sid Shapiro @ Wang Institute
  270.  *    - Fixed some reverse video bugs with code submitted by Peter Chubb
  271.  *    - Fixed bug in nextbuffer reported by Dave Forslund
  272.  *    - added system V support (USG) from Linwood Varney
  273.  *    2-jun-86
  274.  *    - changed defines to just define one Unix define (for example,
  275.  *      just define BSD for Unix BSD 4.2)
  276.  *    - Added Incremental search functions written by D. R. Banks
  277.  *      in file ISEARCH.C
  278.  *    - added insert-string (unbound) command to help the macro
  279.  *      language out.
  280.  *    - added unmark-buffer (M-~) command to turn off the current buffers
  281.  *      change flag
  282.  *    - fixed nxtarg to truncate strings longer than asked for max length
  283.  *    4-jun-86
  284.  *    - added special characters in command line tokens. Tilde (~) is
  285.  *      the special lead-in character for "nrtb".
  286.  *    - Fixed bad ifdef in Aztec code so it could look at HOME dir
  287.  *      for startup, help, and emacs.rc files
  288.  *    6-jun-86
  289.  *    - make delete word commands clear the kill buffer if not after another
  290.  *      kill command
  291.  *    11-jun-86
  292.  *    - made ~@ in string arguments pass as char(192) to nxtarg() so one can
  293.  *      quote @ at the beginning of string arguments
  294.  *    - changed buffer size vars in listbuffers() to long (for big files)
  295.  *    - re-wrote buffer-position command to be much faster
  296.  *    12-jun-86
  297.  *    - added count-words (M-^C) command to count the words/chars and
  298.  *      lines in a region
  299.  *    - changed regions so they could be larger than 65535 (short ->
  300.  *      long in the REGION structure)
  301.  *    - changed ldelete() and all callers to use a long size. The kill
  302.  *      buffer will still have a problem >65535 that can not be solved
  303.  *      until I restructure it.
  304.  *    - grouped paragraph commands and word count together under symbol
  305.  *      WORDPRO to allow them to be conditionally made (or not)
  306.  *    13-jun-86
  307.  *    - re-wrote kill buffer routines again. Now they support an unlimited
  308.  *      size kill buffer, and are (in theory) faster.
  309.  *    - changed delete-next-word (M-D) to not eat the newline after a word,
  310.  *      instead it checks and eats a newline at the cursor.
  311.  *    17-jun-86
  312.  *    - added numeric argument to next/previous-window to access the nth
  313.  *      window from the top/bottom
  314.  *    - added support for the Data General 10 MSDOS machine
  315.  *    - added save-window (unbound) and restore-window (unbound) commands
  316.  *      for the use of the menu script. Save-window remembers which window
  317.  *      is current, and restore-window returns the cursor to that window.
  318.  *    20-jun-86
  319.  *    - fixed a bug with the fence matching locking up PASCAL NEAR the beginning
  320.  *      of a buffer
  321.  *    - added argument to update to selectively force a complete update
  322.  *    - added update-screen (unbound) command so macros can force a
  323.  *      screen update
  324.  *    21-jun-86
  325.  *    - rearranged token() and nxtarg() calls so that command names and
  326.  *      repeat counts could also be prompted and fetched from buffers
  327.  *      [this broke later with the exec re-write....]
  328.  *    - added write-message (unbound) command to write out a message
  329.  *      on the message line (for macros)
  330.  *    - changed ifdef's so that color modes are recognized as legal in
  331.  *      b/w version, and simply do nothing (allowing us to use the same
  332.  *      script files)
  333.  *    [Released version 3.7 on July 1 to the net and elswhere]
  334.  *    2-jul-86
  335.  *    - Changed search string terminator to always be the meta character
  336.  *      even if it is rebound.
  337.  *    3-jul-86
  338.  *    - removed extra calls to set color in startup code. This caused the
  339.  *      original current window to always be the global colors.
  340.  *    7-jul-86
  341.  *    - Fixed bugs in mltreply() to work properly with all terminators
  342.  *      including control and spec characters
  343.  *    22-jul-86
  344.  *    - fixed replaces() so that it will return FALSE properly on the
  345.  *      input of the replacement string.
  346.  *    - added a definition for FAILED as a return type.....
  347.  *    - changed version number to 3.7b
  348.  *    23-jul-86
  349.  *    - fixed o -> 0 problem in TERMIO.C
  350.  *    - made ^U universal-argument re-bindable
  351.  *    - wrote asc_int() for systems (like Aztec) where it acts strangely
  352.  *    - changed version number to 3.7c
  353.  *    25-jul-86
  354.  *    - make ^G abort-command rebindable
  355.  *    29-jul-86
  356.  *    - added HP110 Portable Computer support
  357.  *    - changed version number to 3.7d
  358.  *    30-jul-86
  359.  *    - Fixed a couple of errors in the new VMS code as pointer
  360.  *      out by Ken Shackleford
  361.  *    - split terminal open/close routines into screen and keyboard
  362.  *      open/close routines
  363.  *    - closed the keyboard during all disk I/O so that OS errors
  364.  *      can be respoded to correctly (especially on the HP150)
  365.  *    - changed version number to 3.7e
  366.  *    31-jul-86
  367.  *    - added label-function-key (unbound) command under symbol FLABEL
  368.  *      (primarily for the HP150)
  369.  *    4-aug-86
  370.  *    - added fixes for Microsoft C as suggested by ihnp4!ihuxm!gmd1
  371.  *        <<remember to fix [list] deletion bug as reported
  372.  *          by craig@hp-pcd>>
  373.  *    8-aug-86
  374.  *    - fixed beginning misspelling error everywhere
  375.  *    - fixed some more MSC errors
  376.  *    - changed version number to 3.7g
  377.  *    ?-aug-86 John M. Gamble:
  378.  *    - Made forward and reverse search use the same scan routine.
  379.  *    - Added a limited number of regular expressions - 'any',
  380.  *      'character class', 'closure', 'beginning of line', and
  381.  *      'end of line'.
  382.  *    - Replacement metacharacters will have to wait for a re-write of
  383.  *      the replaces function, and a new variation of ldelete().
  384.  *
  385.  *    - (For those curious as to my references, i made use of
  386.  *      Kernighan & Plauger's "Software Tools."
  387.  *      I deliberately did not look at any published grep or editor
  388.  *      source (aside from this one) for inspiration.  I did make use of
  389.  *      Allen Hollub's bitmap routines as published in Doctor Dobb's Journal,
  390.  *      June, 1985 and modified them for the limited needs of character class
  391.  *      matching.  Any inefficiences, bugs, stupid coding examples, etc.,
  392.  *      are therefore my own responsibility.)
  393.  *    20-aug-86
  394.  *    - fixed CMODE .h scanning bug
  395.  *    - changed version number to 3.7h
  396.  *    30-aug-86
  397.  *    - fixed killing renamed [list] buffer (it can't) as submitted
  398.  *      by James Aldridge
  399.  *    - Added code to allow multiple lines to display during
  400.  *      vertical retrace
  401.  *      [total disaster....yanked it back out]
  402.  *    9-sep-86
  403.  *    - added M-A (apropos) command to list commands containing a substring.
  404.  *    - fixed an inefficiency in the display update code submitted
  405.  *      by William W. Carlson (wwc@pur-ee)
  406.  *    10-sep-86
  407.  *    - added Dana Hoggatt's code for encryption and spliced it into the
  408.  *      proper commands. CRYPT mode now triggers encryption.
  409.  *    - added -k flag to allow encryption key (no spaces) in command line
  410.  *    14-sep-86
  411.  *    - added missing lastflag/thisflag processing to docmd()
  412.  *    - changed version to 3.7i and froze for partial release via mail
  413.  *      and BBS
  414.  *    05-oct-86
  415.  *    - changed some strcpys in MAIN.C to bytecopys as suggested by John
  416.  *      Gamble
  417.  *    - replaces SEARCH.C and ISEARCH.C with versions modified by
  418.  *      John Gamble
  419.  *    10-oct-86
  420.  *    - removed references to lflick....it just won't work that way.
  421.  *    - removed defines LAT2 and LAT3...the code no longer is Lattice
  422.  *      version dependant.
  423.  *    14-oct-86
  424.  *    - changed spawn so that it will not not pause if executed from
  425.  *      a command line
  426.  *    15-oct-86
  427.  *    - added argument concatination (+) to the macro parsing
  428.  *    - added [] as fence pairs
  429.  *    16-oct-86
  430.  *    - rewrote all macro line parsing routines and rearranged the
  431.  *      mlreply code. Saved 6K!!! Have blazed the path for expanding
  432.  *      the command language.
  433.  *    17-oct-86
  434.  *    - added new keyboard macro routines (plus a new level to the
  435.  *      input character function)
  436.  *    22-oct-86
  437.  *    - improved EGA cursor problems
  438.  *    - added -r (restricted) switch to command line for BBS use
  439.  *    06-nov-86
  440.  *    - fixed terminator declarations from char to int in getarg() and
  441.  *      nxtarg() in EXEC.C as pointed out by John Gamble
  442.  *    07-nov-86
  443.  *    - made wordrap() user callable as wrap-word (M-FNW) and changed
  444.  *      the getckey() routine so that illegal keystrokes (too many
  445.  *      prefixes set) could be used for internal bindings. When word
  446.  *      wrap conditions are met, the keystroke M-FNW is executed. Added
  447.  *      word wrap check/call to newline().
  448.  *    11-nov-86
  449.  *    - added and checked support for Mark Williams C 86
  450.  *    12-nov-86
  451.  *    - added goto-matching-fence (M-^F) command to jump to a matching
  452.  *      fence "({[]})" or beep if there is none. This can reframe the
  453.  *      screen.
  454.  *    - added code and structure elements to support change-screen-size
  455.  *      command (M-^S) to change the number of lines being used by
  456.  *      MicroEMACS.
  457.  *    15-nov-86
  458.  *    - finished debugging change-screen-size
  459.  *    17-nov-86
  460.  *    - Incorporated in James Turner's modifications for the Atari ST
  461.  *        23-sep-86
  462.  *        - added support for the Atari ST line of computers (jmt)
  463.  *          - added a '\r' to the end of each line on output and strip
  464.  *            it on input for the SHOW function from the desktop
  465.  *          - added 3 new mode functions (HIREZ, MEDREZ, and LOREZ);
  466.  *            chgrez routine in TERM structure; and MULTREZ define in
  467.  *            ESTRUCT.H to handle multiple screen resolutions
  468.  *    [note....ST still not running under Lattice yet...]
  469.  *    25-nov-86
  470.  *    - Made the filter-buffer (^X-#) command not work on VIEW mode
  471.  *      buffers
  472.  *    - Made the quick-exit (M-Z) command throw out a newline after
  473.  *      each message so they could be seen.
  474.  *    26-nov-86
  475.  *    - fixed a couple of bugs in change-screen-size (M-^S) command
  476.  *    - changed file read behavior on long lines and last lines
  477.  *      with no newline (it no longer throws the partial line out)
  478.  *    - [as suggested by Dave Tweten] Made adding a ^Z to the end
  479.  *      of an output file under MSDOS configurable under the
  480.  *      CTRL-Z symbol in ESTRUCT.H
  481.  *    - [Dave Tweten] Spawn will look up the "TMP" environment variable
  482.  *      for use during various pipeing commands.
  483.  *    - [Dave Tweten] changed pipe command under MSDOS to use '>>'
  484.  *      instead of '>'
  485.  *    04-dec-86
  486.  *    - moved processing of '@' and '#' so that they can be outside
  487.  *      the quotes in an argument, and added hooks to process '%' for
  488.  *      environment and user variables.
  489.  *    - modified IBMPC.C to sense the graphics adapter (CGA and MONO)
  490.  *      at runtime to cut down on the number of versions.
  491.  *    05-dec-86
  492.  *    - changed macro directive character to "!" instead of "$" (see
  493.  *      below) and fixed the standard .rc file to comply.
  494.  *    - added code to interpret environment variables ($vars). Added
  495.  *      hooks for built in functions (&func). So, to recap:
  496.  *
  497.  *        @<string>    prompt and return a string from the user
  498.  *        #<buffer name>    get the next line from a buffer and advance
  499.  *        %<var>        get user variable <var>
  500.  *        $<evar>     get environment variable <evar>
  501.  *        &<func>     evaluate function <func>
  502.  *
  503.  *    - allowed repeat counts to be any of the above
  504.  *    - added code to allow insert-string (unbound) to use its
  505.  *      repeat count properly
  506.  *    - added set (^X-A) command to set variables. Only works on
  507.  *      environmental vars yet.
  508.  *    9-dec-86
  509.  *    - added some code for user defined variables...more to come
  510.  *    - added options for malloc() memory pool tracking
  511.  *    - preliminary user variables (%) working
  512.  *    - changed terminal calls to macro's (to prepare for the new
  513.  *      terminal drivers)
  514.  *    15-dec-86
  515.  *    - changed previous-line (^P) and next-line (^N) to return a
  516.  *      FALSE at the end or beginning of the file so repeated
  517.  *      macros involving them terminate properly!
  518.  *    - added code for $CURCOL and $CURLINE
  519.  *    20-dec-86
  520.  *    - set (^X-A) now works with all vars
  521.  *    - added some new functions
  522.  *        &ADD &SUB &TIMES &DIV &MOD &NEG &CAT
  523.  *    - once again rearranged functions to control macro execution. Did
  524.  *      away with getarg()
  525.  *    23-dec-86
  526.  *    - added string functions
  527.  *        &LEFt &RIGht &MID
  528.  *    31-dec-86
  529.  *    - added many logical functions
  530.  *        &NOT &EQUal &LESs &GREater
  531.  *    - added string functions
  532.  *        &SEQual &SLEss &SGReater
  533.  *    - added variable indirection with &INDirect
  534.  *    - made fixes to allow recursive macro executions
  535.  *      (improved speed during macro execution as well)
  536.  *    3-jan-87
  537.  *    - added $FLICKER to control flicker supression
  538.  *    - made spawn commands restricted
  539.  *    - cleaned up lots of unintentional int<->char problems
  540.  *    4-jan-87
  541.  *    - Fixed broken pipe-command (^X-@) command under MSDOS
  542.  *    - added !IF  !ELSE  !ENDIF  directives and changed the
  543.  *      name of !END to !ENDM....real slick stuff
  544.  *    5-jan-87
  545.  *    - quick-exit (M-Z) aborts on any filewrite errors
  546.  *    8-jan-87
  547.  *    - debugged a lot of the new directive and evaluation code.
  548.  *      BEWARE of stack space overflows! (increasing stack to
  549.  *      16K under MSDOS)
  550.  *    - removed non-standard DEC Rainbow keyboard support...let someone
  551.  *      PLEASE implement this in the standard manner using key bindings
  552.  *      and send the results to me.
  553.  *    - added change-screen-width () command and $CURWIDTH variable
  554.  *    11-jan-87
  555.  *    - fixed an incredibly deeply buried bug in vtputc and combined
  556.  *      it with vtpute (saving about 200 bytes!)
  557.  *    16-jan-87
  558.  *    - added code to handle controlling multiple screen resolutions...
  559.  *      allowed the IBM-PC driver to force Mono or CGA modes.
  560.  *    - added current buffer name and filename variables
  561.  *      $cbufname and $cfname
  562.  *    18-jan-87
  563.  *    - added $sres variable to control screen resolution
  564.  *    - added $debug variable to control macro debugging code (no longer
  565.  *      is this activated by GLOBAL spell mode)
  566.  *    - fixed bug in -g command line option
  567.  *    - Released Version 3.8 to BBSNET
  568.  *    21-jan-87
  569.  *    - added $status variable to record return status of last command
  570.  *    2-feb-87
  571.  *    - added ATARI 1040 support...runs in all three modes right now
  572.  *    - added $palette var with palette value in it
  573.  *    - undefined "register" in BIND.C and INPUT.C for ST520 & LATTICE
  574.  *      to get around a nasty Lattice bug
  575.  *    4-feb-87
  576.  *    - added, debugged code for switching all 1040ST color modes, added
  577.  *      code for HIGH monochrome mode as well, DENSE still pending
  578.  *    5-feb-87
  579.  *    - with John Gamble, found and corrected the infamous bad matching
  580.  *      fence problems.
  581.  *    - added error return check in various add/delete mode commands
  582.  *    10-feb-87
  583.  *    - re-arrange code in docmd() so that labels are stored in
  584.  *      macro buffers
  585.  *    - fixed !RETURN to only return if (execlevel == 0) [If we are
  586.  *      currently executing]
  587.  *    14-feb-87
  588.  *    - added to outp() calls in the EGA driver to fix a bug in the BIOS
  589.  *    - adding code for 1040ST 40 line DENSE mode (not complete)
  590.  *    25-feb-87
  591.  *    - added auto-save "ASAVE" mode....variables $asave and $acount
  592.  *      control the frequency of saving and count until next save
  593.  *    - added &and and &or as functions for logical anding and oring
  594.  *    - added string length &LEN, upper and lower case string funtions
  595.  *      &LOWER and &UPPER
  596.  *    27-feb-87
  597.  *    - added $lastkey   last keystroke struck and
  598.  *        $curchar    character under cursor
  599.  *    28-feb-87
  600.  *    - added code for trim-line (^X^T) command and table entries
  601.  *      for the entab-line (^X^E) and detab-line (^X^D) commands.
  602.  *      These are conditional on AEDIT (Advanced editing) in estruct.h
  603.  *    18-mar-87
  604.  *    - finished above three commands
  605.  *    - added $version environment variable to return the current
  606.  *      MicroEMACS version number
  607.  *    - added $discmd emvironment variable. This is a logical flag that
  608.  *      indicates if emacs should be echoing commands on the command line.
  609.  *      real useful in order to stop flashing macros and .rc files
  610.  *    - added $progname environment variable. this always returns the
  611.  *      string "MicroEMACS". OEM's should change this so that macros can
  612.  *      tell if they are running on an unmodified emacs or not.
  613.  *    - fixed a minor bug in the CGA/MONO detection routine in IBMPC.C
  614.  *    20-mar-87
  615.  *    - integrated EGAPC.C into IBMPC.C and eliminated the file. Now an
  616.  *      EGA user can switch from EGA to CGA modes at will
  617.  *    - A LOT of little fixes and corrections sent in by John Ruply
  618.  *    25-mar-87
  619.  *    - Fixed buffer variables so they will work when referencing the
  620.  *      current buffer
  621.  *    26-mar-87
  622.  *    - Fixed asc_int() to be more reasonable. trailing whitespace ignored,
  623.  *      only one leading sign, no non-digits allowed after the sign.
  624.  *    - fixed buffer variables to go from the point to the end of
  625.  *      line.
  626.  *    28-mar-87
  627.  *    - fixed bugs with 8 bit chars as submited by Jari Salminen
  628.  *    - replace AZTEC/MSDOS agetc() with a1getc() which won't strip
  629.  *      the high order bit
  630.  *    30-mar-87
  631.  *    - changed list-buffers (^X^B) so that with any argument, it will
  632.  *      also list the normally invisable buffers
  633.  *    - added store-procedure and execute-procedure/run (M-^E)
  634.  *      commands to store and execute named procedures.
  635.  *    31-mar-87
  636.  *    - Fixed infinite loop in ^X-X command (when [LIST] is the
  637.  *      only buffer left) as pointed out by John Maline
  638.  *    - made filenames in getfile() always lower case as pointed
  639.  *      out by John Maline
  640.  *    2-apr-87
  641.  *    - Fixed buffer variables so they would work on non-current displayed
  642.  *      buffers. They should now work with ALL buffers....
  643.  *    3-apr-87
  644.  *    - Yanked AZTEC profiling code....not very useful
  645.  *    - Modified IBMPC driver so it will not start in EGA mode
  646.  *    - allow the next-buffer (^X-X) command to have a preceding
  647.  *      non-negative argument.
  648.  *    14-april-87: John M. Gamble
  649.  *    - Deleted the "if (n == 0) n = 1;" statements in front of the
  650.  *      search/hunt routines.  Since we now use a do loop, these
  651.  *      checks are unnecessary.  Consolidated common code into the
  652.  *      function delins().  Renamed global mclen matchlen,
  653.  *      and added the globals matchline, matchoff, patmatch, and
  654.  *      mlenold.
  655.  *      This gave us the ability to unreplace regular expression searches,
  656.  *      and to put the matched string into an evironment variable.
  657.  *      SOON TO COME: Meta-replacement characters!
  658.  *    14-apr-87
  659.  *    - added John Gamble's modified search.c. The code has cut apx
  660.  *      200-300 bytes off the executable.
  661.  *    - added the &RND function to generate a random integer between
  662.  *      1 and its arguments value. Also $SEED is availible as the
  663.  *      random number seed.
  664.  *    - changed the -k command line switch so if there is no argument,
  665.  *      it will prompt for one when the file is read
  666.  *    15-apr-87
  667.  *    - added 20 bytes of buffer in getval()'s local argument alloc so
  668.  *      when it returns a value, it has enough stack space to do at least
  669.  *      one strcpy() before stomping on the returned value. ALWAYS call
  670.  *      getval() ONLY from within a strcpy() call.
  671.  *    - made $curcol return a 1 based value instead of a zero based one.
  672.  *      [changed this back later for 3.8o   it was simply wrong.....]
  673.  *    16-apr-87
  674.  *    - re-wrote bytecopy() for AZTEC & MSDOS so it null terminates the
  675.  *      string.
  676.  *    - changed pipe() to pipecmd() to avoid conflicts with various
  677.  *      UNIX systems
  678.  *    24-apr-87
  679.  *    - changed open parameters on AMIGA window open to 0/0/640/200
  680.  *    25-apr-87    DML
  681.  *    - cleaned up an unneccessary if/else in forwsearch() and
  682.  *      backsearch()
  683.  *    - savematch() failed to malloc room for the terminating byte
  684.  *      of the match string (stomp...stomp...). It does now. Also
  685.  *      it now returns gracefully if malloc fails
  686.  *    [Froze and released v3.8i via BBS net]
  687.  *    14-may-87
  688.  *    - added nop (M-FNC) that gets called on every command loop
  689.  *    - added $wline, returns and sets # lines in current window
  690.  *    - added $cwline, returns and set current line within window
  691.  *    - added $target, returns/sets target for line moves
  692.  *    - added $search, returns/sets default search string
  693.  *    - added $replace, returns/sets default replace string
  694.  *    - added $match, returns last matched string in magic search
  695.  *    29-may-87
  696.  *    - rewrote word deletes to not kill trailing non-whitespace after
  697.  *      the last word. Also a zero argument will cause it to just delete
  698.  *      the word and nothing else.
  699.  *    - more fixes for the search pattern environment variables
  700.  *    30-may-87
  701.  *    - forced all windows to redraw on a width change
  702.  *    2-jun-87
  703.  *    - forced clear-message-line to overide $discmd
  704.  *    - added mlforce() routine and call it in clear-message-line,
  705.  *      write-message and when $debug is TRUE
  706.  *    - recoded the startup sequence in main()....Much Better...
  707.  *    4-jun-87
  708.  *    - forced interactive arguments ( @"question" ) to ALWAYS be echoed
  709.  *      regardless of the setting of $discmd.
  710.  *    7-jun-87
  711.  *    - started adding support for Turbo C under MSDOS
  712.  *    11-jun-87
  713.  *    - words now include ONLY upper/lower case alphas and digits
  714.  *    - fixed some more bugs with the startup..(ORed in the global modes)
  715.  *    - took more limits off the self-insert list....
  716.  *    16-jun-87
  717.  *    - macro debugging now displays the name of the current macro.
  718.  *    - fixed a problem in expandp() in search.c that kept high-byte
  719.  *      characters from working in search strings
  720.  *    18-jun-87
  721.  *    - added &sindex <str1> <str2> function which searches for string 2
  722.  *      within string 1
  723.  *    [released verion 3.8o internally]
  724.  *    19-jun-87
  725.  *    - added $cmode and $gmode to return and set the mode of the
  726.  *      current buffer and the global mode
  727.  *    - separated findvar() out from setvar() so it could be used in
  728.  *      the !LOOP directive (which got canned....read on)
  729.  *    - %No such variable message now types the name of the offending
  730.  *      variable
  731.  *    22-jun-87
  732.  *    - fixed startup bug when editing the startup file
  733.  *    - added the !LOOP <var> <label> directive
  734.  *    26-jun-87
  735.  *    - dumped !LOOP......added !WHILE. This needed and caused a vaste
  736.  *      reorginization in exec.c which mainly involved moving all the
  737.  *      directive handling from docmd() to dobuf(), in the process
  738.  *      getting rid of a lot of junk and making the result smaller
  739.  *      than it started.....(yea!)
  740.  *    - added $tpause to control the fence flashing time in CMODE.
  741.  *      The value is machine dependant, but you can multiply the
  742.  *      original in macros to stay machine independant. (as
  743.  *      suggested by Baron O.A. Grey)
  744.  *    - added hook to execute M-FNR (null) during a file read, after
  745.  *      the name is set and right before the file is read. Took out
  746.  *      any auto-CMODE code, as this is now handled with a macro.
  747.  *      (also suggested by Baron O.A. Grey)
  748.  *    - Added Baron O.A. Grey's SYSTEM V typeahead() code...I hope
  749.  *      this works....if you check this out, drop me a line.
  750.  *    - Added new variable $pending, returns a logical telling if
  751.  *      a typed ahead character is pending.
  752.  *    29-jun-87
  753.  *    - Made adjustmode() use curbp-> instead of curwp->w_bufp-> which
  754.  *      fixed some bugs in the startup routines.
  755.  *    - added $lwidth to return the length of the current line
  756.  *    2-jul-87
  757.  *    - Added &env <str> which returns the value of the environment
  758.  *      variable <str> where possible
  759.  *    - Fixed a NASTY bug in execbuf()..the buffer for the name
  760.  *      of the buffer to execute was NBUFN long, and got overflowed
  761.  *      with a long interactive argument.
  762.  *    3-jul-87
  763.  *    - Moved the loop to match a key against its binding out of execute()
  764.  *      to getbind() so it could be used later elsewhere.
  765.  *    - Added &bind <keyname> which returns the function bound to the
  766.  *      named key
  767.  *    - changed execute-file to look in the executable path first...
  768.  *    6-jul-87
  769.  *    - changed $curchar to return a newline at the end of a line and
  770.  *      it no longer advances the cursor
  771.  *    - a lot of minor changes sent by various people....
  772.  *    7-jul-87
  773.  *    - some amiga specific fixes as suggested by Kenn Barry
  774.  *    - added $line [read/write] that contains the current line in the
  775.  *      current buffer
  776.  *    - changed $curcol so setting it beyond the end of the line will
  777.  *      move the cursor to the end of the line and then fail.
  778.  *    10-jul-87
  779.  *    - added a number of fixes and optimizations along with the rest
  780.  *      of the TURBO-C support as submited by John Maline
  781.  *    13-jun-87
  782.  *    - caused dobuf() to copy lastflag to thisflag so the first
  783.  *      command executed will inherit the lastflag from the command
  784.  *      before the execute-buffer command. (needed this for smooth
  785.  *      scrolling to work)
  786.  *    - made flook() look first in the $HOME directory, then in the
  787.  *      current directory, then down the $PATH, and then in the
  788.  *      list in epath.h
  789.  *    14-jul-87
  790.  *    - added some fixes for VMS along with support for the SMG
  791.  *      screen package as submited by Curtis Smith
  792.  *    15-jul-87
  793.  *    - fixed M-^H (delete-previous-word) so it can delete the first
  794.  *      word in a file....I think there may be more of this kind of thing
  795.  *      to fix.
  796.  *    16-jul-87
  797.  *    - added code to allow arbitrary sized lines to be read from files..
  798.  *      speed up file reading in the process.
  799.  *    - made out of memory conditions safer.. especial on file reads
  800.  *    - fixed a bug in bind having to do with uppercasing function
  801.  *      key names (submitted by Jari Salminen)
  802.  *    - made ST520 exit in the same resolution that EMACS was started in
  803.  *      (for the 1040ST)
  804.  *    20-jul-87: John M. Gamble
  805.  *    - Set the variables matchlen and matchoff in the 'unreplace'
  806.  *      section of replaces().  The function savematch() would
  807.  *      get confused if you replaced, unreplaced, then replaced
  808.  *      again (serves you right for being so wishy-washy...)
  809.  *    [FROZE development and released version 3.9 to USENET]
  810.  *    {It never made it.....got killed by comp.unix.sources}
  811.  *    12-aug-87: John M. Gamble
  812.  *    - Put new function rmcstr() in SEARCH.C to create the replacement
  813.  *      meta-character array.  Modified delins() so that it knows
  814.  *      whether or not to make use of the array.  And, put in the
  815.  *      appropriate new structures and variables.
  816.  *    15-sep-87
  817.  *    - added support for Mark Williams C on the Atari ST
  818.  *    - made the MALLOC debugging package only conditional on RAMSIZE
  819.  *    - added code for flagging truncated buffers
  820.  *    23-sep-87
  821.  *    - fixed &RIGHT to return the <arg2> rightmost characters
  822.  *    - fixed a buffer in getval() to be static....things are stabler
  823.  *      now.
  824.  *    - moved all the stack size declarations to after include "estruct.h"
  825.  *      they work a lot better now....... (rather than not at all)
  826.  *    - made Atari ST spawns all work with MWshell
  827.  *    - fixed spawning on the 1040ST under MWC
  828.  *    27-sep-87
  829.  *    - added &exist function to check to see if a named file exist
  830.  *    - added &find function to find a file along the PATH
  831.  *    - added -A switch to run "error.cmd" from command line
  832.  *    - added $gflags to control startup behavior....
  833.  *    03-oct-87
  834.  *    - changed ":c\" to "c:" in epath.h for the AMIGA as suggested
  835.  *      by Tom Edds
  836.  *    - added binary and, or, and xor functions as submited by John Maline
  837.  *      (&band   &bor    and    &bxor)
  838.  *    - added binary not (&bnot) function
  839.  *    - added fixes for gotoline() and nextarg() as submited by David
  840.  *      Dermott
  841.  *    - fixed return value of $curwidth as submitted by David Dermott
  842.  *    - fixed several calls to ldelete() to have a long first argument
  843.  *      (pointed out by David Dermott)
  844.  *    - Fixed a bug in stock() which prevented uppercase FN bindings as
  845.  *      pointed out by many people
  846.  *    - changed dofile() to make sure all executed files don't conflict
  847.  *      with existing buffer names. Took out cludged code in main.c to
  848.  *      handle this problem... this solution is better (suggested by
  849.  *      Don Nash)
  850.  *    05-oct-87
  851.  *    - added in John Gamble's code to allow for a replacement regular
  852.  *      expresion character in MAGIC mode
  853.  *    [note: under MSDOS  we are still TOO BIG!!!!]
  854.  *    - added overwrite-string as a new user callable function, and
  855.  *      lowrite(c) as an internal function for overwriting characters
  856.  *    - added &xlate function to translate strings according to a
  857.  *      translation table
  858.  *    10-oct-87
  859.  *    - added code to allow emacs to clean its own buffers on exit.
  860.  *      useful if emacs is used as a subprogram. Conditional on
  861.  *      the CLEAN definition in estruct.h
  862.  *    14-oct-87
  863.  *    - swallowed very hard and switched to LARGE code/LARGE data model
  864.  *    - packaged and released version 3.9c internally
  865.  *      (MSDOS executables compiled with TURBO C Large model)
  866.  *    16-oct-87
  867.  *    - temporary fix for FUNCTION keys now includes the Meta-O sequence
  868.  *      if VT100 is definined (submited by Jeff Lomicka)
  869.  *    - an VT100 also triggers input.c to force ESC to always
  870.  *      be interpeted as META as well as the currently bound key
  871.  *    - fixed a bug in the VMSVT driver as pointed out by Dave Dermott
  872.  *    - added a size parameter to token() to eliminate problems with
  873.  *      long variable names. (as sugested by Ray Wallace)
  874.  *    18-oct-87
  875.  *    - fixed a bug in the free ram code that did not clear the buffer
  876.  *      flag causing emacs to ask for more confirnmations on the way out.
  877.  *    19-oct-87
  878.  *    - added ^X-$ execute-program call to directly execute a program
  879.  *      without going through a shell... not all environments have this
  880.  *      code completed yet (uses shell-command where not)
  881.  *    [Froze for 3.9d release internally]
  882.  *    28-oct-87
  883.  *    - added code for Atari ST DENSE mode and new bell as submited
  884.  *      by J. C. Benoist
  885.  *    - made extra CR for ST files conditional on ADDCR. This is only
  886.  *      needed to make the desktop happy...and is painful for porting
  887.  *      files (with 2 CR's) elsewhere (Also from J. C. Benoist)
  888.  *    - added optional more intellegent (and larger) close brace
  889.  *      insertion code (also from J. C. Benoist)
  890.  *    4-nov-87
  891.  *    - fixed AZTEC spawning... all MSDOS spawns should work now
  892.  *    - a META key while debugging will turn $debug to false
  893.  *      and continue execution.
  894.  *    [Froze for version 3.9e USENET release]
  895.  *    4-nov-87 Geoff Gibbs
  896.  *    - Fast search using simplified version of Boyer and Moore
  897.  *      Software-Practice and Experience, vol 10, 501-506 (1980).
  898.  *      Mods to scanner() and readpattern(), and added fbound() and
  899.  *      setjtable().  Scanner() should be callable as before, provided
  900.  *      setjtable() has been called first.
  901.  *    13-dec-87
  902.  *    - added a change to the system V termio.c code to solve a keyboard
  903.  *      polling problem, as submited by Karl Lehenbauer
  904.  *    - removed a "static" from the mod95() function declaration
  905.  *      in crypt.c to make MSC happy (by Malcolm MacNiven)
  906.  *    - added code so the new exec routines in spawn.c are working
  907.  *      under MSC (By Malcolm MacNiven)
  908.  *    - fixed the mixed space/tab entabbing bug as suggested
  909.  *      by Michal Jaegermann
  910.  *    - added the missing brace in the VT100 code in getcmd()
  911.  *      (This one was submited by many different people)
  912.  *    - added more intelligent spawning for TURBO C as submitted
  913.  *      by Bob Montante
  914.  *    - added support for the WICAT computers running under the WMCS
  915.  *      operating system as submitted by Bruce Hunsaker
  916.  *    16-dec-87
  917.  *    - re-wrote fillpara(). Its 4 times Faster!!!
  918.  *    - moved M-FNR binding to $readfile ie to make emacs execute
  919.  *      a macro when reading files:
  920.  *        set $readhook "nop"    ;or whetever
  921.  *    18-dec-1987: John M. Gamble
  922.  *    - Made replaces() beep at you and stop if an empty string is
  923.  *      replaced.  This is possible in MAGIC mode, if you pick your
  924.  *      pattern incorrectly.
  925.  *    - Fixed a subtle bug in the new Boyer-Moore routines, which caused
  926.  *      searches to fail occasionally.
  927.  *    19-dec-87
  928.  *    - new search algorithm from Geoff Gibbs, cleaned up by John Gamble.
  929.  *      its over 30 TIMES FASTER!!!! using a simplified Boyer and Moore
  930.  *      pattern search.  This effects all the but MAGIC search commands.
  931.  *    22-dec-87
  932.  *    - narrow-to-region (^X-<) and widen-from-region (^X->) allow you
  933.  *      to make all but a region invisable, thus all global commands
  934.  *      can act on a single region.
  935.  *    - a numeric argument on the select-buffer (^X-b) command makes
  936.  *      that buffer become "invisable"
  937.  *    - M-FNC becomes $cmdhook
  938.  *      M-FNW becomes $wraphook
  939.  *    23-dec-87
  940.  *    - made unmark-buffer (M-~) update the mode lines of all windows
  941.  *      pointing into the unmarked buffer
  942.  *    28-dec-87
  943.  *    - added new prefix MOUS (coded as MS-) for dealing with mice
  944.  *    29-dec-87
  945.  *    - vastly reorginized machine dependant code. Put termio.c and
  946.  *      spawn.c together and then pulled out msdos.c, unix.c, wmcs.c,
  947.  *      atari.c, amigados.c, and vms.c. These are the operating specific
  948.  *      source files now.
  949.  *    30-dec-87
  950.  *    - cleaned up msdos.c. Got rid of two unused spawn functions for
  951.  *      LATTICE. Also removed attempt to lookup SHELL variable to
  952.  *      find the command processer. This is definatly not applicable
  953.  *      here as COMSPEC should always be the name of the reloaded
  954.  *      command processor.
  955.  *    20-jan-87
  956.  *    - added Jeff Lomicka's ST mouse support and added some
  957.  *      appropriate code to input.c to support this.
  958.  *    - added buffer name completion to the select-buffer (^X-B)
  959.  *      command as submitted by Martin Neitzel.
  960.  *    - changed some function names:
  961.  *        abs    =>    absv
  962.  *        atoi    =>    asc_int
  963.  *        ltoi    =>    long_int
  964.  *        setmode =>    setmod
  965.  *        strncpy =>    bytecopy
  966.  *    25-jan-88    By Jeff Lomicka
  967.  *    - Added parsing of keypad keys, LK201 function key sequences, mouse
  968.  *      sequences (VaxStation form and BBN BitGraph form), and the cursor
  969.  *      position report to VMSVT.C.  This will require a change in the way
  970.  *      that VMS users bind functions to their function keys or keypad
  971.  *      keys.  This also defines a defacto-standard for the names of the
  972.  *      numeric keypad keys, based on the VT100 and compatible terminals.
  973.  *    - Added MOUSE.C to DESCRIP.MMS, and changed it to reference ME.OPT,
  974.  *      and to generate ME.EXE.
  975.  *    - Renamed MICROEMACS.OPT to ME.OPT so that the filename would fit
  976.  *      on smaller systems.
  977.  *    - Added capability for copy and paste from the terminal-wide
  978.  *      copy/paste buffer.  This allows copy and paste of the select region
  979.  *      from and to non-cooperating sessions in other windows.  (The
  980.  *      addition of the MOUSE handling routines disables the transparent
  981.  *      use of the VWS copy/paste mechanism.) There may be a bug in the
  982.  *      PASTE section of this code.  On some VWS systems, you may get a
  983.  *      bunch of Hex characters instead of text.  I'm looking in to finding
  984.  *      out what is really supported in the released versions of VWS.  This
  985.  *      code is conditional based on MOUSE & VMSVT.  Code was added to
  986.  *      VMSVT.C.  Added bindings for to ebind.h.  Yank is on ^X^Y.  Copy is
  987.  *      on ^XC.  If MOUSE & VMSVT is true, this binding overides the use of
  988.  *      ^XC for spanwcli.  [This won't stay.. alternative binding?]
  989.  *      Also added definitions for this to efunc.h.
  990.  *    - Added #define of CPM to estruct.h.  It is used in FILE.C.  You
  991.  *      might want to delete it again. [It was deleted..no CPM support]
  992.  *    - Added noshare attributes to all data in many modules.
  993.  *    - Re-introudced XONDATA condition that was in 3.9eJ's TERMIO.C into
  994.  *      VMS.C.  (This was overlooked by Dan in making 3.9g.)
  995.  *    - Appended a ":" to the "MICROEMACS$LIB:" path element in the VMS
  996.  *      portion of EPATH.H.
  997.  *    - Fixed mouse reports from VMSVT.C to correspond to the code in 3.9g.
  998.  *    - In INPUT.C, added VMS to list of systems that generate FN key and
  999.  *      mouse reports with leading 0 bytes.
  1000.  *    - In order to accomodate callable editor support, I had to arrange
  1001.  *      so that some of the CALLED features are active all of the time,
  1002.  *      particularly EXIT HANDLING.  I changed all calls to exit() into
  1003.  *      calls to meexit().  There is a great need to divide up exits
  1004.  *      between error exits that aren't expected to return, and exits that
  1005.  *      just set the exit flag.  Places that didn't expect exit to return
  1006.  *      should be changed to return immediately after calling exit, so that
  1007.  *      the command loop can catch it and return.  This error handling
  1008.  *      business is a real mess right now.
  1009.  *    - Re-arranged main() so that most of the guts are in called
  1010.  *      routines, so that there can be more than one entry point into the
  1011.  *      program.  Note, now, the possiblity of adding recursive-edit as a
  1012.  *      function that you can call from a macro.
  1013.  *    - Added the universal symbol ME$EDIT to the VMS version as a second
  1014.  *      entry point, for use when called by MAIL and NOTES, which use
  1015.  *      LIB$FIND_IMAGE_SYMBOL and perform run-time linking with their text
  1016.  *      editor.  This stuff works great!
  1017.  *    - Changed Atari-ST makefile to link without -VGEM, so that you will
  1018.  *      get argc and argv.
  1019.  *    - Fixed ST520.C so that screen would be redrawn when we notice that
  1020.  *      desk accessories exit, and so that the mouse will be turned off
  1021.  *      when exiting into a shell (If text cursor was on, mouse is left
  1022.  *      off).
  1023.  *    - Changed ST520.C to have bindings for keypad keys, with PF1 "("
  1024.  *      key as metac, so that it can be used as GOLD prefix.    Uses GOLDKEY
  1025.  *      option in ESTRUCT.H.
  1026.  *    26-jan-88    Daniel Lawrence...
  1027.  *    - cleaned up coding in main.c
  1028.  *    - changed more function names
  1029.  *        itoa    =>    int_asc
  1030.  *        ltoa    =>    long_asc
  1031.  *    27-jan-88
  1032.  *    - added terminal initilizer string output to tcap.c as submitted
  1033.  *      by Ge' Wiejers
  1034.  *    - switched the -A command line switch to be -E the way MWC demands
  1035.  *      that it be. Also had to move -E to -C (for Change...)
  1036.  *    02-feb-88
  1037.  *    - changed META and ^X prefixes to use a new mechinism. Hitting
  1038.  *      a prefix stores it as a pending prefix.
  1039.  *    05-feb-88
  1040.  *    - changed emacs to use ^M for line terminators instead of
  1041.  *      ^J. This required LOTS of changes. Now, however, we can
  1042.  *      search for and manipulate ^M.
  1043.  *    - fixed getcmd() to work again so that describe-key and
  1044.  *      interactive binding functions work again.
  1045.  *    - added $sterm environmental variable. This hold the current
  1046.  *      value of the keystroke needed to terminate search string
  1047.  *      requests. The value in here is also automatically reset
  1048.  *      any time the meta-prefix is rebound, the the meta-prefix's value
  1049.  *    06-feb-88
  1050.  *    - fixed bug in stock().. real control characters in command lines
  1051.  *      now bind properly
  1052.  *    [BBS release of version 3.9i]
  1053.  *    23-feb-88
  1054.  *    - added buffer name completion to delete-buffer (^XK) and reorginized
  1055.  *      code their to gain back 1 K
  1056.  *    - added $modeflag to allow us to hide the modelines.
  1057.  *    - added $sscroll to allow smooth scrolling... (I don't like this
  1058.  *      but there were too many requests for it).
  1059.  *    - added $lastmesg to hold last message EMACS wrote out
  1060.  *    04-mar-88
  1061.  *    - added Alan Phillip's mods to support the VGA adapter on the
  1062.  *      IBM PS/2 machines. Modified it a little.
  1063.  *    15-mar-88
  1064.  *    - Forever twiddling with the startup code, I moved the initialization
  1065.  *      of exitflag to main() to allow a startup file to exit EMACS
  1066.  *      properly.  Also had to make meexit always return(TRUE) regardless
  1067.  *      of the exitstatus. (Ie it always works and doesn't abort the macro)
  1068.  *    17-mar-88
  1069.  *    - added code to change hard tab size with $tabsize variable
  1070.  *    - added binary search to fncmatch()
  1071.  *    28-mar-88
  1072.  *    - optimized the IBMPC version in TURBO C by supplying mixed memory
  1073.  *      mode information (NEAR and PASCAL). The executable is down to
  1074.  *      89K..but remember to name the code segment (from the options menu)
  1075.  *    1-apr-88
  1076.  *    - added remove-mark (^X<space>) to allow you to unset the mark
  1077.  *      in the current window.
  1078.  *    8-apr-88
  1079.  *    - Lots of twiddling with the mixed memory model TURBOC IBM-PC
  1080.  *      version... its 87K long now and fairly stable
  1081.  *    - changed behavior of CMODE when inserting blank lines
  1082.  *    - tightened stack usage from 32K to 20K
  1083.  *    9-apr-88
  1084.  *    - added new cinsert(). blank lines no longer confuse the CMODE
  1085.  *      indentation. Trailing white space is deleted when newline is
  1086.  *      hit in CMODE.
  1087.  *    12-apr-88
  1088.  *    - fixed long standing bug in query-replace-string. When the line the
  1089.  *      point originally starts on is extended (thus re-malloced) a '.',
  1090.  *      aborting the replace and returning to the original replace had
  1091.  *      locked things up. no more.
  1092.  *    07-may-88
  1093.  *    - fixed bug in narrow() ... it works everywhere now.
  1094.  *    [BBS release of 3.9n]
  1095.  *    3-june-88
  1096.  *    - removed restriction against deleting invisable buffers
  1097.  *    - a lot of little fixes suggested by Dave Tweten
  1098.  *    10-jun-88
  1099.  *    - added "safe save"ing as coded by Suresh Konda.
  1100.  *      (when writing a file to disk, it writes it to a temporary file,
  1101.  *       deletes the original and renames the temp file)
  1102.  *    - added $ssave flag to enable or disable safe file saving
  1103.  *    12-jun-88
  1104.  *    - added automatic horizontal window scrolling.    $hscroll (default
  1105.  *      is TRUE) controls if it is enabled. $fcol is the current first
  1106.  *      column of window in screen column one.  $hjump determines the
  1107.  *      number of columns scrolled at a time.
  1108.  *    - changed version number to 3.9o
  1109.  *    22-jun-88
  1110.  *    - made binary searches start from 0 instead of one... EMACS can
  1111.  *      find the first of many lists again.
  1112.  *    - more debugging things.  Added the dump-variable command which
  1113.  *      creates a buffer (like list-buffers does) with all the environment
  1114.  *      and user variables and their values.    Also the display (^XG)
  1115.  *      command prompts and lists the value of a variable.  These are
  1116.  *      both conditional on the DEBUGM symbol in estruct.h
  1117.  *    1-jul-88
  1118.  *    - fixed a bug in showcpos() which did not report the proper value
  1119.  *      for the current character when issued at the end of the file
  1120.  *    [Released internally as 3.9p]
  1121.  *    3-aug-88
  1122.  *    - changed keyname in stock() in bind.c to unsigned char for
  1123.  *      compilers that don't default. This allows more arbitrary
  1124.  *      rebinding. (submitor: David Sears)
  1125.  *    12-aug-88
  1126.  *    - changed wrap-word to force $fcol to 0
  1127.  *    - changed fill-paragraph (M-Q) to force $fcol to 0
  1128.  *    - added -i command line switch to initialize a variable's value
  1129.  *      for example:    emacs -i$sres VGA
  1130.  *    26-aug-88
  1131.  *    - changed code in updateline() in display.c to remove reliance
  1132.  *      on well behaved pointer subtraction (submitted by Kenneth Sloan)
  1133.  *    - fixed potential bug in fileio.c in ffgetline()
  1134.  *      (submitted by John Owens)
  1135.  *    6-sep-88
  1136.  *    - &right and &mid now check their arguments so the bytecopy can not
  1137.  *      start past the end of the string.
  1138.  *    - added $writehook to execute macroes when writing files
  1139.  *    - added $exbhook to execute macro when exiting an old buffer
  1140.  *    - added $bufhook to execute macro when entering a new buffer
  1141.  *    14-sep-88
  1142.  *    - asc_int() now ignores trailing non-digits
  1143.  *    15-sep-88
  1144.  *    - added &trim function to trim whitespace off a variable
  1145.  *    - changed message "Out of memory while inserting string" to
  1146.  *      "Can not insert string" as this error can result when the
  1147.  *      current buffer is in VIEW mode as well.
  1148.  *    - made trim-line, entab-line, and detab-line work on the
  1149.  *      current region if they have no arguments.  Also added alias
  1150.  *      trim-region, entab-region and detab-region.  The old names
  1151.  *      will hang about for a version, then dissapear.  I like the
  1152.  *      new functionality much better.
  1153.  *    25-sep-88
  1154.  *    - Inserted the macros isletter(), isuppper(), islower(), and
  1155.  *      CHCASE() whereever appropriate, replacing explicit character
  1156.  *      comparisons.    When DIACRIT is set to one, they become functions
  1157.  *      and know about the extended ascii character set.  Functions right
  1158.  *      now are in for MSDOS.C - other machines to follow.  From J. Gamble.
  1159.  *    26-sep-88
  1160.  *    - moved all text constants out to a language specific header file
  1161.  *      and left an english version of the constant in a remark at its
  1162.  *      occurence.
  1163.  *    - added $language to return the language of the current version
  1164.  *    - added elang.h to call the proper language specific module
  1165.  *    2-oct-88
  1166.  *    - removed DIACRIT conditional. Its there all the time now. Ripped
  1167.  *      the old code, and replaced it with a upcase[] and lowcase[]
  1168.  *      table.  Functions to manipulate it are now in new source file
  1169.  *      char.c and can be made conditional on system and language.
  1170.  *      Added table for extended MSDOS modeled after John Gamble's
  1171.  *      code.
  1172.  *    5-oct-88
  1173.  *    - got rid of CHCASE()..[except in the MAGIC mode search code]
  1174.  *      I ALWAYS force to upper or lower, and never simply swap.  They
  1175.  *      are now uppercase() and lowercase() in the new char.c source file.
  1176.  *    7-oct-88
  1177.  *    - added all the needed code to use TERMCAP on UNIX to interpret
  1178.  *      function and cursor keys.  A rather slimy trick involving
  1179.  *      the key timing is used, and this makes keyboard macroes
  1180.  *      a little dicy....
  1181.  *    - added the DIACRIT compilation flag back for people who
  1182.  *      want more speed in MAGIC mode.
  1183.  *    10-oct-88
  1184.  *    - as suggested by Michael Andrews, when the current buffer is
  1185.  *      in view mode, don't preallocate expansion room in new lines.
  1186.  *      (ie we aren't editing them anyway!)
  1187.  *    - added Microsoft Mouse drive... went very well. It all appears
  1188.  *      to work, just like the Atari ST mouse driver.
  1189.  *    11-oct-88
  1190.  *    - recieved and tested german.h header file from Martin Neitzel
  1191.  *      (unido!sigserv!neitzel@uunet.uu.net)
  1192.  *    15-oct-88
  1193.  *    - recieved and tested dutch.h header file from Paul De Bra
  1194.  *      (debra@research.att.com)
  1195.  *    - fixed a lot of mouse movement problems.  Dragging a mode line
  1196.  *      sideways horizontally scrolls a it's window.  Fixed positioning
  1197.  *      problems with scrolled and extended lines.
  1198.  *    - added $msflag to turn the mouse off
  1199.  *    - added $diagflag.  When set to FALSE, no diagonal movement is
  1200.  *      possible.  Vertical movement has precidence, but an explicit
  1201.  *      horizontal drag still works.
  1202.  *    - grabbing and dragging the last char of the command line allows
  1203.  *      you to resize the editing screen.  This should be tied into
  1204.  *      various windowing systems later.
  1205.  *    - write mouse-region-(down/up). See the emacs reference docs on the
  1206.  *      exact behavior of these.
  1207.  *    - deleted the old mouse-(kill/yank)-(up/down). They are
  1208.  *      redundant now, and don't work as well as mouse-region-*.
  1209.  *    2-nov-88    [changes submitted by Allen Pratt from ATARI]
  1210.  *    - created DIRSEPSTR and DIRSEPCHAR definitions for directory seperators
  1211.  *    - added TTflush in bindtokey() to force space out to terminal after
  1212.  *      binding name.
  1213.  *    - fixed a pointer casting problem in display.c involving pointer subtraction
  1214.  *    - removed the cursormove() from the beginning of mlwrite() so
  1215.  *      the cursor need not jump to the command line if the fisplay
  1216.  *      is disabled by setting $discmd to FALSE.
  1217.  *    - added >c to get a emacs command sequence and return it as
  1218.  *      a bindable string
  1219.  *    - changed scrnextup -> nextup, scrnextdn -> nextdown, and
  1220.  *      mlreplyt -> mltreply to make short symbol compilers happy.
  1221.  *    - added "print" as a synonim to "write-message".
  1222.  *    - added "source" as a synonim to "execute-file".
  1223.  *    - added a M-^X binding to the execute-command-line command
  1224.  *    4-nov-88
  1225.  *    - changed $tabsize to $hardtab. Added $softab as the current
  1226.  *      softtab size (previously only changable by the ^I (handle-tab)
  1227.  *      command.
  1228.  *    - fixed various problems in reglines() and made ^X^D (detab-region)
  1229.  *      and ^X^E (entab-region) use the current hard tab setting.
  1230.  *    - execute-command-line (M-^X) when executed within a macro line
  1231.  *      (which sounds redundent) will force all of the arguments of
  1232.  *      the executed command to be taken interactivly.  I needed this
  1233.  *      for the new macro to allow mouse functionality on the
  1234.  *      function key window.
  1235.  *    - taking Michael Andrew's suggestion to its conclusion, we no longer
  1236.  *      allocate any extra space except when inserting.  This has
  1237.  *      substantially decreased the memory usage.  Note that when
  1238.  *      we must explicitly set l_used to the proper amount since lalloc()
  1239.  *      is not responcible for the rounding up.
  1240.  *    - arranged to allow getstring() to return a NULL result.  Aborting
  1241.  *      out of an interactive prompt now will properly terminate a macro.
  1242.  *    [Released the 3.10 BETA test version...yes the ATARI version is broke]
  1243.  *    24-nov-88
  1244.  *    - fixed system V input char HOG problems as submitted by
  1245.  *      Kjartan R. Gudmundsson. Also eliminated some other 7 bit filters
  1246.  *      in unix.c at the same time.
  1247.  *    - reading function keys into table has been fixed in TCAP.C.  It will
  1248.  *      no longer attempt to strcpy NULL pointers.
  1249.  *    1-dec-88
  1250.  *    - multiple marks are now implemented. (What a task...). Set-mark
  1251.  *      (M-<space>), remove-mark (^X<space>) and exchange-point-and-mark
  1252.  *      (^X^X) all take a numeric argument from 0 to NMARKS-1 (9 now).
  1253.  *    2-dec-88
  1254.  *    - added goto-mark (M-^G) which moves the point to the requested mark.
  1255.  *    - fixed some VMS things that Curtis pointed out...
  1256.  *    - fixed bug in crypt() algorith!!!! This works properly now.  I had
  1257.  *      to add a $oldcrypt environment variable to trigger the broken
  1258.  *      behavior so people could decrypt their old files.  I will probably
  1259.  *      have to live with this.....
  1260.  *    15-dec-88
  1261.  *    - added end-of-word command to advance just past the end of a word.
  1262.  *    20-dec-88
  1263.  *    - added definitions for SUN's OS and SCO XENIX to allow us to use
  1264.  *      specific calls in those OSs for waiting and timing.
  1265.  *    - merged in XTCAP.C as submitted by Guy Turcotte into tcap.c.  This
  1266.  *      mirrors the BSD 4.3 changes for function keys for the SCO XENIX
  1267.  *      and SUN OS versions
  1268.  *    14-jan-89
  1269.  *    - added $region as a read only variable (max 128 chars) of the
  1270.  *      current region (as suggested by Allan Pratt)
  1271.  *    - changed KEYTAB structure to allow us to bind user macroes
  1272.  *      (buffers) to keys as well as C functions. Lots of changes
  1273.  *      for this.
  1274.  *    18-jan-89
  1275.  *    - finished changes for the new KEYTAB structure.
  1276.  *    - modified describe-bindings to display the bound macroes.
  1277.  *    - added arguments to nullproc() in main.c (BUG FIX!)
  1278.  *    - tried (and succeeded) in defining the pascal keyword
  1279.  *      for MSDOS & TURBO. A 2k reduction in the executable was nice.
  1280.  *    - added macro-to-key (^X^K) function to bind a macro to a key.
  1281.  *    19-jan-89
  1282.  *    - made numeric arguments to keys bound to macroes repeat those
  1283.  *      macroes n times.
  1284.  *    - modified docmd() to look for a macro name if it could not find
  1285.  *      a function name. Again a numeric leadin implies repitition.
  1286.  *    - added machine code execpr() function to the IBMPC version
  1287.  *      because under NOVELL Netware, the DOS 4B exec call does not
  1288.  *      preserve the stack on exit... thus execprog() would die.  This
  1289.  *      requires that you add execpr.obj to the make and link files!
  1290.  *      There is a symbol (NOVELL) in estruct.h to control this code
  1291.  *      being included.
  1292.  *    24-jan-89
  1293.  *    - various bug fixes and type fixes as suggested by the high C
  1294.  *      compiler on the IBM-RT
  1295.  *    1-feb-89
  1296.  *    - changed the fgetc() in unix.c to a read() under V7 and BSD so
  1297.  *      the time dependant function key checking works.
  1298.  *    - added a support for Hewlet Packard's UNIX system which
  1299.  *      is a System V with BSD 4.3 enhancements.  This is controled
  1300.  *      by the HPUX symbol in estruct.h.
  1301.  *    5-feb-89
  1302.  *    - modified mouse-region-up so right clicking down on a modeline and
  1303.  *      then releasing closes that window
  1304.  *    12-feb-89
  1305.  *    - Goaded onward by file completion code submitted by Fuyau Lin, all
  1306.  *      the completion code has been re-written and layered properly.
  1307.  *      Any OS specific driver need to now supply getffile() and
  1308.  *      getnfile() to supply a completion file list, or these can
  1309.  *      return NULL on systems where this is not possible. All this code
  1310.  *      is conditional on the COMPLET symbol in estruct.h.
  1311.  *    17-mar-89
  1312.  *    - system V code from April 1989 "C Users Journal" installed in
  1313.  *      UNIX.C. Hope this puts that problem to rest.
  1314.  *    - Jeff Lomicka fixed a lot of mousing bugs in ST520.c
  1315.  *    - Re-wrote AMIGADOS.C.  This should work properly with INTUITION
  1316.  *      and lots of windowing (resizing, mousing, etc.)
  1317.  *    - more additions for the DATA GENERAL from Doug Rady. (read
  1318.  *      the history in aosvs.c for details).
  1319.  *    - orginized the NOSHARE, VIOD and CONST keywords better.
  1320.  *    - A lot of general cleanup.
  1321.  *    [Released as version 3.10 to the world]
  1322.  *    05-may-89
  1323.  *    - installed the BRICKS revsion control system (from DATALIGHT)
  1324.  *      on my PC developmental machine.  This should make diffs possible.
  1325.  *      The installation was convoluted to to brick's inibility to
  1326.  *      use subdirectories, and implemented through a much more
  1327.  *      complex makefile.
  1328.  *    - fixed a missing structure element in line 1230 of eval.c
  1329.  *    - set attribute to clear screen to 07 in ibmeeop.  This fixes
  1330.  *      a long standing bug involving not seeing the modeline.
  1331.  *    16-may-88
  1332.  *    - a bad character in UNIX.C's code for the HPUX is fixed
  1333.  *    - a couple of header problems for HPUX fixed
  1334.  *    - a bug in EVAL.C comparing var names past 10 chars is fixed
  1335.  *    - added Dan Corkill's ISEARCH mods (see ISEARCH.C) Had
  1336.  *      to fix them to allow function keys at the end of an isearch.
  1337.  *    22-may-89 John Gamble
  1338.  *    - added $SEARCHTYPE var to determine where searches terminate.
  1339.  *        0 = forward: after string, backward: at beg of string
  1340.  *        1 = always at beginning of string
  1341.  *        2 = always character past end of string
  1342.  *      added code and vars all around for this
  1343.  *    28-may-89
  1344.  *    - finished fixing ISEARCH to properly allow function keys and
  1345.  *      mouse movement to terminate the ISEARCH.
  1346.  *    28-may-89 John Gamble
  1347.  *    - Code finally added to handle the $SEARCHPNT (nee' $SEARCHTYPE)
  1348.  *      variable.  Frankly, i think its pretty sloppy, and should
  1349.  *      be replaced by a separate function to deal with point positions.
  1350.  *      Will change it later.
  1351.  *    7-jul-89 John Gamble
  1352.  *    - A far more elegant way of dealing with $SEARCHPNT is present,
  1353.  *      more efficient in space also.  Didn't need the above mentioned
  1354.  *      point function.  Altered ISEARCH.C code to use new calling
  1355.  *      parameters in scan routines.
  1356.  *    - Got started with group structure in MAGIC mode, with alterations
  1357.  *      present in estruct.h and search.c
  1358.  *    15-jul-89 John Gamble
  1359.  *    - added $disphigh environment variable to control the escaped
  1360.  *      display of high bit set ascii characters
  1361.  *    05-aug-89 Daniel Lawrence
  1362.  *    - added to lines to lbound() so a forward search will no longer
  1363.  *      wrap around the end of the buffer if the point was at the end.
  1364.  *    - widen-from-region (^X>) preserves the point and marks if they
  1365.  *      were at the end of the fragment, instead of moving them to
  1366.  *      the end of the buffer.
  1367.  *    - fixed bug in comp_file() to allow up to 128 char files specs
  1368.  *      instead of 32 chars.
  1369.  *    - patched some bugs in the TIPC version.  It runs again, but
  1370.  *      without a mouse and color and reverse video.  The TIPC I had
  1371.  *      to test on was a weird mono one....
  1372.  *    - released 3.10a to the BBS for TIPC users
  1373.  *    05-aug-89 John Gamble
  1374.  *    - refolding and shoving a lot has managed to knock about 300
  1375.  *      bytes of code out of search.c and isearch.c.  Also the some of
  1376.  *      the various commands in an isearch now shadow their bigger
  1377.  *      counterparts.
  1378.  *    - fixed the tab bug in entab-line (^X-^E) which munged lines.
  1379.  *    15-aug-89 Daniel Lawrnece
  1380.  *    - added append-file (^X^A) command to append a buffer on the
  1381.  *      end of a file
  1382.  *    [released 3.10b to Krannert.....]
  1383.  *    20-aug-89 Daniel Lawrence
  1384.  *    - The quote character is now treated as the abort and universal-
  1385.  *      argument characters are: only one key may be bound to it at
  1386.  *      a time.
  1387.  *    9-sep-89
  1388.  *    - a bug in msdos.c prevented the proper binding of ALT-0 on the
  1389.  *      IBMPC. Fixed this as pointed out by Rik Faith.
  1390.  *    17-sep-89 John M. Gamble
  1391.  *    - Isearch now understands alternatively bound keys.
  1392.  *      One change had to be made to ebind.h and input.c, to handle
  1393.  *      the delete-previous-character command.  The delete character
  1394.  *      is now represented internally as CNTL|'?', instead of 0x7F.
  1395.  *      Changes made to handle this are in ebind.h and input.c.
  1396.  *    16-dec-89
  1397.  *     - Incorporated Kevin Mitchell's VMS improvements.  Using the
  1398.  *       native RMS file I/O, and native memory memory routines
  1399.  *       GREATLY speeds up file and buffer manipulation.
  1400.  *    17-dec-89
  1401.  *    - updated the HP150.C file to work with the new style I/O layers.
  1402.  *      hp150 version now works properly.
  1403.  *    25-jan-90
  1404.  *    - dumped a lot of the old choice symbols in estruct.h for some
  1405.  *      things which have either never been used, or have clearly
  1406.  *      superior versions now.
  1407.  *    - removed the WORDPRO and AEDIT symbols.... all this code is
  1408.  *      always in now.  (it never made much of a size difference anyway)
  1409.  *    - modified sources to allow them to use new ANSI style prototypes.
  1410.  *      (this was a lot of work....)
  1411.  *    - in the process, fixed bug where EMACS probably grew confused
  1412.  *      when setting $curchar to a newline.
  1413.  *    26-jan-90
  1414.  *    - replaced old file completion code with version by Michael J. Arena
  1415.  *      It allows us to partially complete directory names on UNIX.
  1416.  *    - modified getffile in MSDOS.C to return directory names as well
  1417.  *      so it can work with the above mod.  I need to do this mod on
  1418.  *      all OSs which will support it.
  1419.  *    - added support for the Supermax UNIX system as submitted by
  1420.  *      Michael Hillerstrom.
  1421.  *    - fixed a couple of OS2 bugs having to do with key input as submitted
  1422.  *      by Sugih Jamin
  1423.  *    - fixed three bugs posted by Kieth Jones (in display.c and eval.c)
  1424.  *    - let the TURBO C MSDOS version use the bios instead of DOS for
  1425.  *      keybord input as submitted by David R. Kohr.  This should solve
  1426.  *      problems with TSRs like Sidekick that break rules.
  1427.  *    - fixed a bug in MSDOS.C's getffile involving how the filename was
  1428.  *      parsed.  Paths including ".." now can expand properly.
  1429.  *    [Released version 3.10e to USENET]
  1430.  *    - changed version number to 3.10f
  1431.  *    15-feb-90
  1432.  *    - added $lterm variable to allow emacs to write non-standard line
  1433.  *      terminators on output.  Set to "" it uses standard terminators.
  1434.  *    - forced ffgetline() to trim trailing line terminators on reading
  1435.  *      this allows us to read strange files more robustly.
  1436.  *    - removed the ADDCR option as the var above can do it
  1437.  *    17-mar-90
  1438.  *    - John Gamble found and fixed a bug in the binding code erroneously
  1439.  *      searching for a particular empty slot.
  1440.  *    22-mar-90
  1441.  *    - changed line buffer allocation scheme during file reading to
  1442.  *      use realloc() and always double the buffer size.  Much faster
  1443.  *      on long line reads. 
  1444.  *    01-may-90
  1445.  *    - added code to allow SUN verion to work properly
  1446.  *    - added .xlk style file locking for unix systems
  1447.  *    10-may-90
  1448.  *    - added NEC 9801 hardware driver.  There is no background color
  1449.  *      implimented yet as this will involve using the graphic planes
  1450.  *      to simulate a backgound color.
  1451.  *    25-may-90
  1452.  *    - added DBCS (Double Byte Character Set) symbol to estruct.h and
  1453.  *      also much conditional code to handle display and editing of
  1454.  *      DBCS chars.  This code is active in the NEC version, using
  1455.  *      japanese KANJI characters.
  1456.  *    - added REP (replace) mode. Very similar to OVER mode except
  1457.  *      tabs and 2 byte characters are handled differently.
  1458.  *    6-jun-90
  1459.  *    - modified ansi.c into fmr.c for the Fujitsu FMR-70 series
  1460.  *      msdos machines.  Extensive modifications to msdos.c were
  1461.  *      needed to accomodate this machine. 
  1462.  *    16-jun-90
  1463.  *    - modified swbuffer() to not check locks on an inactive buffer
  1464.  *      in view mode.  This allows the -v switch to work from the
  1465.  *      command line on a file whose directory the user has no
  1466.  *      write access to.
  1467.  *    28-jun-90
  1468.  *    - added background colors to the FMR driver utilizing the
  1469.  *      graphics planes via the GDS driver.
  1470.  *    30-jun-90
  1471.  *    - added $wchars, a list of characters considered "in a word".
  1472.  *      An empty value sets this to its default of alphas, numbers
  1473.  *      and the underscore (_) character.
  1474.  *    5-jul-90
  1475.  *    - re-arranging code to vector all pop up windows through on
  1476.  *      function for display.
  1477.  *    - fixed bug in positioning of file name in buffer list
  1478.  *    6-jul-90
  1479.  *    - added ability to pop up temporary windows.  Environment variable
  1480.  *      $popval gives the old behavior when FALSE and the new behavior
  1481.  *      when TRUE.
  1482.  *    - added pop-buffer function to allow user to pop up the contents
  1483.  *      of a buffer.
  1484.  *    27-jul-90
  1485.  *    - fixed up the OS2 code back into working.  Wrote getffile()
  1486.  *      and getnfile() to allow it file name completion.
  1487.  *    27-jul-90 John M. Gamble
  1488.  *     - Magic mode characters '+' and '?' added, respectively meaning
  1489.  *    "one to many" and "zero to one (or, optional)".
  1490.  *    12-oct-90
  1491.  *    - A BAD bug in vteeol() hung the machine during the redraw.  Vtcol
  1492.  *    was not getting incremented when the screen was scrolled horizontally.
  1493.  *    26-nov-90
  1494.  *    - conditionalized code in MSDOS.C using the BIOS to not be used when
  1495.  *    compiled for the HP150.  (It's bios is different, of course)
  1496.  *    15-jan-91
  1497.  *    - in linstr() made an non-positive number of inserted characters
  1498.  *      illegal, causing the linstr to return FALSE on negative and
  1499.  *      TRUE on zero... but not changing the text
  1500.  *    15-jan-91
  1501.  *    - rewrote dolock.c to generalize it. it now supports MSDOS and SUN
  1502.  *      the SUN code should work on other UNIXs, but needs confirmation
  1503.  *    17-jan-91  John Gamble
  1504.  *    - removed references to DIACRIT
  1505.  *    - added the $yankpnt variable.
  1506.  *    21-jan-91  Daniel Lawrence
  1507.  *    - adding OS2 support for file locking
  1508.  *    07-mar-91
  1509.  *    - added the concepts of SCREENs.  Each screen is a separate list
  1510.  *      of windows which overlay on text based systems.
  1511.  *
  1512.  *    New commands:
  1513.  *      next-screen        (A-N) switch to the following screen
  1514.  *      previous-screen    (A-P) switch to the previous screen
  1515.  *      find-screen        (A-F) switch or create a named screen
  1516.  *      delete-screen        (A-D) delete the named screen
  1517.  *      list-screens        (A-B) how list of screens
  1518.  *
  1519.  *    New variables:
  1520.  *      $scrname        name of the current screen
  1521.  *      $scrnum        ordinal number of the current screen
  1522.  *
  1523.  *    Most of the code for this is in the new source file SCREEN.C
  1524.  *
  1525.  *    11-mar-91    Code from or suggested by Michael C. Andrews
  1526.  *    - getstring() now accepts ^K to return a non-default empty
  1527.  *      result. (to allow for NULL replace strings!)
  1528.  *    - added indent-region [M-)] and undent-region [M-(]
  1529.  *    - added &ISNum function to test variables for being numeric
  1530.  *    - added $curwind and $numwind to give the current ordinal and total
  1531.  *      number of windows on the current screen
  1532.  *    12-mar-91    Daniel Lawrence
  1533.  *    - checked and fixed code for IBMPC MicroSoft C 5 and 6 compilers
  1534.  *    15-mar-91    Curtis Smith
  1535.  *    - masked the number generated by ernd in writeout() to limit it
  1536.  *      to 5 digits so that MPE won't barf on a too long file name
  1537.  *      for the temporary file
  1538.  *    19-mar-91    Daniel Lawrence
  1539.  *    - added code to parse drive letters to dolock()/undolock()
  1540.  *      MSDOS is happier.
  1541.  *    - changed search order of files to look in current directory
  1542.  *      before HOME and PATH dirs.
  1543.  *    24-mar-91
  1544.  *    - command file names default to a .cmd extention from the command
  1545.  *      line and from the source command.
  1546.  *    [released BETA version 3.11]
  1547.  */
  1548.  
  1549. history()
  1550.  
  1551. {
  1552.     /* this is here to keep compilers from complaining... it's not needed */
  1553. }
  1554.  
  1555.