home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
517b.lha
/
Uedit_v2.6e
/
Config!P
< prev
next >
Wrap
Text File
|
1991-06-09
|
8KB
|
305 lines
======== PRINTER CMDS ========
Print the hilite region. (See alt-p.)
<ctl-p: print(curFile,hilite) >
Select printing port: parallel, serial, Preferences raw or processed.
<alt-p:
putMsg("Printer select: 0=par: 1=ser: 2=prt: 3=prt: (raw)")
getKeyVal(macroNum,inputChar)
sub(n54,inputChar,"0")
if (geNum(n54,0) & gtNum(4,n54)) equateNum(prefPrint,n54)
putMsg(" ") >
Print entire document
<altCtl-p: print(curFile,all)>
Stop the current print
<lAmiga-a: abortPrint abort>
Stop all prints that are stored up
<rAmiga-a:
while (abortPrint) nothing
abort >
Restart current print
<lAmiga-s: restartPrint>
Give printer control code help
<shftAltCtl-p:
freebuf(buf54)
putMsg(" ")
insertRgn(buf54,sFile,
"Press lAmiga-p and then one of the letters below. For boldface, italics,
8 lines/inch, etc, the hilite region is bracketed with printer codes:
i = italics
u = underline
b = boldface
c = condensed
e = elite
l = enlarged
s = shadow
d = double strike
n = NLQ
x = superscript
y = subscript
8 = 8 lines/inch
Other keys:
rAmiga-g = find next printer code in document
lAmiga-g = input a printer code # (0-75. See table in Manual.)
\"Print select\" must be 2 or 3 for these codes to control your printer.
Select \"Show vals\" to see what print-select is. Select your printer in
Preferences.
",all)
flipFlag(buf54,readOnly)
equateNum(n53,curFile)
editBuf(buf54)
vScroll(sFile)
updateDisplay
getKey(n54)
editBuf(buf[n53])
.. updateDisplay
freeBuf(buf54) >
Get a key and reduce it to lower case.
<virtual-g:
putMsg("Enter prtr code (b c d e i l n s u x y 8 h=help):")
if (getKey(n54)) { mod(n54,n54,104) putMsg(" ") returnTrue }
putMsg(" ")
returnFalse >
Bracket the hilite region with printer codes using n54
<virtual-c:
if (geLoc(curFile,sHilite,eHilite)) returnFalse
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,sHilite)
.. the line below appears to be needed in some cases when the
.. code is embedded at start of line. Without it the printer
.. may not receive the code.
if (is(curFile,sLine)) insertChar(curFile,13)
printerCode(curFile,n53,0,0)
incNum(n53)
moveCursor(curFile,eHilite)
printerCode(curFile,n53,0,0)
equateLoc(curFile,eHilite,atCursor)
moveCursor(curFile,locA) >
Printer codes: Next letter key brackets hilite for boldface, italics etc.
<lAmiga-p:
if (runKey(virtual-g)) {
if (eqNum(n54,normal-h)) runKey(shftAltCtl-p)
else {
switch (n54) {
case(normal-8) { equateNum(n53,55) }
case(normal-i) { equateNum(n53,6) }
case(normal-u) { equateNum(n53,8) }
case(normal-b) { equateNum(n53,10) }
case(normal-e) { equateNum(n53,15) }
case(normal-c) { equateNum(n53,17) }
case(normal-l) { equateNum(n53,19) }
case(normal-s) { equateNum(n53,21) }
case(normal-d) { equateNum(n53,23) }
case(normal-n) { equateNum(n53,25) }
case(normal-x) { equateNum(n53,27) }
case(normal-y) { equateNum(n53,29) }
default { returnFalse }
}
runKey(virtual-c)
}
} >
Find next printer code (can delete it with ctl-h)
<rAmiga-g:
freeBuf(buf54)
insertChar(buf54,"")
insertChar(buf54,wildCard)
insertChar(buf54,"")
insertChar(buf54,eitherOr)
insertChar(buf54,"")
insertChar(buf54,wildCard)
insertChar(buf54,wildCard)
insertChar(buf54,"")
setSearch(buf54)
if (search(curFile,sInvert,eInvert,1))
putMsg("Press ctl-i to delete the code") >
Insert printer code. (See printer code table for meaning of numbers 0-75.)
<lAmiga-g:
putMsg("Enter printer code (0-75, see printer-codes):")
equateNum(n53,0)
equateNum(n52,0)
if (inputNum(n54) & geNum(n54,0) & geNum(75,n54)) {
switch(n54) {
case(12) {
putMsg("Enter foreground color (30-39)")
goto label(2) }
case(13) {
putMsg("Enter background color (40-49)")
goto label(2) }
case(48) {
putMsg("Enter proportional offset")
goto label(2) }
case(57) {
putMsg("Enter form length")
goto label(2) }
case(58) {
putMsg("Enter # lines to skip on perforation")
goto label(2) }
case(64) {
putMsg("Top/bottom margins, enter top margin")
}
case(65) {
putMsg("Left/right margins, enter left margin")
}
case(75) {
putMsg("Extended command - enter arg value")
goto label(2) }
default { goto label(1) }
}
label(3)
if (not inputNum(n52)) return
putMsg("Enter next value")
label(2)
if (not inputNum(n53)) return
label(1)
printerCode(curFile,n54,n52,n53)
} >
======== PAGING CMDS ======
Erase next page number
<lAmiga-y:
if (not is(curFile,eForm)) movecursor(curFile,eForm)
if (is(curFile,12)) return
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
if (is(curFile,12)) runKey(alt-kp7)
>
Input page number to go to
<alt-3:
putMsg("Go to page #:")
if (inputNum(n3)) gotoPage(curFile,n3) >
Insert a formfeed character
<lAmiga-f: insertChar(curFile,12) >
Go to top of page
<lAmiga-h: moveCursor(curFile,sForm) >
Go to end of page
<lAmiga-b: moveCursor(curFile,eForm) >
Insert page-division at cursor
<lAmiga-v:
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
getPageRowCol(n50,n51,n52)
getLocal(curFile,n53,bottomMargin)
getLocal(curFile,n49,pageLines)
if (gtNum(2,n49)) {
putMsg("Must set lines/page > 1 first")
returnFalse
}
div(n53,n53,2)
add(n51,n51,n53)
while (gtNum(n49,n51)) { incNum(n51) insertChar(curFile,eLine) }
getLocal(curFile,n49,lineLength)
div(n49,n49,2)
while (gtNum(n49,0)) { insertChar(curFile," ") decNum(n49) }
toWord(curFile,n50)
insertChar(curFile,12)
if (not is(curFile,eFile)) {
getLocal(curFile,n54,topMargin)
while (gtNum(n54,0)) { decNum(n54) insertChar(curFile,eLine) }
}
>
Delete next page-division
<lAmiga-d:
label(1)
if (not is(curFile,sForm)) moveCursor(curFile,sForm)
if (not is(curFile,eForm)) moveCursor(curFile,eForm)
if (not is(curFile,eLine)) moveCursor(curFile,eline)
if (not is(curFile,12)) {
moveCursor(curFile,eChar)
if (not is(curFile,eFile)) goto label(1)
returnFalse
}
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
getPageRowCol(n49,n50,n51)
getLocal(curFile,n54,topMargin)
getLocal(curFile,n53,bottomMargin)
equateLoc(curFile,locA,atCursor) .. start of ff line
moveCursor(curFile,downLine)
while (gtNum(n54,0)) { .. del tm lines
if (not is(curFile,blankLine)) goto label(2)
decNum(n54)
moveCursor(curFile,downLine)
}
label(2)
equateLoc(curFile,locB,atCursor)
equateLoc(curFile,atCursor,locA)
moveCursor(curFile,upLine)
while (gtNum(n50,0)) {
decNum(n50)
if (not is(curFile,blankLine)) {
moveCursor(curFile,downLine)
goto label(3)
}
moveCursor(curFile,upLine)
}
label(3)
equateLoc(curFile,locA,atCursor)
clearRgn(curFile,loc) >
Auto-insert page-divisions and page-numbers in document
<lAmiga-r:
putMsg("Scanning")
equateLoc(curFile,locA,atCursor)
freeBuf(buf54)
insertChar(buf54,12)
setSearch(buf54)
if (search(curFile,sInvert,eInvert,1)) {
putMsg("Delete old paging divisions first using lAmiga-d")
returnFalse
}
putMsg(" ")
equateLoc(curFile,atCursor,locA)
if (not is(curFile,sForm)) moveCursor(curFile,sForm)
while (nothing) {
moveCursor(curFile,eForm)
getLocal(curFile,n53,bottomMargin)
getPageRowCol(n50,n51,n52)
getLocal(curFile,n52,pageLines)
if (gtNum(2,n52)) {
putMsg("Must set lines/page > 1 first")
returnFalse
}
if (gtNum(n52,n51)) { .. last page is short
sub(n55,n52,n51) .. page lines - real line
while (gtNum(n52,n51)) {
insertChar(curFile,eLine)
incNum(n51)
}
do (n54,1,n53) moveCursor(curFile,upLine)
runKey(lAmiga-v)
if (not is(curFile,eFile)) {
moveCursor(curFile,eFile)
runKey(lAmiga-v)
}
return
}
do (n54,1,n53) moveCursor(curFile,upLine)
equateNum(n54,1)
while (is(curFile,blankLine)) {
moveCursor(curFile,downLine)
incNum(n54)
if (geNum(n54,n53)) goto label(1)
}
label(1)
runKey(lAmiga-v)
moveCursor(curFile,downLine)
updateDisplay
} >