summaryrefslogtreecommitdiff
path: root/app/tecal/1.8.7/src/TeCal.gen
blob: c670db7551f1deeee1a5e43c6c9668f5c0ad69ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
LET tecal    = "TeCal",
    auskunft = "TeCal Auskunft";

IF NOT exists ("TeCal") THEN fetch ("TeCal",archive) FI;
IF NOT exists ("TeCal Auskunft") THEN fetch ("TeCal Auskunft",archive) FI;

checkoff;
insert tecal;
insert auskunft;
shorten auskunft file;
forget ("Tecal.gen", quiet).

insert tecal   :
  display (""13""10""15" TeCal-Rechner wird installiert  "14""13""10"");
  insert (tecal);
  forget (tecal, quiet).

insert auskunft:
  display (""13""15" TeCal-Auskunftfile wird installiert  "14""13""10"");
  insert (auskunft).

shorten auskunft file :
  display (""13""10""15" TeCal-Auskunftfile wird komprimiert  "14""13""10"");
  disable stop;
  DATASPACE VAR dspace := nil space;
  FILE      VAR file   := sequential file ( input, auskunft),
                shorted:= sequential file (output, dspace);
  TEXT      VAR buffer;
   INT      VAR i;

  WHILE NOT eof (file)
  REPEAT get line (file, buffer)
  UNTIL  (pos ("(*", buffer) > 0) OR is error PER;
  i:= 1;
  IF eof (file) COR text not transfered
     THEN errorstop ("TeCal-Auskunftsfile ist bereits komprimiert!"13""10"" +
                     "'ESC <?>' funktioniert wahrscheinlich nicht."13""10"" +
                     "Bitte ORIGINAL Auskunftsfile von Diskette verwenden")
     ELSE forget (auskunft, quiet);
          copy (dspace, auskunft)
  FI;
  forget (dspace) .

 text not transfered :
    WHILE NOT eof (file)
    REPEAT cout (i);
           get line (file, buffer);
           IF pos (buffer, "*)") > 0
              THEN LEAVE text not transfered WITH FALSE
              ELSE put line (shorted, buffer)
           FI;
           i INCR 1
    UNTIL is error PER;
    TRUE .