home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 289.lha / Uedit_v2.5a / config!m < prev    next >
Encoding:
Text File  |  1989-10-09  |  68.2 KB  |  2,201 lines

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