home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 2: PC
/
frozenfish_august_1995.bin
/
bbs
/
d07xx
/
d0770.lha
/
Uedit
/
KenPerano.LZH
/
Config!E
< prev
next >
Wrap
Text File
|
1989-03-29
|
7KB
|
230 lines
======= Extra Commands =======
Process all INCLUDE files
<shftAltCtl-f1: .. K. Perano
moveCursor(curFile,eFile) .. reverse search allows for include at sFile
setSearch("include")
while (search(curFile,locA,locB,-1)) {
moveCursor(curFile,locA)
moveCursor(curFile,eWord)
while (is(curFile,space)) moveCursor(curFile,eChar)
equateLoc(curFile,locA,atCursor) .. start of possible file name.
while (nothing) {
if ( is(curFile,whiteSpace)) goto label(1) .. break
if ( is(curFile,eFile)) goto label(1) .. break
moveCursor(curFile,eChar)
}
label(1)
equateLoc(curFile,locB,atCursor) .. end of possible file name.
freeBuf(buf45)
insertRgn(buf45,sFile,curFile,loc)
if (not is(curFile,eline)) moveCursor(curFile,eline)
equateLoc(curFile,locB,atCursor) .. end of include line
moveCursor(curFile,sline)
equateLoc(curFile,locA,atCursor) .. beginning of include line
if (moveCursor(curFile,sChar)) { .. delete include line if found file
if (insertFile(curFile,locA,buf45)) clearRgn(curFile,loc)
}
else { .. "include" keyword at sFile case
if (insertFile(curFile,locA,buf45)) clearRgn(curFile,loc)
moveCursor(curFile,sFile)
}
} >
Mark cursor location with a unique ASCII marker
<alt-.: insertRgn(curFile,atCursor,"<cursor>",char) > .. K. Perano
Find and remove marker
<alt-/: .. K. Perano
setSearch("<cursor>")
if (search(curFile,locA,locB,1))
clearRgn(curFile,loc)
else if (search(curFile,locA,locB,-1))
clearRgn(curFile,loc)
else
putMsg("Not found")
setSearch(buf49) >
Change case of Hilite region
<shftctl-f: .. K. Perano
locToIndex(curFile,n2,sHilite)
locToIndex(curFile,n3,eHilite)
decNum(n3)
if (geNum(n3,n2)) {
moveCursor(curFile,sHilite)
do (n1,n2,n3) {
if (is(curFile,upperCase)) toLower(curFile)
else toUpper(curFile)
moveCursor(curFile,eChar)
}
refreshDisplay
}>
Copy Hilite region to file
<altCtl-f: .. K. Perano
if (gtLoc(curFile,eHilite,sHilite)) {
if (getFlag(curFile,columnar)) flipFlag(curFile,columnar)
freeBuf(buf47) insertRgn(buf47,sFile,curFile,hilite)
equateLoc(buf47,sPage,sFile)
putMsg("Save Hilite as file:")
freeBuf(buf43)
if (inputString(buf43))
if (setFileName(buf47,buf43)) {
saveFile(buf47)
setFileName(buf47,"Copied Hilite")
}
}
else returnFalse >
Convert Hilite region to lower case
<shftctl-l: .. K. Perano
locToIndex(curFile,n2,sHilite)
locToIndex(curFile,n3,eHilite)
decNum(n3)
if (geNum(n3,n2)) {
moveCursor(curFile,sHilite)
do (n1,n2,n3) {
toLower(curFile)
moveCursor(curFile,eChar)
}
refreshDisplay
}>
Transpose previous two characters
<alt-t: .. K. Perano
moveCursor(curFile,sChar)
copyChar(curFile,n2)
moveCursor(curFile,sChar)
copyChar(curFile,n1)
swapChar(curFile,n2)
moveCursor(curFile,eChar)
swapChar(curFile,n1)
moveCursor(curFile,eChar) >
Convert Hilite region to upper case
<shftctl-u: .. K. Perano
locToIndex(curFile,n2,sHilite)
locToIndex(curFile,n3,eHilite)
decNum(n3)
if (geNum(n3,n2)) {
moveCursor(curFile,sHilite)
do (n1,n2,n3) {
toUpper(curFile)
moveCursor(curFile,eChar)
}
refreshDisplay
}>
Copy all lines containing "string" to "buffer"
<altCtl-w: .. K. Perano
equateNum(n1,curFile)
putMsg("Save in buffer:")
freeBuf(buf43)
if (inputString(buf43)) {
newFile
setFileName(curFile,buf43)
equateNum(n2,curFile)
editBuf(buf[n1])
}
else
returnFalse
putMsg("Input search string:")
freeBuf(buf49)
if (inputString(buf49)) {
moveCursor(curFile,sFile)
setSearch(buf49)
while (search(curFile,locA,locB,1)) {
if (not is(curFile,sline)) moveCursor(curFile,sline)
insertRgn(buf[n2],eFile,curFile,line)
insertChar(buf[n2],eLine)
moveCursor(curFile,downLine)
}
}
else
returnFalse >
Show current search string
<shftAlt-.: putMsg(buf49) > .. K. Perano
Set current search string to hilite.
<shftAlt-,: freeBuf(buf49) .. K. Perano
insertRgn(buf49,sFile,curFile,hilite)
setSearch(buf49)
putMsg(buf49) >
Show current replace string
<shftAltCtl-.: putMsg(buf48) > .. K. Perano
Set current replace string to hilite.
<shftAltCtl-,: freeBuf(buf48) .. K. Perano
insertRgn(buf48,sFile,curFile,hilite)
putMsg(buf48) >
Process substitution list
<shftAlt-s: .. K. Perano
equateNum(n1,curFile)
putMsg("Substitution buffer: ") .. get name of substitution buffer
if (inputNum(n2)) {
moveCursor(buf[n2],sFile)
}
else
returnFalse
while (runKey(shftaltCtl-s)) { .. get substitution pair
moveCursor(curFile,sFile)
while (search(curFile,locA,locB,1)) {
clearRgn(curFile,loc)
insertRgn(curFile,locA,buf48,all)
}
} >
<shftaltCtl-s: .. K. Perano
clearRgn(buf48,all)
clearRgn(buf49,all)
editBuf(buf[n2])
if ( not is(curFile,eFile)) {
... find and load search string
while (is(curFile,space)) moveCursor(curFile,eChar)
equateLoc(curFile,locA,atCursor) .. start of search string
while (nothing) {
if ( is(curFile,whiteSpace)) goto label(1) .. break
if ( is(curFile,eFile)) goto label(1) .. break
moveCursor(curFile,eChar)
}
label(1)
equateLoc(curFile,locB,atCursor) .. end of search string
insertRgn(buf49,sFile,curFile,loc)
setSearch(buf49)
... find and load replace string
while (is(curFile,space)) moveCursor(curFile,eChar)
equateLoc(curFile,locA,atCursor) .. start of replace string
while (nothing) {
if ( is(curFile,whiteSpace)) goto label(2) .. break
if ( is(curFile,eFile)) goto label(2) .. break
moveCursor(curFile,eChar)
}
label(2)
equateLoc(curFile,locB,atCursor) .. end of replace string
insertRgn(buf48,sFile,curFile,loc)
.... position cursor at start of next line
if (not is(curFile,eline)) moveCursor(curFile,eline)
moveCursor(curFile,eChar)
editBuf(buf[n1])
returnTrue
}
else {
editBuf(buf[n1])
returnFalse
}
>