summaryrefslogtreecommitdiff
path: root/app/schulis-mathematiksystem/1.0/src/spool cmd
blob: 6a78cc1b69c2acd47a2e14b6551957293142466c (plain)
1
2
3
PACKETspoolcmdDEFINESspoolcontrolpassword,killspool,firstspool,startspool,stopspool,haltspool,waitforhalt:LETerrornak=2,entrylinecode=23,killercode=24,firstcode=25,startcode=26,stopcode=27,haltcode=28,waitforhaltcode=29;DATASPACE VARds;BOUND STRUCT(TEXTentryline,INTindex,TEXTactualentries,password)VARcontrolmsg;BOUND TEXT VARerrormsg;INT VARreply;INITFLAG VARinthistask:=FALSE;BOOL VARdialogue;TEXT VARcontrolpassword,password;controlpassword:="";PROCspoolcontrolpassword(TEXT CONSTnewpassword):IFonlineTHENsay("�
�")FI;disablestop;do("enter spool control password (""+newpassword+"")");clearerror;nodoagain;covertracks;covertracks(controlpassword);controlpassword:=newpassword;END PROCspoolcontrolpassword;PROCcallspool(INT CONSTopcode,TEXT CONSTname,TASK CONSTspool):dialogue:=commanddialogue;password:=writepassword;passwordCAT"/";passwordCATreadpassword;disablestop;commanddialogue(FALSE);enterpassword(controlpassword);commanddialogue(dialogue);call(opcode,name,spool);commanddialogue(FALSE);enterpassword(password);commanddialogue(dialogue);END PROCcallspool;PROCstartspool(TASK CONSTspool):enablestop;callspool(haltcode,"",spool);callspool(startcode,"",spool);END PROCstartspool;PROCstartspool(TASK CONSTspool,INT CONSTnewchannel):enablestop;callspool(haltcode,"",spool);callspool(startcode,text(newchannel),spool);END PROCstartspool;PROCstopspool(TASK CONSTspool):callspool(stopcode,"",spool);END PROCstopspool;PROCstopspool(TASK CONSTspool,TEXT CONSTdeactivemsg):callspool(stopcode,deactivemsg,spool);END PROCstopspool;PROChaltspool(TASK CONSTspool):callspool(haltcode,"",spool);END PROChaltspool;PROChaltspool(TASK CONSTspool,TEXT CONSTdeactivemsg):callspool(haltcode,deactivemsg,spool);END PROChaltspool;PROCwaitforhalt(TASK CONSTspool):callspool(waitforhaltcode,"",spool);END PROCwaitforhalt;PROCwaitforhalt(TASK CONSTspool,TEXT CONSTdeactivemsg):callspool(waitforhaltcode,deactivemsg,spool);END PROCwaitforhalt;PROCcontrolspool(TASK CONSTspool,INT CONSTcontrolcode,TEXT CONSTquestion,BOOL CONSTleave):enablestop;initializecontrolmsg;WHILEvalidspoolentryREP IFcontrolquestionTHENcontrolspoolentryFI PER;.initializecontrolmsg:IF NOTinitialized(inthistask)THENds:=nilspaceFI;forget(ds);ds:=nilspace;controlmsg:=ds;controlmsg.entryline:="";controlmsg.password:=controlpassword;controlmsg.index:=0;say("
");.validspoolentry:call(spool,entrylinecode,ds,reply);IFreply=errornakTHENerrormsg:=ds;errorstop(errormsg);FI;controlmsg.index<>0.controlquestion:say(controlmsg.entryline);yes(question).controlspoolentry:call(spool,controlcode,ds,reply);IFreply=errornakTHENerrormsg:=ds;errorstop(errormsg);FI;IFleaveTHEN LEAVEcontrolspoolFI;END PROCcontrolspool;PROCkillspool(TASK CONSTspool):controlspool(spool,killercode,"   loeschen",FALSE)END PROCkillspool;PROCfirstspool(TASK CONSTspool):controlspool(spool,firstcode,"   als erstes",TRUE)END PROCfirstspool;END PACKETspoolcmd;