FPTED By Fernando J. G. Pereira FPTED is a, easy to use, text editor, that allows the user to do almost all of the most used features in other text editors. It isn't as powerful as "vi", or "emacs", but I think, it's easy to use, its runtime version is very small (in disk space), and it lets you do almost everything you usually do in other editors. Its main characteristics are: 1 - Its user friendly (at least that's what I think...). 2 - It lets you edit several (up to 20) text files at the same time. 3 - You can cut & paste between files, and you can recover deleted text, even after you exit and return to the editor. 4 - You can redefine keys. 5 - You can repeat sequences of key commands. 6 - It has "search and replace", with individual confirmations. 7 - It has abbreviation substitutions (performed with TAB). 8 - You can create definition files that could be read each time the editor is called (using one environment variable). 9 - It has online help. 10- It has MOUSE SUPPORT. 11- It has autoindent and parenthesis match (useful when writing programs). 12 -It doesn't create tmp files, like other editors do, so if the system goes down, you may loose all changes you've made since the last time you save. To minimize this problem, the editor catches a lot of signals (SIGDANGER,SIGPWR,SIGHUP,SIGTERM etc) and saves a copy of each changed file. Also, this editor was designed to be portable between different architectures, so it's very easy to port a wide range of machines. To make it portable, the default key bindings use almost only alphabetic keys, but, as you can redefine keys, this shouldn't be a big problem... This program was written in traditional C, using the curses library and some portable UNIX features (like signals, etc.). To create a runtime version of this editor you must start by extracting this articles from the newsgroup and execute the shell archives. sh sh When this is finished, you can make a runtime version using make and selecting the desired makefile (or changing one of the existing ones). As there are two different versions of curses, the System V and the BSD version, you can choose between the SYSV.make makefile and BSD.make. Attention: This makefiles will attempt to send a mail message to me, so that I can make a list of users. From times to times I intend to send to those people a file containing all the patches needed to remove bugs found meanwhile. The makefile will automatically erase the "mail" code from itself in the first time you compile FPTED successfully, after the message is sent. make -f SYSV.make or make -f BSD.make Although, the main difference between this editor compiled with one library and the other is the usage of the REVERSE attribute. If your system does not have the SIGNAL UNIX system call, then you should remove the flag -DUNIX from the compiler line in the respective makefile. Also, if you are not using terminals with VT like key code sequences (starting with "["), then you should remove the flag -DVT_TERM. There are three NEW compilation flags: QUICK_SCROLL enables a multi-line scroll mode. This mode can be useful when your terminal normal scroll is very slow. STATUS_LINE enables a status line with the name of the file currently edited and the key used to access the menu. MOUSE_SUPPORT lets you use the mouse keys to locate text in the editor when using a xterm. You can still use the standard X clipboard using the shift key. If your system has more than one version of curses (as it is the case in ULTRIX), you can change the name of the include files in fpted.c and change the respective names in the makefile... After installing the runtime version, before you start using this editor you should define the following environment variables: FPTED_HELP is the path to the help file: If you are using a csh, do as follows: setenv FPTED_HELP `pwd`/fpted_help ( if you are in a different directory, instead of `pwd`, you should specify a complete path ) FPTED_CLIPFILE is the file where the clipboard is saved when you exit the editor. If you want to use a file named fpted_clip inside a directory named tmp in your home directory do as follows: mkdir ~/tmp setenv FPTED_CLIPFILE ~/tmp/fpted_clip FPTED_DEFS is the definitions file that is automatically readded each time you run this editor: setenv FPTED_DEFS ~/.fpted_defs This file can be created with this editor (saving the definitions created interactively), or you can copy one of the sample files in this directory: c_fpted_defs - Key and abbreviations useful for C programmers. vt_fpted_defs - Key definitions for VT200 like terminals. As one example, if you want to use a VT200, you should do as follows: cp vt_fpted_defs ~/.fpted_defs If you like this program you should also put all of the environment definition in your .chsrc or .profile. ********** IMPORTANT NOTE ********** I intend this program to be FREE software, that is: you can distribute it, but you shouldn't use it for selling... So, you are free to use this application, and you can distribute any number of copies, as long as this notice will appear in every copy. Also, I DENY any responsibility for any kind of possible problems caused by this application (That means, if something unexpected goes wrong, you are at your own...). ************* I hope you enjoy. Fernando Pereira 1/Feb/92 Lisboa - Portugal fjp@minerva.inesc.pt