home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d7xx / d770 / uedit.lha / Uedit / edt.LZH / edt! next >
Text File  |  1992-03-04  |  24KB  |  726 lines

  1. -----------------------------------------------------------------------------
  2. |                             Config!                                       |
  3. |        Copyright (C) 1986-88 Rick Stiles.  All rights reserved.           |
  4. ----------------------------------------------------------------------------
  5.  
  6. Config! defines all of Uedit's default settings and commands.  If you edit
  7. Config! and want to make a new Data! file, type "Run UE -c" in CLI. 
  8.  
  9. If you create a new config such as "NewConfig", you can make Uedit compile it
  10. by typing "UE -cNewConfig" in CLI.  On the "Save new Data?" question,
  11. selecting Yes writes a new Data! file.
  12.  
  13.                                    *****
  14. Edit the contents of each set of angle brackets, but leave the angle-brackets
  15. intact:
  16.  
  17. (To recompile these defaults anytime, select "Cfg defalts" in the menu.)
  18.  
  19. (Unless told otherwise, use 0 for "no" or 1 for "yes".)
  20.  
  21. <0>     Make Key-Help file during this compile.  (For "TEACH KEYS" in menu.)
  22.         (NOTE:  If you want to create a new Key-Help facility, you should set
  23.         this flag to 1.  Startup compile is much faster when it's 0, however.)
  24.  
  25. <S:Key-Help>  Name of Key-Help file to create or look for.  19 chars max.
  26.  
  27. <1>     Show cursor during compile of this configuration.  Slower, if show.
  28.  
  29. <RAM:uejunk>  Name for temporary file when one is needed.  19 chars max.
  30.  
  31. <topaz> Font name (19 chars max).
  32. <8>     Font pixel height ( >= 8).
  33.  
  34. <10>    Primiti ve Mode (pmESC) terminator character.  ASCII value, 5-255.
  35.  
  36. <0>     User global flag A.  Any integer value.
  37. <0>     User global flag B.  Any integer value.
  38. <0>     Columnar display mode
  39. <0>     Cram display mode
  40. <1>     Show page-row-column
  41.  
  42. <1>     Mark gadgets
  43. <0>     Interlace/bitplanes. 0-3.
  44. <1>     Show invisibles
  45. <0>     Show busies
  46. <0>     Teach keys mode
  47.  
  48. <20>    Maximum files to edit.  1-100.
  49. <0>     Make icons
  50. <0>     Search case-sensitive flag
  51. <?>     Search single wildcard.      Printable character.
  52. <$>     Search either-or delimiter.  Printable character.
  53.  
  54. <*>     Search multi wildcard.       Printable character.
  55. <~>     Search all-but delimiter.    Printable character.
  56. <0>     White allowed under single wildcard: 0=no, 1=space/tab, 2=any white.
  57. <0>     White allowed under multi wildcard: 0=no, 1=space/tab, 2=any white.
  58. <75>    Percent offset for submenus.  0-100 percent.
  59.  
  60. <0>     RESERVED  (l)
  61. <0>     RESERVED  (m)
  62. <0>     Speak requester alerts
  63. <0>     Speak messages
  64. <0>     Print tabs (if 0, tabs are converted to spaces during print)
  65.  
  66. <1>     Smart tabs (don't convert tabs if inside quotes)
  67. <1>     Screen: 0= Wb screen, 1= Custom screen
  68. <0>     Use printable keys for typing, disabling any commands on them.
  69. <2>     Printer selection.  0=par:, 1=ser:, 2=prt:, 3=prt: (raw).
  70. <100>   Idle-time (tenths of seconds) after which time idle cmd is run. 1-32767
  71.  
  72. <0>     Hide display.
  73. <1>     Scroll type: 0 = show colors, 1 = faster
  74. <0>     Trap menus to use menu mouse button as a key
  75. <664>     Screen width in pixels (640-1064)
  76. <224>     Screen height in pixels (gets auto-doubled for LACE) (200-1064)
  77.  
  78. <0>     Task priority when in tiny window (-128 to 127)
  79. <0>     Reserved    (capsLock)
  80. <0>     Reserved    (clickTime)
  81. <0>     User global flag C.  Any integer value.
  82. <1>     User global flag D.  Any integer value.
  83.  
  84. <1>     Put in tabs, not spaces, when tab key pressed.
  85. <1>     Autoindent mode
  86. <0>     Overstrike mode
  87. <1>     Autobackup mode
  88. <0>     RESERVED  (r)
  89.  
  90. <1>     Wordwrap mode
  91. <0>     Rightjustify mode
  92. <1>     Map illegal chars (ASCII 0-4) to table values.  (See table below.)
  93. <0>     RESERVED  (c)
  94. <0>     User local flag A
  95.  
  96. <0>     User local flag B
  97. <4>     Tab ruler to use.   0-4.  (See ruler tables below.)
  98. <77>    Line-length.  1-9999.
  99. <5>     Split window size in lines.  2-100, up to max lines in window.
  100. <0>     Left margin.    0-255.
  101.  
  102. <0>     top margin.     0-255.
  103. <1>     bottom margin.  0-255.
  104. <66>    lines/page.     1-255.
  105. <10>    End-of-line char.  10 = Newline, 13 = Carriage Return.
  106.  
  107. These are the 5 TAB rulers.  There can be up to 32 column-entries in each tab
  108. ruler.  The highest column is 255.  The lowest is 2.  In Uedit, to change
  109. tab rulers, select "Tab ruler".  To see the settings, select "See ruler". 
  110. To adjust the tabs, select "Set ruler".
  111.  
  112. <7 13 19 25 31>     Tab ruler 0.
  113. <9 17 25 33 41 49>  Tab ruler 1.
  114. <11 21 31 41 51 61
  115. 71 81>              Tab ruler 2.
  116. <>                  Tab ruler 3.
  117. <5 9 13 17 21 25 29
  118. 33 37 41 45 49 53 57
  119. 61 65 69 73 >       Tab ruler 4.
  120.  
  121. Uedit uses ASCII characters 0-3 internally for markers.  Files cannot
  122. legally contain these characters.  If the above "Map illegal chars" flag
  123. is not set, any illegal characters (ASCII 0-3) are replaced by "@" upon
  124. loading the file.  If "Map illegal chars" is set, illegal chars are mapped
  125. to the "safe" chars given below upon loading the file.  Upon saving the
  126. file, the chars are remapped back into their old ASCII 0-3 values:
  127.  
  128. <128>   map ASCII 0
  129. <129>   map ASCII 1
  130. <130>   map ASCII 2
  131. <131>   map ASCII 3
  132.  
  133. Printable key table:  DON'T TOUCH, unless you know what you are doing! 
  134. This is a translation table which converts raw keystrokes into printable
  135. characters.  (See Rom Kernal Manual, Volume 1, page 3-81.)  There must be
  136. 64 in each row.  Use OVERSTRIKE typing mode when modifying this, to avoid
  137. trouble:
  138.  
  139. Normal and SHIFT keys:
  140. Unused -->     U             U    EUROPE--> EE   U          U
  141. <`1234567890-=\ 0qwertyuiop[] 123asdfghjkl;'  456 zxcvbnm,./ .789>
  142. <~!@#$%^&*()_+| 0QWERTYUIOP{} 123ASDFGHJKL:"  456 ZXCVBNM<>? .789>
  143.  
  144. ALT and SHIFT+ALT keys:  (Put foreign letters in these 2 arrays.)
  145. Keypad keys --> K           KKKKKK              KKK             KKKK     "
  146. <`¹²³¢¼½¾·«»-=\  å°©®þ¤µ¡ø¶      æßð     £;'      ±×窺­¸,./     > ..
  147. <~!@#$%^&*()_+|  Å°©®Þ¥µ¦Ø¶      Æ§Ð     £;'      ¬×Ǫº¯¸,./     > .."
  148.  
  149. Colors:  (values must be 0-3, corresponding to RGB color register numbers)
  150.                                 fg        bg
  151.     ((local colors for buffers))
  152.     0  normal text              <1>      <0>
  153.     1  cursor                    <1>      <2>
  154.     2  hilite                    <1>      <3>
  155.     3  cursor+hilite            <3>      <1>
  156.     4  inverse                  <0>      <1>
  157.     5  cursor+inverse            <0>      <2>
  158.     6  hilite+inverse            <3>      <1>
  159.     7  cursor+hilite+inverse    <0>      <3>
  160.     ((screen colors))
  161.     8  title bar                <1>      <3>
  162.     9  msg line                 <2>      <0>
  163.     10 menus                    <1>      <3>
  164.     11 tab ruler                <1>      <2>
  165.     12 requester                <1>      <2>
  166.     13 formfeed                 <1>      <2>
  167.     14 spare1                    <0>      <1>
  168.     15 spare2                    <0>      <2>
  169.  
  170. RGB colors:  (Range is 0-15.)
  171. Red     Green    Blue
  172. <0>     <5>     <10>    Register 0
  173. <15>    <15>    <15>    Register 1
  174. <15>    <9>     <0>     Register 2
  175. <0>     <9>     <15>    Register 3
  176. or these ...
  177. ..<11>  <11>    <0>     Register 0
  178. ..<0>    <0>     <0>     Register 1
  179. ..<15>  <15>    <15>    Register 2
  180. ..<15>  <8>     <0>     Register 3
  181. or these ...
  182. ..<0>    <5>     <10>    Register 0
  183. ..<15>  <15>    <15>    Register 1
  184. ..<15>  <10>    <0>     Register 2
  185. ..<10>  <5>     <5>     Register 3
  186.  
  187. Gadget Names in the messge line.  19 chars max:
  188.  
  189. <Next File>     Name for gadget 1
  190. <Prev File>     Name for gadget 2
  191. <Scroll down>   Name for gadget 3
  192. <Scroll up>     Name for gadget 4
  193.  
  194.                                    *****
  195.  
  196. Everything from here onward is menu selections or commands.  (See
  197. Config!M, Config!P, Config!R, and Config!S also.)
  198.  
  199. Keep a backup copy of the original, if you change this file.
  200.  
  201. It's a good idea to include the following 2 commands first thing after the
  202. config defaults above.  That way, if a compile-error occurs during startup-
  203. compile, you can fix the error easily using mouse-scrolling and f6.
  204.  
  205. Compile command at or following cursor
  206. <normal-f6: if (not compile(curFile)) beepDisplay >
  207.  
  208. Place cursor or scroll if button held
  209. <normal-buttonDown:
  210.    moveCursor(curFile,mouseLoc)
  211.    updateDisplay
  212.    mouseXY(n0,n1)
  213.    equateNum(n4,n1)
  214.    if (not mouseDown) return
  215.    while (not inputWaiting) {
  216.         trackMouse
  217.         mouseXY(n2,n3)
  218.         sub(n3,n3,n1)
  219.         div(n3,n3,5)
  220.         vscroll(n3) 
  221.         updateDisplay
  222.    }
  223. >
  224.  
  225. <startup:
  226.  
  227. menu("Files","",1,normal-f1)
  228.    menu("Next file      f1","",1,normal-f1)
  229.    menu("Prev file      f2","",1,normal-f2)
  230.    menu("Open          G-O","",1,virtual-o)
  231.    menu("Incl file     G-I","",1,virtual-i)
  232.    menu("Restore       G-R","",1,virtual-r)
  233.    menu("Save          G-F","",1,virtual-f)
  234.    menu("Save as...    G-W","",1,virtual-w)
  235.    menu("Close         G-C","",1,virtual-c)
  236.    menu("Exit          G-X","",1,virtual-x)
  237.    menu("Quit          G-Q","",1,virtual-q)
  238.    menu("AmigaDOS   lAmi-y","",1,lAmiga-y)
  239.    menu("DOS + res. lAmi-z","",1,lAmiga-z)
  240.    menu("CD(Ch dir) lAmi-c","",1,lAmiga-c)
  241.    menu("About...         ","",1,lAmiga-a)
  242.  
  243. menu("Buffers","",2,normal-f3)
  244.    menu("See buffers    f3","",2,normal-f3)
  245.    menu("Edit buffer  S-f3","",2,shft-f3)
  246.    menu("Free buffers A-f3","",2,alt-f3)
  247.  
  248. menu("Commands","",3,normal-f1)
  249.       menu("Configurations   ","",3,normal-f6)
  250.    SUBmenu("Save data    A-f6","",3,alt-f6)
  251.    SUBmenu("Load data    C-f6","",3,ctl-f6)
  252.       menu("Compile          ","",3,normal-f6)
  253.    SUBmenu("Compile        f6","",3,normal-f6)
  254.    SUBmenu("Cfg defalts AC-f6","",3,altCtl-f6)         
  255.    SUBmenu("Make command S-f6","",3,shft-f6)
  256.       menu("Learn            ","",3,normal-f6)
  257.    checkedSUBmenu("Start learn   C-s","",3,ctl-s,learnMode)
  258.    SUBmenu("End/Run learn C-r","",3,ctl-r)
  259.    SUBmenu("Command mult  C-m","",3,ctl-m)
  260.    SUBmenu("Save learn    C-5","",3,ctl-5)
  261.    SUBmenu("Load learn    C-6","",3,ctl-6)
  262.    SUBmenu("Run learn #   C-7","",3,ctl-7)
  263.  
  264. menu("Modes","",4,normal-f1)
  265.              menu("TEACH KEYS       ","",4,normal-f1)
  266.    checkedSUBmenu("Teach keys C-help","",4,ctl-help,teachKeys)     
  267.           SUBmenu("Teach one     C-t","",4,ctl-t)           
  268.              menu("Local modes      ","",4,normal-f1)
  269.    checkedSUBmenu("OverStrike   C-a","",4,ctl-a,overStrike)
  270.    checkedSUBmenu("WordWrap     C-f5","",4,ctl-f5,wordWrap)
  271.    checkedSUBmenu("Right justify A-j","",4,alt-j,rightJustify)
  272.    checkedSUBmenu("AutoIndent   A-f5","",4,alt-f5,autoIndent)
  273.    checkedSUBmenu("Read-only   SA-f5","",4,shftAlt-f5,readOnly)
  274.    checkedSUBmenu("Changed flag L-f5","",4,lAmiga-f5,changed)   
  275.    checkedSUBmenu("Use tabs   AC-tab","",4,altCtl-tab,trueTabs) 
  276.    checkedSUBmenu("AutoBackup     f5","",4,normal-f5,autoBackup)
  277.    checkedSUBmenu("Map illegals SA-m","",4,shftAlt-m,mapChars)   
  278.    checkedSUBmenu("Save on idle C-f2","",4,ctl-f2,userLocalA)    
  279.              menu("Global modes     ","",4,normal-f1)
  280.    checkedSUBmenu("Interlace   S-esc","",4,shft-esc,lace)
  281.    checkedSUBmenu("Row/Column    C-2","",4,ctl-2,rowCol)
  282.    checkedSUBmenu("Mark gadgets  C-g","",4,ctl-g,markGadgets)
  283.    checkedSUBmenu("Invisibles    C-v","",4,ctl-v,spooks)
  284.    checkedSUBmenu("Busies        C-b","",4,ctl-b,busies)
  285.    checkedSUBmenu("Use keys      A-u","",4,alt-u,useKeys)
  286.    checkedSUBmenu("Make icons   AC-i","",4,altCtl-i,icons)
  287.   
  288. menu("Numbers","",5,normal-f1)
  289.    menu("Show vals  S-help","",5,shft-help)
  290.    menu("Tab ruler        ","",5,normal-f1)
  291.       SUBmenu("See ruler  SA-tab","",5,shftAlt-tab)             
  292.       SUBmenu("Set ruler  SC-tab","",5,shftCtl-tab)             
  293.       SUBmenu("Tab table  GC-tab","",5,shftAltCtl-tab)          
  294.    menu("Lt margin    GC-L","",5,shftaltctl-l)   
  295.    menu("Rt margin    GC-R","",5,shftaltctl-r)   
  296.    menu("End of line   C-e","",5,ctl-e)
  297.    menu("Max files   AC-f1","",5,altCtl-f1)                
  298.    menu("Idle timer   GC-i","",5,shftAltCtl-i)             
  299.    menu("PM terminator ESC","",5,normal-esc)               
  300.    menu("Name gadget C-esc","",5,ctl-esc)
  301.    menu("File size     C-1","",5,ctl-1)
  302.  
  303. menu("Colors","",6,normal-f1)
  304.    menu("Colors     A-help","",6,alt-help)
  305.    menu("Lace color  A-esc","",6,alt-esc)
  306.  
  307. menu("Spelling","",7,normal-f1)
  308.    menu("Load speller  R-1","",7,rAmiga-1)
  309.    menu("Check fwd     R-2","",7,rAmiga-2)
  310.    menu("Chk&mark fwd  R-3","",7,rAmiga-3)
  311.    menu("Chk & collect R-4","",7,rAmiga-4)
  312.    menu("Merge w/ dict R-5","",7,rAmiga-5)
  313.    menu("Del from dict R-6","",7,rAmiga-6)
  314.    menu("Free Speller  R-8","",7,rAmiga-8)  
  315.   
  316.      nameBuffer(35,"Rexx Msg/Reply OUT")
  317.      nameBuffer(36,"Rexx Msg/Reply IN")
  318.      nameBuffer(37,"Copied Columnar")
  319.      nameBuffer(38,"S:Directories")
  320.      nameBuffer(42,"Help!")
  321.      nameBuffer(45,"Scratch Deletes")
  322.      nameBuffer(46,"Copied Invert")
  323.      nameBuffer(47,"Copied Hilite")
  324.      nameBuffer(48,"Replace String")
  325.      nameBuffer(49,"Search String")
  326.      >
  327.  
  328.  
  329.                                    *****
  330. Here is a description of how buffers are used in this file.  If you make
  331. changes which involve buffers, you should follow the convention in this list:
  332. (You can change this convention entirely, of course.)
  333.  
  334. buf55-99 = available for user commands
  335. buf50-54 = used for temporary purposes in commands
  336. buf49 = search string
  337. buf48 = replace string
  338. buf47 = copied hilite
  339. buf46 = copied invert
  340. buf45 = holds scratch deletes for Undo, keypad-0
  341. buf44 = make-command buffer
  342. buf43 = document names
  343. buf42 = holds Help, if loaded
  344. buf41 = used in buffer swapping command, ctl-w
  345. buf40 = used for AmigaDOS commands
  346. buf39 = used for result of AmigaDOS commands (if result selected)
  347. buf38 = directory names
  348. buf37 = copied columnar data
  349. buf36 = ARexx msg/reply input buffer
  350. buf35 = ARexx msg/reply output buffer
  351.  
  352. ---------------------------------------------------------------------------
  353.  
  354. <defines:
  355. define(N_0 ,n0)
  356. define(N_1 ,n1)
  357. define(N_2 ,n2)
  358. define(N_3 ,n3)
  359. define(N_4 ,n4)
  360. define(N_5 ,n5)
  361. define(N_6 ,n6)
  362. define(N_7 ,n7)
  363. define(N_8 ,n8)
  364. define(N_9 ,n9)
  365. define(N_10 ,n10)
  366. define(N_11 ,n11)
  367. define(N_12 ,n12)
  368. define(N_13 ,n13)
  369. define(N_14 ,n14)
  370. define(N_15 ,n15)
  371. define(N_16 ,n16)
  372. define(N_17 ,n17)
  373. define(N_18 ,n18)
  374. define(n_19 ,n19)
  375.  
  376. define(B_0 ,buf50)
  377. define(B_1 ,buf51)
  378. define(B_2 ,buf52)
  379. define(B_3 ,buf53)
  380. define(B_4 ,buf54)
  381.  
  382. define(COLUMNAR_BUF ,buf37)
  383. define(DIR_NAMES    ,buf38)
  384. define(SWAP_BUF ,buf41)
  385. define(FILE_NAME    ,buf43)
  386. define(UNDO_BUF ,buf45)
  387. define(INVERT_BUF    ,buf46)
  388. define(HILITE_BUF    ,buf47)
  389. define(REPLACE_TXT ,buf48)
  390. define(SEARCH_STR    ,buf49)
  391. define(BUF_99    ,buf99)
  392.  
  393. define(BSTACK_99    ,buf99) .. note buf99 isn't really used
  394. define(NSTACK_99    ,n99)    .. note n99 isn't really used
  395.  
  396. define(Eat_MouseUp_Input    ,624)
  397. >
  398.  
  399. Show current values of line-length, lines/page, tab-table #, colors, etc
  400. <shft-help:
  401.     putMsg("")
  402.     equateLoc(curfile,locA,atCursor)
  403.     moveCursor(curfile,sFile)
  404.     moveCursor(curfile,eLine)
  405.     copyChar(curfile,N_2)
  406.     moveCursor(curfile,locA)
  407.     ..updateDisplay
  408.     equateNum(N_1,curFile)
  409.     text(" ",0,0,0,-2)
  410.     text("Serial number:                       Search wildcard :",2,0,0,0)
  411.     text("Buffer       :                       \"\"   multiWild  :",3,0,0,0)
  412.     text("Size         :                       \"\"      allBut  :",4,0,0,0)
  413.     text("Line length  :                       \"\"    eitherOr  :",5,0,0,0)
  414.     text("Lines/page   :                       \"\" singleWhite  :",6,0,0,0)
  415.     text("Tab table    :                       \"\"  multiWhite  :",7,0,0,0)
  416.     text("Left margin  :                       Idle timer      :",8,0,0,0)
  417.     text("Top margin   :                       PM terminator   :",9,0,0,0)
  418.     text("Bottom margin:                       Max files       :",10,0,0,0)
  419.     text("End-of-line  :                       Printer select  :",11,0,0,0)
  420.     text("Color bits   :                       capsLock        :",12,0,0,0)
  421.     text("Split size   :",13,0,0,0)
  422.  
  423.     text("Values for this buffer",1,0,0,0)
  424.     getSerialNum(N_4)
  425.     text(N_4,2,16,8,0)
  426.     text(N_1,3,16,8,0)  ..buffer number
  427.     getLocal(curFile,N_4,lineLength)
  428.     text(N_4,5,16,8,0)
  429.     getLocal(curFile,N_4,pageLines)
  430.     text(N_4,6,16,8,0)
  431.     getLocal(curFile,N_4,tabTable)
  432.     text(N_4,7,16,8,0)
  433.     getLocal(curFile,N_4,leftMargin)
  434.     text(N_4,8,16,8,0)
  435.     getLocal(curFile,N_4,topMargin)
  436.     text(N_4,9,16,8,0)
  437.     getLocal(curFile,N_4,bottomMargin)
  438.     text(N_4,10,16,8,0)
  439.     text(N_2,11,16,8,0) .. eol, copied it above
  440.     freeBuf(B_3)
  441.     getLocal(curFile,N_10,color)
  442.     toWord(B_3,N_10)
  443.     movecursor(B_3,sfile)
  444.     hexDecimal(B_3)
  445.     text(B_3,12,16,8,0)
  446.     text(splitSize,13,16,8,0)
  447.     freeBuf(B_3)
  448.     insertChar(B_3,wildCard)
  449.     text(B_3,2,56,8,0)
  450.     freeBuf(B_3)
  451.     insertChar(B_3,multiWild)
  452.     text(B_3,3,56,8,0)
  453.     freeBuf(B_3)
  454.     insertChar(B_3,allBut)
  455.     text(B_3,4,56,8,0)
  456.     freeBuf(B_3)
  457.     insertChar(B_3,eitherOr)
  458.     text(B_3,5,56,8,0)
  459.     text(singleWhite,6,56,8,0)
  460.     text(multiWhite,7,56,8,0)
  461.     text(idleTime,8,56,8,0)
  462.     text(pmESC,9,56,8,0)
  463.     getMaxFiles(N_4)
  464.     text(N_4,10,56,8,0)
  465.     text(prefPrint,11,56,8,0)
  466.     if (!eqNum(capsLock,0)) text("YES",12,56,3,0)
  467.     else text("no",12,56,8,0)
  468.     putMsg("Any key to continue")
  469.     fileSize(curFile,N_4)
  470.     text(N_4,4,16,8,0)
  471.     getKey(N_4)
  472.     putMsg("")
  473.     refreshDisplay>
  474.  
  475. Set colors
  476. <alt-help:
  477.     inputKey(N_5)
  478.     while (nothing) {
  479.         gosub label(0)
  480.         putMsg("# of color (0-15) to change (ESC=quit):")
  481.         if (!inputNum(N_5)) {
  482.             refreshDisplay
  483.             putMsg("")
  484.             return
  485.         }
  486.         if (geNum(N_5,0) & geNum(15,N_5)) {
  487.             putMsg("Fg color value (0-3)?")
  488.             inputNum(N_7)
  489.             if (geNum(N_7,0) & geNum(3,N_7)) {
  490.                 putMsg("Bg color value (0-3)?")
  491.                 inputNum(N_6)
  492.                 if (geNum(N_6,0) & geNum(3,N_6)) {
  493.                     if (eqNum(N_6,N_7)) {
  494.                         putMsg("Fg == Bg is NOT ALLOWED")
  495.                         delay(10)
  496.                     } else {
  497.                         setColors(curFile,N_5,N_7,N_6)
  498.                         setColors(" ",N_5,N_7,N_6)   .. so new buf's inherit these
  499.                     }
  500.                     if (eqNum(N_5,8)) {
  501.                         toggle(toTiny)
  502.                         toggle(toTiny)
  503.                     }
  504.                     if (eqNum(N_5,10)) runKey(startup)
  505.                     updateDisplay
  506.                 }
  507.             }
  508.         }
  509.     }
  510.  
  511. label(0)  ..subroutine to demonstrate current color settings
  512.     equateNum(N_3,1)
  513.     equateNum(N_5,0)
  514.     do (N_4,2,21) {
  515.         text("",N_4,18,N_3,41)
  516.         if (gtNum(N_4,3) & gtNum(21,N_4) & !eqNum(N_4,12)) {
  517.             if (gtNum(N_5,9)) text(N_5,N_4,19,N_3,0)
  518.             else text(N_5,N_4,20,N_3,0)
  519.             text("< >  < >",N_4,49,N_3,0)
  520.             incNum(N_5)
  521.         }
  522.     }
  523.     equateNum(N_0,0)
  524.     do (N_4,4,20) {
  525.         if (!eqNum(N_4,12)) {
  526.             getColors(curFile,N_0,N_1,N_2)
  527.             text(N_1,N_4,50,N_3,0)
  528.             text(N_2,N_4,55,N_3,0)
  529.             incNum(N_0)
  530.         }
  531.     }
  532.     text("#       ((( For Files )))     Fg   Bg",3,20,N_3,0)
  533.     text("normal text",  4,23,0,0)
  534.     text("cursor",  5,23,1,0)
  535.     text("hilite",  6,23,2,0)
  536.     text("cursor + hilite",  7,23,3,0)
  537.     text("invert",  8,23,4,0)
  538.     text("invert+cursor",  9,23,5,0)
  539.     text("hilite+invert",  10,23,6,0)
  540.     text("cursor+hilite+invert",  11,23,7,0)
  541.     text("        ((( For Screen )))",12,20,N_3,0)
  542.     text("title bar",  13,23,8,0)
  543.     text("msg line",  14,23,9,0)
  544.     text("menus",  15,23,10,0)
  545.     text("tab ruler",  16,23,11,0)
  546.     text("requester",  17,23,12,0)
  547.     text("formfeed",  18,23,13,0)
  548.     text("spare1",  19,23,14,0)
  549.     text("spare2",  20,23,15,0)
  550. >
  551.  
  552. Start this Key-Help mode - press Amiga-ESC to leave this Key-Help mode
  553. <ctl-help: flipFlag(curFile,teachKeys) >
  554.  
  555. Refresh window (or screen in interlace), including title bar
  556. <ctl-w:     refreshDisplay >
  557.  
  558. Save all changed files automatically, then quit
  559. <normal-closebox:   getMaxFiles(n52)
  560.             decNum(n52)
  561.             do (n54,0,n52) if (getFlag(buf[n54],changed))
  562.                                if (not saveFile(buf[n54])) returnFalse
  563.             quit(0) >  
  564.  
  565. Switch to next document
  566. <normal-gadget1:  toggle(curFile) >
  567. Switch to previous document
  568. <normal-gadget2:  runKey(normal-f2) >
  569. Scroll display down
  570. <normal-gadget3:  while (mouseDown) { vScroll(downLine) updateDisplay } >
  571. Scroll display up
  572. <normal-gadget4:  while (mouseDown) { vScroll(upLine)   updateDisplay } >
  573.  
  574. Switch to next file
  575. <normal-f1:    toggle(curFile) >
  576.  
  577. Switch to previous file
  578. <normal-f2:      getMaxFiles(n53)
  579.                if (geNum(1,n53)) { editBuf(buf0) returnFalse }
  580.                decNum(n53)
  581.                equateNum(n54,curFile)
  582.                while (nothing) {
  583.                    if (gtNum(n54,n53)) equateNum(n54,n53)
  584.                    decNum(n54)
  585.                    if (gtNum(0,n54)) equateNum(n54,n53)
  586.                    if (getFileName(buf54,buf[n54])) {
  587.                        editBuf(buf[n54])
  588.                        returnTrue
  589.                    }
  590.                } >
  591.  
  592. Load a file
  593. <alt-f1:       putMsg("Input new filename:")
  594.                freeBuf(buf43)
  595.                if (inputString(buf43)) loadFile(buf43) >
  596.  
  597. Insert file at cursor
  598. <virtual-i:   putMsg("Input filename to insert:")
  599.                freeBuf(buf43)
  600.                if (inputString(buf43)) insertFile(curFile,atCursor,buf43) >
  601.  
  602. Restore current file to original
  603. <virtual-r:   if (not askYesNo("Restore file to original?"))
  604.                           returnFalse
  605.                if (getFileName(buf43,curFile))
  606.                    { freeBuf(curFile) loadFile(buf43) } >
  607.  
  608. Save file under different name
  609. <virtual-w: putMsg("Save file as:")
  610.             freeBuf(buf43)
  611.             if (inputString(buf43)) if (setFileName(curFile,buf43))
  612.                    saveFile(curFile) >
  613.  
  614. Save all changed files
  615. <virtual-f: getMaxFiles(n53)
  616.             decNum(n53)
  617.             do(n54,0,n53)
  618.                if (getFlag(buf[n54],changed)) saveFile(buf[n54]) >
  619.  
  620. Turn on/off saving changes during idle periods
  621. <ctl-f2:  flipFlag(curFile,userLocalA)>
  622.  
  623. Close current file.  If changed, ask "Save changes?"
  624. <virtual-c: if (not isEmpty(curFile)) if (getFlag(curFile,changed))
  625.               if (askYesNo("Save changes before closing?"))
  626.                 if (not saveFile(curFile)) returnFalse
  627.             freeBuf(curFile) >
  628.  
  629. Free all non-file buffers.  Erases search string, directory name, etc
  630. <alt-f3:    getMaxFiles(n52)
  631.             do(n54,n52,54) freeBuf(buf[n54]) >
  632.  
  633. Save all changed files automatically, then quit
  634. <virtual-x:   getMaxFiles(n52)
  635.             decNum(n52)
  636.             do (n54,0,n52) if (getFlag(buf[n54],changed))
  637.                                if (not saveFile(buf[n54])) returnFalse
  638.             quit(0) >  
  639.  
  640. Ask "Save changes?", if any changes, then ask "Really quit?"
  641. <virtual-q: 
  642.  equateNum(n53,0)
  643.  getMaxFiles(n52)
  644.  decNum(n52)
  645.  do(n54,0,n52) if (getFlag(buf[n54],changed)) equateNum(n53,1)
  646.  if (eqNum(n53,1)) 
  647.    if (not askYesNo("Buffer(s) have been modified. Really quit?")) returnFalse
  648.   quit(0) 
  649. >  
  650.  
  651. Toggle overstrike typing mode
  652. <ctl-a:          flipFlag(curFile,overstrike) >
  653. Toggle autoindent typing mode
  654. <alt-f5:           flipFlag(curFile,autoIndent) >
  655. Toggle wordwrap typing mode
  656. <ctl-f5:           flipFlag(curFile,wordWrap) >
  657. Toggle "changed" status of current buffer
  658. <lAmiga-f5:   flipFlag(curFile,changed) >
  659. Convert file to read-only status
  660. <shftAlt-f5:       flipFlag(curFile,readOnly) >
  661. Toggle speak-messages status
  662. <shftCtl-f5:       flipFlag(curFile,speakMsgs) >
  663. Toggle speak-alerts status
  664. <altCtl-f5:        flipFlag(curFile,speakAlerts) >
  665. Toggle auto-backup mode
  666. <normal-f5:    flipFlag(curFile,autoBackup) >
  667.  
  668.  
  669.          WARNING: You can't compile this one with F6, but in startup you can
  670.          put cursor before it and ESC will compile from there forward.
  671.  
  672. Compile command at or following cursor
  673. <normal-f6:    if (not compile(curFile)) beepDisplay >
  674.  
  675. Select buffer 44 to use for scratch editing or writing commands
  676. <shft-f6:      editBuf(buf44)
  677.        putMsg("Type in command, <anykey: etc>, and press F6 to compile:") >
  678.  
  679. Find out if keys have got commands attached
  680. <lAmiga-f6:  while (getKey(n54)) {
  681.                if (inUse(n54)) putMsg("In use - Amiga-esc to abort")
  682.                else putMsg("Available - Amiga-esc to abort")
  683.              }>
  684.  
  685. Save UE config to disk.  Default is Data! or last name you gave
  686. <alt-f6:
  687.        if (askYesNo("Save data?")) {
  688.            putMsg("Input data filename or ESC:")
  689.            freeBuf(buf54)
  690.            inputString(buf54)
  691.            saveConfig(buf54)
  692.        } >
  693.  
  694. Restore UE config from disk.  Default is Data! or last name you gave
  695. <ctl-f6:
  696.        if (askYesNo("Load data?")) {
  697.            putMsg("Input data filename or ESC:")
  698.            freeBuf(buf54)
  699.            inputString(buf54)
  700.            loadConfig(buf54)
  701.        } >
  702.  
  703. Compile configuration default values at the top of Config! file
  704. <altCtl-f6:     moveCursor(curFile,sFile)
  705.                 if (not compileDefaults(curFile)) beepDisplay>
  706.  
  707. Input the number of a buffer to edit
  708. <shft-f3:   putMsg("Input number of buffer to edit:")
  709.                if (inputNum(n54)) { editBuf(buf[n54]) vScroll(sFile) } >
  710.  
  711. Examine all buffers that aren't empty
  712. <normal-f3:    getMaxFiles(n52)
  713.                 do (n54,n52,99) if (not isEmpty(buf[n54])) {
  714.                    editBuf(buf[n54])
  715.                    vScroll(sFile)
  716.                    updateDisplay
  717.                    putMsg("F1=continue, F2=edit this one, F3=stop:")
  718.                    getKey(n53)
  719.                    if (eqNum(n53,normal-f2)) { putMsg(" ") return }
  720.                    if (eqNum(n53,normal-f3)) goto label(1)
  721.                }
  722.                label(1)
  723.                toggle(curFile)
  724.                putMsg(" ") >
  725.  
  726.