home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 2: PC
/
frozenfish_august_1995.bin
/
bbs
/
d07xx
/
d0770.lha
/
Uedit
/
DonMikneus.LZH
/
DonConfig
next >
Wrap
Text File
|
1989-09-28
|
112KB
|
3,741 lines
=============================================================================
Last Modified: 24 Mar 89
DonConfig modified from Config! by Don Mikneus as follows:
((NOTE: I updated this so it'd compile with Uedit v2.4. R.S. 4/4/89))
* Single-buttonDown and hold scrolls text in opposite direction of mouse
location when mouse is at extreme limits of the window.
* Double-buttonDown & Drag hilites text until buttonUp. Combine this with
scroll feature above for easy text hiliting by mouse alone.
* Shift-double-buttondown & Drag inverts region. Same as hilite feature.
* Ctl-buttonDown & Drag hilites text. ButtonUp then loads the hilited file or
directory from any number of independent directories. This allows mouse
controlled loading of filenames having embedded spaces.
* Buffer Status command changed to "Configure" to allow changing of buffer
variables. It's easier to keep track of variables when all are shown
simultaneously. Any buffer's variables can be changed once inside this
buffer-status function.
* Menus were rearranged. Menu items are in either alphabetical or logical
order. Items containing submenus are in all CAPS.
* Modified Quit&Save options to consistently check whether file needs saving.
* All commands that are called by other commands have virtual-key labels
so that a user cannot inadvertently swap-out a needed subcommand.
* Buffers used within commands have the highest buffer numbers. Buffers used
for files have the lowest buffer numbers (Zero and up). Same thing goes
for nVariables.
* Function keys F6 - F10 have no default definitions and are open for the
user.
* Cursor-arrow keys control cursor movement, keypad controls scroll movement.
"Shift" moves by word, "Alt" moves to end of text, "Ctl" moves to ABS end.
* Reformating can operate on paragraphs in a special mode (BlankDelimit) as
text delimited by blank lines only or in normal mode as text delimited by
both indent changes or blank lines. AutoFormat provides auto-reformat
capability for paragraphs in special mode. In AutoFormat mode,
reformatting occurs on any non-text entry cursor movement. BlankDelimit
Mode reformats only when the current paragraph has changed. Spec LMargin
and Spec RMargin settings can be made for each paragraph separated by blank
lines. Reformat can now operate on all hilited paragraphs, from current
paragraph to end of screen, or even to end of document.
* Primitive mode "completion-key" is the RETURN since that is what most
people expect.
* Ascii table and Key Table commands added to aid Config programming.
* Many commands modified to be more flexible in operation. For example, add/
sub number works on entire number regardless of where the cursor is in the
number.
=============================================================================
Config! defines Uedit's start-up settings and commands. Config! must be in
S: or in your current directory.
If you edit Config! and want to make a new Data! file, type "Run UE -c" in
CLI. (Or you can rename S:Data! or delete it, and Uedit will be forced to
compile Config! next time.)
If you create a new config such as "NewConfig", you can make Uedit compile it
by typing "UE -cNewConfig" in CLI. On the "Save new Data?" question,
selecting Yes will replace Data!. Selecting No will preserve the old Data!.
Once inside Uedit, you can select "Save data" and save it under a new name
like "NewData".
To make Uedit use NewData next time, type "UE -dNewData" in CLI. To make it
your standard data file, rename it to Data! or S:Data!.
---------------------------------------------------------------------------
Here is a description of how buffers and number variables are used in this file.
If you make changes which involve buffers or numeric variables, follow the
convention in this list:
(Though this convention could be changed entirely, of course.)
buf95-99 = used for temporary purposes in commands
buf94 = search string
buf93 = replace string
buf92 = copied hilite
buf91 = copied invert
buf90 = holds scratch deletes for Undo, keypad-0
buf89 = make-command buffer
buf88 = document names
buf87 = holds Help, if loaded
buf86 = used in buffer swapping command, CTRL-w
buf85 = used for AmigaDOS commands
buf84 = used for result of AmigaDOS commands (if result selected)
buf83 = most recent directory name, if "Directory" has been selected
buf82 = copied columnar data
buf81 = debug message
buf0-19 = file buffers
And this is how number variables are used in this config ...
n95-n99 = temporary variables
n94 = numeric total
n93 = delay time
n92 = current EOL column position when requested, Temp CurrentIndex
n91 = temp column match, WB colors, TAB
n90 = temp column match, ButtonDown Counter
n89 = track mouse x position after double click, Temp SpecMargin Status
n88 = track mouse y position after double click
n87 = scroll position indicator for norm/interlace screen
n86 = pointer to buffer for building sorted list in
n85 = current buffer number
n84 = last delete command's cursor position
n83 = 1 if userLocalB and File was changed but not yet saved
n82 = index to start of paragraph
KEEP A BACKUP COPY OF THE ORIGINAL CONFIG! IF YOU CHANGE THIS FILE!
=============================================================================
Edit the contents of each set of angle brackets, but leave the angle-brackets
as they are:
(To recompile these defaults anytime, select "Compile Def" in the menu.)
(Unless told otherwise, use 0 for "no" or 1 for "yes".)
<1> make Key-Help file during this compile. (For "TEACH KEYS" in menu.)
(NOTE: Unless you need the Key-Help facility, you should change this
flag to 0. The compile will go much faster.)
<s:EdKeyHelp> name of Key-Help file (1-19 characters.)
<0> show cursor during compile of this configuration (slower, if show)
<RAM:uejunk> Name for temporary file when one is needed. 19 chars max.
<27> Primitive Mode (pmESC) terminator character. ASCII value, 5-255.
<0> user global flag A ; Any Integer Value
<0> user global flag B ; Any Integer Value
<0> columnar display mode
<0> cram display mode
<1> show row-column
<1> mark gadgets
<0> Interlace/bitplanes. 0-3.
<1> show invisibles
<0> show busies
<0> key-help mode
<20> maximum files to edit: 1-100
<0> make icons
<0> search case-sensitive
<?> search wildcard (printable character)
<$> search either-or delimiter (printable character)
<*> Search multi wildcard. Printable character.
<~> Search all-but delimiter. Printable character.
<0> White allowed under single wildcard: 0=no, 1=space/tab, 2=any white.
<0> White allowed under multi wildcard: 0=no, 1=space/tab, 2=any white.
<75> Percent offset for submenus. 0-100 percent.
<0> RESERVED (l)
<0> RESERVED (m)
<0> speak alerts
<0> speak messages
<0> Print tabs (if 0, tabs are converted to spaces during print)
<1> Smart tabs (don't convert tabs if inside quotes)
<0> RESERVED
<0> use printable cmd-keys for typing input
<2> printer: 0=par: 1=ser: 2=prt: 3=prt: (raw)
<10> idle-time (in seconds) after which idle command is executed: 1-9999
<0> Hide display.
<1> Scroll type: 0 = show colors, 1 = faster
<0> Trap menus to use menu mouse button as a key
<0> Reserved
<0> Reserved
<0> Reserved
<0> Reserved
<0> Reserved
<0> Reserved
<0> Reserved
<0> use tabs - put in tabs, not spaces, when tab key pressed.
<1> autoindent mode
<0> overstrike mode
<0> autobackup mode
<0> RESERVED (r)
<1> wordwrap mode
<0> right-justification mode
<1> map illegal ASCII chars 0-4 to alternate values (see mappings below)
<0> RESERVED (c)
<0> User local flag A
<0> user local flag A
<4> tab table to use: 0-4 (See tables below.)
<77> line-length: 1-9999
<5> split window size in lines (2-100, up to max lines in window)
<0> left margin 0-200
<1> top margin 0-200
<1> bottom margin 0-200
<1> lines/page: 1-200
<10> end-of-line character: 10=Newline, 13=Carriage Return
These are the 5 TAB tables. There can be at most 32 column-entries in tab
table. The highest column is 255. The lowest tab column is 2. In Uedit, to
change tab tables, select "Tab table"; to see the settings, select "See
ruler"; to adjust the tabs, select "Set ruler".
<5> Tab table 0. (32 entries max. Column 2-255.)
<6 20> Tab table 1. (32 entries max. Column 2-255.)
<5 10 20 45> Tab table 2. (32 entries max. Column 2-255.)
<> Tab table 3. (32 entries max. Column 2-255.)
<3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 >
Tab table 4. (32 entries max. Column 2-255.)
Uedit uses ASCII characters 0-3 internally for marking cleared text and for
flags. Thus, files cannot legally contain these characters. If the above
"map illegals" flag is not set, these odd characters are erased by Uedit upon
loading the file. If "Map illegals" is set (see default above ), ASCII 0-3
are remapped into "safe" character values using the settings below. Upon
saving the file to disk the characters are converted back into their old
ASCII 0-3 values: (You could also map the 3 non-null ctrl characters to
ASCII 28-31. This would make tests for control characters work properly.)
<128> map ASCII 0
<129> map ASCII 1
<130> map ASCII 2
<131> map ASCII 3
Printable key table: DON'T TOUCH, unless you know what you are doing! This
is a translation table which converts raw keystrokes into printable
characters. (See Rom Kernal Manual, Volume 1, page 3-81.) There must be 64
in each row. Use OVERSTRIKE mode when modifying this, to save trouble.
Unused --> U U EUROPE--> EE U U
<`1234567890-=\ 0qwertyuiop[] 123asdfghjkl;' 456 zxcvbnm,./ .789>
<~!@#$%^&*()_+| 0QWERTYUIOP{} 123ASDFGHJKL:" 456 ZXCVBNM<>? .789>
Colors:
<2><1><0><3> Workbench window colors (Preferences colors) (0-3)
Interlace RGB colors (0-15):
Red Green Blue
<00> <00> <15> Register 0
<12> <12> <15> Register 1
<00> <00> <00> Register 2
<15> <00> <00> Register 3
Gadget Names (19 chars max):
<Next File> Name for gadget 1 (19 chars max).
<Copy HiLite> Name for gadget 2 (19 chars max).
<Cut HiLite> Name for gadget 3 (19 chars max).
<Paste HiLite> Name for gadget 4 (19 chars max).
<startup:
menu("File",1,normal-f1)
menu("New CF1",1,ctl-f1)
menu("Open AF1",1,alt-f1)
menu("Open w/Dir C-d",1,ctl-d)
menu("Insert SAF1",1,shftAlt-f1)
menu("Rename A-r",1,alt-r)
menu("Restore SCF1",1,shftCtl-f1)
menu("Close w/Save AF2",1,alt-f2)
menu("Save As... F2",1,normal-f2)
menu("Save AllFiles SF2",1,shft-f2)
menu("SetDefaultDir A-d",1,alt-d)
menu("Print SC-p",1,shftCtl-p)
menu("About... ",1,shftAltCtl-a)
menu("Quit C-z",1,ctl-z)
menu("Buffers",2,normal-f1)
menu("Clear All SAF2",2,shftAlt-f2)
menu("Clear # C-f",2,ctl-f)
menu("Index Build SA-i",2,shftAlt-i)
menu("Review All A-b",2,alt-b)
menu("Speak HiLite A-s",2,alt-s)
menu("Swap w/ Buf86 C-w",2,ctl-w)
menu("Swap w/ Buf0 L-w",2,lAmiga-w)
menu("Command",3,normal-f1)
menu("Do m times C-m",3,ctl-m)
menu("Do Cmd # A-ESC",3,alt-ESC)
menu("DOS Result C-y",3,ctl-y)
menu("DOS NoResult SC-y",3,shftctl-y)
menu("Compile Cmd C-c",3,ctl-c)
menu("Compile Def AC-c",3,altCtl-c)
menu("Cmd Buffer SC-c",3,shftCtl-c)
menu("Kill Cmd SAC-k",3,shftAltCtl-k)
menu("Swap Cmds A-w",3,alt-w)
menu("Swap MouseUp SA-w",3,shftAlt-w)
menu("COMMAND DATA ",3,virtual-a)
SUBmenu("Save Data C-F2",3,ctl-f2)
SUBmenu("Load Data AC-F1",3,altCtl-f1)
menu("GOTO ",3,virtual-a)
SUBmenu("Line # C-n",3,ctl-n)
SUBmenu("Page # A-3",3,alt-3)
SUBmenu("Page Start L-h",3,lAmiga-h)
SUBmenu("Page End L-e",3,lAmiga-e)
SUBmenu("First Line C-up",3,ctl-upArrow)
SUBmenu("Last Line C-dwn",3,ctl-downArrow)
menu("LEARN ",3,virtual-a)
SUBmenu("eXecute Learn C-x",3,ctl-x)
SUBmenu("Save Learn # C-5",3,ctl-5)
SUBmenu("Load Learn # C-6",3,ctl-6)
SUBmenu("Run Learn # C-7",3,ctl-7)
menu("PRINT ",3,normal-f1)
SUBmenu("Stop Current L-p",3,lAmiga-p)
SUBmenu("Stop Queue R-p",3,rAmiga-p)
SUBmenu("Restart print L-s",3,lAmiga-s)
SUBmenu("Select Port A-p",3,alt-p)
SUBmenu("Queue Hilite C-p",3,ctl-p)
SUBmenu("Code áEmbed L-b",3,lAmiga-b)
SUBmenu("Code áFind R-g",3,rAmiga-g)
SUBmenu("Code áHelp AC-hlp",3,altCtl-help)
SUBmenu("Codeá Raw R-b",3,rAmiga-b)
menu("SPELLING ",3,rAmiga-1)
SUBmenu("Load speller R-1",3,rAmiga-1)
SUBmenu("Check fwd R-2",3,rAmiga-2)
SUBmenu("Chk&mark fwd R-3",3,rAmiga-3)
SUBmenu("Chk & collect R-4",3,rAmiga-4)
SUBmenu("Merge w/ dict R-5",3,rAmiga-5)
SUBmenu("Del from dict R-6",3,rAmiga-6)
SUBmenu("Free Speller R-8",3,rAmiga-8)
menu("Edit",4,virtual-a)
menu("Ascii A-a",4,alt-a)
menu("Caps Flip A-f",4,alt-f)
menu("Center Line A-2",4,alt-2)
menu("Control Char C-k",4,ctl-k)
menu("HardSpace S-Space",4,shft-space)
menu("UnDel C-kpEnter",4,ctl-kpEnter)
menu("COLUMN ",4,virtual-a)
SUBmenu("Copy HiLit SC-3",4,shftCtl-3)
SUBmenu("Cut HiLit SC-1",4,shftCtl-1)
SUBmenu("Paste SC-4",4,shftCtl-4)
SUBmenu("Space HiLit SC-2",4,shftCtl-2)
SUBmenu("Overwrite SC-5",4,shftCtl-5)
SUBmenu("Ins HiL @Csr SC-6",4,shftCtl-6)
SUBmenu("OvW HiL @Csr SC-7",4,shftCtl-7)
menu("FORMAT MARKINGS ",4,virtual-a)
SUBmenu("Insert FF L-f",4,lAmiga-f)
SUBmenu("Del PageMark L-d",4,lAmiga-d)
SUBmenu("Ins PageMark L-v",4,lAmiga-v)
SUBmenu("AutoIns PgMk L-r",4,lAmiga-r)
menu("HILITE ",4,virtual-a)
SUBmenu("Start KP1",4,normal-kp1)
SUBmenu("End KP3",4,normal-kp3)
SUBmenu("Copy kp.",4,normal-kpDot)
SUBmenu("Cut kp-",4,normal-kpMinus)
SUBmenu("Paste kpEnter",4,normal-kpEnter)
SUBmenu("Erase C-h",4,ctl-h)
menu("INVERT ",4,virtual-a)
SUBmenu("Start S-KP1",4,shft-kp1)
SUBmenu("End S-KP3",4,shft-kp3)
SUBmenu("Copy A-kp.",4,alt-kpDot)
SUBmenu("Cut A-kp-",4,alt-kpMinus)
SUBmenu("Paste A-kpEnter",4,alt-kpEnter)
SUBmenu("Erase C-i",4,ctl-i)
menu("REFORMAT ",4,virtual-a)
SUBmenu("Paragraph F4",4,normal-f4)
SUBmenu("Hilite Region SF4",4,shft-f4)
SUBmenu("To ScreenEnd AF4",4,alt-f4)
SUBmenu("To Doc End CF4",4,ctl-f4)
SUBmenu("Space 2 Tab R-t",4,rAmiga-t)
SUBmenu("Tab 2 Space L-t",4,lAmiga-t)
SUBmenu("DelTrailSpace C-4",4,ctl-4)
menu("SEARCH & REPLACE ",4,virtual-a)
SUBmenu("Set Search kp7",4,shft-kp7)
SUBmenu("Set Replace kp9",4,shft-kp9)
SUBmenu("SEARCH Fwrd C-s",4,ctl-s)
SUBmenu("Replace Fwrd C-r",4,ctl-r)
SUBmenu("Rpl All Fwrd AC-r",4,altCtl-r)
SUBmenu("SEARCH Back SC-s",4,shftCtl-s)
SUBmenu("Replace Back SC-r",4,shftCtl-r)
menu("Mode",5,normal-f1)
checkedMenu("AutoBackup SACF5",5,shftAltCtl-f5,autoBackup)
checkedMenu("Changed Flag LF5",5,lAmiga-f5,changed)
checkedMenu("ColumnarData SC-`",5,shftCtl-`,columnar)
Menu("FORMAT",5,virtual-a)
checkedSUBMenu("AutoFormat ACF4",5,altCtl-f4,userLocalB)
checkedSUBMenu("AutoIndent AF5",5,alt-f5,autoIndent)
checkedSUBMenu("BlankDelimit CF3",5,ctl-f3,userGlobalB)
checkedSUBMenu("Right Justify A-j",5,alt-j,rightJustify)
checkedSUBMenu("Spec LMargin SAF4",5,shftAlt-f4,userGlobalA)
checkedSUBMenu("WordWrap CF5",5,ctl-f5,wordWrap)
checkedMenu("Help C-help",5,ctl-help,teachKeys)
checkedMenu("Icon Files -G- F5",5,normal-f5,icons)
checkedMenu("Idle Save ACF2",5,altCtl-f2,userLocalA)
checkedMenu("Learn R-l",5,rAmiga-l,learnMode)
checkedMenu("Map ASC(0-5) SA-m",5,shftAlt-m,mapChars)
checkedMenu("Num Keypad-G- A-n",5,alt-n,useKeys)
checkedMenu("OverStrike SF5",5,shft-f5,overStrike)
checkedMenu("Read-Only SAF5",5,shftAlt-f5,readOnly)
checkedMenu("Search Caps C-8",5,ctl-8,searchCaps)
checkedMenu("Speak Alrts ACF5",5,altCtl-f5,speakAlerts)
checkedMenu("Speak Msgs SCF5",5,shftCtl-f5,speakMsgs)
checkedMenu("Tabs Real AC-tab",5,altCtl-tab,trueTabs)
menu("Adjust",6,normal-f1)
menu("Configure S-HELP",6,shft-help)
menu("DataInput Key ESC",6,normal-ESC)
menu("End Of Line SA-e",6,shftAlt-e)
menu("GadgetName AC-ESC",6,altCtl-esc)
menu("Hex# 2 Dec# A-h",6,alt-h)
menu("nVariable A-8",6,alt-8)
menu("Spec LMargin SF3",6,shft-f3)
menu("Spec RMargin F3",6,normal-f3)
menu("UnInvert A-i",6,alt-i)
menu("UnHiLite C-u",6,ctl-u)
menu("Display",7,normal-f1)
checkedMenu("Busies SA-b",7,shftAlt-b,busies)
checkedMenu("Control Codes C-v",7,ctl-v,spooks)
checkedMenu("Interlace S-ESC",7,shft-esc,lace)
checkedMenu("Mark Gadgets C-g",7,ctl-g,markGadgets)
checkedMenu("MoreRows RF5",7,rAmiga-f5,cram)
checkedMenu("Row/Column C-2",7,ctl-2,rowCol)
menu("ASCII of Char C-a",7,ctl-a)
menu("ASCII Table R-a",7,rAmiga-a)
menu("Key Codes A-k",7,alt-k)
menu("Key Table AC-k",7,altCtl-k)
menu("Refresh SC-help",7,shftCtl-help)
menu("SPLIT WINDOWS ",7,virtual-a)
SUBmenu("New L-0",7,lAmiga-0)
SUBmenu("Decrease L-kp2",7,lAmiga-kp2)
SUBmenu("Enlarge L-kp8",7,lAmiga-kp8)
SUBmenu("Next Window L-9",7,lAmiga-9)
SUBmenu("Close L--",7,lAmiga--)
SUBmenu("Undo Buffer L-1",7,lAmiga-1)
SUBmenu("Search Buffer L-2",7,lAmiga-2)
SUBmenu("ReplaceBuffer L-3",7,lAmiga-3)
SUBmenu("Hilite Buffer L-4",7,lAmiga-4)
SUBmenu("Invert Buffer L-5",7,lAmiga-5)
SUBmenu("Column Buffer L-6",7,lAmiga-6)
SUBmenu("Current Dir L-7",7,lAmiga-7)
nameBuffer(94,"Search String") .. names for buffers
nameBuffer(93,"Replace String")
nameBuffer(92,"Copied Hilite")
nameBuffer(91,"Copied Invert")
nameBuffer(90,"Scratch Deletes")
nameBuffer(89,"Command EditBuffer")
nameBuffer(88,"Directory Name")
nameBuffer(87,"Help")
nameBuffer(86,"Index")
nameBuffer(82,"Copied ColumnText")
runKey(shftAltCtl-z)
runKey(virtual-7)
>
NOTE: shftAltCtl-z is executed automatically at startup. Normally no
command exists for it. During an edit session you can create and save one,
however, and it will be executed each time you start Uedit.
Press HELP if you want to see how to set up shftAltCtl-z to auto-load your
files.
=========================== VIRTUAL KEYS =============================
NOTE: The following are subroutines which are only accessible from commands
and cannot be directly accessed by the keyboard. They permit swapping of
normal commands without having to worry about one key calling another.
ERASE FILE GRACEFULLY
<virtual-a:
if (eqNum(macroNum,465)) ..ctl-z
{ if (askYesNo("Quit WITHOUT Save?")) quit(0)
equateNum(macroNum,1) ..clear this test
}
if (not saveFile(buf[n99]))
{ putMsg("AMIGA-ESC=Abort. Save File As")
freeBuf(buf88)
getFileName(buf88,buf[n99])
inputString(buf88)
if (setFileName(buf[n99],buf88))
if (not saveFile(buf[n99])) returnFalse
}
>
HILITE COPY
<virtual-b:
if (gtLoc(curFile,eHilite,sHilite))
{ freeBuf(buf92) insertRgn(buf92,sFile,curFile,hilite)
}
>
HILITE PASTE
<virtual-c:
insertRgn(curFile,atCursor,buf92,all)
if (not onScreen(atCursor)) vScroll(atCursor)
>
HILITE START
<virtual-d:
equateLoc(curFile,sHilite,mouseLoc) equateNum(n90,2)
>
SAVE File as
<virtual-e:
putMsg("AMIGA-ESC=Abort, Save CurrentFile As")
freeBuf(buf88)
freeBuf(buf99)
getFileName(buf88,curFile)
getFileName(buf99,curFile)
inputString(buf88)
moveCursor(buf88,sFile)
moveCursor(buf99,sFile)
while (not is(buf88,eFile))
{ if (is(buf99,eFile)) goto label(1)
copyChar(buf99,n99)
if (not is(buf88,n99)) goto label(1)
moveCursor(buf88,eChar)
moveCursor(buf99,eChar)
}
if (not runKey(virtual-6))
{ putMsg ("File was unchanged, no SAVE.")
return
}
label(1)
if (setFileName(curFile,buf88)) saveFile(curFile)
>
SEARCH STRING EDIT IN buf94
<virtual-g:
putMsg("AMIGA-ESC=Abort, Input Search String")
inputString(buf94)
putMsg("Searching Forward")
runKey(virtual-h)
>
NOTE: returnTrue is needed below because "thisKey" could return a False even
though search() returned True. returnFalse is needed because equateLoc()
will return a True:
SEARCH FORWARD FOR STRING IN buf94
<virtual-h:
if (eqLoc(curFile,atCursor,eInvert)) moveCursor(curFile,sChar)
setSearch(buf94)
if (search(curFile,sInvert,eInvert,1)) returnTrue
putMsg("Forward Search failed")
equateLoc(curFile,sInvert,eInvert)
returnFalse
>
REPLACE STRING EDIT IN buf93
<virtual-i:
putMsg("AMIGA-ESC=Abort. Input Replace String")
inputString(buf93)
>
INVERT COPY
<virtual-j:
if (not gtLoc(curFile,eInvert,sInvert)) returnFalse
freeBuf(buf91)
insertRgn(buf91,sFile,curFile,invert)
>
DELETE MESSAGE
<virtual-k:
refreshDisplay
putMsg("Phrase Copied to buf90. Recover with CTRL-ENTER")
>
DELETE TO EOL
<virtual-l:
if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf90)
if (is(curFile,eLine)) runKey(normal-del)
else
{ equateLoc(curFile,locA,atCursor)
moveCursor(curFile,eLine)
equateLoc(curFile,locB,atCursor)
insertRgn(buf90,eFile,curFile,loc)
clearRgn(curFile,loc)
}
>
SPACE INSERT
<virtual-m:
insertChar(curFile," ") moveCursor(curFile,sChar)
if (is(curFile,sLine)) refreshDisplay
>
DIRECTORY NAME
<virtual-n:
putMsg("AMIGA-ESC=Abort. Enter New Editor Default Directory (use w/CLI only): ")
freeBuf(buf83)
if (inputString(buf83)) changeDir(buf83)
>
LINES/PAGE
<virtual-o:
getLocal(buf[n85],n99,pageLines)
putMsg("AMIGA-ESC=Abort. Enter New # Lines/Page")
inputNum(n99)
setLocal(buf[n85],pageLines,n99)
>
SEARCH BACKWARD FOR STRING IN buf94
<virtual-p:
setSearch(buf94)
if (search(curFile,sInvert,eInvert,-1)) returnTrue
putMsg("Backward Search failed")
equateLoc(curFile,sInvert,eInvert)
returnFalse
>
REPLACE INVERTED REGION W/ buf93
<virtual-q:
if (eqLoc(curFile,sInvert,eInvert)) returnFalse
clearRgn(curFile,invert)
insertRgn(curFile,sInvert,buf93,all)
runKey(virtual-h)
>
PRINT: Get control key
<virtual-r:
putMsg("Enter printer code (b c d e i l n s u x y 8 h=help):")
if (getKey(n99)) { mod(n99,n99,104) putMsg(" ") returnTrue }
putMsg(" ")
returnFalse
>
SPACE: Clear Leading
<virtual-s:
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
while (is(curFile,space))
{ if (is(curFile,eLine)) returnTrue
clearChar(curFile)
}
>
SET n92 = EOL column position
<virtual-t:
equateLoc(curFile,locA,atCursor)
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
locToCol(curFile,n92,atCursor)
equateLoc(curFile,atCursor,locA)
>
COLUMN-HILIGHTED COPIED TO buf82
<virtual-u:
if (gtLoc(curFile,eHilite,sHilite))
{ freeBuf(buf82) copyColData(buf82,sFile,curFile,hilite,1)
}
>
SORTED LIST BUILT BY SUCCESSIVELY ADDING INVERT REGIONS
<virtual-v:
moveCursor(curFile,sInvert)
copyChar(curFile,n99)
if (is(curFile,upperCase)) add(n99,n99,32)
if (isEmpty(buf[n86])) insertChar(buf[n86],eLine)
moveCursor(buf[n86],sFile)
equateLoc(buf[n86],sPage,atCursor)
label(1)
copyChar(buf[n86],n98)
if (is(buf[n86],upperCase)) add(n98,n98,32)
if (gtNum(n99,n98))
{ moveCursor(buf[n86],downLine)
if (not is(buf[n86],eFile)) goto label(1)
}
insertRgn(buf[n86],atCursor,curFile,invert)
insertChar(buf[n86],eLine)
>
PRINTER: Bracket the hilite region with printer codes using n99
<virtual-w:
if (geLoc(curFile,sHilite,eHilite)) returnFalse
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,sHilite)
printerCode(curFile,n98,0,0)
incNum(n98)
moveCursor(curFile,eHilite)
printerCode(curFile,n98,0,0)
moveCursor(curFile,locA)
>
Check whether hilite is file/dir and load appropriately
<virtual-x:
updateDisplay
moveCursor(curFile,sInvert)
equateNum(n99,0)
if (is(curFile,"(")) goto label(1)
moveCursor(curFile,eInvert)
moveCursor(curFile,eChar)
while (is(curFile,space)) moveCursor(curFile,eChar)
equateNum(n99,1)
insertRgn(buf99,eFile,curFile,invert)
if (is(curFile,"(")) goto label(1)
refreshDisplay
loadFile(buf99)
return
label(1)
moveCursor(curFile,eChar)
if (is(curFile,"d"))
{ moveCursor(curFile,eChar)
if (is(curFile,"i"))
{ moveCursor(curFile,eChar)
if (is(curFile,"r"))
{ if (eqNum(n99,0))
{ moveCursor(curFile,sInvert)
moveCursor(curFile,sChar)
while (is(curFile,space)) moveCursor(curFile,sChar)
moveCursor(curFile,eChar)
equateLoc(curFile,eInvert,atCursor)
moveCursor(curFile,sChar)
while (not is(curFile,whiteSpace)) moveCursor(curFile,sChar)
moveCursor(curFile,eChar)
equateLoc(curFile,sInvert,atCursor)
insertRgn(buf99,eFile,curFile,invert)
}
swapBuf(buf83,buf99)
runKey(ctl-d) ..Get Dir of Buf83
refreshDisplay
}
}
}
>
Find Beginning of FileName
<virtual-y:
while (is(curFile,space))
{ if (not moveCursor(curFile,sChar)) goto label(1)
if (is(curFile,eLine)) goto label(1)
}
goto label(2)
label(1)
if (not is(curFile,eWord)) moveCursor(curFile,eWord)
moveCursor(curFile,sChar)
label(2)
while (not is(curFile,space))
{ if (not moveCursor(curFile,sChar)) goto label(3) }
moveCursor(curFile,eChar)
label(3)
equateLoc(curFile,sInvert,atCursor)
updateDisplay
>
DEBUG
..<virtual-d:
freeBuf(buf81)
insertRgn(buf81,eFile,"Paused at ",all)
toWord(buf81,n0)
putMsg(buf81)
refreshDisplay
delay(30)
>
VIRTUAL KEYS 1-4 ARE USED IN "SPECIAL-REFORMAT" SECTION BELOW
NUMERIC front end for add/sub a number
<virtual-5:
if (is(curFile,"."))
{ moveCursor(curFile,eChar)
if (not is(curFile,digit))
{ do(n99,1,2) moveCursor(curFile,sChar)
if (not is(curFile,digit))
{ moveCursor(curFile,eChar)
returnFalse
}
}
}
if (not is(curFile,digit)) returnFalse
if (not is(curFile,sWord)) moveCursor(curFile,sWord)
moveCursor(curFile,sChar)
if (is(curFile,"."))
{ moveCursor(curFile,sChar)
if (is(curFile,digit)) moveCursor(curFile,sWord)
else
{ moveCursor(curFile,eChar)
equateNum(n99,0)
goto label(0)
}
}
else moveCursor(curFile,eChar)
toNumber(n99,curFile)
moveCursor(curFile,eWord)
label(0)
if (is(curFile,"."))
{ moveCursor(curFile,eChar)
if (not is(curFile,digit)) goto label(1)
toNumber(n98,curFile)
moveCursor(curFile,eChar)
if (not is(curFile,digit))
{ mul(n98,n98,10)
moveCursor(curFile,sChar)
}
moveCursor(curFile,eWord)
}
else
{
label(1)
equateNum(n98,0)
}
mul(n99,n99,100)
if (gtNum(0,n99)) mul(n97,n98,-1)
else equateNum(n97,n98)
add(n99,n99,n97)
>
REFORMAT feature to keep track of changed file
<virtual-6:
if (getFlag(curFile,userLocalB)) returnTrue
if (not getFlag(curFile,changed)) returnFalse
>
STARTUP default conditions
<virtual-7:
equateNum(pmESC,10) .. Set Primitive Input Key = RETURN
>
====================== GADGETS & CURSOR KEYS ==========================
NOTE: There can be shft-closeBox, alt-closeBox, etc, commands also.
QUIT gracefully
<normal-closeBox:
if (not isEmpty(curFile))
if (runKey(virtual-6)) ..Check whether file is changed
if (askYesNo("Save Changes for This File Before Closing?"))
{ equateNum(n99,curFile)
if (not runKey(virtual-a)) returnFalse
}
freeBuf(curFile)
getMaxFiles(n98)
decNum(n98)
do (n99, 0, n98)
if (not isEmpty(buf[n99])) returnFalse
if (askYesNo("Quit Uedit?")) quit(0)
>
<normal-esc:
putMsg("Enter new Primitive Mode terminator CTRL-key")
if (getKeyVal(n54,n99))
if (gtNum(n99,4))
if (gtNum(32,n99)) equateNum(pmESC,n99)
putMsg(" ") >
INTERLACE mode
<shft-Esc:
flipFlag(curFile,lace)
>
COMMAND Execute #
<alt-Esc:
putMsg("AMIGA-ESC=Abort. Enter the command number to execute")
inputNum(n99)
runKey(n99)
>
QUIT No SAVES
<ctl-esc:
quit(0)
>
GADGET Change Name
<altCtl-esc:
putMsg("Enter Number of Gadget to Rename (1-4):")
inputNum(n99)
freeBuf(buf99)
insertRgn(buf99,eFile,"Enter Name for Gadget ",all)
toWord(buf99,n99)
putMsg(buf99)
freeBuf(buf99)
inputString(buf99)
gadgetName(n99,buf99)
>
NEXT FILE
<normal-gadget1:
toggle(curFile)
>
COPY HILITE TO BUFFER 92
<normal-gadget2:
runKey(virtual-b)
if (thisKey) putMsg("HiLite Copied to buf92")
>
CUT HILITE TO BUFFER 92
<normal-gadget3:
if (runKey(virtual-b)) clearRgn(curFile,hilite)
if (thisKey) putMsg("HiLite Copied to buf92")
>
PASTE BUFFER 92 AT CURSOR
<normal-gadget4:
runKey(virtual-c)
>
CURSOR Up
<normal-upArrow:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,upLine)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR Down
<normal-downArrow:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,downLine)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR Left
<normal-leftArrow:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,sChar)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR Right
<normal-rightArrow:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,eChar)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR moves up 1/2 screen
<shft-upArrow:
equateLoc(curFile,locA,atCursor)
getLocal(curFile,n97,pageLines)
if (eqNum(n97,1))
{ getSplitLines(n98,n97) .. get start & stop
sub(n97,n97,n98)
div (n98,n97,2)
do (n99,1,n98) moveCursor(curFile,upLine)
goto label(1)
}
getPageRowCol(n99,n99,n98)
do (n98,2,n99) moveCursor(curFile,upLine)
vScroll(atCursor)
label(1)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR moves down 1/2 screen
<shft-downArrow:
equateLoc(curFile,locA,atCursor)
getLocal(curFile,n97,pageLines)
if (eqNum(n97,1))
{ getSplitLines(n98,n97) .. get start & stop
sub(n97,n97,n98)
div (n98,n97,2)
do (n99,1,n98) moveCursor(curFile,downLine)
return
}
getPageRowCol(n99,n98,n99)
sub(n99,n97,n98)
do (n98,1,n99) moveCursor(curFile,downLine)
vScroll(atCursor)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR to Start of Word
<shft-leftArrow:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,sWord)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR to End of Word
<shft-rightArrow:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,eWord)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR to Top of Screen
<alt-upArrow:
equateLoc(curFile,locA,atCursor)
if (eqLoc(curFile,atCursor,sPage))
{ moveCursor(curFile,upLine) updateDisplay
}
moveCursor(curFile,sPage)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR to Bottom of Screen
<alt-downArrow:
equateLoc(curFile,locA,atCursor)
equateLoc(curFile,mouseLoc,atCursor)
moveCursor(curFile,ePage)
moveCursor(curFile,upLine)
if (eqLoc(curFile,mouseLoc,atCursor))
{ moveCursor(curFile,downLine)
updateDisplay
moveCursor(curFile,ePage)
moveCursor(curFile,upLine)
}
while (inputWaiting)
{ inputKey(n99)
moveCursor(curFile,downline)
moveCursor(curFile,ePage)
moveCursor(curFile,upLine)
}
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR to Start of Text in Line
<alt-leftArrow:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,sLine)
while (is(curFile,whiteSpace)) moveCursor(curFile,eChar)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR to End of Text in Line
<alt-rightArrow:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,eLine)
moveCursor(curFile,sChar)
while (is(curFile,whiteSpace))
{ if (not moveCursor(curFile,sChar)) goto label(1)
}
label(1)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR to Start of File
<ctl-upArrow:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,sFile) vScroll(atCursor)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR to End of File
<ctl-downArrow:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,eFile) vScroll(atCursor)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR to Start of Line
<ctl-leftArrow:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,sLine)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
CURSOR to End of Line
<ctl-rightArrow:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,eLine)
if (getFlag(curFile,userLocalB)) runKey(virtual-1)
>
HILITE Region moved to left by one space
<shftCtl-leftArrow:
moveCursor(curFile,sHilite)
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
label(1)
if (is(curFile,space)) clearChar(curFile)
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
moveCursor(curFile,eChar)
if (gtLoc(curFile,eHilite,atCursor)) goto label(1)
>
HILITE Region moved to right by one space
<shftCtl-rightArrow:
moveCursor(curFile,sHilite)
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
label(1)
if (gtLoc(curFile,eHilite,atCursor))
{ insertChar(curFile," ")
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
moveCursor(curFile,eChar)
goto label(1)
}
>
HILITE : Start/End on Double Click; SINGLE: place cursor, and/or scroll
<normal-buttonDown:
moveCursor(curFile,mouseLoc)
if (getFlag(curFile,userLocalB)) runKey(virtual-1) ..Special Reformat
if (eqNum(macroNum,512)) ..Ctl-buttonDown
{ putMsg("Select FileName to Load")
equateNum(n90,2)
}
else
{ if (eqNum(macroNum,408)) ..SA-ButtonDown
{ putMsg("Select Phrase to add to Index")
equateNum(n90,2)
}
else
{ if (eqNum(n90,1)) ..n90=1 after 1st click
{ if (eqLoc(curFile,locA,mouseLoc))
{ equateNum(n90,2) ..n90=2 for double-click
if (eqNum(macroNum,96)) ..Normal-buttonDown
{ putMsg("HiLite Started")
refreshDisplay
runkey(virtual-d)
}
if (eqNum(macroNum,200)) ..shft-buttonDown
{ putMsg("Invert Started")
}
}
}
else
equateNum(n90,1)
}
}
equateLoc(curFile,locA,mouseLoc)
if (eqNum(n90,2)) ..If double-click,initialize
{ if (eqNum(macroNum,96)) ..Normal-buttonDown
{ equateLoc(curFile,sHilite,locA)
equateLoc(curFile,eHilite,sHilite)
}
else
{ equateLoc(curFile,sInvert,locA)
equateLoc(curFile,eInvert,sInvert)
}
}
updateDisplay
equateNum(n87,175) ..define normal screen bottom
delay(3)
if (getFlag(curFile,lace)) equateNum(n87,375) ..define lace screen bottom
while (mouseDown)
{ trackMouse
mouseXY(n89,n88)
if (gtNum(25,n88)) vScroll(upLine) ..if at top of screen
else if (gtNum(n88,n87)) vScroll(downLine)..if at bottom of screen
if (gtNum(n89,620)) hScroll(1) ..if at right of screen
else if (gtNum(20,n89)) hScroll(-1) ..if at left of screen
if (eqNum(n90,2)) ..if double-click,move hilite
{if (gtLoc(curFile,locA,mouseLoc))
{if (eqNum(macroNum,96)) ..Normal buttonDown
{equateLoc(curFile,sHilite,mouseLoc) equateLoc(curFile,eHilite,locA)
}
else
{equateLoc(curFile,sInvert,mouseLoc) equateLoc(curFile,eInvert,locA)
}
}
else
{if (eqNum(macroNum,96)) ..Normal buttonDown
{equateLoc(curFile,eHilite,mouseLoc) equateLoc(curFile,sHilite,locA)
}
else
{equateLoc(curFile,eInvert,mouseLoc) equateLoc(curFile,sInvert,locA)
}
}
refreshDisplay
}
else updateDisplay
}
if (eqNum(n90,2)) ..for doubleclick complete,cleanup
{ equateNum(n90,0)
if (eqNum(macroNum,96)) { putMsg("HiLite Completed") goto label(9) }
if (eqNum(macroNum,200)) { putMsg("Invert Completed") goto label(9) }
putMsg(" ")
}
label(9)
if (eqNum(macroNum,512)) equateNum(n90,3) ..remember ctl-buttonDown
>
INVERT: Start/End on Double Click; SINGLE: place cursor, and/or scroll
<shft-buttonDown:
runKey(normal-buttonDown) .. Uses MacroNum (200) to distinguish
>
HILITE FILENAME that is clicked
<ctl-buttonDown:
runKey(normal-buttonDown) .. Uses MacroNum (512) to distinguish
>
LOAD Hilited Filename/Directory
<normal-buttonUp:
if (eqNum(n90,3)) runKey(ctl-buttonUp) .. n90 set at end normal-button cmd
>
LOAD Hilited Filename/Directory
<ctl-buttonUp:
equateNum(n90,0)
moveCursor(curFile,sFile) ..First Line of Buf = DirName
equateLoc(curFile,locA,atCursor)
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
equateLoc(curFile,locB,atCursor)
freeBuf(buf99)
insertRgn(buf99,eFile,curFile,loc)
equateLoc(curFile,atCursor,sInvert)
runKey(virtual-y) ..Find/Mark Start of FileName
if (gtLoc(curFile,sInvert,eInvert)) equateLoc(curFile,eInvert,sInvert)
equateLoc(curFile,atCursor,eInvert)
while (not is(curFile,space))
{ if (is(curFile,eLine)) goto label(2)
moveCursor(curFile,eChar)
}
label(2)
equateLoc(curFile,eInvert,atCursor)
runKey(virtual-x) ..Load Hilited File/Directory
>
INDEX ADD PHRASE in buf86 by dragging mouse
<shftAlt-buttonDown:
runKey(normal-buttonDown) ..Uses macroNum to distinguish
equateLoc(curFile,atCursor,eInvert)
if (not is(curFile,eWord)) moveCursor(curFile,eWord)
equateLoc(curFile,eInvert,atCursor)
refreshDisplay
equateNum(n86,86) .. n86 holds the buffer number for the index
if (thisKey)
putMsg("Inverted Phrase Added to buf86 Index. CTRL-w swaps File<->Index")
runKey(virtual-v)
>
INVERT START
<shftCtl-buttonDown:
equateLoc(curFile,sInvert,mouseLoc)
if (thisKey) putMsg("Invert Started")
updateDisplay
>
INVERT END
<altCtl-buttonDown:
equateLoc(curFile,eInvert,mouseLoc)
if (thisKey) { putMsg("Invert Completed") refreshDisplay }
>
======================= KEYPAD & FUNCTION KEYS =========================
NOTE: FUNCTION KEYS F6 - F10 ARE AVAILABLE FOR DEFINITION BY THE USER
FILE previous
<normal-f1:
getMaxFiles(n98)
equateNum(n85,curFile)
while (nothing)
{ if (gtNum(n85,n98)) equateNum(n85,n98)
decNum(n85)
if (gtNum(0,n85)) equateNum(n85,19)
if (getFileName(buf99,buf[n85])) { editBuf(buf[n85]) returnTrue }
}
>
FILE next
<shft-f1:
toggle(curFile)
>
FILE Open w/name
<alt-f1:
putMsg("Input External Filename to Edit")
freeBuf(buf88)
if (inputString(buf88)) loadFile(buf88)
>
FILE Open New
<ctl-f1:
newFile
>
FILE Inserted from disk
<shftAlt-f1:
putMsg("Input External Filename to Insert")
freeBuf(buf88)
if (inputString(buf88)) insertFile(curFile,atCursor,buf88)
>
FILE Replace w/original
<shftCtl-f1:
if (not askYesNo("Replace buffer w/ original file?")) returnFalse
if (getFileName(buf88,curFile)) { freeBuf(curFile) loadFile(buf88) }
>
CONFIG Replaced from disk
<altCtl-f1:
if (askYesNo("Load CommandData?"))
{ putMsg("Input Data Filename to Load (ESC = s:Data!)")
freeBuf(buf99)
inputString(buf99)
loadConfig(buf99)
}
>
SAVE File as
<normal-f2:
runKey(virtual-e)
>
SAVE ALL CHANGED FILES
<shft-f2:
getMaxFiles(n98)
decNum(n98)
do(n99,0,n98)
{ if (getFlag(buf[n99],changed)) saveFile(buf[n99])
else
{ if (getFlag(buf[n99],userLocalB)) saveFile(buf[n99])
}
}
>
SAVE File then CLOSE
<alt-f2:
if (runKey(virtual-e)) freeBuf(curFile)
>
CONFIG Saved to disk
<ctl-f2:
putMsg("Input Data Filename to SaveAs (ESC => save to CurrentDir)")
freeBuf(buf99)
inputString(buf99)
saveConfig(buf99)
>
SAVE changes during idle periods toggle
<altCtl-f2: flipFlag(curFile,userLocalA)
>
ERASE ALL NonFile BUFFERS
<shftAlt-f2:
if (askYesNo("Erase NonFile Buffers?"))
{ getMaxFiles(n97)
do(n99,n97,99) freeBuf(buf[n99])
}
>
========================== SPECIAL REFORMAT ================================
========= COMMANDS TO REFORMAT PARAGRAPHS SEPARATED BY BLANK LINES ===========
All cursor movement and file-save commands were modified to accomodate the
special reformat capability. In general, if AutomaticSpecial REFORMAT is
selected (ie userLocalB is set), the original cursor position is saved in
locA, the modified cursor location is saved in locB, the paragraph at the
original cursor position is reformatted, and the cursor is left at the
modified cursor position.
REFORMAT Paragragh delimited by blank lines, keeps Indent, handles SpecMargins
<virtual-1:
if (not getFlag(curFile,changed)) returnFalse
equateLoc(curFile,locB,atCursor) .. Where cursor goes when complete
equateLoc(curFile,atCursor,locA) .. Where to do reformatting
or(n83,n83,1) .. Remember to save changed file
if (is(curFile,blankLine)) goto label(9)
freeBuf(buf98)
equateNum(n95,0) .. Special LMargin for 2ndLine
getLocal(curFile,leftMargin,leftMargin) .. Remember default conditions
getLocal(curFile,lineLength,lineLength)
equateNum(n97,lineLength) .. Set Special RMargin = Default
.. For special LMargin, set n89(bit 1); For special RMargin, set n89(bit 2)
runKey(virtual-2) .. Find End of Paragraph
if (not runKey(virtual-3)) goto label(8) .. Check for Special Format Codes
..Find & Mark location of start of 1stLine
while (not is(curFile,blankLine))
{ if (not moveCursor(curFile,upLine)) goto label(1)
}
moveCursor(curFile,downLine)
label(1)
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
locToIndex(curFile,n82,atCursor)
..Calculate Special LeftMargins or 1stLine Indent
if (and(n99,n89,1)) ..If Special LMargin is true
{ if (not moveCursor(curFile,downLine)) goto label(3)
if (is(curFile,blankLine))
setLocal(curFile,leftMargin,1)
else
{ if (not is(curFile,sLine)) moveCursor(curFile,sLine)
while (is(curFile,space))
{ incNum(n95) moveCursor(curFile,eChar)
}
incNum(n95) ..Calculate Special 2ndLine
}
setLocal(curFile,leftMargin,n95) ..LMargin = 2ndLine Indent
}
else
..No Special LMargin, but Keep 1stLine Indent if > normal LMargin
{ colToLoc(curFile,atCursor,leftMargin)
while (is(curFile,space))
{ swapChar(curFile,215) moveCursor(curFile,eChar)
}
if (not moveCursor(curFile,downLine)) goto label(3)
}
..Join all lines in paragraph to 1stLine
putMsg("Reformatting...")
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
if (is(curFile,sFile)) goto label(3)
while (not is(curFile,blankLine))
{ if (not is(curFile,sLine)) moveCursor(curFile,sLine)
moveCursor(curFile,sChar) swapChar(curFile,32)
if (not moveCursor(curFile,downLine)) goto label(3)
}
label(3)
.. If Special LMargin, Preserve 1stLine Indent whether <> 2ndLine Indent
indexToLoc(curFile,atCursor,n82) .. Goto Start of 1stLine
if (and(n99,n89,1))
{ equateNum(n99,0)
equateNum(n96,0)
if (gtNum(n95,n96))
{ while (is(curFile,space))
{ if (gtNum(n95,n96))
{ moveCursor(curFile,eChar)
incNum(n96)
}
else goto label(5)
}
}
while (gtNum(n95,n96))
{ if (is(curFile,space))
{ moveCursor(curFile,eChar)
incNum(n96)
while (is(curFile,space)) clearChar(curFile)
}
else
{ if (is(curFile,eLine)) goto label(8)
else equateNum(n99,1)
moveCursor(curFile,eChar)
incNum(n96)
}
}
label(5)
if (not is(curFile,sLine))
{ moveCursor(curFile,sChar)
equateLoc(curFile,mouseLoc,locB)
equateLoc(curFile,locB,atCursor)
insertRgn(buf98,sFile,curFile,loc)
clearRgn(curFile,loc)
equateLoc(curFile,locB,mouseLoc)
}
if (eqNum(n99,0))
..1stLine Indent Contained only spaces upto 2ndLine LMargin
{ while (is(curFile,space))
{ swapChar(curFile,215)
moveCursor(curFile,eChar)
}
}
}
reformat
label(8)
..Reformats complete. Fix special paragraph codes.
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
setLocal(curFile,leftMargin,leftMargin)
setLocal(curFile,lineLength,lineLength)
if (and(n99,n89,2)) runKey(virtual-4) ..Write RMargin Codes
if (and(n99,n89,1)) ..Special LMargin
{ if (not and(n99,n89,4)) insertChar(curFile,"") ..Write LMargin Code
indexToLoc(curFile,atCursor,n82) ..Repair 1stLine
if (not is(curFile,sLine)) moveCursor(curFile,sChar)
while (is(curFile,215))
{ swapChar(curFile,32)
moveCursor(curFile,sChar)
}
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
insertRgn(curFile,atCursor,buf98,all)
if (gtNum(n95,1)) do (n99,2,n95) clearChar(curFile)
}
else
..No Special LMargin, but Repair 1stLine Indent
{ indexToLoc(curFile,atCursor,n82)
colToLoc(curFile,atCursor,leftMargin)
while (is(curFile,215))
{ swapChar(curFile,32) moveCursor(curFile,eChar)
}
}
label(9)
..Done, Reset UEdit Change Flag, Goto proper cursor position
if (getFlag(curFile,changed)) flipFlag(curFile,changed)
equateLoc(curFile,atCursor,locB)
putMsg(" ")
>
REFORMAT Find End of Paragraph
<virtual-2:
while (not is(curFile,blankLine))
{ if (not moveCursor(curFile,downLine)) goto label(0)
}
moveCursor(curFile,upLine)
label(0)
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
if (is(curFile,eFile))
{ moveCursor(curFile,upLine)
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
}
moveCursor(curFile,sChar)
>
REFORMAT Check for Special Margin Codes
<virtual-3:
equateNum(n89,0) ..Special Margins Flag
if (and(n99,userGlobalA,1)) or(n89,n89,5) ..Set Global&LMargin Flag
if (is(curFile,"")) ..Check For Special LMargin
{ or(n89,n89,1) ..Set Special LMargin Flag
and(n89,n89,251) ..Clear GlobalMode Flag
clearChar(curFile) ..Don't Reformat MarginCode
if (not moveCursor(curFile,sChar)) returnFalse
}
if (is(curFile,"")) ..Check For Special RMargin
{ or(n89,n89,2) ..Set Special RMargin Flag
moveCursor(curFile,sChar)
copyChar(curFile,n97)
sub(n97,n97,20)
moveCursor(curFile,sChar)
copyChar(curFile,n99)
sub(n99,n99,20)
mul(n99,n99,10)
add(n97,n97,n99)
moveCursor(curFile,sChar)
copyChar(curFile,n99)
sub(n99,n99,20)
mul(n99,n99,100)
add(n97,n97,n99)
do (n99,1,4) clearChar(curFile) ..Don't Reformat MarginCodes
setLocal(curFile,lineLength,n97) ..Set Special RMargin
}
returnTrue
>
REFORMAT Write Special RightMargin Codes for RightMargin stored in n97
<virtual-4:
div(n99,n97,100)
mul(n98,n99,100)
sub(n98,n97,n98)
add(n99,n99,20)
insertChar(curFile,n99)
div(n99,n98,10)
mul(n96,n99,10)
sub(n98,n98,n96)
add(n99,n99,20)
insertChar(curFile,n99)
add(n99,n98,20)
insertChar(curFile,n99)
insertChar(curFile,"")
>
REFORMAT Set Special RightMargins for current paragraph
<normal-f3:
equateLoc(curFile,locA,atCursor)
getLocal(curFile,n97,lineLength)
equateNum(lineLength,n97)
runKey(virtual-2) ..Move to EOP
runKey(virtual-3) ..Read Current Margin Codes
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
freeBuf(buf99)
insertRgn(buf99,eFile,"AMIGA-ESC=Abort. 0=Remove. RightMargin= ",all)
toWord(buf99,n97)
insertRgn(buf99,eFile,". Enter new RightMargin:",all)
putMsg(buf99)
if (inputNum(n97)) if (gtNum(n97,0))
runKey(virtual-4) ..Write New Special RMargin
if (and(n99,n89,1)) insertChar(curFile,"")
setLocal(curFile,lineLength,lineLength)
equateLoc(curFile,atCursor,locA)
>
REFORMAT Toggle On/Off Special LeftMargins for current paragraph
<shft-f3:
equateLoc(curFile,locA,atCursor)
runKey(virtual-2) ..Move to EOP
runKey(virtual-3) ..Read Current Margin Codes
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
freeBuf(buf99)
insertRgn(buf99,eFile,"Special LeftMargin now ",all)
if (and(n99,n89,1))
{ insertRgn(buf99,eFile,"OFF",all)
and(n89,n89,254)
}
else
{ insertRgn(buf99,eFile,"ON" ,all)
or(n89,n89,1)
}
putMsg(buf99)
if (and(n99,n89,2)) runKey(virtual-4)
if (and(n99,n89,1)) insertChar(curFile,"")
equateLoc(curFile,atCursor,locA)
>
REFORMAT mode toggle: Paragraphs separated by Blank Lines/by Indent Change
<ctl-f3:
if (and(n99,userGlobalB,1))
{ and(userGlobalB,userGlobalB,65534)
putMsg("REFORMAT now delimits paragraphs by Indent Changes")
if (getFlag(curFile,userLocalB)) flipFlag(curFile,userLocalB)
}
else
{ or(userGlobalB,userGlobalB,1)
putMsg("REFORMAT now delimits paragraphs by Blank Lines ONLY")
}
>
REFORMAT Paragraph
<normal-f4:
if (and(n99,userGlobalB,1))
{ if (not getFlag(curFile,changed)) flipFlag(curFile,changed)
equateLoc(curFile,locA,atCursor)
runKey(virtual-1)
return
}
runKey(ctl-3)
>
REFORMAT Hilited Paragraphs
<shft-f4:
locToIndex(curFile,n92,atCursor)
equateLoc(curFile,atCursor,sHilite)
while (geLoc(curFile,eHilite,atCursor))
{ runKey(normal-f4)
if (and(n99,userGlobalB,1))
..If Paragraphs separated by blank lines, move to next paragraph
{ while (not is(curFile,blankLine))
{ if (not moveCursor(curFile,downLine)) return
}
while (is(curFile,blankLine))
{ if (not moveCursor(curFile,downLine)) return
}
}
}
indexToLoc(curFile,atCursor,n92)
>
REFORMAT to End of Screen Paragraphs separated by blank line
<alt-f4:
locToIndex(curFile,n92,atCursor)
label(1)
if (not getFlag(curFile,changed)) flipFlag(curFile,changed)
equateLoc(curFile,locA,atCursor)
runKey(virtual-1)
while (not is(curFile,blankLine))
{ if (not moveCursor(curFile,downLine)) goto label(2)
}
while (is(curFile,blankLine))
{ if (not moveCursor(curFile,downLine)) goto label(2)
}
if (eqNum(macroNum,499)) ..ctl-F4
{ if (geLoc(curFile,atCursor,ePage)) goto label(2) }
if (geLoc(curFile,atCursor,eFile)) goto label(2)
goto label(1)
label(2)
indexToLoc(curFile,atCursor,n92)
>
REFORMAT to End of Document Paragraphs separated by blank line
<ctl-f4:
runKey(alt-f4)
>
REFORMAT with all paragraphs automatically having special left margins
<shftAlt-f4:
if (and(n99,userGlobalA,1)) and(userGlobalA,userGlobalA,65534)
else or(userGlobalA,userGlobalA,1)
>
REFORMAT Automatically any changes to Paragraphs Separated by blank lines
<altCtl-f4:
flipFlag(curFile,userLocalB)
if (getFlag(curFile,userLocalB))
{ if (not and(n99,userGlobalB,1))
if (not askYesNo("OK TO DELIMIT PARAGRAPHS BY BLANK LINES?"))
returnFalse
runKey(virtual-1)
or(userGlobalB,userGlobalB,1)
}
>
===================== SPECIAL REFORMAT SECTION END =======================
==========================================================================
SWITCH FLAG SETTINGS:
<normal-f5: flipFlag(curFile,icons) >
<shft-f5: flipFlag(curFile,overstrike) >
<alt-f5: flipFlag(curFile,autoIndent) >
<ctl-f5: flipFlag(curFile,wordWrap) >
<shftAlt-f5: flipFlag(curFile,readOnly) >
<shftCtl-f5: flipFlag(curFile,speakMsgs) >
<altCtl-f5: flipFlag(curFile,speakAlerts) >
<shftAltCtl-f5: flipFlag(curFile,autoBackup) >
<lAmiga-f5: flipFlag(curFile,changed)>
<rAmiga-f5: flipFlag(curFile,cram)>
SEARCH string new, including either-or "$" and wildcards "?"
<normal-kp7:
freeBuf(buf94)
if (runKey(virtual-g)) putMsg(" ")
>
SEARCH string edit existing
<shft-kp7:
if (runKey(virtual-g)) putMsg(" ")
>
REPLACE string new
<normal-kp9:
freeBuf(buf93) runKey(virtual-i)
>
REPLACE string edit existing
<shft-kp9:
runKey(virtual-i)
>
CURSOR center on screen
<normal-kp5:
vScroll(atCursor)
>
SCROLL UP
<normal-kp8:
vScroll(upLine)
>
SCROLL DOWN
<normal-kp2:
vScroll(downLine)
>
SCROLL LEFT
<normal-kp4:
hScroll(-1)
>
SCROLL RIGHT
<normal-kp6:
hScroll(1)
>
<shft-kp8:
getSplitLines(n98,n97) .. get start & stop
sub(n97,n97,n98)
sub(n97,n97,1)
do (n99,1,n97) vScroll(upLine)
>
<shft-kp2:
getSplitLines(n98,n97) .. get start & stop
sub(n97,n97,n98)
sub(n97,n97,1)
do (n99,1,n97) vScroll(downLine)
>
<shft-kp4:
hScroll(-10)
>
<shft-kp6:
hScroll(10)
>
<alt-kp8:
vScroll(sPage)
>
<alt-kp2:
vScroll(ePage)
>
<alt-kp4:
hScroll(-20)
>
<alt-kp6:
hScroll(20)
>
<ctl-kp8:
vScroll(sFile)
>
<ctl-kp2:
vScroll(eFile)
>
<ctl-kp4:
getLocal(curFile,n99,lineLength)
do (n98,1,n99) hScroll(-1)
>
<ctl-kp6:
getLocal(curFile,n99,lineLength)
do (n98,1,n99) hScroll(1)
>
SPLIT Increase # lines by one
<lAmiga-kp8:
equateNum(n99,curFile)
getSplitLines(n98,n97) .. get start & stop
sub(n97,n97,n98)
incNum(n97) .. bump # lines
splitWindow(curFile,0)
if (not splitWindow(buf[n99],n97))
{ decNum(n97) .. decrement it back
splitWindow(buf[n99],n97)
returnFalse
}
>
SPLIT Decrease # lines by one
<lAmiga-kp2:
equateNum(n99,curFile)
getSplitLines(n98,n97)
decNum(n97)
sub(n97,n97,n98)
if (gtNum(2,n97)) returnFalse
splitWindow(curFile,0)
splitWindow(buf[n99],n97)
>
==================== HILITE AND INVERT COMMANDS ========================
HILITE start at cursor
<normal-kp1:
equateLoc(curFile,sHilite,atCursor)
equateNum(n90,2)
refreshDisplay
>
HILITE end at cursor
<normal-kp3:
equateLoc(curFile,eHilite,atCursor)
equateNum(n90,0)
refreshDisplay
>
INVERT start at cursor
<shft-kp1:
equateLoc(curFile,sInvert,atCursor) refreshDisplay
>
INVERT end at cursor
<shft-kp3:
equateLoc(curFile,eInvert,atCursor) refreshDisplay
>
HILITE region copied into buffer
<normal-kpDot:
runKey(virtual-b)
>
INVERT region copied into buffer
<alt-kpDot:
if (thisKey) putMsg("Invert Copied to buf91")
runKey(virtual-j)
>
HILITE, COPY THEN DELETE
<normal-kpMinus:
if (runKey(virtual-b)) clearRgn(curFile,hilite)
>
INVERT, COPY THEN DELETE
<alt-kpMinus:
runKey(virtual-j) clearRgn(curFile,invert)
>
HILITE-COPY INSERTED at cursor
<normal-kpEnter:
runKey(virtual-c)
>
INVERT-COPY INSERTED at cursor
<alt-kpEnter:
insertRgn(curFile,atCursor,buf91,all)
if (not onScreen(atCursor)) vScroll(atCursor)
>
UNDELETE at cursor
<ctl-kpEnter:
insertRgn(curFile,atCursor,buf90,all)
if (not onScreen(atCursor)) vScroll(atCursor)
>
BLANK-LINE INSERTED BELOW CUR LINE
<altCtl-kpEnter:
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
insertChar(curFile,eLine)
>
BLANK-LINE INSERTED AT CURRENT LINE FOR TYPING
<shftAlt-kpEnter:
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
insertChar(curFile,eLine) moveCursor(curFile,sChar)
>
========================== MISCELLANEOUS KEYS ============================
HELP file toggle
<normal-help:
if (not isEmpty(buf87))
{ equateNum(n99,curFile)
if (eqNum(n99,42)) freeBuf(buf87)
else editBuf(buf87)
}
else
{ if (insertFile(buf87,sFile,"S:EdHelp"))
{ editBuf(buf87)
flipFlag(buf87,readOnly)
flipFlag(buf87,changed)
}
else putMsg("Couldn't find S:DonHelp file")
}
>
STATUS settings
<shft-help:
equateNum(n85,curFile)
label(0)
if (getFlag(buf[n85],markGadgets))
{ equateNum(n95,1) flipFlag(buf[n85],markGadgets)
}
else equateNum(n95,0)
freeBuf(buf98)
freeBuf(buf97)
editBuf(buf98)
insertRgn(buf97,sFile,"SELECT AN ITEM TO CHANGE FOR BUF ",all)
toWord(buf97,n85)
setFileName(buf98,buf97)
setLocal(buf98,pageLines,1)
insertRgn(buf98,atCursor,
"Scroll or Select using MOUSE or ARROWS/RETURN CLICK HERE TO RESUME
Buffer Number C-e:á
Buffer Size :á
Colors A-HELP:á
End-of-line :á
Idle timer SAC-i:á
Max files SC-m:á
Printer select A-p:á
Search eitherOr AC-e:á
Search wildcard AC-w:á
Serial number :á
Speak mode :á
Speak pitch :á
Speak speed :á
Split size L-8:á
Tab table SAC-tab:á
#Lines Per Page :á
Left Margin C-l:á
Right Margin A-RETURN:á
Top Margin C-t:á
Bottom Margin C-b:á
",all)
moveCursor(buf98,sFile)
equateNum(n90,1)
do (n91,729,741) .. write first 12 info lines to config buffer
{ incNum(n90)
lineToLoc(buf98,atCursor,n90)
colToLoc(buf98,atCursor,27)
runKey(n91)
}
do(n91,743,749) .. write next 6 info lines to config buffer
{ incNum(n90)
lineToLoc(buf98,atCursor,n90)
colToLoc(buf98,atCursor,27)
runKey(n91)
}
equateLoc(buf98,sPage,sFile)
equateLoc(buf98,eInvert,atCursor)
label(1)
equateNum(n94,0)
equateLoc(buf98,sInvert,atCursor)
if (not is(buf98,eLine)) clearRgn(buf98,invert)
moveCursor(buf98,sFile)
setLocal(buf98,pageLines,1)
..loop inside label(2) until a proper keystoke takes it out
label(2)
refreshDisplay
getKey(n98)
if (eqNum(n98,97)) .. buttonUp
{ moveCursor(buf98,mouseLoc) goto label(4)
}
else if (eqNum(n98,69)) goto label(5) .. ESC
else if (eqNum(n98,68)) goto label(4) .. RETURN
else if (eqNum(n98,76)) moveCursor(curFile,upLine)
else if (eqNum(n98,77)) moveCursor(curFile,downLine)
else
{ if (eqNum(n98,62)) runKey(normal-kp8)
else if (eqNum(n98,30)) runKey(normal-kp2)
goto label(2)
}
colToLoc(buf98,atCursor,1)
equateLoc(buf98,sInvert,atCursor)
moveCursor(buf98,eLine)
equateLoc(buf98,eInvert,atCursor)
goto label(2)
label(3)
putMsg("Item Cannot be Changed Now")
goto label(1)
label(4)
colToLoc(buf98,atCursor,1)
equateLoc(buf98,sInvert,atCursor)
moveCursor(buf98,eLine)
equateLoc(buf98,eInvert,atCursor)
refreshDisplay
getPageRowCol(n99,n98,n97)
if (eqNum(n98,0)) goto label(5)
else if (eqNum(n98, 1)) runKey(ctl-e) ..Buffer Number
else if (eqNum(n98, 2)) goto label(3) ..Buffer Size
else if (eqNum(n98, 3)) runKey(alt-Help) ..Colors
else if (eqNum(n98, 4)) goto label(3) ..End of Line
else if (eqNum(n98, 5)) runKey(shftAltCtl-i) ..Idle timer
else if (eqNum(n98, 6)) runKey(shftCtl-m) ..Max Files
else if (eqNum(n98, 7)) runKey(alt-p) ..Printer Select
else if (eqNum(n98, 8)) runKey(altCtl-e) ..Search eitherOr
else if (eqNum(n98, 9)) runKey(altCtl-w) ..Search wildcard
else if (eqNum(n98,10)) goto label(3) ..Serial Number
else if (eqNum(n98,11)) goto label(3) ..Speak mode
else if (eqNum(n98,12)) goto label(3) ..Speak speed
else if (eqNum(n98,13)) goto label(3) ..Speak pitch
else if (eqNum(n98,14)) runKey(lAmiga-8) ..Split Size
else if (eqNum(n98,15)) runKey(shftAltCtl-tab) ..Tab Table
else if (eqNum(n98,16)) runKey(virtual-o) ..#Lines per Page
else if (eqNum(n98,17)) runKey(ctl-l) ..Left Margin
else if (eqNum(n98,18)) runKey(alt-return) ..Right Margin
else if (eqNum(n98,19)) runKey(ctl-t) ..Top Margin
else if (eqNum(n98,20)) runKey(ctl-b) ..Bottom Margin
else if (gtNum(n98,20)) goto label(3)
colToLoc(buf98,atCursor,27) ..move to data
if (gtNum(n98,13)) { add(n98,n98,729) runKey(n98) } ..show change2screen
else { add(n98,n98,728) runKey(n98) }
if (eqNum(n94,1)) goto label(0)
else goto label(1)
label(5)
editBuf(buf[n85])
if (eqNum(n95,1)) flipFlag(buf[n85],markGadgets)
equateLoc(buf98,eInvert,sInvert)
freeBuf(buf98)
runKey(virtual-y)
>
Functions below type the current configuration values to the config buffer
<shftAltCtl-1: .. item = 1, key = 729
toWord(buf98,n85) .. Buffer Number
equateNum(n94,1)
>
<shftAltCtl-2:
fileSize(buf[n85],n99) .. Buffer Size
toWord(buf98,n99)
>
<shftAltCtl-3:
getWBColors(n99,n98,n97,n96) .. Colors
toWord(buf98,n99)
toWord(buf98,n98)
toWord(buf98,n97)
toWord(buf98,n96)
>
<shftAltCtl-4:
copyChar(buf98,n99) .. EOL
toWord(buf98,n99)
>
<shftAltCtl-5:
toWord(buf98,idleTime) .. Idle Time
>
<shftAltCtl-6:
getMaxFiles(n99) .. Max Files
toWord(buf98,n99)
>
<shftAltCtl-7:
toWord(buf98,prefPrint) .. Print Select
>
<shftAltCtl-8:
insertChar(buf98,eitherOr) .. Search eitherOr
>
<shftAltCtl-9:
insertChar(buf98,wildCard) .. Search wildcard
>
<shftAltCtl-0:
getSerialNum(n99) .. Serial Number
toWord(buf98,n99)
>
<shftAltCtl--:
insertChar(buf98,0) .. Speak mode UNUSED NOW
>
<shftAltCtl-=:
toWord(buf98,0) .. Speak Pitch UNUSED NOW
>
<shftAltCtl-\:
toWord(buf98,0) .. Speak speed UNUSED NOW
>
<shftAltCtl-kp0: .. item = 14, key = 743
toWord(buf98,splitSize)
>
<shftAltCtl-q: .. key = 744
getLocal(buf[n85],n99,tabTable) .. Tab Table
toWord(buf98,n99)
>
<shftAltCtl-w:
getLocal(buf[n85],n99,pageLines) .. #Lines Per Page
toWord(buf98,n99)
>
<shftAltCtl-e:
getLocal(buf[n85],n99,leftMargin) .. Left Margin
toWord(buf98,n99)
>
<shftAltCtl-r:
getLocal(buf[n85],n99,lineLength) .. Right Margin
toWord(buf98,n99)
>
<shftAltCtl-t:
getLocal(buf[n85],n99,topMargin) .. Top Margin
toWord(buf98,n99)
>
<shftAltCtl-y:
getLocal(buf[n85],n99,bottomMargin) .. Botton Margin
toWord(buf98,n99)
>
COLORS of WB
<alt-help:
if (getFlag(curFile,lace)) laceColor
else toggle(color)
>
HELP mode toggle for keys, PRESS Amiga-ESC to Exit
<Ctl-help:
putMsg("Key-Help mode. PRESS Amiga-ESC to Abort")
flipFlag(curFile,teachKeys)
>
REFRESH display
<shftCtl-help: refreshDisplay
>
HELP for printer control codes
<altCtl-help:
freebuf(buf99)
putMsg(" ")
insertRgn(buf99,sFile,
"á TO ENABLE SPECIAL PRINTING
==========================
Press lAmiga-b and then one of the letters below. The hilite region will print
as boldface, italics, 8 lines/inch, etc, by bracketing it with printer codes:
8 = 8 lines/inch l = enlarged
b = boldface n = NLQ
c = condensed s = shadow
d = double strike u = underline
e = elite x = superscript
i = italics y = subscript
OTHER KEYS
==========
rAmiga-g = find next printer code in document
rAmiga-b = input a printer code # (0-75. See table in Manual.)
\"Printer Select\" must be 2 or 3 for these codes to control your printer.
Select \"SETUP/CHG CONFIGURE\" to see what \"Printer Select\" is.
Select your printer in Preferences.
",all)
flipFlag(buf99,readOnly)
equateNum(n85,curFile)
editBuf(buf99)
vScroll(sFile)
updateDisplay
getKey(n99)
editBuf(buf[n85])
freeBuf(buf99)
>
HELP tell which keys are open
<lAmiga-help:
while (getKey(n99))
{ if (inUse(n99)) putMsg("In use - Amiga-Esc to abort help mode")
else putMsg("Available - Amiga-Esc to abort help mode")
}
>
HELP next key. Copy key-help to RAM: on first
<rAmiga-help:
putMsg("Input a Key, Gadget, Click etc to get Help Msg")
getKey(n99)
teachOne(n99)
>
DELETE to end of word:
<shft-del:
if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf90)
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,eWord)
equateLoc(curFile,locB,atCursor)
insertRgn(buf90,eFile,curFile,loc)
clearRgn(curFile,loc)
if (thisKey) runkey(virtual-k)
>
DELETE to end of line:
<alt-del:
runKey(virtual-l)
if (thisKey) runkey(virtual-k)
>
DELETE entire line
<ctl-del:
locToLine(curFile,n99,atCursor)
if (not eqNum(n99,n84)) freeBuf(buf90)
locToLine(curFile,n84,atCursor)
colToLoc(curFile,atCursor,1)
equateLoc(curFile,locA,atCursor)
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
moveCursor(curFile,eChar)
equateLoc(curFile,locB,atCursor)
insertRgn(buf90,eFile,curFile,loc)
clearRgn(curFile,loc)
if (thisKey) runKey(virtual-k)
>
DELETE below cursor to EOL
<shftCtl-del:
equateLoc(curFile,mouseLoc,atCursor)
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
if (not is(curFile,eFile))
{ moveCursor(curFile,downLine)
runKey(virtual-l)
moveCursor(curFile,mouseLoc)
}
if (thisKey) runKey(virtual-k)
>
DELETE to end of page
<altCtl-del:
indexToLoc(curFile,locA,n84)
if (not eqLoc(curFile,locA,atCursor)) freeBuf(buf90)
locToIndex(curFile,n84,atCursor)
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,ePage)
equateLoc(curFile,locB,atCursor)
insertRgn(buf90,eFile,curFile,loc)
clearRgn(curFile,loc)
if (thisKey) runKey(virtual-k)
>
BACKSPACE to start of word
<shft-bs:
indexToLoc(curFile,locA,n84)
if (not eqLoc(curFile,locA,atCursor)) freeBuf(buf90)
locToIndex(curFile,n84,atCursor)
equateLoc(curFile,locB,atCursor)
moveCursor(curFile,sWord)
equateLoc(curFile,locA,atCursor)
insertRgn(buf90,sFile,curFile,loc)
clearRgn(curFile,loc)
if (thisKey) runKey(virtual-k)
>
BACKSPACE to start of line
<alt-bs:
indexToLoc(curFile,locA,n84)
if (not eqLoc(curFile,locA,atCursor)) freeBuf(buf90)
locToIndex(curFile,n84,atCursor)
if (is(curFile,sLine)) runKey(normal-bs)
else
{ equateLoc(curFile,locB,atCursor)
moveCursor(curFile,sLine)
equateLoc(curFile,locA,atCursor)
insertRgn(buf90,sFile,curFile,loc)
clearRgn(curFile,loc)
}
if (thisKey) runKey(virtual-k)
>
BACKSPACE above cursor to EOL
<ctl-bs:
equateLoc(curFile,mouseLoc,atCursor)
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
if (not is(curFile,sFile))
{ moveCursor(curFile,upLine)
runKey(alt-del)
moveCursor(curFile,mouseLoc)
}
if (thisKey) runKey(virtual-k)
>
BACKSPACE to start of page
<altCtl-bs:
indexToLoc(curFile,locA,n84)
if (not eqLoc(curFile,locA,atCursor)) freeBuf(buf90)
locToIndex(curFile,n84,atCursor)
equateLoc(curFile,locB,atCursor)
moveCursor(curFile,sPage)
equateLoc(curFile,locA,atCursor)
insertRgn(buf90,sFile,curFile,loc)
clearRgn(curFile,loc)
vScroll(atCursor)
if (thisKey) runKey(virtual-k)
>
SPACE,HARD inserted at cursor
<shft-space:
insertChar(curFile,160)
>
SPACE inserted at cursor
<ctl-space:
runKey(virtual-m)
>
SPACE inserted in front of word for typing
<shftCtl-space:
if (not is(curFile,sWord)) moveCursor(curFile,sWord)
runKey(virtual-m)
>
SPACES removed between words
<altCtl-space:
while (not is(curFile,space))
{ moveCursor(curFile,eChar) if(is(curFile,eFile)) returnTrue
}
moveCursor(curFile,eChar)
while (is(curFile,space)) clearChar(curFile)
>
LINE-LENGTH adjust
<alt-return:
if (thisKey) equateNum(n85,curFile)
putMsg("AMIGA-ESC=Abort. Enter New Right Margin")
if (inputNum(n99)) setLocal(buf[n85],lineLength,n99)
>
========================= TAB COMMANDS ==============================
TAB Transparent forward
<shft-tab: moveCursor(curFile,eTab)
>
TAB Transparent backward
<alt-tab: moveCursor(curFile,sTab)
>
TAB Undo - delete white space back to previous tab column
<ctl-tab:
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,sTab)
while (nothing)
{ if (is(curFile,space)) goto label(1)
if (is(curFile,9)) goto label(1) .. a TAB
return
label(1)
clearChar(curFile)
if (eqLoc(curFile,atCursor,locA)) return
}
>
TAB toggle: Switch to/from using spaces for tabs or using real tabs
<altCtl-tab: flipFlag(curFile,trueTabs)
>
TAB ruler display above cursor line
<shftAlt-tab: seeRuler
>
TAB ruler set using mouse or keys
<shftCtl-tab:
putMsg("Set TABS w/Mouse, Tab, Space, BS, Del (anykey,Amiga-Esc=Abort)")
setRuler putMsg(" ")
>
TAB table number select(0-4) used for TAB spacing
<shftAltCtl-tab:
equateNum(n97,curFile)
putMsg("AMIGA-ESC=Abort. Enter new tab table # (0-4)")
if (inputNum(n99)) if (geNum(n99,0)) if (gtNum(5,n99))
{ setLocal(buf[n97],tabTable,n99)
setLocal(buf[n85],tabTable,n99)
}
putMsg("Set TABS w/Mouse, Tab, Space, BS, Del (anykey,Amiga-Esc=Abort)")
setRuler putMsg(" ")
>
========================== GENERAL COMMANDS ===============================
ASCII Input
<alt-a:
putMsg("AMIGA-ESC=Abort. Enter ASCII value to write at cursor")
inputNum(n99)
typeChar(n99)
>
ASCII value of char under cursor (use to ID ctl-chars)
<ctl-a:
copyChar(curFile,n99)
freeBuf(buf99)
toWord(buf99,n99)
insertRgn(buf99,sFile,"Previous Character's ASCII Value was ",all)
putMsg(buf99)
moveCursor(curFile,eChar)
>
ASCII value table
<rAmiga-a:
freeBuf(buf87)
insertChar(buf87,eLine)
insertRgn(buf87,sFile,
"ASCII Val = Col Position + Last Value on Prev Line 50",all)
equateLoc(buf87,sHilite,sFile)
colToLoc(buf87,eHilite,51)
if (getFlag(buf87,autoIndent)) flipFlag(curFile,autoIndent)
if (not getFlag(buf87,spooks)) flipFlag(curFile,spooks)
do (n99,1,4)
{ mul(n98,n99,50)
add(n98,n98,1)
add(n97,n98,49)
do (n96,n98,n97) insertChar(buf87,n96)
insertChar(buf87," ")
toWord(buf87,n97)
insertChar(buf87,eLine)
}
splitWindow(buf87,5)
>
BUFFERS examination
<alt-b:
equateNum(n99,curFile)
getMaxFiles(n97)
do (n85,n97,99) if (not isEmpty(buf[n85]))
{ editBuf(buf[n85])
putMsg("F1=Next F2=Edit this one F3=Stop")
getKey(n98)
if (eqNum(n98,normal-f2)) { putMsg(" ") returnTrue }
if (eqNum(n98,normal-f3)) goto label(1)
}
label(1)
editBuf(buf[n99])
putMsg(" ")
>
MARGIN BOTTOM setup
<ctl-b:
if (thisKey) equateNum(n85,curFile)
putMsg("AMIGA-ESC=Abort. Enter Bottom Margin (0-200 lines)")
if (inputNum(n99)) setLocal(buf[n85],bottomMargin,n99)
>
BUSIES toggle
<shftAlt-b:
flipFlag(curFile,busies)
>
PRINT code embed: Next letter key brackets hilite for boldface, italics etc.
<lAmiga-b:
if (runKey(virtual-r))
{ if (eqNum(n99,normal-h))
runKey(altCtl-help)
else
{ equateNum(n98,-1)
if (eqNum(n99,normal-8)) equateNum(n98,55)
if (eqNum(n99,normal-i)) equateNum(n98,6)
if (eqNum(n99,normal-u)) equateNum(n98,8)
if (eqNum(n99,normal-b)) equateNum(n98,10)
if (eqNum(n99,normal-e)) equateNum(n98,15)
if (eqNum(n99,normal-c)) equateNum(n98,17)
if (eqNum(n99,normal-l)) equateNum(n98,19)
if (eqNum(n99,normal-s)) equateNum(n98,21)
if (eqNum(n99,normal-d)) equateNum(n98,23)
if (eqNum(n99,normal-n)) equateNum(n98,25)
if (eqNum(n99,normal-x)) equateNum(n98,27)
if (eqNum(n99,normal-y)) equateNum(n98,29)
if (eqNum(n98,-1)) returnFalse
runKey(virtual-w)
}
}
>
Insert printer code. (See printer code table for meaning of numbers 0-75.)
<rAmiga-b:
putMsg("AMIGA-ESC=Abort. Enter Printer Code (0-75, see printer-codes)")
equateNum(n98,0)
equateNum(n97,0)
if (inputNum(n99))
{ if (geNum(n99,0)) if (geNum(75,n99))
{ if (eqNum(n99,12))
{ putMsg("Enter foreground color (30-39)") goto label(2)
}
if (eqNum(n99,13))
{ putMsg("Enter background color (40-49)") goto label(2)
}
if (eqNum(n99,48)) returnFalse
if (eqNum(n99,57))
{ putMsg("Enter form length") goto label(2)
}
if (eqNum(n99,58)) returnFalse .. perf skip n
if (eqNum(n99,64)) returnFalse .. t&b margins
if (eqNum(n99,65)) returnFalse .. l&r margins
if (eqNum(n99,75)) returnFalse .. extended cmd
goto label(1)
label(2)
if (not inputNum(n98)) return
label(1)
printerCode(curFile,n99,53,52)
}
}
>
COMMAND COMPILER
<ctl-c:
putMsg("Compiling")
if (not compile) beepDisplay
>
COMMAND-writing buf89 selected
<shftCtl-c:
editBuf(buf89)
putMsg("Type in command e.g. <key: etc>, CTRL-c to Compile")
>
COMMAND input and COUNT number of times executed
<shftAlt-c:
equateNum(n99,0)
putMsg("Input Command to Execute & Count:")
if (getKey(n98))
{ while (runKey(n98)) incNum(n99)
freeBuf(buf99)
insertRgn(buf99,sFile,"Times Executed = ",all)
toWord(buf99,n99)
putMsg(buf99)
}
>
COMMAND Compile configuration default values at the top of Config! file
<altCtl-c:
moveCursor(curFile,sFile)
if (not compileDefaults) beepDisplay
>
DIRECTORY-edit directoryname in buf83, load new buffer with directory
<ctl-d:
if (eqNum(macroNum,450)) ..ctl-d, can be called from virtual-x
{ putMsg("Enter Dir to Get")
inputString(buf83)
}
fileSize(buf83,n99)
if (eqNum(n99,0)) return
freeBuf(buf98)
insertRgn(buf98,eFile,"dir ",all)
insertRgn(buf98,eFile,buf83,all)
moveCursor(buf84,sFile)
if (not execute(buf84,buf98)) returnFalse
moveCursor(buf83,eFile)
moveCursor(buf83,sChar)
if (not isEmpty(buf83))
{ if (not is(buf83,":")) if (not is(buf83,"/"))
insertRgn(buf83,eFile,"/",all) }
moveCursor(buf84,sFile)
insertChar(buf84,eLine)
insertRgn(buf84,sFile,buf83,all)
newFile
swapBuf(buf84,curFile)
freeBuf(buf84)
vScroll(sFile)
putMsg("To Load Files: Select with CTRL-Left_Mouse_Button")
setFileName(curFile,buf98)
flipFlag(curFile,changed)
>
DIRECTORY change DEFAULT
<alt-d:
runKey(virtual-n)
>
DELAY change time
<shftAlt-d:
putMsg("Input # Tenths of Seconds (delay)")
inputNum(n93)
>
DELAY # tenths of seconds stored in n93 (see shftAlt-d)
<shftAltCtl-d:
delay(n93)
>
PAGE-division Delete next
<lAmiga-d:
label(1)
if (not is(curFile,sForm)) moveCursor(curFile,sForm)
if (not is(curFile,eForm)) moveCursor(curFile,eForm)
if (not is(curFile,eLine)) moveCursor(curFile,eline)
if (not is(curFile,12))
{ moveCursor(curFile,eChar)
if (not is(curFile,eFile)) goto label(1)
returnFalse
}
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
getPageRowCol(n99,n99,n98) .. Page,Col values not used
getLocal(curFile,n98,topMargin)
getLocal(curFile,n97,bottomMargin) .. bottomMargin value not used
equateLoc(curFile,locA,atCursor) .. start of ff line
moveCursor(curFile,downLine)
while (gtNum(n98,0)) .. del tm lines
{ if (not is(curFile,blankLine)) goto label(2)
decNum(n98)
moveCursor(curFile,downLine)
}
label(2)
equateLoc(curFile,locB,atCursor)
equateLoc(curFile,atCursor,locA)
moveCursor(curFile,upLine)
while (gtNum(n99,0))
{ decNum(n99)
if (not is(curFile,blankLine))
{ moveCursor(curFile,downLine)
goto label(3)
}
moveCursor(curFile,upLine)
}
label(3)
equateLoc(curFile,locA,atCursor)
clearRgn(curFile,loc)
>
BUFFER EDIT
<ctl-e:
putMsg("Input Buffer Number to EDIT")
if (inputNum(n85)) if (thisKey) editBuf(buf[n85])
>
END-OF-LINE new
<alt-e:
putMsg("Input New End-Of-Line value (usually 10 or 13)")
inputNum(n99)
setEol(n99)
refreshDisplay
>
END-OF-LINE replace existing character
<shftAlt-e:
putMsg("Replace EOL: Current End-Of-Line value for File (usually 10/13)")
inputNum(n99)
if (not gtNum(n99,0)) returnFalse
putMsg("What End-Of-Line value should it be (usually 10/13)")
inputNum(n98)
if (not gtNum(n98,0)) returnFalse
setEol(n99)
moveCursor(curFile,sFile)
putMsg("Changing EOL Characters...LeftAmiga-ESC to abort")
while (moveCursor(curFile,eLine))
if (is(curFile,n99)) swapChar(curFile,n98)
setEol(n98)
equateNum(pmESC,n98) .. Allow RETURN key to end Primitive mode
vScroll(sFile)
putMsg(" ")
refreshDisplay
>
EITHER-OR new
<altCtl-e:
putMsg("Input New Either-Or Char for Search")
getChar(eitherOr)
putMsg(" ")
>
GOTO PAGE End
<lAmiga-e: moveCursor(curFile,eForm)
>
ERASE buffer
<ctl-f:
putMsg("Input Buffer # to FREE")
if (inputNum(n99)) freeBuf(buf[n99])
>
CASE FLIP UPPER/LOWER of character under cursor
<alt-f:
if (is(curFile,alpha))
{ if (is(curFile,lowerCase)) toUpper(curFile)
else toLower(curFile)
}
moveCursor(curFile,eChar)
>
FORMFEED Insert
<lAmiga-f: insertChar(curFile,12)
>
GADGETS displayed
<ctl-g:
flipFlag(curFile,markGadgets)
>
PRINT Goto/Invert next printer code (can erase it with ctl-i)
<rAmiga-g:
freeBuf(buf99)
insertRgn(buf99,sFile,"?$??",word)
setSearch(buf99)
if (search(curFile,sInvert,eInvert,1))
putMsg("Press CTL-i to delete the code")
else
putMsg("No Printer Codes found")
>
HEX TOGGLE hexadecimal/decimal
<alt-h:
hexDecimal(curFile)
>
HILITE ERASE Region- No Copy is made
<ctl-h:
clearRgn(curFile,hilite)
>
GOTO PAGE Start
<lAmiga-h: moveCursor(curFile,sForm)
>
INVERT uninvert
<alt-i:
equateLoc(curFile,sInvert,eInvert) refreshDisplay
>
INVERT ERASE Region- No Copy is made
<ctl-i:
clearRgn(curFile,invert)
>
((See shftAlt-buttonDown in ref to shftAlt-i.))
INDEX creation for keywords in buf86: Ref Line#'s in Curfile of Keywords
<shftAlt-i:
if (isEmpty(buf86)) returnFalse
equateNum(n85,curFile)
runKey(virtual-o)
freeBuf(buf99)
label(1)
moveCursor(buf86,sFile)
while (is(buf86,whiteSpace)) clearChar(buf86)
if (is(buf86,eFile))
{ swapBuf(buf99,buf86)
freeBuf(buf99)
setFileName(buf86,"Index")
equateLoc(buf86,sPage,sFile)
equateLoc(buf86,atCursor,sFile)
putMsg("Press CTRL-w to see Index")
returnTrue
}
freeBuf(buf94)
insertRgn(buf94,sFile,buf86,line)
clearRgn(buf86,line)
putMsg(buf94)
moveCursor(buf99,eFile)
insertRgn(buf99,eFile,buf94,all)
insertRgn(buf99,eFile," ",all)
insertChar(buf99,eLine)
moveCursor(buf99,sChar)
equateNum(n98,0)
moveCursor(curFile,sFile)
label(2)
setSearch(buf94)
while (search(curFile,sInvert,eInvert,1))
{ moveCursor(curFile,sChar)
if (is(curFile,alpha))
{
label(3)
moveCursor(curFile,eInvert)
goto label(2)
}
if (is(curFile,digit)) goto label(3)
moveCursor(curFile,eInvert)
if (is(curFile,alpha)) goto label(2)
if (is(curFile,digit)) goto label(2)
locToLine(curFile,n99,atCursor)
getLocal(curFile,n97,pageLines)
div(n99,n99,n97)
incNum(n99)
if (not eqNum(n99,n98))
{ if (not eqNum(n98,0)) insertChar(buf99,",")
toWord(buf99,n99)
equateNum(n98,n99)
}
}
goto label(1)
>
IDLE-timer value (seconds) input (after which idle command executed)
<shftAltCtl-i:
putMsg("Input idle time (seconds)")
if (inputNum(n99)) equateNum(idleTime,n99)
>
JUSTIFY file right
<alt-j:
flipFlag(curFile,rightJustify)
if (getFlag(curFile,userLocalB))
if (not getFlag(curFile,changed)) flipFlag(curFile,changed)
>
JOIN next line to current line
<ctl-j:
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
equateLoc(curFile,locA,atCursor)
label(1)
moveCursor(curFile,eChar)
if (is(curFile,space)) goto label(1)
if (is(curFile,9)) goto label(1) .. a TAB
equateLoc(curFile,locB,atCursor)
clearRgn(curFile,loc)
insertChar(curFile," ")
>
KEY-CODE Display
<alt-k:
putMsg("Will Display Codes for next Key Command")
getKeyVal(n99,n98)
freeBuf(buf99)
toWord(buf99,n99)
insertRgn(buf99,eFile,"/",all)
toWord(buf99,n98)
insertRgn(buf99,sFile,"Macro/ASCII Codes for that key are ",all)
putMsg(buf99)
>
CTL-CHARACTER INPUT , such as formfeed, into text at cursor
<ctl-k:
putMsg("Input a Control Character")
getKeyVal(n54,n53)
typeChar(n53)
>
KEY-AVAILABILITY
<altCtl-k:
putMsg("Creating key table, please wait...")
freeBuf(buf99)
insertRgn(buf99,sFile,
"1 ! 1
2 @ 2
3 # 3
4 $ 4
5 % 5
6 ^ 6
7 & 7
8 * 8
9 ( 9
0 ) 10
- _ 11
= + 12
\ | 13
--------14
kp0 15
Q 16
W 17
E 18
R 19
T 20
Y 21
U 22
I 23
O 24
P 25
[ { 26
] } 27
--------28
kp1 29
kp2 30
kp3 31
A 32
S 33
D 34
F 35
G 36
H 37
J 38
K 39
L 40
; : 41
' \" 42
--------43
--------44
kp4 45
kp5 46
kp6 47
--------48
Z 49
X 50
C 51
V 52
B 53
N 54
M 55
, < 56
. > 57
/ ? 58
--------59
kp. 60
kp7 61
kp8 62
kp9 63
Space 64
BS 65
Tab 66
kpEnter 67
Return 68
ESC 69
DEL 70
--------71
--------72
--------73
kpMinus 74
--------75
upArrow 76
downArrow
rightArrow
leftArrow
F1 80
F2 81
F3 82
F4 83
F5 84
F6 85
F7 86
F8 87
F9 88
F10 89
--------90
--------91
--------92
--------93
--------94
Help 95
buttonDn96
buttonUp97
Gadget1-98
Gadget2-99
Gadg3--100
Gadg4--101
CloseBx102
` ~ 103
",all)
editBuf(buf99)
equateNum(n99,0) .. outer loop prefix counter
do (n99,0,10)
{ moveCursor(buf99,sFile) vScroll(sFile) refreshDisplay
do (n98,1,103) .. inner loop key counter
{ mul(n97,n99,104) .. prefix,
add(n97,n97,n98) .. plus key, gives value
moveCursor(buf99,eLine)
if (inUse(n97)) insertChar(buf99,"X") else insertChar(buf99,"-")
insertRgn(buf99,atCursor," ",all)
}
}
insertRgn(buf99,sFile,"
Master keytable for current status of Uedit
X Key in use - Key not in use ---- Non-key or Europe
Any specific key value is: (prefix * 104) + KeyCode
KeyName Norm Shft Alt SA Ctl SC AC SAC lAmi rAmi Virtual
| |0 |1 |2 |3 |4 |5 |6 |7 |8 |9 |10 {-- Prefix
v KeyCode | | | | | | | | | | |
v
",all)
vscroll(sFile) refreshDisplay
putMsg(" ") >
KILL command: including mouse clicks, menu selections, gadgets, keys
<shftAltCtl-k:
putMsg("Next Command-Key will be Deleted! AmigaESC to Abort")
if (getKey(n99)) if (killKey(n99))
{ putMsg("Key Command was Deleted") returnTrue
}
putMsg("User Aborted, No Action taken")
>
MARGIN LEFT set
<ctl-l:
if (thisKey) equateNum(n85,curFile)
putMsg("AMIGA-ESC=Abort. Enter Left Margin (0-200)")
if (inputNum(n99)) setLocal(buf[n85],leftMargin,n99)
>
LEARN mode toggle on/off
<rAmiga-l:
flipFlag(curFile,learnMode)
if (getFlag(curFile,learnMode))
{ putMsg("LEARN MODE ACTIVE CTRL-x:End, RightAmiga-l:Cancel")
}
else
{ putMsg("Learn Mode Cancelled")
}
>
CASE convert char under cursor to LOWER
<alt-l:
toLower(curFile) moveCursor(curFile,eChar)
>
MULTIPLY next command
<ctl-m:
putMsg("Next Command will be Repeated m times. Input m Multiplier:")
inputNum(cmdMultiplier)
>
Map illegal ASCII (0 thru 5) characters into safe ones. (See top of Config!)
<shftAlt-m: flipFlag(curFile,mapChars)
>
Max # of files to edit
<shftCtl-m:
putMsg("Enter Max # files to edit")
getMaxFiles(n99)
inputNum(n99)
setMaxFiles(n99)
>
GOTO line NUMBER
<ctl-n:
putMsg("Input Line NUMBER to Goto")
if (inputNum(n99))
{ lineToLoc(curFile,atCursor,n99) vScroll(atCursor)
}
>
NUMERIC keypad toggle for numbers/ctrl
<alt-n:
flipFlag(curFile,useKeys)
>
OPEN line at cursor for typing
<ctl-o:
insertChar(curFile,eLine) moveCursor(curFile,sChar)
>
PRINT port select
<alt-p:
putMsg("Printer select: 0=par: 1=ser: 2=prt: 3=prt: (raw)")
if (inputNum(n99))
if (geNum(n99,0)) if (gtNum(4,n99)) equateNum(prefPrint,n99)
putMsg(" ")
>
PRINT hilite region
<ctl-p:
print(curFile,hilite)
>
PRINT Entire current file
<shftCtl-p:
putMsg("Current File now in PrintQueue. Stop=LeftAmiga-p.")
print(curFile,all)
>
PAGE size change
<altCtl-p:
equateNum(n85,curFile)
runKey(virtual-o)
>
PRINT Stop current
<lAmiga-p:
abortPrint abort
>
PRINT Stop all prints that are stored up
<rAmiga-p:
while (abortPrint) nothing
abort
>
REPLACE "matched" region, forward search
<ctl-r:
runKey(virtual-q)
>
REPLACE "matched" region, backward search
<shftCtl-r:
if (eqLoc(curFile,sInvert,eInvert)) returnFalse
clearRgn(curFile,invert)
insertRgn(curFile,sInvert,buf93,all)
runKey(virtual-p)
>
REPLACE-ALL forward
<altCtl-r:
while(runKey(virtual-q)) nothing
>
RENAME curfile
<alt-r:
putMsg("RENAME Input New Filename")
getFileName(buf88,curFile)
if (inputString(buf88))
setFileName(curFile,buf88)
if (not getFlag(curFile,changed)) flipFlag(curFile,changed)
>
PAGE-divisions and Page-numbers Auto-insert in document
<lAmiga-r:
putMsg("Scanning")
equateLoc(curFile,locA,atCursor)
freeBuf(buf99)
insertChar(buf99,12)
setSearch(buf99)
if (search(curFile,sInvert,eInvert,1))
{ putMsg("Delete old paging divisions first using lAmiga-d")
returnFalse }
putMsg(" ")
equateLoc(curFile,atCursor,locA)
if (not is(curFile,sForm)) moveCursor(curFile,sForm)
while (nothing)
{ moveCursor(curFile,eForm)
getLocal(curFile,n99,bottomMargin)
getPageRowCol(n98,n98,n97) .. Page,Col values not used
getLocal(curFile,n97,pageLines)
if (gtNum(n97,n98)) .. last page is short
{ while (gtNum(n97,n98))
{ insertChar(curFile,eLine)
incNum(n98)
}
do (n96,1,n99) moveCursor(curFile,upLine)
runKey(lAmiga-v)
return
} .. end if gtnum(n97
do (n96,1,n99) moveCursor(curFile,upLine)
equateNum(n96,1)
while (is(curFile,blankLine))
{ moveCursor(curFile,downLine)
incNum(n96)
if (geNum(n96,n99)) goto label(1)
}
label(1)
runKey(lAmiga-v)
moveCursor(curFile,downLine)
updateDisplay
}
> .. end while nothing
SPEAK hilite region a line at a time
<alt-s:
if (gtLoc(curFile,eHilite,sHilite))
{ equateLoc(curFile,locA,atCursor)
equateLoc(curFile,sInvert,sHilite)
equateLoc(curFile,atCursor,sHilite)
while (gtLoc(curFile,eHilite,sInvert))
{ if (not is(curFile,eLine)) moveCursor(curFile,eLine)
moveCursor(curFile,eChar)
if (gtLoc(curFile,atCursor,eHilite))
equateLoc(curFile,eInvert,eHilite)
else equateLoc(curFile,eInvert,atCursor)
if (gtLoc(curFile,eInvert,sInvert))
{ freeBuf(buf95)
insertRgn(buf95,sFile,curFile,invert)
speak(buf95)
}
equateLoc(curFile,sInvert,atCursor)
}
equateLoc(curFile,atCursor,locA)
}
>
SEARCH forward, invert "matched" region, put cursor at start of region
<ctl-s:
putMsg("Searching Forward")
if (runKey(virtual-h)) putMsg(" ")
>
SEARCH backward
<shftCtl-s:
putMsg("Searching Backward")
if (runKey(virtual-p)) putMsg(" ")
>
PRINT Restart current
<lAmiga-s:
restartPrint
>
MARGIN TOP setup
<ctl-t:
if (thisKey) equateNum(n85,curFile)
putMsg("AMIGA-ESC=Abort. Enter Top Margin (0-200 lines)")
if (inputNum(n99)) setLocal(buf[n85],topMargin,n99)
>
TAB Converted to spaces in document
<lAmiga-t:
tabsToSpaces
>
TAB Converted from spaces in document
<rAmiga-t:
spacesToTabs
>
HILITE to UnHiLited
<ctl-u:
equateLoc(curFile,sHilite,eHilite) refreshDisplay
>
CASE convert char under cursor to UPPER case
<alt-u:
toUpper(curFile) moveCursor(curFile,eChar)
>
CTRL-CHARACTERS VISIBILITY toggle
<ctl-v:
flipFlag(curFile,spooks) refreshDisplay
>
PAGE-division Insert at cursor
<lAmiga-v:
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
getPageRowCol(n99,n98,n97)
getLocal(curFile,n97,bottomMargin)
getLocal(curFile,n96,pageLines)
div(n97,n97,2)
add(n98,n98,n97)
while (gtNum(n96,n98)) { incNum(n98) insertChar(curFile,eLine) }
getLocal(curFile,n96,lineLength)
div(n96,n96,2)
while (gtNum(n96,0)) { insertChar(curFile," ") decNum(n96) }
toWord(curFile,n99)
insertChar(curFile,12) .. FormFeed to bottom of page
getLocal(curFile,n99,topMargin)
while (gtNum(n99,0)) { decNum(n99) insertChar(curFile,eLine) }
>
SWAP commands including mouse clicks, menu selections, gadgets, keys
<alt-w:
putMsg("Next 2 Keys will be Swapped")
if (getKey(n98)) if (getKey(n99)) if (swapKey(n98,n99))
{ putMsg("Keys were Swapped") returnTrue }
putMsg(" ")
>
SWAP current buffer in window with buffer 86
<ctl-w:
putMsg("CTRL-w to toggle MainFile <-
> Index")
swapBuf(curFile,buf86) >
SWAP BUTTON-UP
<shftAlt-w:
putMsg("Next Function Key will be Swapped with Button-Up")
if (getKey(n98)) if (swapKey(n98,normal-buttonUp))
{ putMsg("Old Operation now performed by ButtonUp") returnTrue
}
putMsg(" ")
>
WILD-CARD character change
<altCtl-w:
putMsg("Input New Search Wild-Card Char")
getChar(wildCard)
putMsg(" ")
>
Swap current buffer to buffer 0 (the "home" buffer of Uedit)
<lAmiga-w: swapBuf(buf0,curFile) editBuf(buf0)
>
LEARN-BUFFER EXECUTED
<ctl-x:
runLearn
>
AmigaDOS command executed, results collected
<ctl-y:
putMsg("Enter AmigaDOS command. Results will be displayed")
freeBuf(buf85)
if (not inputString(buf85)) returnFalse
freeBuf(buf84)
if (not execute(buf84,buf85)) returnFalse
if (not isEmpty(buf84))
{ putMsg("Result of AmigaDOS command") editBuf(buf84)
}
else
{ putMsg("No message from AmigaDOS") freeBuf(buf84)
}
>
AmigaDOS command executed, BUT no results collected
<shftctl-y:
putMsg("Enter AmigaDOS command to do. Results not collected")
freeBuf(buf85)
if (inputString(buf85)) execute(" ",buf85)
>
QUIT, BUT Save all changed files first (ala VMS EVE)
<ctl-z:
getMaxFiles(n97)
decNum(n97)
do (n99,0,n97)
{ if (getFlag(buf[n99],changed))
{ editBuf(buf[n99])
if (not runKey(virtual-a)) returnFalse .. virtual-a uses buf[n99]
}
else
{ if (getFlag(buf[n99],userLocalB))
{ editBuf(buf[n99])
if (not runKey(virtual-a)) returnFalse .. virtual-a uses buf[n99]
}
}
}
quit(0)
>
SPACE clear leading
<ctl-1:
equateLoc(curFile,locA,atCursor)
runKey(virtual-s)
equateLoc(curFile,atCursor,locA)
>
CENTER text in line
<alt-2:
runKey(virtual-s)
if (is(curFile,blankLine)) returnFalse
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
getLocal(curFile,n99,lineLength)
locToCol(curFile,n98,atCursor)
if (gtNum(n99,n98))
{ moveCursor(curFile,sLine)
sub(n98,n99,n98)
div(n98,n98,2)
do (n99,2,n98) insertChar(curFile," ")
}
>
ROW-COL displayed
<ctl-2:
flipFlag(curFile,rowCol)
>
GOTO PAGE #
<alt-3:
putMsg("Input Page # to Goto")
if (inputNum(n99)) gotoPage(curFile,n99)
>
REFORMAT paragraph
<ctl-3:
putMsg("REFORMATING Paragraph Delimited by Indent Change")
if (reformat) moveCursor(curFile,downLine)
putMsg(" ")
>
REFORMAT HiLite region
<altCtl-3:
putMsg("Reformatting HiLite Region")
moveCursor(curFile,sHiLite)
while (gtLoc(curFile,eHilite,atCursor))
{ if (reformat) moveCursor(curFile,downLine)
else returnFalse
if (is(curFile,eFile)) return
}
>
MATCH indent of prev line
<alt-4:
moveCursor(curFile,upLine)
equateNum(n99,0)
if (not getFlag(curFile,autoIndent))
{ flipFlag(curFile,autoIndent) equateNum(n99,1)
}
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
clearChar(curFile)
typeChar(eLine)
if (eqNum(n99,1)) flipFlag(curFile,autoIndent)
>
SPACE--delete trailing white-space in entire document
<ctl-4:
putMsg("Deleting trailing white space for every line in this file")
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,sFile)
label(1)
if (is(curFile,eFile))
{ equateLoc(curFile,atCursor,locA)
putMsg("All trailing white space is deleted")
returnTrue
}
moveCursor(curFile,eLine)
moveCursor(curFile,sChar)
label(2)
while (is(curFile,space))
{ clearChar(curFile) moveCursor(curFile,sChar)
}
while (is(curFile,9))
{ clearChar(curFile) moveCursor(curFile,sChar)
}
if (is(curFile,space)) goto label(2)
moveCursor(curFile,eLine)
goto label(1)
>
JUSTIFY right from cursor location
<alt-5:
runKey(virtual-t)
getLocal(curFile,n99,lineLength)
sub(n92,n99,n92)
if (gtNum(n92,0))
{ while (decNum(n92)) insertChar(curFile," ")
}
else if (gtNum(0,n92))
{ while (incNum(n92)) if (is(curFile,space)) clearChar(curFile)
}
>
LEARN-SEQUENCE saved to disk
<ctl-5:
putMsg("Save Learn to what #")
if (inputNum(n99)) saveLearn(n99)
>
EOL column position stored in n92
<alt-6:
runKey(virtual-t)
>
LEARN-SEQUENCE loaded from disk
<ctl-6:
putMsg("Load what Learn #")
if (inputNum(n99)) loadLearn(n99)
>
LEARN-SEQUENCE Loaded from disk and Run
<ctl-7:
putMsg("Input Learn # to Load & Run")
if (inputNum(n99)) if (loadLearn(n99)) runLearn
>
VARIABLE # Change
<alt-8:
putMsg("Enter Uedit's n-variable # to Edit")
inputNum(n99)
freeBuf(buf99)
insertRgn(buf99,eFile,"Enter new value (AMIGA-ESC=NoChange) n",all)
toWord(buf99,n99)
insertRgn(buf99,eFile," now = ",all)
toWord(buf99,n[n99])
putMsg(buf99)
if (inputNum(n98))
equateNum(n[n99],n98)
>
SEARCH exactly toggle
<ctl-8:
flipFlag(curFile,searchCaps)
>
======================== COLUMN COMMANDS ===========================
COLUMN mode toggle
<shftCtl-`:
flipFlag(curFile,columnar) refreshDisplay
>
COLUMN-Hilited Cut
<shftCtl-1:
if (thisKey) putMsg("HiLite Column Copied to buf82")
locToIndex(curFile,n99,sHilite)
runKey(virtual-u) .. Copy Hilite to buf82
clearColData(curFile,hilite,0)
indexToLoc(curFile,atCursor,n99)
>
COLUMN-Hilited data Spaced-out
<shftCtl-2:
clearColData(curFile,hilite,1)
>
COLUMN-Hilited Copied
<shftCtl-3:
if (thisKey) putMsg("HiLite Column Copied to buf82")
runKey(virtual-u) .. Copy Hilite to buf82
>
COLUMN data (buf82) Inserted
<shftCtl-4:
copyColData(curFile, atCursor, buf82, all, 1)
>
COLUMN data (buf82) Overlayed
<shftCtl-5:
copyColData(curFile,atCursor,buf82,all,0)
>
COLUMN-Hilited data Inserted at cursor
<shftCtl-6:
copyColData(curFile,atCursor,curFile,hilite,1)
>
COLUMN-Hilited data Overlayed at cursor
<shftCtl-7:
copyColData(curFile,atCursor,curFile,hilite,0)
>
====================== SPLIT WINDOW COMMANDS =================================
SPLIT WINDOW: Erase current
<lAmiga--: splitWindow(curFile,0)>
SPLIT WINDOW to show current file
<lAmiga-0: splitWindow(curFile,splitSize)>
SPLIT WINDOW to show Undo buffer
<lAmiga-1: splitWindow(buf90,splitSize)>
SPLIT WINDOW to show search buffer
<lAmiga-2: splitWindow(buf94,splitSize)>
SPLIT WINDOW to show replace buffer
<lAmiga-3: splitWindow(buf93,splitSize)>
SPLIT WINDOW to show copied-hilite buffer
<lAmiga-4: splitWindow(buf92,splitSize)>
SPLIT WINDOW to show copied-invert buffer
<lAmiga-5: splitWindow(buf91,splitSize)>
SPLIT WINDOW to show copied-columnar buffer
<lAmiga-6: splitWindow(buf82,splitSize)>
SPLIT WINDOW to show current directory name
<lAmiga-7: splitWindow(buf83,splitSize)>
SPLIT WINDOW size Set
<lAmiga-8:
putMsg("Enter # lines in split window (2 or more)")
if (inputNum(n99)) if (geNum(n99,2)) equateNum(splitSize,n99)
putMsg(" ")
>
SPLIT WINDOW Switch to next
<lAmiga-9: toggle(windowSplit)>
========================= ARITHMETIC COMMANDS ===========================
NUMERIC--INITIALIZE total to zer0
<ctl-0:
putMsg("Numeric Total initialized to 0")
equateNum(n94,0)
>
NUMERIC--type running total into text at cursor
<ctl-=:
freeBuf(buf99)
div(n97,n94,100)
if (gtNum(0,n94)) if (eqNum(n97,0)) insertChar(buf99,"-")
toWord(buf99,n97)
insertChar(buf99,".")
if (gtNum(0,n94)) mul(n97,n94,-1)
else equateNum(n97,n94)
mod(n97,n97,100)
if (gtNum(10,n97)) insertChar(buf99,"0")
toWord(buf99,n97)
insertRgn(curFile,atCursor,buf99,all)
insertRgn(buf99,sFile,"Inserted Total into text ",all)
putMsg(buf99)
>
NUMERIC--add next word to running total & display total
<shftCtl-=:
if (not runKey(virtual-5)) returnFalse
add(n94,n94,n99)
freeBuf(buf99)
div(n97,n94,100)
if (gtNum(0,n94)) if (eqNum(n97,0)) insertChar(buf99,"-")
toWord(buf99,n97)
insertChar(buf99,".")
mod(n97,n94,100)
if (gtNum(0,n94)) mul(n97,-1,n97)
if (gtNum(10,n97)) insertChar(buf99,"0")
toWord(buf99,n97)
insertRgn(buf99,sFile,"Running total is ",all)
putMsg(buf99)
>
Subtract the next word (if a number) from arithmetic total & display total
<ctl--:
if (not runKey(virtual-5)) returnFalse
sub(n94,n94,n99)
freeBuf(buf99)
div(n97,n94,100)
if (gtNum(0,n94)) if (eqNum(n97,0)) insertChar(buf99,"-")
if (gtNum(0,n94)) insertChar(buf99,"-")
toWord(buf99,n97)
insertChar(buf99,".")
mod(n97,n94,100)
if (gtNum(0,n97)) mul(n97,n97,-1)
if (gtNum(10,n97)) insertChar(buf99,"0")
toWord(buf99,n97)
insertRgn(buf99,sFile,"Running total is ",all)
putMsg(buf99)
>
========================= SPELLING COMMANDS ===========================
Start spell-checking mode by loading in the dictionary table.
<rAmiga-1: if (spellerUp) goto label(0)
if (not startSpell("Udtable","Udict",1)) {
putMsg("No memory or dictionary not found")
returnFalse
}
label(0)
putMsg("Speller is up") >
Find first misspelled word, starting at cursor. Abort with Amiga-ESC.
<rAmiga-2: if (not spellerUp) {
putMsg("Speller not up")
returnFalse
}
putMsg(" ")
while (not spell(buf54,curFile)) runKey(104) >
Click word in msg line (buf54), select word to replace word before cursor.
<104:
if (isEmpty(buf54)) return
insertRgn(buf54,efile," ***",all)
putMsg(buf54)
vscroll(atCursor)
updateDisplay
getKeyVal(n3,n4)
if (eqNum(n3,normal-esc)) abort
mousexy(n1,n2)
while (inputKey(n54)) nothing
if (mouseDown) while (not inputWaiting) {
if (not mouseDown) goto label(0)
inputKey(n54)
}
label(0)
if (geNum(n3,normal-gadget1) & geNum(normal-gadget4,n3)
& gtNum(n2,10) & gtNum(20,n2)) {
div(n1,n1,8)
incNum(n1)
moveCursor(buf54,sfile)
moveCursor(buf54,eword)
locToIndex(buf54,n54,atcursor)
if (gtNum(n1,n54)) {
indexToLoc(buf54,atCursor,n1)
if (is(buf54,alpha)) {
movecursor(buf54,eword)
movecursor(buf54,sword)
movecursor(curfile,sword)
if (is(curfile,upperCase)) toUpper(buf54)
clearRgn(curfile,word)
insertrgn(curfile,atcursor,buf54,word)
}
}
}
putMsg(" ")
freeBuf(buf54)
while (inputKey(n54)) nothing
if (mouseDown) while (not inputWaiting) {
if (not mouseDown) return
inputKey(n54)
}
>
Spell-check from cursor fwd. Mark bad words with "@".
<rAmiga-3: if (not runKey(rAmiga-1)) returnFalse
putMsg("Spell checking ... abort with Amiga-ESC")
while (not spell(" ",curFile)) insertChar(curFile,"@")
putMsg(" ") >
Load supplemental dictionary & spell from cursor fwd. Add to supplement.
<rAmiga-4: if (not runKey(rAmiga-1)) returnFalse
equateNum(n54,curFile)
putMsg("Dict supplement to use (ESC = UdSupplement)")
freebuf(buf54)
equateNum(n99,0)
if (inputString(buf54)) {
if (not loadFile(buf54)) goto label(3)
} else {
label(3)
if (not loadFile("UdSupplement")) {
if (not newFile) {
putMsg("Close a file for me!")
returnFalse
}
setFileName(curfile,"UdSupplement")
}
}
putMsg("Spell checking ... abort with Amiga-Esc")
if (getFlag(curFile,searchCaps)) flipFlag(curFile,searchCaps)
label(0)
while (not spell(" ",buf[n54])) {
moveCursor(buf[n54],sWord)
freeBuf(buf54)
insertRgn(buf54,eFile,buf[n54],word)
moveCursor(buf[n54],eWord)
moveCursor(buf54,sFile)
if (not is(buf54,"'")) if (not is(buf54,alpha)) goto label(0)
moveCursor(buf54,eFile)
putMsg(buf54) .. remove for faster speed
insertChar(buf54,eLine)
moveCursor(curFile,eFile)
label(4) .. could remove this block but it helps hugely in speed.
setSearch(buf54)
if (search(curFile,locA,locB,-1)) {
if (is(curFile,sWord)) goto label(0)
moveCursor(curFile,sWord)
goto label(4)
}
moveCursor(buf54,sChar)
clearChar(buf54) .. remove eline
.. this sect for speed
moveCursor(buf54,sFile)
copyChar(buf54,n47) .. copy 1st char of word
freeBuf(buf52)
insertChar(buf52,eLine) .. load in eline-1stchar
insertChar(buf52,n47)
moveCursor(curFile,eFile).. search for starting place
setSearch(buf52)
search(curfile,locA,locB,-1)
moveCursor(curFile,eWord).. move fwd, so sWord works
if (is(curFile,sFile)) goto label(1)
while (nothing) {
moveCursor(curFile,sWord)
freeBuf(buf53)
insertRgn(buf53,eFile,curFile,word)
stringComp(n53,buf54,buf53,1) .. ignore case
if (eqNum(n53,0)) goto label(0) .. found it, continue
if (gtNum(n53,0)) {
label(1)
moveCursor(curFile,eWord)
moveCursor(curFile,eChar)
label(2)
insertRgn(curFile,atCursor,buf54,all)
insertChar(curFile,eLine)
updateDisplay .. remove for faster speed
incNum(n99)
if (gtNum(n99,19)) {
fileSize(curFile,n99) .. force buffer packing
equateNum(n99,0)
}
goto label(0)
}
if (is(curFile,sFile)) goto label(2)
}
}
moveCursor(curFile,sFile)
putMsg("These words weren't in dictionary")
.. stopSpell .. use if want speller removed
>
Merge dict supplement with dict-files. dict.A-Z must be in Current Directory.
<rAmiga-5: if (isEmpty(curFile)) returnFalse
moveCursor(curFile,sFile)
freeBuf(buf52)
freeBuf(buf54)
insertRgn(buf54,eFile,"dict. ",all)
if (getFlag(curFile,searchCaps)) flipFlag(curFile,searchCaps)
equateNum(n50,0)
while (nothing) {
moveCursor(curFile,eWord)
moveCursor(curFile,sWord)
freeBuf(buf53)
if (not insertRgn(buf53,eFile,curFile,word)) {
label(6)
if (getFlag(buf52,changed)) saveFile(buf52)
goto label(0)
}
moveCursor(buf53,sFile)
toUpper(buf53)
copyChar(buf53,n54) .. copy 1st letter of word A-Z
toLower(buf53)
if (eqNum(n54,39)) equateNum(n54,65) .. apost becomes 'A'
else {
if (gtNum(n54,90)) goto label(1) .. must be A-Z
if (gtNum(65,n54)) goto label(1)
}
moveCursor(buf54,eFile)
moveCursor(buf54,sChar)
swapChar(buf54,n54) .. make it "dict.A" etc.
if (not eqNum(n54,n50)) {
if (not eqNum(n50,0))
if (getFlag(buf52,changed)) saveFile(buf52)
clearRgn(buf52,all)
fileSize(buf52,n49) .. make it pack buffer
if (not insertFile(buf52,eFile,buf54)) {
putMsg("Can't find dict.A-Z!")
returnFalse
}
setFileName(buf52,buf54)
if (getFlag(buf52,changed)) flipFlag(buf52,changed)
equateNum(n50,n54) .. save dict-letter
}
.. put word in dict.
moveCursor(buf53,eFile)
putMsg(buf53)
insertChar(buf53,eLine)
moveCursor(buf52,eFile)
label(2)
setSearch(buf53)
if (search(buf52,locA,locB,-1)) {
if (is(buf52,sWord)) goto label(1)
goto label(2) .. continue searching
}
.. didn't find it. Do the slow scan & insert the word.
moveCursor(buf53,eFile)
moveCursor(buf53,sChar)
clearChar(buf53) .. remove eLine
moveCursor(buf52,eFile)
equateNum(n49,1)
label(4)
while (nothing) {
if (eqNum(n49,1)) do(n48,1,40) moveCursor(buf52,sWord)
moveCursor(buf52,sWord)
freeBuf(buf51)
insertRgn(buf51,eFile,buf52,word)
stringComp(n53,buf53,buf51,1) .. ignore case
if (eqNum(n53,0)) goto label(1) .. found it, continue
if (gtNum(n53,0)) {
if (eqNum(n49,1)) goto label(5)
moveCursor(buf52,eWord)
moveCursor(buf52,eChar)
label(3)
insertRgn(buf52,atCursor,buf53,all)
insertChar(buf52,eLine)
goto label(1)
}
if (is(buf52,sFile)) {
if (eqNum(n49,1)) {
label(5)
equateNum(n49,0)
do (n48,1,41) moveCursor(buf52,eWord)
goto label(4)
}
goto label(3)
}
}
label(1) .. next word
moveCursor(curFile,eLine)
moveCursor(curFile,eChar)
updateDisplay
if (is(curFile,eFile)) goto label(6)
}
label(0)
putMsg("Done. Run Udbuild to rebuild working dict & table")
freeBuf(buf52)
>
Remove words from dict-files. dict.A-Z must be in Current Directory.
<rAmiga-6: if (isEmpty(curFile)) returnFalse
moveCursor(curFile,sFile)
freeBuf(buf52)
freeBuf(buf54)
insertRgn(buf54,eFile,"dict. ",all)
if (getFlag(curFile,searchCaps)) flipFlag(curFile,searchCaps)
equateNum(n50,0)
while (nothing) {
moveCursor(curFile,eWord)
moveCursor(curFile,sWord)
freeBuf(buf53)
if (not insertRgn(buf53,eFile,curFile,word)) {
label(6)
if (getFlag(buf52,changed)) saveFile(buf52)
goto label(0)
}
moveCursor(buf53,sFile)
toUpper(buf53)
copyChar(buf53,n54) .. copy 1st letter of word A-Z
toLower(buf53)
if (eqNum(n54,39)) equateNum(n54,65) .. apost becomes 'A'
else {
if (gtNum(n54,90)) goto label(1) .. must be A-Z
if (gtNum(65,n54)) goto label(1)
}
moveCursor(buf54,eFile)
moveCursor(buf54,sChar)
swapChar(buf54,n54) .. make it "dict.A" etc.
if (not eqNum(n54,n50)) {
if (not eqNum(n50,0))
if (getFlag(buf52,changed)) saveFile(buf52)
clearRgn(buf52,all)
fileSize(buf52,n49) .. make it pack buffer
if (not insertFile(buf52,eFile,buf54)) {
putMsg("Can't find dict.A-Z!")
returnFalse
}
setFileName(buf52,buf54)
if (getFlag(buf52,changed)) flipFlag(buf52,changed)
equateNum(n50,n54) .. save dict-letter
}
.. remove word from dict.
moveCursor(buf53,eFile)
putMsg(buf53)
insertChar(buf53,eLine)
moveCursor(buf52,eFile)
label(2)
setSearch(buf53)
if (search(buf52,locA,locB,-1)) {
if (is(buf52,sWord)) {
clearRgn(buf52,loc)
goto label(1) .. next word
}
goto label(2) .. continue searching
}
label(1) .. next word
moveCursor(curFile,eLine)
moveCursor(curFile,eChar)
if (is(curFile,eFile)) goto label(6)
updateDisplay
}
label(0)
putMsg("Done. Run Udbuild to rebuild working dict & table")
freeBuf(buf52)
>
Stop spell-checking mode. (Frees up about 12k of memory.)
<rAmiga-8: if (spellerUp) { stopSpell putMsg("Speller removed") } >
<normal-f6:
equateNum(pmesc,10) >