summaryrefslogtreecommitdiff
path: root/system/dos/1.8.7/src/open
blob: 518c4b87896947e71ccd0ac7d14b4f21ff1a3d28 (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
56
57
58
59
60
61
62
63
64
65
66
PACKET open DEFINES                             (* Copyright (C) 1986 *)
                                                (* Frank Klapper      *)
  open  work,                                   (* 05.01.87           *)
  close work,
  work opened,
  work closed,
  init check rerun,
  check rerun,

  hd version:

BOOL VAR open;
INT VAR old session;

BOOL VAR hd flag := FALSE;

INITFLAG VAR packet := FALSE;

PROC open work:
  open := TRUE

END PROC open work;

PROC close work:
  open := FALSE

END PROC close work;

BOOL PROC work opened:
  IF NOT initialized (packet)
    THEN close work
  FI;
  open

END PROC work opened;

BOOL PROC work closed:
  NOT work opened

END PROC work closed;

PROC init check rerun:
  old session := session

END PROC init check rerun;

PROC check rerun:
  IF session <> old session
    THEN close work;
         error stop ("Diskettenzugriff im RERUN")
  FI.

END PROC check rerun;

PROC hd version (BOOL CONST status):
  hd flag := status

END PROC hd version;

BOOL PROC hd version:
  hd flag

END PROC hd version;

END PACKET open;