home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
KAND
/
CTJUTIL1.ZIP
/
CONTROL.COM
/
CONTROL3.CLA
< prev
next >
Wrap
Text File
|
1988-08-13
|
9KB
|
230 lines
MEMBER('CONTROLS')
UPDATEPRT PROCEDURE(MODE) !ADD, DELETE, CHANGE PROCEDURE
MODE BYTE
PRTENTER SCREEN WINDOW(8,43),AT(13,20),HLP('NEWPRNT'),HUE(6,0,0)
ROW(1,1) STRING('╔═{41}╗')
ROW(2,1) REPEAT(6);STRING('║<0{41}>║') .
ROW(8,1) STRING('╚═{41}╝')
ROW(3,3) STRING('Printer Name:')
COL(17) ENTRY(@S8),USE(PRINTER),HUE(7,0),SEL(31,0),REQ,LFT,UPR
ROW(5,4) STRING('Description:')
COL(17) ENTRY(@S25),USE(DESCRIP),HUE(7,0),SEL(31,0),REQ,LFT,UPR
ROW(7,13) PAUSE('Press F10 to Accept'),USE(?DONE),HUE(17,2)
.
EJECT
DELWIN SCREEN WINDOW(3,59),AT(23,12),HUE(7,0,0)
ROW(1,1) STRING('╔═{57}╗'),HUE(29,0)
ROW(2,1) STRING('║<0{57}>║'),HUE(29,0)
ROW(3,1) STRING('╚═{57}╝'),HUE(29,0)
ROW(2,2) PAUSE('PRESS F10 TO DELETE THIS RECORD OR ANY OTHER KEY TO ABORT')|
USE(?DEL),HUE(14,0)
.
CODESCR SCREEN WINDOW(25,80),HLP('CONFIG'),HUE(14,1)
ROW(24,2) PAINT(1,79),HUE(10,0)
ROW(24,1) PAINT(2,1),HUE(10,0)
ROW(1,1) STRING('┌─{21}┤<0{38}>├─{17}┐'),HUE(4,1)
ROW(2,1) STRING('├─{39}┬─{38}┤'),HUE(4,1)
ROW(3,1) REPEAT(20);STRING('│<0{39}>│<0{38}>│'),HUE(4,1) .
ROW(23,1) STRING('└─{39}┴─{38}┘'),HUE(4,1)
ROW(25,56) STRING('<24,0,25>'),HUE(13,0)
ROW(1,34) STRING('-'),HUE(13,1)
ROW(3,12) STRING('DP Mode:')
COL(42) STRING('Cancel Condensed'),HUE(14,1)
COL(58) STRING(':')
ROW(4,12) STRING('LQ Mode:')
COL(44) STRING('Backspace Char:')
ROW(5,5) STRING('Double Wide ON:')
COL(50) STRING('Linefeed:')
ROW(6,16) STRING('OFF:')
COL(50) STRING('Formfeed:')
ROW(7,5) STRING('Double High ON:')
COL(43) STRING('Carriage return:')
ROW(8,16) STRING('OFF:')
COL(51) STRING('LF + CR:')
ROW(9,7) STRING('Underline ON:')
COL(51) STRING('LF Only:')
ROW(10,16) STRING('OFF:')
COL(51) STRING('CR Only:')
ROW(11,8) STRING('Boldface ON:')
COL(51) STRING('CR + LF:')
ROW(12,16) STRING('OFF:')
COL(43) STRING('Unidirect print:')
ROW(13,6) STRING('Overstrike ON:')
COL(44) STRING('Bidirect print:')
ROW(14,16) STRING('OFF:')
COL(45) STRING('Printer reset:')
ROW(15,5) STRING('Superscript ON:')
COL(55) STRING(' '),HUE(14,1)
COL(58) STRING(':')
ROW(16,7) STRING('Subscript ON:')
COL(43) STRING('Reserved for '),HUE(14,1)
COL(58) STRING(':')
ROW(17,3) STRING('Sup/Subscrpt OFF:')
COL(46) STRING('Future Use '),HUE(14,1)
COL(58) STRING(':')
ROW(18,9) STRING('Italics ON:')
COL(44) STRING(' {14}'),HUE(14,1)
COL(58) STRING(':')
ROW(19,8) STRING('Italics OFF:')
COL(51) STRING(' {7}'),HUE(14,1)
COL(58) STRING(':')
ROW(20,5) STRING('10 CPI (Pica) :')
COL(52) STRING(' {6}'),HUE(14,1)
COL(58) STRING(':')
ROW(21,5) STRING('12 CPI (Elite):')
COL(45) STRING('Reverse Print'),HUE(14,1)
COL(58) STRING(':')
ROW(22,3) STRING('17 CPI(compress):')
COL(42) STRING(' Cancel Rev. Prt'),HUE(14,1)
COL(58) STRING(':')
ROW(25,2) STRING('F1'),HUE(13,0)
COL(4) STRING(' = Help {6}'),HUE(10,0)
COL(17) STRING('F9'),HUE(13,0)
COL(19) STRING(' = Exit {6}'),HUE(10,0)
COL(32) STRING('F10'),HUE(13,0)
COL(35) STRING(' = Save and Exit {5}'),HUE(10,0)
COL(57) STRING(' '),HUE(10,0)
COL(59) STRING(' = move highlight bar '),HUE(10,0)
MODEL ROW(1,25) STRING(8),HUE(11,1)
DESC COL(36) STRING(25),HUE(11,1)
REPEAT(20,2),EVERY(1,39),INDEX(NDX)
ROW(3,20) POINT(1,21),USE(?POINT),SEL(0,7),REQ
HARDSPC COL(20) STRING(1),HUE(7,1)
COL(21) ENTRY(@N3B),USE(C1),HUE(7,1),INS,NUM
COL(25) ENTRY(@N3B),USE(C2),HUE(7,1),INS,NUM
COL(29) ENTRY(@N3B),USE(C3),HUE(7,1),INS,NUM
COL(33) ENTRY(@N3B),USE(C4),HUE(7,1),INS,NUM
COL(37) ENTRY(@N3B),USE(C5),HUE(7,1),INS,NUM
. .
NDX BYTE !REPEAT INDEX VARIABLE
GROUP GROUP,DIM(40) !40 DIMENSION ARRAY GROUP
CGRP GROUP ! CODE GROUP
C1 BYTE ! CODE 1
C2 BYTE ! CODE 2
C3 BYTE ! CODE 3
C4 BYTE ! CODE 4
C5 BYTE ! CODE 5
. ! END CODE GROUP
TEMPCODE STRING(5),OVER(CGRP) !REDECLARE BYTE GROUP AS STRING
. !END GROUP
CODE
CASE MODE !IF MODE PASSED IS
OF ENTER !ADD MODE
DO GETPRT !GET PRINTER NAME & DESCRIPTION
IF KEYCODE() = F9_KEY THEN RETURN. !IF F9 WAS PRESSED RETURN TO CALLER
OPEN(CODESCR) !OPEN THE CODE SCREEN
MODEL = PRINTER !DISPLAY PRINTER
DESC = DESCRIP !DISPLAY DESCRIPTION
DESC = CENTER(DESC) !CENTER DESCRIPTION
LOOP NDX = 1 TO 40 !LOOP THRU THE REPEAT
GROUP[NDX] = ALL('<0>') ! PUT NULLS IN CODE GROUP
HARDSPC = CHR(255) ! PUT A HARD SPACE (SO POINT BAR WILL STOP)
. !END LOOP
LOOP !LOOP THRU CODES
ALERT(F9_KEY,F10_KEY) !ALERT F9 AND F10 KEYS
ACCEPT !ACCEPT THE FIELD
ALERT() !RESET ALERT KEYS
IF KEYCODE() = F9_KEY THEN RETURN. !IF F9 WAS PRESSED RETURN TO CALLER
CASE FIELD() !CHECK WHICH FIELD
OF ?C1 !IF IT'S
OROF ?C2 ! A
OROF ?C3 ! CODE
OROF ?C4
OROF ?C5
IF CONTENTS(?) = 0 ! AND 0 (ENTER) WAS PRESSED
PRTCODE[NDX] = TEMPCODE[NDX] !MOVE CODE TO RECORD AREA
SELECT(?POINT) ! SELECT THE POINT BAR
CYCLE ! RESTART THE LOOP
. . !END CASE, IF
PRTCODE[NDX] = TEMPCODE[NDX] !MOVE CODE TO RECORD AREA
IF KEYCODE() = F10_KEY THEN BREAK. !IF F10 WAS PRESSED, BREAK OUT OF LOOP
. !END LOOP
PUT(PRTFILE) !REWRITE THE RECORD (ADDED IN GETPRT)
IF ERROR() THEN STOP('UNEXPECTED ERROR'). !CHECK FOR ERROR
OF CHANGE !CHANGE MODE
OPEN(CODESCR) !OPEN CODE SCREEN
MODEL = PRINTER !DISPLAY PRINTER
DESC = DESCRIP !DISPLAY DESCRIPTION
DESC = CENTER(DESC) !CENTER DESCRIPTION
LOOP NDX = 1 TO 40 !LOOP THRU CODES
GROUP[NDX] = PRTCODE[NDX] ! MOVE FROM RECORD TO LOCAL GROUP
HARDSPC = CHR(255) ! ASSIGN THE HARD SPACE (FOR POINT TO STOP)
DISPLAY(?C1,?C5) ! DISPLAY THE CODES
. !END LOOP
LOOP !LOOP THRU THE SCREEN
ALERT(F9_KEY,F10_KEY) ! ALERT F9 AND F10 KEYS
ACCEPT ! ACCEPT A FIELD
ALERT() !RESET ALERT KEYS
IF KEYCODE() = F9_KEY THEN RETURN. !IF F9 WAS PRESSED RETURN TO CALLER
CASE FIELD() !CHECK WHICH FIELD
OF ?C1 !IF IT'S
OROF ?C2 ! A
OROF ?C3 ! CODE
OROF ?C4
OROF ?C5
IF CONTENTS(?) = 0 ! AND 0 (ENTER) WAS PRESSED
PRTCODE[NDX] = TEMPCODE[NDX] !MOVE CODE TO RECORD AREA
SELECT(?POINT) ! SELECT THE POINT BAR
CYCLE ! RESTART THE LOOP
. . !END CASE, IF
PRTCODE[NDX] = TEMPCODE[NDX] !MOVE CODE TO RECORD AREA
IF KEYCODE() = F10_KEY THEN BREAK. !IF F10 WAS PRESSED, BREAK OUT OF L
. !END LOOP
PUT(PRTFILE) !REWRITE THE RECORD
IF ERROR() THEN STOP('UNEXPECTED ERROR'). !CHECK FOR ERROR
OF REMOVE !DELETE MODE
OPEN(CODESCR) !OPEN CODE SCREEN
MODEL = PRINTER !DISPLAY PRINTER
DESC = DESCRIP !DISPLAY DESCRIPTION
DESC = CENTER(DESC) !CENTER DESCRIPTION
LOOP NDX = 1 TO 40 !LOOP THRU CODES
GROUP[NDX] = PRTCODE[NDX] ! MOVE FROM RECORD TO LOCAL GROUP
HARDSPC = CHR(255) ! ASSIGN THE HARD SPACE (FOR POINT TO STOP)
DISPLAY(?C1,?C5) ! DISPLAY THE CODES
. !END LOOP
OPEN(DELWIN) !OPEN DELETE WINDOW
ALERT(F9_KEY,F10_KEY) !ALERT F9 AND F10 KEYS
ACCEPT !ACCEPT A FIELD
ALERT() !RESET ALERT KEYS
CASE KEYCODE() !CHECK KEY PRESSED
OF F10_KEY !IF IT WAS F10
DELETE(PRTFILE) ! DELETE THE PRINTER RECORD
ELSE !OTHERWISE
CLOSE(DELWIN) ! CLOSE THE WINDOW
RETURN ! RETURN TO CALLER
. . !END CASE, CASE
GETPRT ROUTINE !GET PRINTER INFORMATION
OPEN(PRTENTER) !OPEN INFO WINDOW
ERASE !ERASE THE FIELDS
CODEGRP = ALL('<0>') !PUT NULLS IN RECORD AREA
LOOP !LOOP THRU THE FIELDS
ALERT(F9_KEY,F10_KEY) ! ALERT F9 AND F10 KEYS
ACCEPT ! ACCEPT A FIELD
ALERT() ! RESET ALERT KEYS
IF KEYCODE() = F9_KEY ! IF F9 WAS PRESSED
CLOSE(PRTENTER) ! CLOSE THE WINDOW
EXIT ! EXIT ROUTINE
. ! END IF
CASE FIELD() ! CHECK FIELD ENTERED
OF ?DONE ! IF PAUSE FIELD
IF KEYCODE() <> F10_KEY ! IF F10 WAS NOT PRESSED
BEEP ! SOUND THE SPEAKER
SELECT(?) ! STAY ON THE SAME FIELD
CYCLE ! RESTART THE LOOP
ELSE ! OTHERWISE
ADD(PRTFILE) ! ADD NEW RECORD
CLOSE(PRTENTER) ! CLOSE THE WINDOW
EXIT ! EXIT THE ROUTINE
. . . !END LOOP, CASE, IF