home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 085.lha / s / Config! next >
Text File  |  1986-11-20  |  79KB  |  2,257 lines

  1. -----------------------------------------------------------------------------
  2. |                           Config!  V2.3                                   |
  3. |        Copyright (C) 1986-87 Rick Stiles.  All rights reserved.           |
  4. ----------------------------------------------------------------------------
  5.  
  6. Config! defines Uedit's start-up settings and commands.  Config! must be in
  7. S: or in your current directory.
  8.  
  9. If you edit Config! and want to make a new Data! file, type "Run UE -c" in
  10. CLI.  (Or you can rename S:Data! or delete it, and Uedit will be forced to
  11. compile Config! next time.)
  12.  
  13. If you create a new config such as "NewConfig", you can make Uedit compile it
  14. by typing "UE -cNewConfig" in CLI.  On the "Save new Data?" question,
  15. selecting Yes will replace S:Data!.  Selecting No will preserve the old
  16. S:Data!.  Once inside Uedit, you can select "Save data" and save it under a
  17. new name like "NewData".
  18.  
  19. To make Uedit use NewData next time, type "UE -dNewData" in CLI.  To make it
  20. your standard data file, rename it to S:Data!.
  21.  
  22.  
  23. =============================================================================
  24. Edit the contents of each set of angle brackets, but leave the angle-brackets
  25. as they are:
  26.  
  27. (To recompile these defaults anytime, select "Cfg defalts" in the menu.)
  28.  
  29. (Unless told otherwise, use 0 for "no" or 1 for "yes".)
  30.  
  31. <1>     make Key-Help file during this compile.  (For "TEACH KEYS" in menu.)
  32.         (NOTE:  Unless you need the Key-Help facility, you should change this
  33.         flag to 0.  The compile will go much faster.)
  34. <Key-Help>  name of Key-Help file (1-19 characters.)
  35.  
  36. <1>     show cursor during compile of this configuration (slower, if show)
  37.  
  38. <0>     user global flag A
  39. <0>     user global flag B
  40. <0>     columnar display mode
  41. <0>     cram display mode
  42. <1>     show row-column
  43.  
  44. <1>     mark gadgets
  45. <0>     interlace screen
  46. <1>     show invisibles
  47. <0>     show busies
  48. <0>     key-help mode
  49.  
  50. <20>    maximum files to edit:  1-100
  51. <0>     make icons
  52. <0>     search case-sensitive
  53. <?>     search wildcard  (printable character)
  54. <$>     search either-or delimiter  (printable character)
  55.  
  56. <0>     RESERVED  (l)
  57. <0>     RESERVED  (m)
  58. <0>     speak alerts
  59. <0>     speak messages
  60. <200>   speech speed:   40-400
  61.  
  62.  
  63. <120>   speech pitch:  65-320
  64. <n>     speak mode:     n=natural,f=female,m=male,r=robotic
  65. <0>     use printable cmd-keys for typing input
  66. <0>     printer: 0=par: 1=ser: 2=prt: 3=prt: (raw)
  67. <10>    idle-time (in seconds) after which idle command is executed: 1-9999
  68.  
  69. <1>     use tabs - put in tabs, not spaces, when tab key pressed.
  70. <1>     autoindent mode
  71. <0>     overstrike mode
  72. <0>     autobackup mode
  73. <0>     RESERVED  (r)
  74.  
  75. <1>     wordwrap mode
  76. <0>     right-justification mode
  77. <0>     map illegal ASCII chars 0-4 to alternate values (see mappings below)
  78. <0>     RESERVED  (c)
  79. <0>     RESERVED  (f)
  80.  
  81. <0>     user local flag A
  82. <0>     user local flag B
  83. <4>     tab table to use: 0-4  (See tables below.)
  84. <77>    line-length:    1-200
  85. <2>        split window size in lines (2-100, up to max lines in window)
  86.  
  87. <0>     RESERVED (f)
  88. <5>        top margin    0-200
  89. <5>        bottom margin 0-200
  90. <66>    lines/page:     1-200
  91. <10>    end-of-line character: 10=Newline, 13=Carriage Return
  92.  
  93. These are the 5 TAB tables.  There can be at most 32 column-entries in tab
  94. table.  The highest column is 255.  The lowest tab column is 2.  In Uedit, to
  95. change tab tables, select "Tab table"; to see the settings, select "See
  96. ruler"; to adjust the tabs, select "Set ruler".
  97.  
  98. <5>                 Tab table 0.  (32 entries max.  Column 2-255.)
  99. <6 20>              Tab table 1.  (32 entries max.  Column 2-255.)
  100. <5 10 20 45>        Tab table 2.  (32 entries max.  Column 2-255.)
  101. <>                  Tab table 3.  (32 entries max.  Column 2-255.)
  102. <5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73
  103.           >         Tab table 4.  (32 entries max.  Column 2-255.)
  104.  
  105. Uedit uses ASCII characters 0-4 internally for marking cleared text and for
  106. flags.  Thus, files cannot legally contain these characters.  If the above
  107. "map illegals" flag is not set, these odd characters are erased by Uedit upon
  108. loading the file.  If "Map illegals" is set (see default above ), ASCII 0-4
  109. are remapped into "safe" character values using the settings below.  Upon
  110. saving the file to disk the characters are converted back into their old
  111. ASCII 0-4 values:  (You could also map the 4 non-null ctrl characters to
  112. ASCII 28-31.  This would make tests for control characters work properly.)
  113.  
  114. <128>   map ASCII 0
  115. <129>   map ASCII 1
  116. <130>   map ASCII 2
  117. <131>   map ASCII 3
  118. <132>   map ASCII 4
  119.  
  120. Printable key table:  DON'T TOUCH, unless you know what you are doing!  This
  121. is a translation table which converts raw keystrokes into printable
  122. characters.  (See Rom Kernal Manual, Volume 1, page 3-81.) There must be 64
  123. in each row.  Use OVERSTRIKE mode when modifying this, to save trouble.
  124. Unused -->     U             U    EUROPE--> EE   U          U
  125. <`1234567890-=\ 0qwertyuiop[] 123asdfghjkl;'  456 zxcvbnm,./ .789>
  126. <~!@#$%^&*()_+| 0QWERTYUIOP{} 123ASDFGHJKL:"  456 ZXCVBNM<>? .789>
  127.  
  128. Colors:
  129.  
  130. <3><2><0><1>    Workbench window colors (Preferences colors) (0-3)
  131.  
  132. Interlace RGB colors (0-15):
  133. Red     Green   Blue
  134. <9>     <5>     <0>     Register 0
  135. <10>    <10>    <10>    Register 1
  136. <0>     <0>     <0>     Register 2
  137. <15>    <10>    <0>     Register 3
  138.  
  139. Gadget Names (19 chars max):
  140.  
  141. <Next File>     Name for gadget 1
  142. <Prev File>     Name for gadget 2
  143. <Scroll down>   Name for gadget 3
  144. <Scroll up>     Name for gadget 4
  145.  
  146. ===========================================================================
  147.  
  148. Everything from here onward is menu selections or commands.
  149.  
  150. Be sure and keep a backup copy of the original Config!, if you change this
  151. file!
  152.  
  153. (( NOTE:
  154.    The left hand entries below are Menu Titles.  Their key argument is not
  155.    used.  Menu Titles should be as brief as possible.  Menu selection names
  156.    can have up to 17 characters.  Entries with a SUB-menu entries below them
  157.    are titles for the submenu items.  Titles never do anything and their key-
  158.    arguments are meaningless and ignored.
  159. ))
  160.  
  161. <startup:
  162.  
  163. menu("Files",1,normal-f1)
  164.    menu("Next file      f1",1,normal-f1)
  165.    menu("Prev file    S-f1",1,shft-f1)
  166.    menu("Open         A-f1",1,alt-f1)
  167.    menu("New file     C-f1",1,ctl-f1)
  168.    menu("Insert file SA-f1",1,shftAlt-f1)
  169.    menu("Restore     SC-f1",1,shftCtl-f1)
  170.    menu("Rename        A-n",1,alt-n)
  171.    menu("AmigaDOS      C-y",1,ctl-y)
  172.    menu("DOS + result  C-z",1,ctl-z)
  173.    menu("Directory     A-z",1,alt-z)
  174.    menu("CD (Chg dir) AC-z",1,altCtl-z)
  175.    menu("Save           f2",1,normal-f2)
  176.    menu("Save as...   S-f2",1,shft-f2)
  177.    menu("Save changes A-f2",1,alt-f2)
  178.    menu("Close          f3",1,normal-f3)
  179.    menu("Auto-close   S-f3",1,shft-f3)
  180.    menu("Quit           f4",1,normal-f4)
  181.    menu("Auto-Quit    S-f4",1,shft-f4)
  182.    menu("About...         ",1,shftAltCtl-a)
  183.  
  184. menu("Buffers",2,normal-f1)
  185.    menu("Search & Replace ",2,normal-f1)
  186.    SUBmenu("Search fwd     f9",2,normal-f9)
  187.    SUBmenu("Replace fwd   f10",2,normal-f10)
  188.    SUBmenu("Rpl all fwd A-f10",2,alt-f10)
  189.    SUBmenu("Search bkwd  S-f9",2,shft-f9)
  190.    SUBmenu("Rpl bkwd    S-f10",2,shft-f10)
  191.    SUBmenu("Set search     f7",2,normal-f7)
  192.    SUBmenu("Set replace    f8",2,normal-f8)
  193.    checkedSUBmenu("Search caps   C-8",2,ctl-8,searchCaps)
  194.    SUBmenu("Set wildcard A-f7",2,alt-f7)
  195.    SUBmenu("Set eitherOr C-f7",2,ctl-f7)
  196.    menu("Buffers          ",2,alt-f3)
  197.    SUBmenu("Swap buf #0   A-w",2,alt-w)             .. %% NEW & useful, one hopes
  198.    SUBmenu("Swap buf #43  C-w",2,ctl-w)             .. %% Changed title only
  199.    SUBmenu("See buffers SC-f6",2,shftCtl-f6)
  200.    SUBmenu("Edit buffer SA-f6",2,shftAlt-f6)
  201.    SUBmenu("Free buffers A-f3",2,alt-f3)
  202.       menu("Speak hilite  A-s",2,alt-s)
  203.  
  204. menu("Commands",3,normal-f1)
  205.       menu("Configurations   ",3,normal-f6)
  206.    SUBmenu("UStar            ",3,virtual-u)
  207.    SUBmenu("Directory Utility",3,virtual-d)
  208.    SUBmenu("Regular UE data  ",3,virtual-e)
  209.    SUBmenu("Save data    A-f6",3,alt-f6)
  210.    SUBmenu("Load data    C-f6",3,ctl-f6)
  211.       menu("Compile          ",3,normal-f6)
  212.    SUBmenu("Compile        f6",3,normal-f6)
  213.    SUBmenu("Cfg defalts AC-f6",3,altCtl-f6)         .. %% new.  Compiles dfalts
  214.    SUBmenu("Make command S-f6",3,shft-f6)
  215.       menu("Keys             ",3,normal-f6)
  216.    SUBmenu("Swap keys      f5",3,normal-f5)
  217.    SUBmenu("Swap mouseUp  A-m",3,alt-m)
  218.    SUBmenu("Kill key   SAC-f6",3,shftAltCtl-f6)
  219.    SUBmenu("Find key  lAmi-f6",3,lAmiga-f6)         .. %% new
  220.       menu("Learn            ",3,normal-f6)
  221.    checkedSUBmenu("Start learn   C-s",3,ctl-s,learnMode)
  222.    SUBmenu("End/Run learn C-r",3,ctl-r)
  223.    SUBmenu("Command mult  C-m",3,ctl-m)
  224.    SUBmenu("Save learn    C-5",3,ctl-5)
  225.    SUBmenu("Load learn    C-6",3,ctl-6)
  226.    SUBmenu("Run learn #   C-7",3,ctl-7)
  227.  
  228. menu("Edits",4,normal-f1)
  229.       menu("Cut&Paste Hilite ",4,normal-f1)
  230.    SUBmenu("Copy          kp.",4,normal-kpDot)
  231.    SUBmenu("Cut           kp-",4,normal-kpMinus)
  232.    SUBmenu("Paste     kpEnter",4,normal-kpEnter)
  233.    SUBmenu("Clear         C-h",4,ctl-h)
  234.    menu("Cut&Paste Invert ",4,normal-f1)
  235.    SUBmenu("I-Copy      C-kp.",4,ctl-kpDot)
  236.    SUBmenu("I-Cut       C-kp-",4,ctl-kpMinus)
  237.    SUBmenu("I-Paste C-kpEnter",4,ctl-kpEnter)
  238.    SUBmenu("I-Clear       C-i",4,ctl-i)
  239.    checkedmenu("Col display  SC-`",4,shftCtl-`,columnar)
  240.    menu("Columnar         ",4,normal-f1)
  241.    SUBmenu("Col Cut      SC-1",4,shftCtl-1)
  242.    SUBmenu("Col Erase    SC-2",4,shftCtl-2)
  243.    SUBmenu("Col Copy     SC-3",4,shftCtl-3)
  244.    SUBmenu("Col Insert   SC-4",4,shftCtl-4)
  245.    SUBmenu("Col Overlay  SC-5",4,shftCtl-5)
  246.    SUBmenu("Ins Hil->Csr SC-6",4,shftCtl-6)
  247.    SUBmenu("Ovl Hil->Csr SC-7",4,shftCtl-7)
  248.    menu("Reformats     C-3",4,ctl-3)
  249.    SUBmenu("Paragraph     C-3",4,ctl-3)
  250.    SUBmenu("Del white-spc C-4",4,ctl-4)
  251.    SUBmenu("Tabs->spaces  L-t",4,lAmiga-t)
  252.    SUBmenu("Spaces->tabs  R-t",4,rAmiga-t)
  253.    menu("Page formatting  ",4,normal-f1)
  254.    SUBmenu("Go to page #  A-3",4,alt-3)
  255.    SUBmenu("Top of page   L-h",4,lAmiga-h)
  256.    SUBmenu("Bottom page   L-b",4,lAmiga-b)
  257.    SUBmenu("Divide page   L-v",4,lAmiga-v)
  258.    SUBmenu("Auto page div L-r",4,lAmiga-r)
  259.    SUBmenu("Del page div  L-d",4,lAmiga-d)
  260.    SUBmenu("Del page #    L-y",4,lAmiga-y)
  261.   
  262. menu("Modes",5,normal-f1)
  263.              menu("TEACH KEYS       ",5,normal-f1)
  264.    checkedSUBmenu("Teach keys C-help",5,ctl-help,teachKeys)     .. %% new
  265.           SUBmenu("Teach one     C-t",5,ctl-t)           .. %% new
  266.              menu("Local modes      ",5,normal-f1)
  267.    checkedSUBmenu("OverStrike   S-f5",5,shft-f5,overStrike)
  268.    checkedSUBmenu("WordWrap     C-f5",5,ctl-f5,wordWrap)
  269.    checkedSUBmenu("Right justify A-j",5,alt-j,rightJustify)
  270.    checkedSUBmenu("AutoIndent   A-f5",5,alt-f5,autoIndent)
  271.    checkedSUBmenu("Read-only   SA-f5",5,shftAlt-f5,readOnly)
  272.    checkedSUBmenu("Changed flag L-f5",5,lAmiga-f5,changed)   .. %% new
  273.    checkedSUBmenu("Use tabs   AC-tab",5,altCtl-tab,trueTabs) .. %% new
  274.    checkedSUBmenu("AutoBackup SAC-f5",5,shftAltCtl-f5,autoBackup)
  275.    checkedSUBmenu("Map illegals SA-m",5,shftAlt-m,mapChars)   .. %% new
  276.    checkedSUBmenu("Save on idle C-f2",5,ctl-f2,userLocalA)    .. %% new
  277.              menu("Global modes     ",5,normal-f1)
  278.    checkedSUBmenu("Interlace   S-esc",5,shft-esc,lace)
  279.    checkedSUBmenu("Row/Column    C-2",5,ctl-2,rowCol)
  280.    checkedSUBmenu("Mark gadgets  C-g",5,ctl-g,markGadgets)
  281.    checkedSUBmenu("Invisibles    C-v",5,ctl-v,spooks)
  282.    checkedSUBmenu("Busies        C-b",5,ctl-b,busies)
  283.    checkedSUBmenu("Use keys      A-u",5,alt-u,useKeys)
  284.    checkedSUBmenu("Make icons   AC-i",5,altCtl-i,icons)
  285.       menu("Printing         ",5,normal-f1)
  286.    SUBmenu("Print select  A-p",5,alt-p)  .. %% new
  287.    SUBmenu("Print hilite  C-p",5,ctl-p)
  288.    SUBmenu("Print file   AC-p",5,altCtl-p)
  289.    SUBmenu("Restart print L-s",5,lAmiga-s)
  290.    SUBmenu("Abort print   L-a",5,lAmiga-a)
  291.    SUBmenu("Stop all prts R-a",5,rAmiga-a)
  292.    SUBmenu("Code help        ",5,virtual-p)
  293.    SUBmenu("Bracket word  L-p",5,lAmiga-p)
  294.    SUBmenu("Find code     R-g",5,rAmiga-g)
  295.    SUBmenu("Embed code    L-g",5,lAmiga-g)
  296.    SUBmenu("Type formfeed L-f",5,lAmiga-f)
  297.   
  298. menu("Numbers",6,normal-f1)
  299.    menu("Show vals  S-help",6,shft-help)
  300.    menu("Tab ruler        ",6,normal-f1)
  301.    SUBmenu("See ruler  SA-tab",6,shftAlt-tab)             .. %% new
  302.    SUBmenu("Set ruler  SC-tab",6,shftCtl-tab)             .. %% new
  303.    SUBmenu("Tab table SAC-tab",6,shftAltCtl-tab)          .. %% was Tab space
  304.       menu("Line/Page        ",6,normal-f1)
  305.    SUBmenu("Line length C-rtn",6,ctl-return)
  306.    SUBmenu("Lines/page    A-g",6,alt-g)
  307.    SUBmenu("Top margin    L-u",6,lAmiga-u)                .. %% new
  308.    SUBmenu("Bottom margin L-l",6,lAmiga-l)                .. %% new
  309.    SUBmenu("End of line   C-e",6,ctl-e)
  310.    menu("Max files   AC-f1",6,altCtl-f1)                .. %% new
  311.    menu("Idle timer  SAC-i",6,shftAltCtl-i)             .. %% new
  312.    menu("Name gadget C-esc",6,ctl-esc)
  313.    menu("File size     C-1",6,ctl-1)
  314.  
  315. menu("Colors",7,normal-f1)
  316.    menu("Colors     A-help",7,alt-help)
  317.    menu("Lace color  A-esc",7,alt-esc)
  318.    menu("Split window     ",7,normal-f1)            .. %% SEE NAMEBUF BELOW
  319.    SUBmenu("Next split L-9",7,lAmiga-9)
  320.    SUBmenu("Elim curr  L-0",7,lAmiga-0)
  321.    SUBmenu("Set size   L-8",7,lAmiga-8)
  322.    SUBmenu("Curr buf   L-c",7,lAmiga-c)
  323.    SUBmenu("Undo buf   L-1",7,lAmiga-1)
  324.    SUBmenu("Search buf L-2",7,lAmiga-2)
  325.    SUBmenu("Replac buf L-3",7,lAmiga-3)
  326.    SUBmenu("Hilite buf L-4",7,lAmiga-4)
  327.    SUBmenu("Invert buf L-5",7,lAmiga-5)
  328.    SUBmenu("Columnar   L-6",7,lAmiga-6)
  329.    SUBmenu("Dir name   L-7",7,lAmiga-7)
  330.  
  331.    menu("Refresh   SC-help",7,shftCtl-help)   .. %% was on CTL-HELP key!
  332.    menu("Unhilite      A-h",7,alt-h)
  333.    menu("Uninvert      A-i",7,alt-i)
  334.  
  335.      nameBuffer(37,"Copied Columnar")         .. %% names for buffers
  336.      nameBuffer(38,"Directory Name")
  337.      nameBuffer(45,"Scratch Deletes")
  338.      nameBuffer(46,"Copied Invert")
  339.      nameBuffer(47,"Copied Hilite")
  340.      nameBuffer(48,"Replace String")
  341.      nameBuffer(49,"Search String")
  342.  
  343.     runKey(shftAltCtl-z) >
  344.  
  345. alertUser("Uedit is shareware.  See Uedit-Policy.") >
  346.  
  347. NOTE:  shftAltCtl-z is executed automatically at startup.  Normally no
  348. command exists for it.  During an edit session you can create and save one,
  349. however, and it will be executed each time you start Uedit.
  350.  
  351. Press HELP if you want to see how to set up shftAltCtl-z  to  auto-load  your
  352. files.
  353.  
  354.  
  355. ---------------------------------------------------------------------------
  356. Here is a description of how buffers are used in this file.  If you make
  357. changes which involve buffers, you should follow the convention in this list:
  358. (You can change this convention entirely, of course.)
  359.  
  360. buf55-99 = available for user commands
  361. buf50-54 = used for temporary purposes in commands
  362. buf49 = search string
  363. buf48 = replace string
  364. buf47 = copied hilite
  365. buf46 = copied invert
  366. buf45 = holds scratch deletes for Undo, keypad-0
  367. buf44 = make-command buffer
  368. buf43 = document names
  369. buf42 = holds Help, if loaded
  370. buf41 = used in buffer swapping command, ctl-w
  371. buf40 = used for AmigaDOS commands
  372. buf39 = used for result of AmigaDOS commands (if result selected)
  373. buf38 = most recent directory name, if "Directory" has been selected
  374. buf37 = copied columnar data
  375.  
  376. ---------------------------------------------------------------------------
  377. Load and show help file - press again to release help
  378. <normal-help:  if (not isEmpty(buf42)) {
  379.                    getBufNum(n54)
  380.                    if (eqNum(n54,42)) freeBuf(buf42)
  381.                    else editBuf(buf42)
  382.                } else {
  383.                   if (insertFile(buf42,sFile,"S:Help!")) {
  384.                                editBuf(buf42)
  385.                                flipFlag(buf42,readOnly)
  386.                   } else putMsg("Couldn't find S:Help! file.")
  387.                } >
  388.  
  389.  
  390.         %% NEW:  ShowFlags CL fct has been ELIMINATED.
  391.  
  392. Show current values of line-length, lines/page, tab-table #, colors, etc
  393. <shft-help:     freeBuf(buf54)
  394.                 insertRgn(buf54,atCursor,
  395. "Serial number   :
  396. Buffer          :
  397. Changed         :
  398. Size            :
  399. Max files       :
  400. Split size      :
  401. Idle timer      :
  402. Colors          :
  403. Cmd Mult        :
  404. End-of-line     :
  405. Line length     :
  406. Lines/page      :
  407. Top margin      :
  408. Bottom margin   :
  409. Tab table       :
  410. Printer select  :
  411. Speak mode      :
  412. Speak speed     :
  413. Speak pitch     :
  414. Search wildcard :
  415. Search eitherOr :
  416.  
  417. ",all)
  418.         moveCursor(buf54,sFile)
  419.         moveCursor(buf54,eLine)
  420.         getSerialNum(n54)
  421.         toWord(buf54,n54)
  422.  
  423.         moveCursor(buf54,eline)
  424.         getBufNum(n4)
  425.         toWord(buf54,n4)
  426.  
  427.         moveCursor(buf54,eline)
  428.         if (getFlag(curFile,changed)) insertChar(buf54,"Y")
  429.         else insertChar(buf54,"n")
  430.  
  431.         moveCursor(buf54,eline)
  432.         fileSize(curFile,n54)
  433.         toWord(buf54,n54)
  434.  
  435.         moveCursor(buf54,eline)
  436.         getMaxFiles(n54)
  437.         toWord(buf54,n54)
  438.  
  439.         moveCursor(buf54,eline)
  440.         toWord(buf54,splitSize)
  441.  
  442.         moveCursor(buf54,eline)
  443.         toWord(buf54,idleTime)
  444.  
  445.         moveCursor(buf54,eline)
  446.         getWBColors(n0,n1,n2,n3)
  447.         toWord(buf54,n0)
  448.         toWord(buf54,n1)
  449.         toWord(buf54,n2)
  450.         toWord(buf54,n3)
  451.  
  452.         moveCursor(buf54,eline)
  453.         toWord(buf54,cmdMultiplier)
  454.  
  455.         moveCursor(buf54,eline)
  456.         copyChar(buf54,n54)
  457.         toWord(buf54,n54)
  458.  
  459.         moveCursor(buf54,eLine)
  460.         getLocal(curFile,n54,lineLength)
  461.         toWord(buf54,n54)
  462.  
  463.         moveCursor(buf54,eline)
  464.         getLocal(curFile,n54,pageLines)
  465.         toWord(buf54,n54)
  466.  
  467.         moveCursor(buf54,eline)
  468.         getLocal(curFile,n54,topMargin)
  469.         toWord(buf54,n54)
  470.  
  471.         moveCursor(buf54,eline)
  472.         getLocal(curFile,n54,bottomMargin)
  473.         toWord(buf54,n54)
  474.  
  475.         moveCursor(buf54,eline)
  476.         getLocal(curFile,n54,tabTable)
  477.         toWord(buf54,n54)
  478.  
  479.         moveCursor(buf54,eline)
  480.         toWord(buf54,prefPrint)
  481.  
  482.         moveCursor(buf54,eline)
  483.         insertChar(buf54,speakMode)
  484.  
  485.         moveCursor(buf54,eline)
  486.         toWord(buf54,speakSpeed)
  487.  
  488.         moveCursor(buf54,eline)
  489.         toWord(buf54,speakPitch)
  490.  
  491.         moveCursor(buf54,eline)
  492.         insertChar(buf54,wildCard)
  493.  
  494.         moveCursor(buf54,eline)
  495.         insertChar(buf54,eitherOr)
  496.         equateLoc(buf54,sPage,sFile)
  497.         freeBuf(buf53)
  498.         insertRgn(buf53,sFile,"Settings for Buffer ",all)
  499.         toWord(buf53,n4)
  500.         insertChar(buf54,eLine)
  501.         setFileName(buf54,buf53)
  502.         getBufNum(n53)
  503.         moveCursor(buf54,eFile)
  504.         editBuf(buf54)
  505.         putMsg(" ")
  506.         getKey(n54)
  507.         editBuf(buf[n53])
  508.         freeBuf(buf54)>
  509.  
  510. Rotate 4 Workbench colors in Uedit
  511. <alt-help:     toggle(color) >
  512.  
  513.         %% new
  514. Start this Key-Help mode - press Amiga-ESC to leave this Key-Help mode
  515. <ctl-help: flipFlag(curFile,teachKeys) >
  516.  
  517. Refresh window (or screen in interlace), including title bar
  518. <shftCtl-help:     refreshDisplay >
  519.  
  520.                    %% This now looks up maxfiles
  521. Close file.  If changed, ask "Save changes?"  If no files, ask "Really quit?"
  522. <normal-closeBox:
  523.                 if (getFlag(curfile,changed)) {
  524.                     if (askYesNo("Save changes?"))
  525.                         if (not saveFile(curFile)) return
  526.                 }
  527.                 freeBuf(curFile)
  528.                 if (isEmpty(curFile)) {
  529.                     equateNum(n1,0)
  530.                     getMaxFiles(n2)
  531.                     decNum(n2)
  532.                     do (n0,0,n2) if (not isEmpty(buf[n0])) equatenum(n1,1)
  533.                     if (eqNum(n1,0))
  534.                         if (askYesNo("Really quit?")) quit(0)
  535.                 } >
  536.  
  537. Switch to next document
  538. <normal-gadget1:  toggle(curFile) >
  539. Switch to previous document
  540. <normal-gadget2:  runKey(shft-f1) >
  541. Scroll display down
  542. <normal-gadget3:  while (mouseDown) { vScroll(downLine) updateDisplay } >
  543. Scroll display up
  544. <normal-gadget4:  while (mouseDown) { vScroll(upLine)   updateDisplay } >
  545.  
  546. Scroll up 1 line
  547. <normal-upArrow:     vScroll(upLine) >
  548. Scroll down 1 line
  549. <normal-downArrow:   vScroll(downLine) >
  550. Scroll right 1 char
  551. <normal-leftArrow:   hScroll(eChar) >
  552. Scroll left 1 char
  553. <normal-rightArrow:  hScroll(sChar) >
  554. Scroll up 11 lines
  555. <shft-upArrow:       do (n54,1,11) vScroll(upLine) >
  556. Scroll down 11 lines
  557. <shft-downArrow:     do (n54,1,11) vScroll(downLine) >
  558. Scroll right 10 chars
  559. <shft-leftArrow:     do (n54,1,10) hScroll(eChar) >
  560. Scroll left 10 chars
  561. <shft-rightArrow:    do (n54,1,10) hScroll(sChar) >
  562.  
  563. Scroll to start of page
  564. <alt-upArrow:        vScroll(sPage) >
  565. Scroll to bottom of page
  566. <alt-downArrow:      vScroll(ePage) >
  567. Scroll right 20 chars
  568. <alt-leftArrow:      do (n54,1,20) hScroll(eChar) >
  569. Scroll left 20 chars
  570. <alt-rightArrow:     do (n54,1,20) hScroll(sChar) >
  571.  
  572. Scroll to start of file
  573. <ctl-upArrow:        vScroll(sFile) >
  574. Scroll to end of file
  575. <ctl-downArrow:      vScroll(eFile) >
  576. Scroll to end of line
  577. <ctl-leftArrow:      equateNum(n54,lineLength)
  578.                      do (n53,1,n54) hScroll(eChar) >
  579. Scroll to start of line
  580. <ctl-rightArrow:     while (hScroll(sChar)) nothing >
  581.  
  582. Place cursor or scroll if button held
  583. <normal-buttonDown:
  584.    moveCursor(curFile,mouseLoc)
  585.    updateDisplay
  586.    mouseXY(n0,n1)
  587.    if (getFlag(curFile,lace)) if (gtNum(30,n1)) return
  588.    while (mouseDown) {
  589.         trackMouse
  590.         mouseXY(n2,n3)
  591.         if (gtNum(n3,n1)) vScroll(downLine)
  592.         if (gtNum(n1,n3)) vScroll(upLine)
  593.         updateDisplay
  594.    }
  595. >
  596. Set start of hilite region
  597. <shft-buttonDown:    equateLoc(curFile,sHilite,mouseLoc) refreshDisplay >
  598. Set end of hilite region
  599. <alt-buttonDown:     equateLoc(curFile,eHilite,mouseLoc) refreshDisplay >
  600.  
  601. Load filename that is CTRL-clicked.  ("Directory" selection sets directory.)
  602. <ctl-buttonDown:
  603.    equateLoc(curFile,atCursor,mouseLoc)
  604.    if (not is(curFile,whiteSpace)) {
  605.        while (not is(curFile,whiteSpace))
  606.            { moveCursor(curFile,sChar) if (is(curFile,sFile)) goto label(1) }
  607.        label(1)
  608.        while (is(curFile,whiteSpace)) moveCursor(curFile,eChar)
  609.        equateLoc(curFile,sInvert,atCursor)
  610.        while (not is(curFile,whiteSpace)) {
  611.            moveCursor(curFile,eChar) if (is(curFile,eFile)) goto label(2) }
  612.        label(2)
  613.        equateLoc(curFile,eInvert,atCursor)
  614.        refreshDisplay
  615.        freeBuf(buf54)
  616.        insertRgn(buf54,sFile,buf38,all)
  617.        insertRgn(buf54,eFile,curFile,invert)
  618.        loadFile(buf54)
  619.    } >
  620. Click or drag mouse, put word/phrase into index in buf41.  (Ctl-w to see.)
  621. <shftAlt-buttonDown:
  622.    equateLoc(curFile,atCursor,mouseLoc)
  623.    moveCursor(curFile,eWord)
  624.    equateLoc(curFile,eInvert,atCursor)
  625.    moveCursor(curFile,sWord)
  626.    equateLoc(curFile,sInvert,atCursor)
  627.    refreshDisplay>
  628.  
  629. Click or drag mouse, put word/phrase into index in buf41.  (Ctl-w to see.)
  630. <shftAlt-buttonUp:
  631.    equateLoc(curFile,atCursor,mouseLoc)
  632.    moveCursor(curFile,eWord)
  633.    equateLoc(curFile,eInvert,atCursor)
  634.    if (geLoc(curFile,sInvert,eInvert)) returnFalse
  635.    moveCursor(curFile,sInvert)
  636.    if (is(curFile,upperCase)) equateNum(n0,1)
  637.    else equateNum(n0,0)
  638.    toLower(curFile)
  639.    copyChar(curFile,n54)
  640.    if (eqNum(n0,1)) toUpper(curFile)
  641.    if (isEmpty(buf41)) insertChar(buf41,eLine)
  642.    moveCursor(buf41,sFile)
  643.    equateLoc(buf41,sPage,atCursor)
  644.    label(1)
  645.    if (is(buf41,upperCase)) equateNum(n0,1)
  646.    else equateNum(n0,0)
  647.    toLower(buf41)
  648.    copyChar(buf41,n53)
  649.    if (eqNum(n0,1)) toUpper(buf41)
  650.    if (gtNum(n54,n53)) {
  651.        moveCursor(buf41,downLine)
  652.        if (not is(buf41,eFile)) goto label(1)
  653.    }
  654.    insertRgn(buf41,atCursor,curFile,invert)
  655.    insertChar(buf41,eLine)
  656. >
  657.  
  658. Set start of invert region
  659. <shftCtl-buttonDown: equateLoc(curFile,sInvert,mouseLoc) refreshDisplay >
  660. Set end of invert region
  661. <altCtl-buttonDown:  equateLoc(curFile,eInvert,mouseLoc) refreshDisplay >
  662. Drag mouse and create hilite region
  663. <shftAltCtl-buttonDown:
  664.    equateLoc(curFile,locA,mouseLoc)
  665.    while (trackMouse) nothing
  666.    if (gtLoc(curFile,locA,mouseLoc))
  667.        { equateLoc(curFile,sHilite,mouseLoc) equateLoc(curFile,eHilite,locA) }
  668.    else
  669.        { equateLoc(curFile,eHilite,mouseLoc) equateLoc(curFile,sHilite,locA) }
  670.    refreshDisplay >
  671.  
  672. Switch to next file
  673. <normal-f1:    toggle(curFile) >
  674.  
  675. Switch to previous file
  676. <shft-f1:      getMaxFiles(n53)
  677.                if (geNum(1,n53)) { editBuf(buf0) returnFalse }
  678.                decNum(n53)
  679.                getBufNum(n54)
  680.                while (nothing) {
  681.                    if (gtNum(n54,n53)) equateNum(n54,n53)
  682.                    decNum(n54)
  683.                    if (gtNum(0,n54)) equateNum(n54,n53)
  684.                    if (getFileName(buf54,buf[n54])) {
  685.                        editBuf(buf[n54])
  686.                        returnTrue
  687.                    }
  688.                } >
  689. Load a file
  690. <alt-f1:       putMsg("Input new filename:")
  691.                freeBuf(buf43)
  692.                if (inputString(buf43)) loadFile(buf43) >
  693.  
  694. Open new "Noname" file
  695. <ctl-f1:       newFile >
  696. Insert file at cursor
  697. <shftAlt-f1:   putMsg("Input filename to insert:")
  698.                freeBuf(buf43)
  699.                if (inputString(buf43)) insertFile(curFile,atCursor,buf43) >
  700. Restore current file to original
  701. <shftCtl-f1:   if (not askYesNo("Restore file to original?"))
  702.                           returnFalse
  703.                if (getFileName(buf43,curFile))
  704.                    { freeBuf(curFile) loadFile(buf43) } >
  705.  
  706.         %% new
  707. Set max number of files can load for normal editing (1-100, usually 20)
  708. <altCtl-f1:     putMsg("Input max # documents allowed (1-100)")
  709.                 if (inputNum(n54)) setMaxFiles(n54)>
  710.  
  711. Save file currently in window
  712. <normal-f2: saveFile(curFile) >
  713.  
  714. Save file under different name
  715. <shft-f2:   putMsg("Save file as:")
  716.             freeBuf(buf43)
  717.             if (inputString(buf43)) if (setFileName(curFile,buf43))
  718.                    saveFile(curFile) >
  719.  
  720.         %% use maxfiles
  721. Save all changed files
  722. <alt-f2:    getMaxFiles(n53)
  723.             decNum(n53)
  724.             do(n54,0,n53)
  725.                if (getFlag(buf[n54],changed)) saveFile(buf[n54]) >
  726.  
  727.         %% Used with idle-command
  728. Turn on/off saving changes during idle periods
  729. <ctl-f2:  flipFlag(curFile,userLocalA)>
  730.  
  731. Close current file.  If changed, ask "Save changes?"
  732. <normal-f3: if (not isEmpty(curFile)) if (getFlag(curFile,changed))
  733.               if (askYesNo("Save changes before closing?"))
  734.                 if (not saveFile(curFile)) returnFalse
  735.             freeBuf(curFile) >
  736.  
  737. Save file, if changed, then close it
  738. <shft-f3:   if (getFlag(curFile,changed)) if (not saveFile(curFile))
  739.                                    returnFalse
  740.             freeBuf(curFile) >
  741.  
  742.         %% use maxfiles
  743. Free all non-file buffers.  Erases search string, directory name, etc
  744. <alt-f3:    getMaxFiles(n52)
  745.             do(n54,n52,54) freeBuf(buf[n54]) >
  746.  
  747.         %% use maxfiles
  748. Ask "Save changes?", if any changes, then ask "Really quit?"
  749. <normal-f4: if (not askYesNo("Really quit?")) returnFalse
  750.             equateNum(n53,0)
  751.             getMaxFiles(n52)
  752.             decNum(n52)
  753.             do(n54,0,n52) if (getFlag(buf[n54],changed)) equateNum(n53,1)
  754.             if (eqNum(n53,1)) if (askYesNo("Save changes?")) runKey(shft-f4)
  755.             quit(0) >
  756.  
  757.         %% use maxfiles
  758. Save all changed files automatically, then quit
  759. <shft-f4:   getMaxFiles(n52)
  760.             decNum(n52)
  761.             do (n54,0,n52) if (getFlag(buf[n54],changed))
  762.                                if (not saveFile(buf[n54])) returnFalse
  763.             quit(0) >
  764.  
  765. Quit fast, WITHOUT saving any files!!
  766. <alt-f4:    quit(10) >
  767.  
  768. Swap next 2 commands. (Mouse buttons, menu selections, gadgets, keys.)
  769. <normal-f5:    putMsg("Next 2 function keys will be swapped!")
  770.                if (getKey(n53)) if (getKey(n54)) if (swapKey(n53,n54))
  771.                    { putMsg("Keys were swapped.") return }
  772.                putMsg(" ") >
  773.  
  774. Toggle overstrike typing mode
  775. <shft-f5:          flipFlag(curFile,overstrike) >
  776. Toggle autoindent typing mode
  777. <alt-f5:           flipFlag(curFile,autoIndent) >
  778. Toggle wordwrap typing mode
  779. <ctl-f5:           flipFlag(curFile,wordWrap) >
  780.     %% new
  781. Toggle "changed" status of current buffer
  782. <lAmiga-f5:   flipFlag(curFile,changed) >
  783. Convert file to read-only status
  784. <shftAlt-f5:       flipFlag(curFile,readOnly) >
  785. Toggle speak-messages status
  786. <shftCtl-f5:       flipFlag(curFile,speakMsgs) >
  787. Toggle speak-alerts status
  788. <altCtl-f5:        flipFlag(curFile,speakAlerts) >
  789. Toggle auto-backup mode
  790. <shftAltCtl-f5:    flipFlag(curFile,autoBackup) >
  791.  
  792.  
  793.          WARNING: You can't compile this one with F6, but in startup you can
  794.          put cursor before it and ESC will compile from there forward.
  795.  
  796. Compile command at or following cursor
  797. <normal-f6:    if (not compile) beepDisplay >
  798.  
  799. Select buffer 44 to use for scratch editing or writing commands
  800. <shft-f6:      editBuf(buf44)
  801.        putMsg("Type in command, <anykey: etc>, and press F6 to compile:") >
  802.         %%new
  803. Find out if keys have got commands attached
  804. <lAmiga-f6:  while (getKey(n54)) {
  805.                if (inUse(n54)) putMsg("In use - Amiga-esc to abort")
  806.                else putMsg("Available - Amiga-esc to abort")
  807.              }>
  808.  
  809. Save UE config to disk.  Default is Data! or last name you gave
  810. <alt-f6:
  811.        if (askYesNo("Save data?")) {
  812.            putMsg("Input data filename or ESC:")
  813.            freeBuf(buf54)
  814.            inputString(buf54)
  815.            saveConfig(buf54)
  816.        } >
  817.  
  818. Restore UE config from disk.  Default is Data! or last name you gave
  819. <ctl-f6:
  820.        if (askYesNo("Load data?")) {
  821.            putMsg("Input data filename or ESC:")
  822.            freeBuf(buf54)
  823.            inputString(buf54)
  824.            loadConfig(buf54)
  825.        } >
  826.  
  827. Compile configuration default values at the top of Config! file
  828. <altCtl-f6:     moveCursor(curFile,sFile)
  829.                 if (not compileDefaults) beepDisplay>
  830.  
  831. Input the number of a buffer to edit
  832. <shftAlt-f6:   putMsg("Input number of buffer to edit:")
  833.                if (inputNum(n54)) { editBuf(buf[n54]) vScroll(sFile) } >
  834.  
  835.                 .. %% this now looks up maxfiles
  836. Examine all buffers that aren't empty
  837. <shftCtl-f6:    getMaxFiles(n52)
  838.                 do (n54,n52,54) if (not isEmpty(buf[n54])) {
  839.                    editBuf(buf[n54])
  840.                    vScroll(sFile)
  841.                    updateDisplay
  842.                    putMsg("F1=continue, F2=edit this one, F3=stop:")
  843.                    getKey(n53)
  844.                    if (eqNum(n53,normal-f2)) { putMsg(" ") return }
  845.                    if (eqNum(n53,normal-f3)) goto label(1)
  846.                }
  847.                label(1)
  848.                toggle(curFile)
  849.                putMsg(" ") >
  850.  
  851. Kill next command, including mouse button, menu selection, gadget, key
  852. <shftAltCtl-f6:
  853.                putMsg("Next command-key will be deleted!")
  854.                if (getKey(n54)) if (killKey(n54))
  855.                    { putMsg("Key command was deleted.") return }
  856.                putMsg(" ") >
  857.  
  858. Input search text & search fwd.  (Either-Or="$" and wildcard="?".)
  859. <normal-f7:    freeBuf(buf49) runKey(shft-f7) >
  860.  
  861. Modify existing search text and then search fwd
  862. <shft-f7:      putMsg("Input search string:")
  863.                inputString(buf49)
  864.                runKey(normal-f9) >
  865.  
  866.                 %% use getChar
  867. Input new search wild-card character
  868. <alt-f7:       putMsg("Input new search wild-card char:")
  869.                getChar(wildCard)
  870.                putMsg(" ")>
  871.  
  872.                 %% use getChar
  873. Input new search either-or character
  874. <ctl-f7:       putMsg("Input new search either-or char:")
  875.                getChar(eitherOr)
  876.                putMsg(" ")>
  877.  
  878. Input replace text to use in search-replace
  879. <normal-f8:    freeBuf(buf48) runKey(shft-f8) >
  880.  
  881. Modify existing replace text
  882. <shft-f8:      putMsg("input replace string:") inputString(buf48) >
  883.  
  884. Search forward, mark matched region, put cursor at start of rgn
  885. <normal-f9:  if (eqLoc(curFile,atCursor,eInvert)) moveCursor(curFile,sChar)
  886.              if (search(curFile,sInvert,eInvert,buf49,eChar)) {
  887.                if (thisKey) if (not onScreen(atCursor)) vScroll(atCursor)
  888.                putMsg(" ")
  889.                return
  890.              }
  891.              putMsg("Search failed.")
  892.              equateLoc(curFile,sInvert,eInvert)
  893.              refreshDisplay
  894.              returnFalse >
  895.  
  896. Search backward, mark matched region, put cursor at start of rgn
  897. <shft-f9:    if (search(curFile,sInvert,eInvert,buf49,sChar)) {
  898.                if (thisKey) if (not onScreen(atCursor)) vScroll(atCursor)
  899.                putMsg(" ")
  900.                return
  901.              }
  902.              putMsg("Search failed.")
  903.              equateLoc(curFile,sInvert,eInvert)
  904.              refreshDisplay
  905.              returnFalse >
  906.  
  907. Replace matched region with replace text, then search forward
  908. <normal-f10:   if (eqLoc(curFile,sInvert,eInvert)) returnFalse
  909.                clearRgn(curFile,invert)
  910.                insertRgn(curFile,sInvert,buf48,all)
  911.                runKey(normal-f9) >
  912.  
  913. Replace matched region with replace text, then search backward
  914. <shft-f10:     if (eqLoc(curFile,sInvert,eInvert)) returnFalse
  915.                clearRgn(curFile,invert)
  916.                insertRgn(curFile,sInvert,buf48,all)
  917.                runKey(shft-f9) >
  918.  
  919. Replace and continue forward search-replace until search fails
  920. <alt-f10:      while(runKey(normal-f10)) nothing >
  921.  
  922. Open a space under cursor for typing
  923. <shft-del: insertChar(curFile," ") moveCursor(curFile,sChar)
  924.            if (is(curFile,sLine)) refreshDisplay>
  925.  
  926. Open line for typing below cursor line
  927. <alt-del:  if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  928.            insertChar(curFile,eLine)>
  929.  
  930. Delete line above cursor line
  931. <ctl-del:  equateLoc(curFile,mouseLoc,atCursor)
  932.            if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  933.            if (not is(curFile,sFile)) {
  934.                moveCursor(curFile,upLine)
  935.                runKey(virtual-x) .. %% this runs ctl-d
  936.                moveCursor(curFile,mouseLoc)
  937.            }>
  938.  
  939. Open a space for typing in front of current word
  940. <shft-bs:  if (not is(curFile,sWord)) moveCursor(curFile,sWord)
  941.            runKey(shft-del)>
  942.  
  943. Open line for typing above the current line
  944. <alt-bs:   if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  945.            insertChar(curFile,eLine)  moveCursor(curFile,sChar)>
  946.  
  947. Delete line below cursor line
  948. <ctl-bs:  equateLoc(curFile,mouseLoc,atCursor)
  949.            if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  950.            if (not is(curFile,eFile)) {
  951.                moveCursor(curFile,downLine)
  952.                runKey(virtual-x) .. %% this runs ctl-d
  953.                moveCursor(curFile,mouseLoc)
  954.            }>
  955.  
  956.  
  957. ---------------------------- Keypad Keys   ----------------------------------
  958. Find cursor and center it in window
  959. <normal-kp5:   vScroll(atCursor) >
  960.  
  961. Delete word left, storing it in Undo buffer
  962. <normal-kp7:   if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
  963.                equateLoc(curFile,locB,atCursor)
  964.                moveCursor(curFile,sWord)
  965.                equateLoc(curFile,locA,atCursor)
  966.                insertRgn(buf45,sFile,curFile,loc)
  967.                equateLoc(buf45,sPage,sFile)
  968.                clearRgn(curFile,loc) >
  969.  
  970. Delete word right, storing it in Undo buffer
  971. <normal-kp9:   if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
  972.                equateLoc(curFile,locA,atCursor)
  973.                moveCursor(curFile,eWord)
  974.                equateLoc(curFile,locB,atCursor)
  975.                insertRgn(buf45,eFile,curFile,loc)
  976.                equateLoc(buf45,sPage,sFile)
  977.                clearRgn(curFile,loc) >
  978. Move cursor up 1 line
  979. <normal-kp8:   moveCursor(curFile,upLine) >
  980. Move cursor down 1 line
  981. <normal-kp2:   moveCursor(curFile,downLine) >
  982. Move cursor to start of word
  983. <normal-kp4:   moveCursor(curFile,sWord) >
  984. Move cursor to end of word
  985. <normal-kp6:   moveCursor(curFile,eWord) >
  986.  
  987. Set start of hilite region at cursor
  988. <normal-kp1:   equateLoc(curFile,sHilite,atCursor) refreshDisplay >
  989.  
  990. Set end of hilite region at cursor
  991. <normal-kp3:   equateLoc(curFile,eHilite,atCursor) refreshDisplay >
  992.  
  993. UNDO scratch deletes, inserting scratch delete buffer at cursor
  994. <normal-kp0:   insertRgn(curFile,atCursor,buf45,all) >
  995.  
  996. <virtual-kpDot: if (getFlag(curFile,columnar)) flipFlag(curFile,columnar)>
  997.  
  998. Copy hilite region into buffer
  999. <normal-kpDot: runKey(virtual-kpDot)
  1000.                if (gtLoc(curFile,eHilite,sHilite))
  1001.                    { freeBuf(buf47) insertRgn(buf47,sFile,curFile,hilite)
  1002.                      equateLoc(buf47,sPage,sFile) }
  1003.                else returnFalse >
  1004.  
  1005. Copy hilite region into buffer, then delete hilite region
  1006. <normal-kpMinus:    runKey(virtual-kpDot)
  1007.                     if (runKey(normal-kpDot)) clearRgn(curFile,hilite) >
  1008.  
  1009. Insert copied hilite at cursor
  1010. <normal-kpEnter:   runKey(virtual-kpDot)
  1011.                    if (is(curFile,sFile)) {
  1012.                         equateLoc(curFile,sHilite,atCursor)
  1013.                         equateLoc(curFile,eHilite,sHilite)
  1014.                    } else {
  1015.                         equateLoc(curFile,sHilite,atCursor)
  1016.                         decLoc(curFile,sHilite)
  1017.                         equateLoc(curFile,eHilite,atCursor)
  1018.                    }
  1019.                    insertRgn(curFile,atCursor,buf47,all)
  1020.                    if (eqLoc(curFile,atCursor,sHilite))
  1021.                             equateLoc(curFile,sHilite,sFile)
  1022.                    else incLoc(curFile,sHilite)
  1023.                    if (getFlag(curFile,columnar)) flipFlag(curFile,columnar)
  1024.                    if (not onScreen(atCursor)) vScroll(atCursor) >
  1025.  
  1026. Find cursor and center it in window
  1027. <shft-kp5:     vScroll(atCursor) >
  1028.  
  1029. Delete char to left of cursor, storing it in Undo buffer
  1030. <shft-kp7:     if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
  1031.                equateLoc(curFile,locB,atCursor)
  1032.                moveCursor(curFile,sChar)
  1033.                equateLoc(curFile,locA,atCursor)
  1034.                insertRgn(buf45,sFile,curFile,loc)
  1035.                equateLoc(buf45,sPage,sFile)
  1036.                clearRgn(curFile,loc) >
  1037.  
  1038. Delete char under cursor, storing it in Undo buffer
  1039. <shft-kp9:     if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
  1040.                equateLoc(curFile,locA,atCursor)
  1041.                moveCursor(curFile,eChar)
  1042.                equateLoc(curFile,locB,atCursor)
  1043.                insertRgn(buf45,eFile,curFile,loc)
  1044.                equateLoc(buf45,sPage,sFile)
  1045.                clearRgn(curFile,loc) >
  1046. Move cursor up one line
  1047. <shft-kp8:     moveCursor(curFile,upLine) >
  1048. Move cursor down one line
  1049. <shft-kp2:     moveCursor(curFile,downLine) >
  1050. Move cursor left 1 char
  1051. <shft-kp4:     moveCursor(curFile,sChar) >
  1052. Move cursor right 1 char
  1053. <shft-kp6:     moveCursor(curFile,eChar) >
  1054. Set start of hilite region at cursor
  1055. <shft-kp1:     runKey(normal-kp1) >
  1056. Set end of hilite region at cursor
  1057. <shft-kp3:     runKey(normal-kp3) >
  1058. UNDO scratch deletes, inserting scratch delete buffer at cursor
  1059. <shft-kp0:     runKey(normal-kp0) >
  1060. Copy hilite region into buffer
  1061. <shft-kpDot:   runKey(normal-kpDot) >
  1062. Copy hilite region into buffer, then delete hilite region
  1063. <shft-kpMinus: runKey(normal-kpMinus) >
  1064. Insert copied hilite region at cursor
  1065. <shft-kpEnter: runKey(normal-kpEnter) >
  1066.  
  1067. Find cursor and center it in window
  1068. <alt-kp5: vScroll(atCursor) >
  1069. Delete to start of line, storing it in Undo buffer
  1070. <alt-kp7:      if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
  1071.                if (is(curFile,sLine)) runKey(shft-kp7)
  1072.                else {
  1073.                    equateLoc(curFile,locB,atCursor)
  1074.                    moveCursor(curFile,sLine)
  1075.                    equateLoc(curFile,locA,atCursor)
  1076.                    insertRgn(buf45,sFile,curFile,loc)
  1077.                    equateLoc(buf45,sPage,sFile)
  1078.                    clearRgn(curFile,loc)
  1079.                } >
  1080. Delete to end of line, storing it in Undo buffer
  1081. <alt-kp9:   if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
  1082.             if (is(curFile,eLine)) runKey(shft-kp9)
  1083.             else {
  1084.                equateLoc(curFile,locA,atCursor)
  1085.                moveCursor(curFile,eLine)
  1086.                equateLoc(curFile,locB,atCursor)
  1087.                insertRgn(buf45,eFile,curFile,loc)
  1088.                equateLoc(buf45,sPage,sFile)
  1089.                clearRgn(curFile,loc)
  1090.             } >
  1091.             %% use sPage
  1092. Move cursor to start of page
  1093. <alt-kp8:   moveCursor(curFile,sPage) vScroll(atCursor)>
  1094.             %% use ePage
  1095. Move cursor to end of page
  1096. <alt-kp2:   moveCursor(curFile,ePage) >
  1097. Move cursor to start of line
  1098. <alt-kp4:   moveCursor(curFile,sLine) >
  1099. Move cursor to end of line
  1100. <alt-kp6:   moveCursor(curFile,eLine) >
  1101. Set start of hilite region at cursor
  1102. <alt-kp1:   runKey(normal-kp1) >
  1103. Set end of hilite region at cursor
  1104. <alt-kp3:   runKey(normal-kp3) >
  1105.  
  1106. UNDO scratch deletes, inserting scratch delete buffer at cursor
  1107. <alt-kp0:     runKey(normal-kp0) >
  1108. Copy hilite region into buffer
  1109. <alt-kpDot:   runKey(normal-kpDot) >
  1110. Copy hilite region into buffer, then delete hilite region
  1111. <alt-kpMinus: runKey(normal-kpMinus) >
  1112. Insert copied hilite region at cursor
  1113. <alt-kpEnter: runKey(normal-kpEnter) >
  1114.  
  1115. Find cursor and center it in window
  1116. <ctl-kp5:      vScroll(atCursor) >
  1117. Delete from cursor to start of page, storing it in Undo buffer
  1118. <ctl-kp7:      if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
  1119.                equateLoc(curFile,locB,atCursor)
  1120.                moveCursor(curFile,sPage)
  1121.                equateLoc(curFile,locA,atCursor)
  1122.                insertRgn(buf45,sFile,curFile,loc)
  1123.                equateLoc(buf45,sPage,sFile)
  1124.                clearRgn(curFile,loc)
  1125.                vScroll(atCursor)
  1126.                updateDisplay >
  1127. Delete from cursor to end of page, storing it in Undo buffer
  1128. <ctl-kp9:      if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
  1129.                equateLoc(curFile,locA,atCursor)
  1130.                moveCursor(curFile,ePage)
  1131.                equateLoc(curFile,locB,atCursor)
  1132.                insertRgn(buf45,eFile,curFile,loc)
  1133.                equateLoc(buf45,sPage,sFile)
  1134.                clearRgn(curFile,loc)
  1135.                updateDisplay >
  1136.  
  1137.             %% use sForm
  1138. Move cursor to start of form
  1139. <ctl-kp8:      moveCursor(curFile,sForm) vScroll(atCursor) >
  1140.             %% use eForm
  1141. Move cursor to end of form
  1142. <ctl-kp2:      moveCursor(curFile,eForm) vScroll(atCursor) >
  1143. Move cursor to start of line
  1144. <ctl-kp4:      moveCursor(curFile,sLine) >
  1145. Move cursor to end of line
  1146. <ctl-kp6:      moveCursor(curFile,eLine) >
  1147. Set start of invert region at cursor
  1148. <ctl-kp1:      equateLoc(curFile,sInvert,atCursor) refreshDisplay >
  1149. Set end of invert region at cursor
  1150. <ctl-kp3:      equateLoc(curFile,eInvert,atCursor) refreshDisplay >
  1151.  
  1152. UNDO scratch deletes, inserting scratch delete buffer at cursor
  1153. <ctl-kp0:      runKey(normal-kp0) >
  1154. Copy invert region into buffer
  1155. <ctl-kpDot:    runKey(virtual-kpDot)
  1156.                if (gtLoc(curFile,eInvert,sInvert))
  1157.                    { freeBuf(buf46) insertRgn(buf46,sFile,curFile,invert)
  1158.                      equateLoc(buf46,sPage,sFile) }
  1159.                else returnFalse >
  1160.  
  1161. Copy invert region into buffer, then delete invert region
  1162. <ctl-kpMinus:  runKey(virtual-kpDot)
  1163.                runKey(ctl-kpDot) clearRgn(curFile,invert) >
  1164.  
  1165. Insert copied invert region at cursor
  1166. <ctl-kpEnter:      runKey(virtual-kpDot)
  1167.                    if (is(curFile,sFile)) {
  1168.                         equateLoc(curFile,sInvert,atCursor)
  1169.                         equateLoc(curFile,eInvert,sInvert)
  1170.                    } else {
  1171.                         equateLoc(curFile,sInvert,atCursor)
  1172.                         decLoc(curFile,sInvert)
  1173.                         equateLoc(curFile,eInvert,atCursor)
  1174.                    }
  1175.                    insertRgn(curFile,atCursor,buf46,all)
  1176.                    if (eqLoc(curFile,atCursor,sInvert))
  1177.                             equateLoc(curFile,sInvert,sFile)
  1178.                    else incLoc(curFile,sInvert)
  1179.                    if (getFlag(curFile,columnar)) flipFlag(curFile,columnar)
  1180.                    if (not onScreen(atCursor)) vScroll(atCursor) >
  1181.  
  1182. ------------------------- miscellaneous keys  -------------------------------
  1183.  
  1184. Set new line-length
  1185. <ctl-return: putMsg("Enter new line-length:")
  1186.              if (inputNum(n54))
  1187.              { setLocal(curFile,lineLength,n54) equateNum(lineLength,n54) } >
  1188.  
  1189.         %% new
  1190. Transparent tab forward
  1191. <shft-tab: moveCursor(curFile,eTab) >
  1192.  
  1193.         %% new
  1194. Transparent tab backward
  1195. <alt-tab:  moveCursor(curFile,sTab) >
  1196.  
  1197.         %% new
  1198. Untab - delete white space back to previous tab column
  1199. <ctl-tab: equateLoc(curFile,locA,atCursor)
  1200.             moveCursor(curFile,sTab)
  1201.             while (nothing) {
  1202.                 if (is(curFile,space)) goto label(1)
  1203.                 if (is(curFile,9))  goto label(1)  .. a TAB
  1204.                 return
  1205.                 label(1)
  1206.                 clearChar(curFile)
  1207.                 if (eqLoc(curFile,atCursor,locA)) return
  1208.             }>
  1209.          %% new
  1210. Switch to/from using spaces for tabs or using real tabs
  1211. <altCtl-tab: flipFlag(curFile,trueTabs)>
  1212.  
  1213.          %% new
  1214. Show tab ruler above cursor line
  1215. <shftAlt-tab:  seeRuler>
  1216.  
  1217.          %% new
  1218. Set tab ruler using mouse or keys
  1219. <shftCtl-tab:
  1220.     putMsg(
  1221.     "Use mouse click/drag, Tab, Space, BS, Del (anykey=quit,lAmi-Esc=abort)")
  1222.     setRuler putMsg(" ") >
  1223.  
  1224.      %% these are new - slow!  Make thousands of column calculations
  1225. Convert tabs in document to spaces
  1226. <lAmiga-t: equateLoc(curFile,locA,atCursor)
  1227.             moveCursor(curFile,sFile)
  1228.             putMsg("TABs to spaces...busy")
  1229.             while (not is(curFile,eFile)) {
  1230.                 if (is(curFile,9)) {                     .. a TAB
  1231.                     swapChar(curFile,32)                   .. a space
  1232.                     moveCursor(curFile,eChar)
  1233.                     while (not is(curFile,tabColumn))
  1234.                         insertChar(curFile,32)                  .. a space
  1235.                 } else moveCursor(curFile,eChar)
  1236.             }
  1237.             equateLoc(curFile,atCursor,locA)
  1238.             putMsg(" ")>
  1239.         %% new
  1240. Convert spaces in document to TABs
  1241. <rAmiga-t: equateLoc(curFile,locA,atCursor)          .. store cursor loc
  1242.             moveCursor(curFile,sFile)
  1243.             putMsg("Spaces to tabs...busy")
  1244.             while (not is(curFile,eFile)) {
  1245.                 equateNum(n0,0)
  1246.                 if (is(curFile,space)) {                  .. a space
  1247.                     equateLoc(curFile,sInvert,atCursor)
  1248.                     moveCursor(curFile,eChar)
  1249.                     incNum(n0)
  1250.                     while (nothing) {
  1251.                         if (is(curFile,space)) goto label(3)    .. a space
  1252.                         if (is(curFile,9)) goto label(3)    .. a TAB
  1253.                         goto label(1)
  1254.                         label(3)
  1255.                         if (is(curFile,tabColumn)) goto label(1)
  1256.                         moveCursor(curFile,eChar)
  1257.                         incNum(n0)
  1258.                     }
  1259.                     label(1)
  1260.                     if (gtNum(n0,1)) if (is(curFile,tabColumn)) {
  1261.                         equateLoc(curFile,eInvert,atCursor)
  1262.                         moveCursor(curFile,sInvert)
  1263.                         swapChar(curFile,9)    .. a TAB
  1264.                         moveCursor(curFile,eChar)
  1265.                         while (not eqLoc(curFile,eInvert,atCursor))
  1266.                             clearChar(curFile)
  1267.                     } else moveCursor(curFile,eChar)
  1268.                 } else moveCursor(curFile,eChar)
  1269.             }
  1270.             putMsg(" ")
  1271.             moveCursor(curFile,locA) >
  1272.  
  1273.          %% new
  1274. Set TAB table number (0-4) to use for TAB spacing
  1275. <shftAltCtl-tab:
  1276.            putMsg("Enter new tab table # (0-4):")
  1277.            if (inputNum(n54)) if (geNum(n54,0)) if (gtNum(4,n54))
  1278.              { setLocal(curFile,tabTable,n54) equateNum(tabTable,n54) } >
  1279.  
  1280.                 %% NEW ===== split window commands
  1281. Erase current split window
  1282. <lAmiga-0:    splitWindow(curFile,0)>
  1283. Split window to show current file
  1284. <lAmiga-c:  splitWindow(curFile,splitSize)>
  1285. Split window to show Undo buffer
  1286. <lAmiga-1:    splitWindow(buf45,splitSize)>
  1287. Split window to show search buffer
  1288. <lAmiga-2:    splitWindow(buf49,splitSize)>
  1289. Split window to show replace buffer
  1290. <lAmiga-3:    splitWindow(buf48,splitSize)>
  1291. Split window to show copied-hilite buffer
  1292. <lAmiga-4:    splitWindow(buf47,splitSize)>
  1293. Split window to show copied-invert buffer
  1294. <lAmiga-5:    splitWindow(buf46,splitSize)>
  1295. Split window to show copied-columnar buffer
  1296. <lAmiga-6:    splitWindow(buf37,splitSize)>
  1297. Split window to show current directory name
  1298. <lAmiga-7:    splitWindow(buf38,splitSize)>
  1299. Set split window size
  1300. <lAmiga-8: putMsg("# lines in split window (2 or more):")
  1301.            if (inputNum(n54)) if (geNum(n54,2)) equateNum(splitSize,n54)
  1302.            putMsg(" ")>
  1303. Switch to next window split
  1304. <lAmiga-9: toggle(windowSplit)>
  1305.  
  1306. Toggle "busies" setting - when turned on, it shows buffers being worked on
  1307. <ctl-b:  flipFlag(curFile,busies) >
  1308.  
  1309. Trim spaces between the next two words after cursor
  1310. <alt-c:  while (not is(curFile,space))
  1311.            { moveCursor(curFile,eChar) if (is(curFile,eFile)) returnTrue }
  1312.          moveCursor(curFile,eChar)
  1313.          while (is(curFile,space)) clearChar(curFile) >
  1314.  
  1315. Let next character typed be a CTRL-character, such as formfeed, etc
  1316. <ctl-c:  putMsg("Input a control character:") inputctlChar >
  1317.  
  1318. Count number of times the next command is successfully executed
  1319. <shftAlt-c:    equateNum(n54,0)
  1320.                putMsg("Input command to execute & count:")
  1321.                if (getKey(n53)) {
  1322.                    while (runKey(n53)) incNum(n54)
  1323.                    freeBuf(buf54)
  1324.                    insertRgn(buf54,sFile,"Times executed = ",all)
  1325.                    toWord(buf54,n54)
  1326.                    putMsg(buf54)
  1327.                } >
  1328.  
  1329. Delay the amount of time (tenths of seconds) stored using shftAlt-d
  1330. <alt-d:    delay(n46) >
  1331.         %% run virtual-x
  1332. Delete cursor line, storing it in Undo buffer.  (See keypad-0/7/9.)
  1333. <ctl-d:   runKey(virtual-x)
  1334. >
  1335.     %% protect line delete from swaps
  1336. <virtual-x:
  1337.         if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
  1338.            equateLoc(curFile,locB,atCursor)
  1339.            if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  1340.            if (not eqLoc(curFile,locB,atCursor)) {
  1341.                equateLoc(curFile,locA,atCursor)
  1342.                insertRgn(buf45,sFile,curFile,loc)
  1343.                clearRgn(curFile,loc)
  1344.            } else equateLoc(curFile,locA,atCursor)
  1345.            if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1346.            moveCursor(curFile,eChar)
  1347.            equateLoc(curFile,locB,atCursor)
  1348.            insertRgn(buf45,eFile,curFile,loc)
  1349.            equateLoc(buf45,sPage,sFile)
  1350.            clearRgn(curFile,loc) >
  1351.  
  1352. Set the delay variable to some value in tenths of seconds
  1353. <shftAlt-d: putMsg("Input # tenths of seconds (used in delays)")
  1354.             inputNum(n46) >
  1355.  
  1356. Change end-of-line character
  1357. <alt-e:    putMsg("Input new end-of-line value (usually 10 or 13):")
  1358.            inputNum(n54)
  1359.            setEol(n54)
  1360.            refreshDisplay >
  1361.  
  1362. Change current document's end-of-line character
  1363. <ctl-e:
  1364.        putMsg("Input file's current end-of-line value (usually 10 or 13):")
  1365.            inputNum(n54)
  1366.            if (not gtNum(n54,0)) returnFalse
  1367.            putMsg("Input new end-of-line value (usually 10 or 13):")
  1368.            inputNum(n53)
  1369.            if (not gtNum(n53,0)) returnFalse
  1370.            setEol(n54)
  1371.            moveCursor(curFile,sFile)
  1372.            putMsg("Changing eol characters ... hit Amiga-ESC to abort.")
  1373.            while (moveCursor(curFile,eLine))
  1374.                if (is(curFile,n54)) swapChar(curFile,n53)
  1375.            setEol(n53)
  1376.            vScroll(sFile)
  1377.            putMsg(" ")
  1378.            refreshDisplay >
  1379.                                  %%new
  1380. Input the number of buffer to free
  1381. <alt-f:    putMsg("Input buffer # to free:")
  1382.            if (inputNum(n54)) freeBuf(buf[n54]) >
  1383.  
  1384. Flip upper/lower case of char under cursor
  1385. <ctl-f:    if (is(curFile,alpha)) {
  1386.                if (is(curFile,lowerCase)) toUpper(curFile)
  1387.                else toLower(curFile)
  1388.            }
  1389.            moveCursor(curFile,eChar) >
  1390.  
  1391. Toggle the mark-gadgets setting.  When "off", the gadget names don't show
  1392. <ctl-g:    flipFlag(curFile,markGadgets) >
  1393.  
  1394. Input a new lines/page value
  1395. <alt-g:    putMsg("Enter new lines/page:")
  1396.            inputNum(n54)
  1397.            if (gtNum(n54,0))
  1398.            { setLocal(curFile,pageLines,n54) equateNum(pageLines,n54) } >
  1399.  
  1400. Uncolor the hilite region
  1401. <alt-h:    equateLoc(curFile,sHilite,eHilite) refreshDisplay >
  1402.  
  1403. Erase hilite region.  No Copy is made!
  1404. <ctl-h:    clearRgn(curFile,hilite) >
  1405.  
  1406. Uncolor the invert region
  1407. <alt-i:    equateLoc(curFile,sInvert,eInvert) refreshDisplay >
  1408.  
  1409. Erase the invert region.  No Copy is made!
  1410. <ctl-i:    clearRgn(curFile,invert) >
  1411.  
  1412. Scan index buffer, build an index.  (See shftAlt-buttonDown/buttonUp.)
  1413. <shftAlt-i:
  1414.    if (isEmpty(buf41)) returnFalse
  1415.    runKey(alt-g)
  1416.    freeBuf(buf54)
  1417.    label(1)
  1418.    moveCursor(buf41,sFile)
  1419.    while (is(buf41,whiteSpace)) clearChar(buf41)
  1420.    if (is(buf41,eFile)) {
  1421.        swapBuf(buf54,buf41)
  1422.        freeBuf(buf54)
  1423.        setFileName(buf41,"Index")
  1424.        equateLoc(buf41,sPage,sFile)
  1425.        equateLoc(buf41,atCursor,sFile)
  1426.        putMsg("Press ctl-w to see Index")
  1427.        return
  1428.    }
  1429.    freeBuf(buf49)
  1430.    insertRgn(buf49,sFile,buf41,line)
  1431.    clearRgn(buf41,line)
  1432.    putMsg(buf49)
  1433.    moveCursor(buf54,eFile)
  1434.    insertRgn(buf54,eFile,buf49,all)
  1435.    insertRgn(buf54,eFile,"  ",all)
  1436.    insertChar(buf54,eLine)
  1437.    moveCursor(buf54,sChar)
  1438.    equateNum(n53,0)
  1439.    moveCursor(curFile,sFile)
  1440.    label(2)
  1441.    while (search(curFile,sInvert,eInvert,buf49,eChar)) {
  1442.        moveCursor(curFile,sChar)
  1443.        if (is(curFile,alpha)) {
  1444.            label(3)
  1445.            moveCursor(curFile,eInvert)
  1446.            goto label(2)
  1447.        }
  1448.        if (is(curFile,digit)) goto label(3)
  1449.        moveCursor(curFile,eInvert)
  1450.        if (is(curFile,alpha)) goto label(2)
  1451.        if (is(curFile,digit)) goto label(2)
  1452.        locToLine(curFile,n54,atCursor)
  1453.        div(n54,n54,pageLines)
  1454.        incNum(n54)
  1455.        if (not eqNum(n54,n53)) {
  1456.            if (not eqNum(n53,0)) insertChar(buf54,",")
  1457.            toWord(buf54,n54)
  1458.            equateNum(n53,n54)
  1459.        }
  1460.    }
  1461.    goto label(1)
  1462. >
  1463. Toggle the "make icons" flag.  When "on", Workbench icons are created
  1464. <altCtl-i:   flipFlag(curFile,icons)>
  1465.  
  1466.                 %% new
  1467. Enter idle-timer value (seconds) after which idle command executed
  1468. <shftAltCtl-i:  putMsg("Input idle time (seconds)")
  1469.                 if (inputNum(n54)) equateNum(idleTime,n54)>
  1470.  
  1471. Toggle the right-justify typing mode
  1472. <alt-j:    flipFlag(curFile,rightJustify) >
  1473.     %% use insertChar
  1474. Join next line to cursor line
  1475. <ctl-j:    if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1476.            equateLoc(curFile,locA,atCursor)
  1477.            label(1)
  1478.            moveCursor(curFile,eChar)
  1479.            if (is(curFile,space)) goto label(1)
  1480.            if (is(curFile,9)) goto label(1)  .. a TAB
  1481.            equateLoc(curFile,locB,atCursor)
  1482.            clearRgn(curFile,loc)
  1483.            insertChar(curFile," ") >
  1484.  
  1485. Move the hilite to the left by one character (space or tab)
  1486. <alt-l:    moveCursor(curFile,sHilite)
  1487.            if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  1488.            label(1)
  1489.            if (is(curFile,whiteSpace)) clearChar(curFile)
  1490.            if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1491.            moveCursor(curFile,eChar)
  1492.            if (gtLoc(curFile,eHilite,atCursor)) goto label(1) >
  1493.  
  1494. Convert the character under the cursor to lower case and move cursor fwd
  1495. <ctl-l:    toLower(curFile) moveCursor(curFile,eChar) >
  1496.  
  1497. Set bottom margin
  1498. <lAmiga-l:    putMsg("Input bottom margin lines (0-200):")
  1499.             if (inputNum(n54)) equateNum(bottomMargin,n54)
  1500.             setLocal(curFile,bottomMargin,bottomMargin)>
  1501.  
  1502. Set command multiplier to use for next command
  1503. <ctl-m:    putMsg("Input command multiplier:") inputNum(cmdMultiplier) >
  1504.  
  1505. Swap the mouse's button-Up operation with the next key-command pressed
  1506. <alt-m:        putMsg("Will swap mouse buttonUp with your next input:")
  1507.                if (getKey(n53)) if (swapKey(n53,normal-buttonUp))
  1508.                    { putMsg("Swapped - to undo, do it again") return }
  1509.                putMsg(" ") >
  1510.  
  1511. Map illegal ASCII (0 thru 5) characters into safe ones.  (See top of Config!)
  1512. <shftAlt-m:  flipFlag(curFile,mapChars)>
  1513.  
  1514. Rename the document in the window
  1515. <alt-n:    putMsg("Input new filename:")
  1516.            getFileName(buf43,curFile)
  1517.            if (inputString(buf43))
  1518.            setFileName(curFile,buf43) >
  1519.  
  1520. Input a text line number to go to
  1521. <ctl-n:    putMsg("Input line number:")
  1522.            if (inputNum(n54))
  1523.                { lineToLoc(curFile,atCursor,n54) vScroll(atCursor) } >
  1524.  
  1525. Open the cursor line for typing
  1526. <ctl-o:    insertChar(curFile,eLine) moveCursor(curFile,sChar) >
  1527.  
  1528. Print the hilite region.  (See alt-p.)
  1529. <ctl-p:    print(curFile,hilite) >
  1530.  
  1531. Switch between printing thru parallel port and through Amiga Preferences
  1532. <alt-p:    putMsg("Printer select: 0=par: 1=ser: 2=prt: 3=prt: (raw)")
  1533.            if (inputNum(n54)) 
  1534.                    if (geNum(n54,0)) 
  1535.                     if (gtNum(4,n54)) equateNum(prefPrint,n54)
  1536.            putMsg(" ") >
  1537.  
  1538. Print entire document
  1539. <altCtl-p: print(curFile,all)>
  1540.  
  1541. Stop the current print
  1542. <lAmiga-a:  abortPrint abort>
  1543.  
  1544. Stop all prints that are stored up
  1545. <rAmiga-a:  while (abortPrint) nothing
  1546.             abort >
  1547.  
  1548. Restart current print
  1549. <lAmiga-s: restartPrint>
  1550.  
  1551. Move the hilite region to the right by one space
  1552. <alt-r:    moveCursor(curFile,sHilite)
  1553.            if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  1554.            label(1)
  1555.            if (gtLoc(curFile,eHilite,atCursor)) {
  1556.                insertChar(curFile,32)
  1557.                if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1558.                moveCursor(curFile,eChar)
  1559.                goto label(1)
  1560.            } >
  1561. Terminate Learn Mode or run whatever is stored in learn-buffer.  (See ctl-s.)
  1562. <ctl-r:    runLearn >
  1563.  
  1564. Speak the hilite region, a line at a time
  1565. <alt-s:    if (gtLoc(curFile,eHilite,sHilite)) {
  1566.                equateLoc(curFile,locA,atCursor)
  1567.                equateLoc(curFile,sInvert,sHilite)
  1568.                equateLoc(curFile,atCursor,sHilite)
  1569.                while (gtLoc(curFile,eHilite,sInvert)) {
  1570.                    if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1571.                    moveCursor(curFile,eChar)
  1572.                    if (gtLoc(curFile,atCursor,eHilite))
  1573.                         equateLoc(curFile,eInvert,eHilite)
  1574.                    else equateLoc(curFile,eInvert,atCursor)
  1575.                    if (gtLoc(curFile,eInvert,sInvert)) {
  1576.                        freeBuf(buf50)
  1577.                        insertRgn(buf50,sFile,curFile,invert)
  1578.                        speak(buf50)
  1579.                    }
  1580.                    equateLoc(curFile,sInvert,atCursor)
  1581.                }
  1582.                equateLoc(curFile,atCursor,locA)
  1583.            } >
  1584.  
  1585. Start/abort Learn Mode.  (Use ctl-r to finish & to run it.)
  1586. <ctl-s:    if (not getFlag(curFile,learnMode)) putMsg("LEARN MODE ACTIVE!")
  1587.            else putMsg("Learn Mode cancelled.")
  1588.            flipFlag(curFile,learnMode) >
  1589.  
  1590.     %% new
  1591. Show key-help message on next key pressed.  Copy key-help to RAM: on first
  1592. <ctl-t:    putMsg("Input a key, gadget, click etc to get Help msg")
  1593.                 getKey(n54)
  1594.                 teachOne(n54)>
  1595.  
  1596. Toggle between using printable keys for commands or for normal typing input
  1597. <alt-u: flipFlag(curFile,useKeys)>
  1598.  
  1599. Load UStar config
  1600. <virtual-u:  loadConfig("S:UStarData!")>
  1601.  
  1602. Convert char under cursor to upper case
  1603. <ctl-u:    toUpper(curFile) moveCursor(curFile,eChar) >
  1604.  
  1605. Set top margin
  1606. <lAmiga-u:    putMsg("Input top margin lines (0-200):")
  1607.             if (inputNum(n54)) equateNum(topMargin,n54)
  1608.             setLocal(curFile,topMargin,topMargin)>
  1609.  
  1610. Switch flag that makes CTRL chars vis/invis
  1611. <ctl-v:    flipFlag(curFile,spooks) refreshDisplay >
  1612.  
  1613. Swap the current document in window with buffer 41
  1614. <ctl-w:    swapBuf(curFile,buf41) >
  1615.  
  1616.        %% new
  1617. Swap current buffer to buffer 0 (the "home" buffer of Uedit)
  1618. <alt-w: swapBuf(buf0,curFile) editBuf(buf0)>
  1619.  
  1620. For programmers:  Toggle number under cursor between hex/decimal
  1621. <ctl-x:    hexDecimal(curFile) >
  1622.  
  1623. Execute an AmigaDOS command, but don't collect the results
  1624. <ctl-y:    putMsg("Enter AmigaDOS command")
  1625.            freeBuf(buf40)
  1626.            if (inputString(buf40)) execute(" ",buf40) >
  1627.  
  1628. Execute an AmigaDOS command and show the results
  1629. <ctl-z:    putMsg("Enter AmigaDOS command")
  1630.            freeBuf(buf40)
  1631.            if (not inputString(buf40)) returnFalse
  1632.            freeBuf(buf39)
  1633.            if (not execute(buf39,buf40)) returnFalse
  1634.            if (not isEmpty(buf39))
  1635.                { putMsg("Result of AmigaDOS command:")
  1636.                flipFlag(buf39,changed)
  1637.                editBuf(buf39)
  1638.                vscroll(sFile)
  1639.                } else
  1640.                { putMsg("No message from AmigaDOS.") freeBuf(buf39) } >
  1641.  
  1642. Get directory listing. (Also sets directoryname used in ctl-buttonDown.)
  1643. <alt-z:    putMsg("Enter directory: ")
  1644.            freeBuf(buf38)
  1645.            inputString(buf38)
  1646.            freeBuf(buf54)
  1647.            insertRgn(buf54,eFile,"Dir ",all)
  1648.            insertRgn(buf54,eFile,buf38,all)
  1649.            if (not execute(buf39,buf54)) returnFalse
  1650.            moveCursor(buf38,eFile)
  1651.            moveCursor(buf38,sChar)
  1652.            if (not isEmpty(buf38)) if (not is(buf38,":"))
  1653.                      insertRgn(buf38,eFile,"/",all)
  1654.            insertRgn(buf39,sFile,"
  1655. ",all)
  1656.            insertRgn(buf39,sFile,buf38,all)
  1657.            newFile
  1658.            swapBuf(buf39,curFile)
  1659.            freeBuf(buf39)
  1660.            vScroll(sFile)
  1661.            putMsg("To load files, ctrl-click names with mouse.")
  1662.            setFileName(curFile,buf54)
  1663.            flipFlag(curFile,changed) >
  1664.  
  1665. Change the current working directory
  1666. <altCtl-z:  putMsg("Change current directory to (won't work in Workbench):")
  1667.             freeBuf(buf54)
  1668.             if (inputString(buf54)) changeDir(buf54)>
  1669.  
  1670. %% alt-0 and alt-7 REMOVED
  1671.  
  1672.         %% store loc
  1673. Clear leading white space in cursor line
  1674. <alt-1:   equateLoc(curFile,locA,atCursor)
  1675.           if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  1676.           while (is(curFile,whiteSpace)) {
  1677.                 if (is(curFile,eLine)) goto label(1)
  1678.                 if (is(curFile,12)) goto label(1) .. formfeed
  1679.                    clearChar(curFile)
  1680.           }
  1681.           label(1)
  1682.           equateLoc(curFile,atCursor,locA) >
  1683.  
  1684. Center text in the line.  (Uses current line length.)
  1685. <alt-2:    
  1686.            runKey(alt-1) .. clear leading white space
  1687.            if (is(curFile,blankLine)) returnFalse
  1688.            if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1689.            locToCol(curFile,n53,atCursor)
  1690.            equateNum(n54,lineLength)
  1691.            incNum(n54)
  1692.            if (gtNum(n54,n53)) {
  1693.                moveCursor(curFile,sLine)
  1694.                sub(n53,n54,n53)
  1695.                div(n53,n53,2)
  1696.                do (n54,2,n53) insertChar(curFile," ")
  1697.            } >
  1698.  
  1699.         %% use typeChar
  1700. Match indent of cursor line to previous line
  1701. <alt-4:        equateNum(n54,0)
  1702.             if (not getFlag(curFile,autoIndent)) {
  1703.                 flipFlag(curFile,autoIndent)
  1704.                 equateNum(n54,1)
  1705.             }
  1706.             if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1707.             clearChar(curFile)
  1708.             typeChar(eLine)
  1709.             if (eqNum(n54,1)) flipFlag(curFile,autoIndent) >
  1710.  
  1711.             %% use locToCol etc
  1712. Right-align the cursor line from cursor rightward
  1713. <alt-5:    runKey(alt-6)
  1714.            locToCol(curFile,n45,atCursor)
  1715.            equateLoc(curFile,locA,atCursor)
  1716.            moveCursor(curFile,eLine)
  1717.            locToCol(curFile,n54,atCursor)
  1718.            moveCursor(curFile,locA)
  1719.            sub(n54,lineLength,n54)
  1720.            if (gtNum(n54,0)) {
  1721.                 while (decNum(n54)) insertChar(curFile," ")
  1722.            } else if (gtNum(0,n54)) {
  1723.                 while (incNum(n54)) if (is(curFile,space)) clearChar(curFile)
  1724.            }>
  1725.  
  1726.         %% use locToCol
  1727. Store the cursor line's length in number variable n45
  1728. <alt-6:        equateLoc(curFile,locA,atCursor)
  1729.             if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1730.             locToCol(curFile,n45,atCursor)
  1731.             equateLoc(curFile,atCursor,locA) >
  1732.  
  1733. %% alt-7 REMOVED
  1734.  
  1735. Show the value of a number variable
  1736. <alt-8:    putMsg("n-variable #: ")
  1737.            inputNum(n54)
  1738.            freeBuf(buf54)
  1739.            insertChar(buf54,"n")
  1740.            toWord(buf54,n54)
  1741.            insertRgn(buf54,eFile," is ",all)
  1742.            toWord(buf54,n[n54])
  1743.            putMsg(buf54) >
  1744.  
  1745. Set the value of a number variable
  1746. <alt-9:    putMsg("Set n-variable #:")
  1747.            inputNum(n54)
  1748.            putMsg("To value:")
  1749.            inputNum(n[n54])>
  1750.  
  1751. Show the ASCII value of the character under the cursor
  1752. <ctl-/:    copyChar(curFile,n54)
  1753.            freeBuf(buf54)
  1754.            toWord(buf54,n54)
  1755.            insertRgn(buf54,sFile,"Character value under cursor was ",all)
  1756.            putMsg(buf54)
  1757.            moveCursor(curFile,eChar) >
  1758.  
  1759. Show the current document size
  1760. <ctl-1:    fileSize(curFile,n54)
  1761.            freeBuf(buf54)
  1762.            insertRgn(buf54,sFile,"File size in bytes: ",all)
  1763.            toWord(buf54,n54)
  1764.            putMsg(buf54)>
  1765.  
  1766. Switch displaying of cursor row-column off/on
  1767. <ctl-2:    flipFlag(curFile,rowCol) >
  1768.  
  1769. Reformat cursor paragraph, starting at cursor line
  1770. <ctl-3:    if (reformat) moveCursor(curFile,downLine) >
  1771.  
  1772.             %% check for tabs
  1773. Delete all trailing white-space in current document
  1774. <ctl-4:    equateLoc(curFile,locA,atCursor)
  1775.            moveCursor(curFile,sFile)
  1776.            label(1)
  1777.            if (is(curFile,eFile))
  1778.                { equateLoc(curFile,atCursor,locA) return }
  1779.            moveCursor(curFile,eLine)
  1780.            moveCursor(curFile,sChar)
  1781.            label(2)
  1782.            if (is(curFile,space))
  1783.                { clearChar(curFile) moveCursor(curFile,sChar) goto label(2)}
  1784.            if (is(curFile,9))       ..  a TAB
  1785.                { clearChar(curFile) moveCursor(curFile,sChar) goto label(2)}
  1786.            moveCursor(curFile,eLine)
  1787.            goto label(1) >
  1788.  
  1789. Save a learn-sequence to disk, saving it under a number 1 to 2 billion
  1790. <ctl-5:    putMsg("Save Learn under what #?")
  1791.            if (inputNum(n54)) saveLearn(n54) >
  1792.  
  1793. Load a learn-sequence stored on disk
  1794. <ctl-6:    putMsg("Load what Learn #?")
  1795.            if (inputNum(n54)) loadLearn(n54) >
  1796.  
  1797. Load and run learn-sequence stored on disk
  1798. <ctl-7:    putMsg("Input learn # to load & run:")
  1799.            if (inputNum(n54)) if (loadLearn(n54)) runLearn >
  1800.  
  1801. Toggle case-sensitivity of search
  1802. <ctl-8:    flipFlag(curFile,searchCaps) >
  1803.  
  1804. ---------------------------  arithmetic commands  --------------------
  1805.  
  1806. Set running arithmetic total to zero
  1807. <ctl-0:     equateNum(n49,0) >
  1808.  
  1809. Type the running arithmetic total into text at cursor
  1810. <ctl-\:     freeBuf(buf54)
  1811.             div(n52,n49,100)
  1812.             if (gtNum(0,n49)) if (eqNum(n52,0)) insertChar(buf54,"-")
  1813.             toWord(buf54,n52)
  1814.             insertChar(buf54,".")
  1815.             if (gtNum(0,n49)) mul(n52,n49,-1)
  1816.             else equateNum(n52,n49)
  1817.             mod(n52,n52,100)
  1818.             if (gtNum(10,n52)) insertChar(buf54,"0")
  1819.             toWord(buf54,n52)
  1820.             insertRgn(curFile,atCursor,buf54,all)
  1821.             insertRgn(buf54,sFile,"Inserted total into text ",all)
  1822.             putMsg(buf54) >
  1823.  
  1824. Add the next word (if a number) to arithmetic total & display total
  1825. <ctl-=:     if (not is(curFile,digit)) returnFalse
  1826.             moveCursor(curFile,eWord)
  1827.             moveCursor(curFile,sWord)
  1828.             toNumber(n54,curFile)
  1829.             moveCursor(curFile,eWord)
  1830.             if (is(curFile,".")) {
  1831.                moveCursor(curFile,eChar)
  1832.                if (not is(curFile,digit)) goto label(1)
  1833.                toNumber(n53,curFile)
  1834.                moveCursor(curFile,eChar)
  1835.                if (not is(curFile,digit)) {
  1836.                    mul(n53,n53,10)
  1837.                    moveCursor(curFile,sChar)
  1838.                }
  1839.                moveCursor(curFile,eWord)
  1840.             } else { label(1) equateNum(n53,0) }
  1841.             mul(n54,n54,100)
  1842.             if (gtNum(0,n54)) mul(n52,n53,-1)
  1843.             else equateNum(n52,n53)
  1844.             add(n54,n54,n52)
  1845.             add(n49,n49,n54)
  1846.             freeBuf(buf54)
  1847.             div(n52,n49,100)
  1848.             if (gtNum(0,n49)) if (eqNum(n52,0)) insertChar(buf54,"-")
  1849.             toWord(buf54,n52)
  1850.             insertChar(buf54,".")
  1851.             mod(n52,n49,100)
  1852.             if (gtNum(0,n49)) mul(n52,-1,n52)
  1853.             if (gtNum(10,n52)) insertChar(buf54,"0")
  1854.             toWord(buf54,n52)
  1855.             insertRgn(buf54,sFile,"Running total is ",all)
  1856.             putMsg(buf54) >
  1857.  
  1858. Subtract the next word (if a number) from arithmetic total & display total
  1859. <ctl--:     if (not is(curFile,digit)) returnFalse
  1860.             moveCursor(curFile,eWord)
  1861.             moveCursor(curFile,sWord)
  1862.             toNumber(n54,curFile)
  1863.             moveCursor(curFile,eWord)
  1864.             if (is(curFile,".")) {
  1865.                moveCursor(curFile,eChar)
  1866.                if (not is(curFile,digit)) goto label(1)
  1867.                toNumber(n53,curFile)
  1868.                moveCursor(curFile,eChar)
  1869.                if (not is(curFile,digit)) {
  1870.                    mul(n53,n53,10)
  1871.                    moveCursor(curFile,sChar)
  1872.                }
  1873.                moveCursor(curFile,eWord)
  1874.             } else { label(1) equateNum(n53,0) }
  1875.             mul(n54,n54,100)
  1876.             if (gtNum(0,n54)) mul(n52,n53,-1)
  1877.             else equateNum(n52,n53)
  1878.             add(n54,n54,n52)
  1879.             sub(n49,n49,n54)
  1880.             freeBuf(buf54)
  1881.             div(n52,n49,100)
  1882.             if (gtNum(0,n49)) if (eqNum(n52,0)) insertChar(buf54,"-")
  1883.             if (gtNum(0,n49)) insertChar(buf54,"-")
  1884.             toWord(buf54,n52)
  1885.             insertChar(buf54,".")
  1886.             mod(n52,n49,100)
  1887.             if (gtNum(0,n52)) mul(n52,n52,-1)
  1888.             if (gtNum(10,n52)) insertChar(buf54,"0")
  1889.             toWord(buf54,n52)
  1890.             insertRgn(buf54,sFile,"Running total is ",all)
  1891.             putMsg(buf54) >
  1892.  
  1893. ------------------ These are for columnar data -------------------------
  1894.  
  1895. <virtual-`: if (not getFlag(curFile,columnar)) flipFlag(curFile,columnar)>
  1896.  
  1897. Toggle between columnar display and regular hilite/invert display mode
  1898. <shftCtl-`: flipFlag(curFile,columnar) refreshDisplay>
  1899.  
  1900. Copy and then clear the hilited columnar data
  1901. <shftCtl-1: freeBuf(buf37)
  1902.             runKey(virtual-`)
  1903.             copyColData(buf37,sFile,curFile,hilite,1)
  1904.             clearColData(curFile,hilite,0) >
  1905.  
  1906. Space-fill the hilited columnar data, overlaying the original text.  No copy
  1907. <shftCtl-2: runKey(virtual-`)
  1908.             clearColData(curFile,hilite,1) >
  1909.  
  1910. Copy the hilited columnar data into a buffer
  1911. <shftCtl-3: runKey(virtual-`)
  1912.             if (geLoc(curFile,sHilite,eHilite)) returnFalse
  1913.             freeBuf(buf37) copyColData(buf37,sFile,curFile,hilite,1)>
  1914.  
  1915. Insert copied columnar data at the cursor
  1916. <shftCtl-4: runKey(virtual-`)
  1917.             copyColData(curFile,atCursor,buf37,all,1)>
  1918.  
  1919. Overlay copied columnar data onto existing text at the cursor
  1920. <shftCtl-5: runKey(virtual-`)
  1921.             copyColData(curFile,atCursor,buf37,all,0)>
  1922.  
  1923. Insert the columnar hilite region at the cursor.  (No intermediate copy.)
  1924. <shftCtl-6: runKey(virtual-`)
  1925.             copyColData(curFile,atCursor,curFile,hilite,1)>
  1926.  
  1927. Overlay the columnar hilite region onto existing text at the cursor
  1928. <shftCtl-7: runKey(virtual-`)
  1929.             copyColData(curFile,atCursor,curFile,hilite,0)>
  1930.  
  1931. ----------------- Interlace Mode -------------------------
  1932.  
  1933. Switch to/from interlace display mode
  1934. <shft-esc: flipFlag(curFile,lace)>
  1935.  
  1936. Tune the RGB colors in interlace using mouse.  (See alt-Help also.)
  1937. <alt-esc:  laceColor>
  1938.  
  1939. Assign a name to one of the 4 gadgets (1-4)
  1940. <ctl-esc:  putMsg("Enter gadget number (1-4):")
  1941.            if (not inputNum(n54)) returnFalse
  1942.            if (gtNum(n54,4)) returnFalse
  1943.            if (gtNum(1,n54)) returnFalse
  1944.            putMsg("Enter gadget name (one Space to clear):")
  1945.            freeBuf(buf54)
  1946.            inputString(buf54)
  1947.            if (not isEmpty(buf54)) {
  1948.                gadgetName(n54,buf54)
  1949.                putMsg(" ")
  1950.            } >
  1951.  
  1952. This is Uedit's "About..." shareware message
  1953. <shftAltCtl-a:
  1954.    getBufNum(n54)
  1955.    freeBuf(buf54)
  1956.    insertRgn(buf54,sFile,
  1957. "
  1958.  
  1959.                   :               Uedit                :
  1960.                   : Copyright (C) 1986-87, Rick Stiles :
  1961.                   :           P.O. Box  666            :
  1962.                   :        Washington, IN 47501        :
  1963.  
  1964. Uedit is SHAREWARE.  Feel free to copy and distribute the Shareware (only)
  1965. version to friends and associates, club members, and bulletin boards.
  1966.  
  1967. Try it and see how you like it.
  1968.  
  1969. If you use Uedit, you must buy it.  (See Uedit-Policy.)
  1970.  
  1971. In return, you will get the Non-Shareware version which allows you to compile
  1972. new commands and can be fully customized to suit your needs or match your
  1973. favorite editor or word processor.  You'll get the latest the Shareware Uedit
  1974. which you can distribute freely, many Extras to use with Uedit, and the full
  1975. documentation.  Plus you will earn $15 commissions for getting others to use
  1976. and buy Uedit.
  1977. ",all) equateLoc(buf54,sPage,sFile)
  1978.    moveCursor(buf54,eFile)
  1979.    do (n52,1,35) insertChar(buf54,eLine)
  1980.    moveCursor(buf54,sFile)
  1981.    do (n52,1,5) moveCursor(buf54,eLine)
  1982.    equateLoc(buf54,eHilite,atCursor)
  1983.    do (n52,1,3) moveCursor(buf54,upLine)
  1984.    do (n52,1,38) moveCursor(buf54,sChar)
  1985.    equateLoc(buf54,sHilite,atCursor)
  1986.    moveCursor(buf54,eFile)
  1987.    if (getFlag(curFile,columnar)) equateNum(n51,0)
  1988.    else { flipFlag(curFile,columnar) equateNum(n51,1) }
  1989.    editBuf(buf54)
  1990.    vScroll(sFile)
  1991.    setFileName(buf54,"         About Uedit...")
  1992.    putMsg("  ")
  1993.    getKey(n53)
  1994.    editBuf(buf[n54])
  1995.    putMsg(" ")
  1996.    if (eqNum(n51,1)) flipFlag(curFile,columnar)
  1997.    freeBuf(buf54)
  1998. >
  1999.  
  2000. ======== PRINTER CMDS ========
  2001.  
  2002.     %% mostly new
  2003.     
  2004. <virtual-p:  freebuf(buf54)
  2005.              putMsg(" ")
  2006.              insertRgn(buf54,sFile,
  2007. "Press lAmiga-p and then one of the letter keys below.  For boldface,
  2008. italics, etc, the cursor-word is bracketed with printer codes:
  2009.  
  2010. i = italics
  2011. u = underline
  2012. b = boldface
  2013. c = condensed
  2014. e = elite
  2015. l = enlarged
  2016. s = shadow
  2017. d = double strike
  2018. n = NLQ
  2019. x = superscript
  2020. y = subscript
  2021. 6 = 6 lines/inch
  2022. 8 = 8 lines/inch
  2023.     Other code keys:
  2024.     rAmiga-g = find next printer code in document
  2025.     lAmiga-g = input a printer code # (0-75.  See table in documentation.)
  2026. \"Print select\" must be 2 or 3 for these codes to control your printer. 
  2027. Select \"Show vals\" to see what print-select is.  Select your printer in
  2028. Preferences.
  2029.  
  2030. ",all)
  2031.         flipFlag(buf54,readOnly)
  2032.         getBufNum(n53)
  2033.         editBuf(buf54)
  2034.         vScroll(sFile)
  2035.         updateDisplay
  2036.         getKey(n54)
  2037.         editBuf(buf[n53])
  2038.         freeBuf(buf54) >
  2039.  
  2040. Get a key and reduce it to lower case.
  2041. <virtual-g:    putMsg("Enter prtr code (b c d e i l n s u x y 6 8 h=help):")
  2042.             if (getKey(n54)) { mod(n54,n54,104)    putMsg(" ") returnTrue }
  2043.             putMsg(" ")
  2044.             returnFalse >
  2045.  
  2046. Bracket a word with printer codes using n54
  2047. <virtual-c:    if (not is(curFile,sWord)) moveCursor(curFile,sWord)
  2048.             printerCode(curFile,n53,0,0)
  2049.             incNum(n53)
  2050.             moveCursor(curFile,eWord)
  2051.             printerCode(curFile,n53,0,0) >
  2052.  
  2053. Printer codes:  Next letter key brackets word for boldface, italics etc.
  2054. <lAmiga-p:
  2055.         if (runKey(virtual-g)) {
  2056.             if (eqNum(n54,normal-6)) printerCode(curFile,56,0,0)
  2057.             else if (eqNum(n54,normal-8)) printerCode(curFile,55,0,0)
  2058.             else if (eqNum(n54,normal-h)) runKey(virtual-p)
  2059.             else {
  2060.                 equateNum(n53,-1)
  2061.                 if (eqNum(n54,normal-i)) equateNum(n53,6)
  2062.                 if (eqNum(n54,normal-u)) equateNum(n53,8)
  2063.                 if (eqNum(n54,normal-b)) equateNum(n53,10)
  2064.                 if (eqNum(n54,normal-e)) equateNum(n53,15)
  2065.                 if (eqNum(n54,normal-c)) equateNum(n53,17)
  2066.                 if (eqNum(n54,normal-l)) equateNum(n53,19)
  2067.                 if (eqNum(n54,normal-s)) equateNum(n53,21)
  2068.                 if (eqNum(n54,normal-d)) equateNum(n53,23)
  2069.                 if (eqNum(n54,normal-n)) equateNum(n53,25)
  2070.                 if (eqNum(n54,normal-x)) equateNum(n53,27)
  2071.                 if (eqNum(n54,normal-y)) equateNum(n53,29)
  2072.                 if (eqNum(n53,-1)) returnFalse
  2073.                 runKey(virtual-c)
  2074.             } 
  2075.         } >
  2076.  
  2077. Find next printer code (can delete it with ctl-h)
  2078. <rAmiga-g:  freeBuf(buf54)
  2079.             insertChar(buf54,"")
  2080.             insertChar(buf54,"?")
  2081.             insertChar(buf54,"")
  2082.             insertChar(buf54,"$")
  2083.             insertChar(buf54,"")
  2084.             insertChar(buf54,"?")
  2085.             insertChar(buf54,"?")
  2086.             insertChar(buf54,"")
  2087.             if (search(curFile,sInvert,eInvert,buf54,eChar))
  2088.             putMsg("Press ctl-i to delete the code") >
  2089.  
  2090. Insert printer code.  (See printer code table for meaning of numbers 0-75.)
  2091. <lAmiga-g:    putMsg("Enter printer code (0-75, see printer-codes):")
  2092.                 equateNum(n53,0)
  2093.                 equateNum(n52,0)
  2094.                 if (inputNum(n54)) {
  2095.                     if (geNum(n54,0)) if (geNum(75,n54)) {
  2096.                         if (eqNum(n54,12)) {
  2097.                             putMsg("Enter foreground color (30-39)")
  2098.                             goto label(2) }
  2099.                         if (eqNum(n54,13)) {
  2100.                             putMsg("Enter background color (40-49)")
  2101.                             goto label(2) }
  2102.                         if (eqNum(n54,48)) returnFalse
  2103.                         if (eqNum(n54,57)) {
  2104.                             putMsg("Enter form length")
  2105.                             goto label(2) }
  2106.                         if (eqNum(n54,58)) returnFalse .. perf skip n
  2107.                         if (eqNum(n54,64)) returnFalse .. t&b margins
  2108.                         if (eqNum(n54,65)) returnFalse .. l&r margins
  2109.                         if (eqNum(n54,75)) returnFalse .. extended cmd
  2110.                         goto label(1)
  2111. label(2)
  2112.                         if (not inputNum(n53)) return
  2113. label(1)
  2114.                         printerCode(curFile,n54,53,52)
  2115.                     }
  2116.                 }>
  2117.  
  2118. ======== PAGING CMDS ======
  2119.  
  2120.         %% mostly new
  2121.  
  2122. Erase next page number
  2123. <lAmiga-y:
  2124.     if (not is(curFile,eForm)) movecursor(curFile,eForm)
  2125.     if (is(curFile,12)) return
  2126.     if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  2127.     if (is(curFile,12)) runKey(alt-kp7)
  2128. >
  2129.  
  2130.             %% use gotoPage()
  2131. Input page number to go to
  2132. <alt-3: putMsg("Go to page #:")
  2133.         if (inputNum(n3)) gotoPage(curFile,n3) >
  2134.  
  2135. Insert a formfeed character
  2136. <lAmiga-f:     insertChar(curFile,12) >
  2137.  
  2138. Go to top of page
  2139. <lAmiga-h:     moveCursor(curFile,sForm) >
  2140.  
  2141. Go to end of page
  2142. <lAmiga-b:     moveCursor(curFile,eForm) >
  2143.  
  2144. Insert page-division at cursor
  2145. <lAmiga-v: 
  2146.     equateNum(n0,1)
  2147.     if (is(curFile,blankLine)) equateNum(n0,2)
  2148.     if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  2149.     getPageRowCol(n50,n51,n52)
  2150.     getLocal(curFile,n53,bottomMargin)
  2151.     getLocal(curFile,n49,pageLines)
  2152.     div(n53,n53,2)
  2153.     add(n51,n51,n53)
  2154.     while (gtNum(n49,n51)) { incNum(n51) insertChar(curFile,eLine) }
  2155.     getLocal(curFile,n49,lineLength)
  2156.     div(n49,n49,2)
  2157.     while (gtNum(n49,0)) { insertChar(curFile," ") decNum(n49) }
  2158.     toWord(curFile,n50)
  2159.     insertChar(curFile,12)
  2160.     getLocal(curFile,n54,topMargin)
  2161.     while (gtNum(n54,0)) { decNum(n54) insertChar(curFile,eLine) }
  2162. >
  2163.  
  2164. Delete next page-division
  2165. <lAmiga-d:
  2166.     label(1)
  2167.     if (not is(curFile,sForm)) moveCursor(curFile,sForm)
  2168.     if (not is(curFile,eForm)) moveCursor(curFile,eForm)
  2169.     if (not is(curFile,eLine)) moveCursor(curFile,eline)
  2170.      if (not is(curFile,12)) {
  2171.         moveCursor(curFile,eChar)
  2172.         if (not is(curFile,eFile)) goto label(1)
  2173.         returnFalse
  2174.     }
  2175.     if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  2176.     getPageRowCol(n49,n50,n51)
  2177.     getLocal(curFile,n54,topMargin)
  2178.     getLocal(curFile,n53,bottomMargin)
  2179.     equateLoc(curFile,locA,atCursor)        .. start of ff line
  2180.     moveCursor(curFile,downLine)
  2181.     while (gtNum(n54,0)) { .. del tm lines
  2182.         if (not is(curFile,blankLine)) goto label(2)
  2183.         decNum(n54)
  2184.         moveCursor(curFile,downLine)
  2185.     }
  2186.     label(2)
  2187.     equateLoc(curFile,locB,atCursor)
  2188.     equateLoc(curFile,atCursor,locA)
  2189.     moveCursor(curFile,upLine)
  2190.     while (gtNum(n50,0)) {
  2191.         decNum(n50)
  2192.         if (not is(curFile,blankLine)) {
  2193.             moveCursor(curFile,downLine)
  2194.             goto label(3)
  2195.         }
  2196.         moveCursor(curFile,upLine)
  2197.     }
  2198.     label(3)
  2199.     equateLoc(curFile,locA,atCursor)
  2200.     clearRgn(curFile,loc)
  2201. >
  2202.  
  2203. Auto-insert page-divisions and page-numbers in document
  2204. <lAmiga-r:
  2205.         putMsg("Scanning")
  2206.         equateLoc(curFile,locA,atCursor)
  2207.         freeBuf(buf54)
  2208.         insertChar(buf54,12)
  2209.         if (search(curFile,sInvert,eInvert,buf54,eChar)) {
  2210.             putMsg("Delete old paging divisions first using lAmiga-d")
  2211.             returnFalse
  2212.         }
  2213.         putMsg(" ")
  2214.         equateLoc(curFile,atCursor,locA)
  2215.         if (not is(curFile,sForm)) moveCursor(curFile,sForm)
  2216.         while (nothing) {
  2217.             moveCursor(curFile,eForm)
  2218.             getLocal(curFile,n53,bottomMargin)
  2219.             getPageRowCol(n50,n51,n52)
  2220.             getLocal(curFile,n52,pageLines)
  2221.             if (gtNum(n52,n51)) {
  2222.                 sub(n55,n52,n51)        .. page lines - real line
  2223.                 while (gtNum(n52,n51)) {
  2224.                     insertChar(curFile,eLine)
  2225.                     incNum(n51)
  2226.                 }
  2227.                 do (n54,1,n53)  moveCursor(curFile,upLine)
  2228.                 runKey(lAmiga-v)
  2229.                 moveCursor(curFile,eFile)
  2230.                 while (not is(curFile,sFile)) {
  2231.                     moveCursor(curFile,sChar)
  2232.                     if (is(curFile,12)) { moveCursor(curFile,eFile) return }
  2233.                     clearChar(curFile)
  2234.                 }
  2235.                 return
  2236.             }
  2237.             do (n54,1,n53)  moveCursor(curFile,upLine)
  2238.             runKey(lAmiga-v)
  2239.             moveCursor(curFile,downLine)
  2240.             updateDisplay
  2241.         }
  2242. >
  2243.  
  2244. =========
  2245.  
  2246.         %% New.  Uses userlocalA in a menu entry & command up above
  2247. Save changed files during idle periods, if their idle-save flag is set
  2248. <idle:  getMaxFiles(n52)
  2249.         decNum(n52)
  2250.         do (n54,0,n52)
  2251.             if (not inputWaiting)
  2252.                 if (getflag(buf[n54],changed))
  2253.                     if (getflag(buf[n54],userLocalA)) saveFile(buf[n54]) >
  2254.  
  2255. -------------------------- end of Config! ----------------------------------
  2256.  
  2257.