summaryrefslogtreecommitdiff
path: root/app/baisy/2.2.1-schulis/src/fetch save interface
blob: 24abb496f9aecfd1299cf664865eeddc9a0e76bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
PACKET fetchsaveDEFINES savefetchmode,path:LET ascii=1,asciigerman=2,
transparent=3,rowtext=5,ds=6,dump=7,atarist=10,ibm=11;INT PROC savefetchmode(
TEXT CONST reservestring):TEXT VAR modus;INT CONST p:=pos(reservestring,":");
IF p=0THEN modus:=reservestringELSE modus:=subtext(reservestring,1,p-1)FI ;
modusnormieren;IF modus="FILEASCII"THEN asciiELIF modus="FILEASCIIGERMAN"
THEN asciigermanELIF modus="FILEATARIST"THEN ataristELIF modus="FILEIBM"THEN 
ibmELIF modus="FILETRANSPARENT"THEN transparentELIF modus="ROWTEXT"THEN 
rowtextELIF modus="DS"THEN dsELIF modus="DUMP"THEN dumpELSE errorstop(
"Unzulässige Betriebsart");-1FI .modusnormieren:changeall(modus," ","");INT 
VAR i;FOR iFROM 1UPTO LENGTH modusREP INT CONST charcode:=code(modusSUB i);
IF islowercaseTHEN replace(modus,i,uppercasechar)FI PER .islowercase:charcode
>96AND charcode<123.uppercasechar:code(charcode-32).END PROC savefetchmode;
TEXT PROC path(TEXT CONST reservestring):INT CONST p:=pos(reservestring,":");
IF p=0THEN ""ELSE subtext(reservestring,p+1)FI .END PROC path;END PACKET 
fetchsave;