home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource3
/
199_01
/
ged.doc
< prev
next >
Wrap
Text File
|
1987-12-17
|
28KB
|
556 lines
GED 2.00
I. Introduction ( goto Changes and Additions if you already use ged )
Ged, a.k.a. "go edit", is an adaptation of J.W.Haefner's MS-DOS QED text
editor to COMPAQ/IBM-PC hardware, making extensive use of DeSmet C's pcio
video routines.
Since this is only an adaptation I have left in all references to previous
authorship. I have also retained most of Mr. Haefner's documentation -
as much of it still applies to Ged.
Why GED?
Initially my goal was to produce an editor to replace what I've used for
almost two years, ( Turbo Pascal's editor ), and to one day port it to a
UNIX/XENIX environment. At this point in time I feel I've made some good
progress towards that end and have decided to pass on the fruits of my
research.
I started this project back in January '86, and spent a good deal of
time trying to make GED work using ansi.sys. It eventually did run, but
not much faster than what I can do in BBx, Business Basic. Ansi.sys
should be used sparingly. Around Spring '86, I started over again, this
time playing with interrupts and feverishly re-reading my Norton's. It
then dawned on me - "why re-invent the wheel", and I opted to use the
video routines that were supplied with DeSmet C's compiler package.
( My reluctance to using pcio was motivated by not wanting to learn assembly
language - there's no way around it. At least with gedio.a you've got some
good working examples. )
II. Changes and Additions
Function Key Definitions:
─────────────────────────
F1 = help menu
F2 = update time
F3 = move cursor left one word to change
F4 = move cursor right one word ""
F5 = save the current file and resume editing
F6 = execute ls see getenv()
F7 = execute more ditto
F8 = execute grep ditto
F9 = turn on graphics editor - display IBM extended ASCII tables
F10 = reset run-time variables and options.
Cursor Control Keys:
────────────────────
Home = cursor to left edge of screen
End = cursor to end of line
PgUp = move cursor up to beginning of file
text scrolls down
PgDn = move cursor down to end of file
text scrolls up
Del = delete character under cursor
if end of line then pull from line below
Caps = displays caps lock status
Lock
Ins = turns overtype/insert on/off ( ged is in insert mode normally )
Arrows = as expected
Alt = if IBM chars table on - then get character from 10-key pad.
GreyMinus = move cursor word left
GreyPlus = move cursor word right
Version:
────────
v2.00 Converting Ged to MicroSoft 5.0 and Qic C.
Added Gedio.asm, ged low level screen routines which compile
under MASM.
v1.15 Added IBM extended graphics chars( box parts, etc. ).
Added grey-minus and grey-plus key detection.
v1.11 Added getenv() - DeSmet 3.0 specific.
Cleaned up screen I/O, it all begins with scr_, except for putstr.
All scr_ functions are located in gedio.a
All scr_ co-ordinates are set for ( col, row ).
All interrupt coded functions are in ged11.c.
Added overtype mode and capslock indicator.
Speeded up cursor movement.
Some additional fixes as suggested by Andrew Binstock.
v1.10 Annoying delete to end of line problem cleaned up.
Delete routine did not have actual cursor location.
Only showed up if deleting at postion greater than
screen width.
Changed inject function to writ_txb - easier to relate to.
Cleaned up putline and rewrite functions.
Added execute function to run other people's programs.
Added J.W.Haefner's reform routine. This is for letter
writing and not programming. Reset right margin using F10.
( Routine still needs some work )
v1.05 Added printer error recovery routine. Printer routine covers
trying to write to non-existent printer, meaning - you forgot
to plug it in. Further success of routine appears to be somewhat
printer dependent. You plugged the printer in then turned it off.
Added undo routine from N. Gilbert's 'e' 4.8 CP/M editor.
( Undo replays the last 100 line changes, including deletes,
moves, etc. It's very handy. )
New Functions:
──────────────
1. undo() Undo will undo the last change(s) - up to one hundred.
To use, enter ^_.
2. reform() Use to reformat blocks of text.
Current Default is 72 characters. To change, use F10 Key to
call file Context Menu. To use, place cursor at beginning of
text block and enter ^QR. Will work with undo. You must
move the cursor off the line before reforming.
3. execute() Must use elink.bat and elink.dat. See function key assignments
in ged.c, and execute() and show_fkeys() in ged1.c. Execute
will clean up after itself depending on how the last argument
is set.
4. getenv() It is now possible to locate ls.exe and more.exe using environ-
mental variables which you can set in your autoexec.bat file.
SET LS=c:\exe\ls.exe
SET MORE=c:\exe\more.exe
SET GREP=c:\exe\grep.exe
( I store my more useful executables in a subdirectory named \exe.
You must set LS, or whatever you call it, in the function key
assignment section of ged.c as well. See ged.c for examples. )
Make sure to set ansi.sys in your config.sys file as ls and
more use the reverse display drivers.
Books:
──────
I recommend the following books for the serious enthusiast:
"Crafting 'C' Tools for the IBM PCs", Joe Campbell, Prentice-Hall.
"Advanced MS-DOS", Ray Duncan, MicroSoft Press.
Bugs:
─────
As of GED 1.10 I became aware of a potentially troublesome bug.
Make sure that readall in ged.c is always set to YES - else you may end
up zapping some random disk sectors. ( Especially if attempting to save
a file before completely reading it in. )
There's a bug in displaying tabs properly - I wish someone would fix
it. I don't use tabs.
Printer error routines could work better.
Other:
──────
Also, please report anything you feel is a bug or that needs improvement.
Fixes and constructive criticism are welcomed.
╓─────────────────────────────────────────────────────────────────────────────╖
║ Graphics: ║
╟─────────────────────────────────────────────────────────────────────────────╢
║ What won't work. The following Ascii characters will cause you problems. ║
║ ║
║ 009 or '\t'. I don't use tabs, but for those those who do, '\t' makes for ║
║ some funny looking displays if not converted to blanks. ║
║ ║
║ 010 or '\n'. Will do as expected. Ged is still a text editor. ║
║ ║
║ 026 or ^Z. Stops your read dead in it's tracks. ║
║ ║
║ Of the three, only ^Z is useful as graphics character - Paul Mace may argue ║
║ otherwise. If you really need to use these forbidden characters it's best ║
║ to write them rather than store them. ║
║ ║
║ What will work. F9 turns on the extended graphics mode and puts up the ║
║ first table. Alt + the number of the char entered with the 10-key pad will ║
║ write the character at the cursor location. Control L, ^L, will repeat it ║
║ till