(This file also appears as "freyja.txt".) Freyja Text Editor Overview (Freyja Reduksjon Emacs, Ytre Jevn All) (Freyja Reduces Emacs Yet Joins All) Version 1.4 Copyright 1991,2 by Craig A. Finseth 13 April 1992 This version (oh, what the heck, the whole thing) is dedicated to my wife, Ann, and daughter, Kari, who put up with me spending a *lot* of time on short notice fixing the bugs in the previous version. Sections: What It Is Status Version History How To Obtain a Copy How To Obtain Support Supported Environments Installation File-by-File ----------------------------------------------------------------- What It Is Freyja is an Emacs-type text editor that implements my choice of Emacs commands. It also includes an RPN-calculator and perpetual calendar. It is extensible by changing the source code and recompiling. While it runs on UNIX systems, it is targeted to MS/DOS laptop and palmtop machines. As a text editor, Freyja includes the following features: - full range of character, line, word, sentence, and paragraph-oriented commands. - search, replace, and query replace - deletions are automatically saved into a "kill buffer" - ability to edit up to 11 files at once - ability to view two windows at once - integrated help facility - commands to change the case of text, change indentation, and perform many other functions - can record and play back keyboard macros - includes a perpetual calendar - includes a fully-integrated HP-45A type calculator - configurable with a FREYJA.INI file - system-manager compliant version for the HP95LX ----------------------------------------------------------------- Status: With the exception of two files, the entire release is freeware distributed under the same terms as GNU CopyLeft. The two files are c0s.asm and makeexm.c. These files are placed wholly in the public domain and anyone, anywhere can use them for any purpose in any way. It is silly to make others have to reinvent this particular wheel. Please use them with my blessings. There is still a pesky bug in the MS/DOS version. (It does not appear to be present in the Unix or HP95LX system-manager compliant versions.) If you edit a lot -- especially interrupting redisplay -- and exit, it (randomly) hangs at the call to _exit. Of course, I can't make it happen whenever I try to find and fix it... ----------------------------------------------------------------- Version History: 1.1 3 Aug 1991 first release 1.2 15 Aug 1991 second release: minor bug fixes in ^C, ^[ ^E, Ins, Enter (in calculator) and redisplay; added keyboard switch 1.3 21 Mar 1992 third release: reworked .ini file reading, fixed minor bugs; ^X ^D now includes hidden files; file I/O can now be unprocessed; all columns of the screen are now used; ^U ^W doesn't save deleted text; removed the date/time stamp command and date time format support; created system-manager compliant versions 1.4 13 Apr 1992 ^X^F now checks for read errors; fixed a bizzarre bug in the system-manager compliant version (forgot to remove a call to malloc/free); fixed buffer deletion bug (now can't delete scratch); file getter now works like other s-m applications; added SBUffer, CTX swap, LANguage, SAVing options to freyja.ini; ^G now cancels menu and file getter (like ESC) in system-manager version; fixed a bug in the Help screen; moved the filename to the end of the status line; fixed a word wrap bug ----------------------------------------------------------------- How To Obtain a Copy: Diskette: Send the author blank diskettes: - two, 5 1/4" (360 KB) or - one, 3 1/2" (either 720 KB or 1.44 MB) and enough stamps to cover return postage plus a dollar or so (so that I can buy a diskette mailer). Or you can just send me about US$3.00 in check, stamp, whatever and I will furnish the diskette(s) and mailer. Anonymous FTP: mail.unet.umn.edu in import/fin/freyja.exe (MS/DOS self-extracting archive) import/fin/freyja.tar (UNIX tar file) import/fin/freyja.tar.Z (compressed UNIX tar file) import/fin/freyja.txt (README file) eddie.mit.edu distrib/hp95lx/editors/freya.tar.Z distrib/hp95lx/editors/freya.exe ----------------------------------------------------------------- How To Obtain Support: not supported, author is: Craig Finseth 1343 Lafond St Paul MN 55104 USA +1 612 644 4027 fin@unet.umn.edu Craig.Finseth@nic.mr.net ----------------------------------------------------------------- Supported Environments: Tested on SunOs 4.0.3. Should run under most Berkeley Unix environments. Tested on MS/DOS V3.x and should run on any MS/DOS version 2.0 or later system. Requires Borland Turbo C Version 2.0 or later to compile (it should compile and run under Microsoft C with only minor changes). Tested on HP95LX. ----------------------------------------------------------------- Installation #1 (from diskette, for MS/DOS): 1) Create a directory on the MS/DOS system to hold the files. 2) Copy the freyja files from the diskette(s) to this directory. copy a:*.* 3) Install it, do: copy freyja.exe [[whereever you put executables]] 4) Install the documentation files. Consult freyja.doc for search path information. These are only requied for the help functions; the editor works fine for all other purposes without them. copy f*.doc [[somewhere in the search path]] 5) If you just want to run the regular versions, stop here. -> see Installation #5 for installing in the HP95LX If you want to make a new version: 6) In fgenlib.h, make sure that the correct system constant is #defined. 7) Edit turboc.cfg to suit your system. 8) Make it: copy makefile.msd makefile [[edit makefile to select the regular or system-manager compliant version]] make ----------------------------------------------------------------- Installation #2 (from freyja.exe file, for MS/DOS): 1) Be on an MS/DOS host or one that can run MS/DOS executables. 2) Create a directory to hold the files. 3) Put the FREYJA.EXE file in some >>other<< directory, as things might get dicey when it tries to unpack FREYJA.EXE... 4) Do: cd [[the destination directory]] [[the name of the freyja.exe file on your system]] 5) Follow the steps in installation #1 starting with step 3. ----------------------------------------------------------------- Installation #3 (from freyja.tar file, for MS/DOS): 1) Be on a Unix host or one with a tar command. 2) Create a directory to hold the files. 3) Do: cd [[that directory]] tar xvf [[the name of the freyja.tar file on your system]] 4) Transfer the files to an MS/DOS system. Don't forget that freyja.exe and freyja.exm must be transferred in "binary" mode. 5) Follow the steps in installation #1 starting with step 3. ----------------------------------------------------------------- Installation #4 (from freyja.tar.Z file, for MS/DOS): 1) Be on a Unix host or one with uncompress and tar commands. 2) Create a directory to hold the files. 3) Do: cd [[that directory]] uncompress < [[the name of the freyja.tar.Z file on your system]] | tar xvf - 4) Transfer the files to an MS/DOS system. Don't forget that freyja.exe and freyja.exm must be transferred in "binary" mode. 5) Follow the steps in installation #1 starting with step 3. ----------------------------------------------------------------- Installation #5 (from diskette or .tar files, for HP95LX): 1) Obtain an IBM PC version. Note that the FREYJA.EXE and FREYJA.EXM files are included with the distribution, so that you don't have to compile anything if you just want to run the off-the-shelf versions. 2) Set up a FREYJA.INI file. You can either create it on a PC and download or use the MEMO application. Mine looks like this: swa 40 spe j pa1 p [[optional, turns off serial port power while in Freyja, then on upon exiting]] met i [[optional]] use n [[optional]] wra y [[optional]] sbu n [[optional]] lan 1 [[optional]] See the distribution FREYJA.INI file for explanations of these options. The same file can be used for both the versions: the system-manager compliant version ignores any parameters that don't apply. I put this file in the C:\_DAT directory. 3) If you want to use the system-manager compliant version: 3A) Load FREYJA.EXM into the HP95LX. 3B) The minimum system RAM required is 218K. This number assumes a 40K swap area, and no other applications open or other uses of memory. 3C) Create or add to your C:\_DAT\APNAME.LST file. Here is an example entry that uses the Alt-MEMO key: C:\_DAT\FREYJA.EXM,bb00,Freyja^M Or, if you are like me: C:\_DAT\FREYJA.EXM,b800,Freyja^M And thus override the built-in MEMO function. The first field if the full pathname of the .EXM file. It must be in upper case, and the drive letter (e.g. "C:") must be the same drive as the APNAME.LST file. The second field is the scan code of the hot key. The third field is the name. The whole thing is terminated by a Carriage Return. key base w/Ctrl w/Alt FILER a800 ae00 ab00 COMM ac00 b200 af00 APPT b000 b600 b300 PHONE b400 ba00 b700 MEMO b800 be00 bb00 123 bc00 c200 bf00 CALC c000 c600 c300 Don't forget to reboot the HP95LX. 4) If you want to use the regular version: 4A) Load FREYJA.EXE into the HP95LX. 4B) The minimum system RAM required is 282K. This number assumes a 40K swap area, and no other applications open or other uses of memory. 4C) Instead of setting the swap area size in FREYJA.INI, you could run a DOS shell (MENU S in the FILER) and give this command line: freyja -z 40 But this is more work as you have to do it each time. 4D) A typical configuration is to put FREYJA.EXE in C:\ and FREYJA.INI in C:\_DAT. To make this work, do: create or add to CONFIG.SYS: shell=command /p create or add to AUTOEXEC.BAT: set FREYJADIR=C:\_DAT $SYSMGR Then reboot. ----------------------------------------------------------------- Installation #6 (from freyja.tar file, for UNIX): 1) Be on a Unix host or one with a tar command. 2) Create a directory to hold the files. 3) Do: cd [[that directory]] tar xvf [[the name of the freyja.tar file on your system]] 4) In fgenlib.h, make sure that the correct system constant is #defined. 5) Configure the editor (look at the beginning of freyja.h). 6) Make it: mv Makefile.unx Makefile make 7) Install it, do: cp freyja [[your binary directory, /usr/local/bin?]] 8) Install the documentation files. Consult freyja.doc for search path information. These are only requied for the help functions; the editor works fine for all other purposes without them. cp f*.doc [[somewhere in the search path]] 9) If desired, change freyja.ini, then put this default version somewhere in the search path. ----------------------------------------------------------------- Installation #7 (from freyja.tar.Z file, for UNIX): 1) Be on a Unix host or one with uncompress and tar commands. 2) Create a directory to hold the files. 3) Do: cd [[that directory]] uncompress < [[the name of the freyja.tar.Z file on your system]] | tar xvf - 4) Follow the steps in installation #6 starting with step 4. ----------------------------------------------------------------- Installation #8 (from diskette, for UNIX): 1) Create a directory to hold the files. 2) Copy the freyja files from the diskette(s) to this directory. How you do this varies from system to system. 3) Follow the steps in installation #6 starting with step 4. ----------------------------------------------------------------- File-by-File: makefile.msd MS/DOS Makefile Makefile.unx UNIX Makefile README this file ascii ASCII chart buf.c buffer management routines c0s.asm replacement startup code for use with the system-manager compliant version calc.c calculator routines char.c character-, line-, and screen-oriented commands date.c date arithmetic routines display.c display and display output routines fcalc.doc calculator documentation fcmdlist.doc command list fcmdxref.doc command cross reference fcopying.doc copying information ffsf.doc Free Software Foundation information fgenlib.h General library header file. file.c file-, buffer-, and system-oriented commands fleague.doc League for Programmer Freedom information flib.c General library routines freyja.c top level freyja.doc documentation, such as it is freyja.exe MS/DOS executable, regular freyja.exm MS/DOS executable, system-manager compliant freyja.h main include file freyja.ini template for .ini file freyja.lnk MS/DOS linker directive file ftutoria.doc introductory tutorial fwarrant.doc warranty information help.c help stuff ini.c load the initialization file jaguar.c HP95LX (Jaguar) interface routines key.c keyboard and input routines libasm.asm MS/DOS assembly language interface routines makeexm.c MS/DOS source to the makeexm program, which builds a .EXM file misc.c miscellaneous commands region.c region-oriented commands smfreyja.lnk MS/DOS linker directive file for the system-manager compliant version smjaguar.c HP95LX (Jaguar) interface routines for the system-manager compliant version table.c command table routines term.c terminal interface routines turboc.cfg MS/DOS Turbo C configuration file white.c whitespace-oriented commands word.c word-oriented commands (including sentence, number, and paragraph) xprintf.c replacement/supplement for printf xprintf.doc