home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Elysian Archive
/
AmigaElysianArchive.iso
/
prog
/
c
/
ue2sas10.lha
/
Config!J
next >
Wrap
Text File
|
1993-01-09
|
6KB
|
186 lines
<defines:
define(DOS_RESULT,buf39)
define(DOS_CMD,buf40)
define(ErrWin, buf77) ..my buffers. Change if conflicting
define(YourCmd, buf78)
define(SASon, n77)
define(SrcBuf, n78) ..holds buffer number of current
define(ErrorLine, n79) ..holds line num of current error
define(FIRST_ERR,6)
>
run compiler on source in window
<shftAlt-j:
equateNum(SrcBuf,curFile) ..make note of buffer with source code
freeBuf(DOS_CMD)
freeBuf(DOS_RESULT)
getFileName(DOS_CMD,buf[SrcBuf]) ..put source file and path string in DOS_CMD
if (isEmpty(YourCmd)) { ..if no string then make default
insertRgn(DOS_CMD,sFile,"sc:c/sc ",all)
..equateLoc(YourCmd,eHilite,atCursor)
..moveCursor(YourCmd,sLine)
..equateLoc(YourCmd,sHilite,atCursor)
} else {
insertRgn(DOS_CMD,sFile,YourCmd,all)
}
if (!execute(DOS_RESULT,DOS_CMD)) returnFalse ..if DOS error, end command
if (isEmpty(DOS_RESULT)) {
putMsg("No reply from AmigaDOS.")
return
}
downFlag(DOS_RESULT,changed)
freeBuf(ErrWin)
insertRgn(ErrWin,sFile,"Last error listed",all)
moveCursor(ErrWin,eLine)
insertChar(ErrWin,10) ..put newline at end of line
insertChar(ErrWin,10) ..put newline at end of line
insertChar(ErrWin,10) ..put newline at end of line
if (!lineToLoc(DOS_RESULT,atCursor,FIRST_ERR)) {
splitWindow(DOS_RESULT,6) ..reveal DOS error messages
return
}
freeBuf(ErrWin)
splitWindow(ErrWin,3)
editBuf(ErrWin) ..make small split ready for input
nameBuffer(ErrWin,"Compile errors")
runKey(shftAlt-k)
>
goto next errorline
<shftAlt-k:
setSearch(".c")
if (search(DOS_RESULT,locA,locB,0)) { ..look for "line"
incLoc(DOS_RESULT,locA) ..find line number
incLoc(DOS_RESULT,locA)
incLoc(DOS_RESULT,locA)
moveCursor(DOS_RESULT,locA) ..cursor to line number
toNumber(ErrorLine, DOS_RESULT) ..convert int at cursor and assign to var
equateLoc(DOS_RESULT,sHilite,atCursor) ..mark region for copying
moveCursor(DOS_RESULT,eLine)
equateLoc(DOS_RESULT,eHilite,atCursor)
insertRgn(ErrWin,atCursor,"line ",all)
insertRgn(ErrWin,atCursor,DOS_RESULT,hilite) ..paste error message to window
toggle(windowSplit)
lineToLoc(buf[SrcBuf],atCursor,ErrorLine) ..put cur on error line in source
vScroll(atCursor)
equateLoc(buf[SrcBuf],sInvert,eInvert)
equateLoc(buf[SrcBuf],sInvert,atCursor)
moveCursor(buf[SrcBuf],eline)
equateLoc(buf[SrcBuf],eInvert,atCursor)
refreshDisplay
toggle(windowSplit)
insertChar(ErrWin,10) ..insert linefeed char
insertChar(ErrWin,10) ..insert linefeed char
insertChar(ErrWin,10) ..insert linefeed char
return
}
putMsg("last error listed")
insertRgn(ErrWin,atCursor,"last error listed",all)
insertChar(ErrWin,10) ..insert linefeed char
insertChar(ErrWin,10) ..insert linefeed char
insertChar(ErrWin,10) ..insert linefeed char
>
clean up error window
<shftAlt-l:
freeBuf(ErrWin)
runKey(lAmiga-0) ..drop split window
putMsg("") ..wipe old message out
editBuf(buf[SrcBuf])
equateLoc(buf[SrcBuf],sInvert,eInvert) ..remove inversion from source
refreshDisplay
>
change command sent to DOS
<shftAlt-;:
..swapKey(normal-buttonDown,shftAlt-2)
..swapKey(normal-buttonUp,shftAlt-1)
putMsg("Enter new compile command <default: sc:c/sc>")
freeBuf(YourCmd)
if (!inputString(YourCmd)) {
insertRgn(YourCmd,sFile,"sc:c/sc ",all)
} else {
moveCursor(YourCmd,eLine) ..cursor to line number
insertChar(YourCmd,32) ..put space at end of line
}
..swapKey(normal-buttonUp,shftAlt-1)
..swapKey(normal-buttonDown,shftAlt-2)
equateLoc(YourCmd,eHilite,atCursor)
moveCursor(YourCmd,sLine) ..cursor to line number
equateLoc(YourCmd,sHilite,atCursor) ..mark region for copying
moveCursor(YourCmd,eLine)
>
toggle SAS screen gadgets
<shftAltCtl-j:
if (eqNum(SASon,0)) {
swapKey(normal-gadget1,shftCtl-j) ..swap gadgets to unused keys
swapKey(normal-gadget2,shftCtl-k)
swapKey(normal-gadget3,shftCtl-l)
copyKey(normal-gadget1,shftAlt-j) ..put SAS functions on gadgets
copyKey(normal-gadget2,shftAlt-k)
copyKey(normal-gadget3,shftAlt-l)
gadgetName(1,"compile")
gadgetName(2,"next error")
gadgetName(3,"clean up")
gadgetName(4," ")
equateNum(SASon,1)
} else {
swapKey(normal-gadget1,shftCtl-j) ..restore gadgets
swapKey(normal-gadget2,shftCtl-k)
swapKey(normal-gadget3,shftCtl-l)
gadgetName(1,"<Next File/MARK>")
gadgetName(2,"<Prev File/MARK>")
gadgetName(3,"<Down/SET MARK> ")
gadgetName(4,"<Up/INIT MARKS> ")
equateNum(SASon,0)
}
>
The following definitions have nothing to do with compiling.
These add the capability of loading learn sequences onto
kepad keys, so that they will operate as macro keys.
Using these as a pattern one could load and run learn sequences
on more of the numeric pad's keys.
<shftCtl-kpLParen:
saveLearn("T:uLearn.1")
putMsg("Learn put on kp-(")>
<shftAlt-kpLParen:
if (loadLearn("T:uLearn.1")) runLearn
else putMsg("Not found") >
<shftCtl-kpRParen:
saveLearn("T:uLearn.2")
putMsg("Learn put on kp-)")>
<shftAlt-kpRParen:
if (loadLearn("T:uLearn.2")) runLearn
else putMsg("Not found") >
<shftCtl-kpSlash:
saveLearn("T:uLearn.3")
putMsg("Learn put on kp-/")>
<shftAlt-kpSlash:
if (loadLearn("T:uLearn.3")) runLearn
else putMsg("Not found") >
<shftCtl-kpStar:
saveLearn("T:uLearn.4")
putMsg("Learn put on kp-*")>
<shftAlt-kpStar:
if (loadLearn("T:uLearn.4")) runLearn
else putMsg("Not found") >