home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
PARASOL
/
VIDEOSTO.ARK
/
OE-PRINT.LIB
< prev
next >
Wrap
Text File
|
1986-08-28
|
3KB
|
87 lines
string oe.printer.rept 31 value "";
{----------------------------------------------------------
{ Printer-Selection Inquiry
{
{ in: printer.to.select
{ out: Printer is selected, or procedure.aborted is 'Y'
{----------------------------------------------------------
procedure oe.printer:
begin
redefine screen.data;
record selprint;
field selprint.rept.desc 30;
field selprint.option 4;
record selprint.rec;
field selprint.unit 3;
field selprint.width 3;
field selprint.desc 32;
endrec;
endrec;
endredef;
record selprint.save;
string ##selprint;
endrec;
move 0 to procedure.aborted;
if printer.to.select = "?" then
move selprint to selprint.save;
fill selprint with " ";
move oe.printer.rept to selprint.rept.desc;
move 0 to oe.printer.rept[byte];
mcall entry using 14,0;
mcall entry using 32,0;
open startup.file shared error standard;
move 1 to startup.key;
while startup.key <= 17 do
subtract 1 from startup.key giving wk.word;
read startup.file error standard;
if startup.prn.unit > 15 then
move default.printer to startup.prn.unit;
fi;
convert startup.prn.unit to wk.str;
edit wk.str with "ZZ9";
index selprint.unit of selprint.rec with wk.word
giving wk.sp;
move wk.str to @wk.sp length 3;
convert startup.prn.width to wk.str;
edit wk.str with "ZZ9";
index selprint.width of selprint.rec with wk.word
giving wk.sp;
move wk.str to @wk.sp length 3;
index selprint.desc of selprint.rec with wk.word
giving wk.sp;
move startup.prn.desc to @wk.sp length ##selprint.desc;
add 1 to startup.key;
od;
close startup.file error standard;
mcall entry using 32,prog.user;
subtract "A" from prog.drive giving wk.byte;
mcall entry using 14,wk.byte;
selprint.get.data:
move "selprint" to screen.name;
call get.screen.data;
if selprint.option = l.END then
call abort.proc;
goto oe.printer.exit;
fi;
move selprint.option to wk.str;
call trunc.wk.str;
scan wk.str for no digits true begin
move "Printer Number must be numeric" to status.line;
call status.line.display;
goto selprint.get.data;
end;
convert wk.str to printer.to.select;
oe.printer.exit:
move selprint.save to selprint;
fi;
if procedure.aborted = 0 then
call select.printer;
fi;
end;