1*96b676e9SEd SchoutenCopyright (c) 2009, Hugh Mahon 2*96b676e9SEd SchoutenAll rights reserved. 372fcea8cSEd Schouten 4*96b676e9SEd SchoutenRedistribution and use in source and binary forms, with or without 5*96b676e9SEd Schoutenmodification, are permitted provided that the following conditions 6*96b676e9SEd Schoutenare met: 772fcea8cSEd Schouten 8*96b676e9SEd Schouten * Redistributions of source code must retain the above copyright 9*96b676e9SEd Schouten notice, this list of conditions and the following disclaimer. 10*96b676e9SEd Schouten * Redistributions in binary form must reproduce the above 11*96b676e9SEd Schouten copyright notice, this list of conditions and the following 12*96b676e9SEd Schouten disclaimer in the documentation and/or other materials provided 13*96b676e9SEd Schouten with the distribution. 1472fcea8cSEd Schouten 15*96b676e9SEd SchoutenTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16*96b676e9SEd Schouten"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17*96b676e9SEd SchoutenLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 18*96b676e9SEd SchoutenFOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 19*96b676e9SEd SchoutenCOPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 20*96b676e9SEd SchoutenINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 21*96b676e9SEd SchoutenBUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22*96b676e9SEd SchoutenLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23*96b676e9SEd SchoutenCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24*96b676e9SEd SchoutenLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 25*96b676e9SEd SchoutenANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26*96b676e9SEd SchoutenPOSSIBILITY OF SUCH DAMAGE. 2772fcea8cSEd Schouten 2872fcea8cSEd Schouten 2972fcea8cSEd SchoutenThe editor 'ee' (easy editor) is intended to be a simple, easy to use 3072fcea8cSEd Schoutenterminal-based screen oriented editor that requires no instruction to 3172fcea8cSEd Schoutenuse. Its primary use would be for people who are new to computers, or who 3272fcea8cSEd Schoutenuse computers only for things like e-mail. 3372fcea8cSEd Schouten 3472fcea8cSEd Schoutenee's simplified interface is highlighted by the use of pop-up menus which 3572fcea8cSEd Schoutenmake it possible for users to carry out tasks without the need to 3672fcea8cSEd Schoutenremember commands. An information window at the top of the screen shows 3772fcea8cSEd Schoutenthe user the operations available with control-keys. 3872fcea8cSEd Schouten 3972fcea8cSEd Schoutenee allows users to use full eight-bit characters. If the host system has 4072fcea8cSEd Schoutenthe capabilities, ee can use message catalogs, which would allow users to 4172fcea8cSEd Schoutentranslate the message catalog into other languages which use eight-bit 4272fcea8cSEd Schoutencharacters. See the file ee.i18n.guide for more details. 4372fcea8cSEd Schouten 4472fcea8cSEd Schoutenee relies on the virtual memory abilities of the platform it is running on 4572fcea8cSEd Schoutenand does not have its own memory management capabilities. 4672fcea8cSEd Schouten 4772fcea8cSEd SchoutenI am releasing ee because I hate to see new users and non-computer types 4872fcea8cSEd Schoutenget frustrated by vi, and would like to see more intuitive interfaces for 4972fcea8cSEd Schoutenbasic tools (both character-based and graphical) become more pervasive. 5072fcea8cSEd SchoutenTerminal capabilities and communication speeds have evolved considerably 5172fcea8cSEd Schoutensince the time in which vi's interface was created, allowing much more 5272fcea8cSEd Schoutenintuitive interfaces to be used. Since character-based I/O won't be 5372fcea8cSEd Schoutencompletely replaced by graphical user interfaces for at least a few more 5472fcea8cSEd Schoutenyears, I'd like to do what I can to make using computers with less 5572fcea8cSEd Schoutenglamorous interfaces as easy to use as possible. If terminal interfaces 5672fcea8cSEd Schoutenare still used in ten years, I hope neophytes won't still be stuck with 5772fcea8cSEd Schoutenonly vi. 5872fcea8cSEd Schouten 5972fcea8cSEd SchoutenFor a text editor to be easy to use requires a certain set of abilities. In 6072fcea8cSEd Schoutenorder for ee to work, a terminal must have the ability to position the cursor 6172fcea8cSEd Schoutenon the screen, and should have arrow keys that send unique sequences 6272fcea8cSEd Schouten(multiple characters, the first character is an "escape", octal code 6372fcea8cSEd Schouten'\033'). All of this information needs to be in a database called "terminfo" 6472fcea8cSEd Schouten(System V implementations) or "termcap" (usually used for BSD systems). In 6572fcea8cSEd Schoutencase the arrow keys do not transmit unique sequences, motion operations are 6672fcea8cSEd Schoutenmapped to control keys as well, but this at least partially defeats the 6772fcea8cSEd Schoutenpurpose. The curses package is used to handle the I/O which deals with the 6872fcea8cSEd Schoutenterminal's capabilities. 6972fcea8cSEd Schouten 7072fcea8cSEd SchoutenWhile ee is based on curses, I have included here the source code to 7172fcea8cSEd Schoutennew_curse, a subset of curses developed for use with ee. 'curses' often 7272fcea8cSEd Schoutenwill have a defect that reduces the usefulness of the editor relying upon 7372fcea8cSEd Schoutenit. 7472fcea8cSEd Schouten 7572fcea8cSEd SchoutenThe file new_curse.c contains a subset of 'curses', a package for 7672fcea8cSEd Schoutenapplications to use to handle screen output. Unfortunately, curses 7772fcea8cSEd Schoutenvaries from system to system, so I developed new_curse to provide 7872fcea8cSEd Schoutenconsistent behavior across systems. It works on both SystemV and BSD 7972fcea8cSEd Schoutensystems, and while it can sometimes be slower than other curses packages, 8072fcea8cSEd Schoutenit will get the information on the screen painted correctly more often 8172fcea8cSEd Schoutenthan vendor supplied curses. Unless problems occur during the building 8272fcea8cSEd Schoutenof ee, it is recommended that you use new_curse rather than the curses 8372fcea8cSEd Schoutensupplied with your system. 8472fcea8cSEd Schouten 8572fcea8cSEd SchoutenIf you experience problems with data being displayed improperly, check 8672fcea8cSEd Schoutenyour terminal configuration, especially if you're using a terminal 8772fcea8cSEd Schoutenemulator, and make sure that you are using the right terminfo entry 8872fcea8cSEd Schoutenbefore rummaging through code. Terminfo entries often contain 8972fcea8cSEd Schouteninaccuracies, or incomplete information, or may not totally match the 9072fcea8cSEd Schoutenterminal or emulator the terminal information is being used with. 9172fcea8cSEd SchoutenComplaints that ee isn't working quite right often end up being something 9272fcea8cSEd Schoutenelse (like the terminal emulator being used). 9372fcea8cSEd Schouten 9472fcea8cSEd SchoutenBoth ee and new_curse were developed using K&R C (also known as "classic 9572fcea8cSEd SchoutenC"), but it can also be compiled with ANSI C. You should be able to 9672fcea8cSEd Schoutenbuild ee by simply typing "make". A make file which takes into account 9772fcea8cSEd Schoutenthe characteristics of your system will be created, and then ee will be 9872fcea8cSEd Schoutenbuilt. If there are problems encountered, you will be notified about 9972fcea8cSEd Schoutenthem. 10072fcea8cSEd Schouten 10172fcea8cSEd Schoutenee is the result of several conflicting design goals. While I know that it 10272fcea8cSEd Schoutensolves the problems of some users, I also have no doubt that some will decry 10372fcea8cSEd Schoutenits lack of more features. I will settle for knowing that ee does fulfill 10472fcea8cSEd Schoutenthe needs of a minority (but still large number) of users. The goals of ee 10572fcea8cSEd Schoutenare: 10672fcea8cSEd Schouten 10772fcea8cSEd Schouten 1. To be so easy to use as to require no instruction. 10872fcea8cSEd Schouten 2. To be easy to compile and, if necessary, port to new platforms 10972fcea8cSEd Schouten by people with relatively little knowledge of C and UNIX. 11072fcea8cSEd Schouten 3. To have a minimum number of files to be dealt with, for compile 11172fcea8cSEd Schouten and installation. 11272fcea8cSEd Schouten 4. To have enough functionality to be useful to a large number of 11372fcea8cSEd Schouten people. 11472fcea8cSEd Schouten 11572fcea8cSEd SchoutenHugh Mahon |___| 116*96b676e9SEd Schoutenhugh4242@yahoo.com | | 11772fcea8cSEd Schouten |\ /| 11872fcea8cSEd Schouten | \/ | 11972fcea8cSEd Schouten 120