annotate win32/dde.d @ 1:4a9dcbd9e54f

-files of 0.13 beta -fixes so that it now compiles with the current dmd version
author marton@basel.hu
date Tue, 05 Apr 2011 20:44:01 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
1 /***********************************************************************\
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
2 * dde.d *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
3 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
4 * Windows API header module *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
5 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
6 * Translated from MinGW Windows headers *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
7 * by Stewart Gordon *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
8 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
9 * Placed into public domain *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
10 \***********************************************************************/
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
11 module win32.dde;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
12 pragma(lib, "user32.lib");
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
13
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
14 private import win32.windef;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
15
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
16 enum : uint {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
17 WM_DDE_FIRST = 0x03E0,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
18 WM_DDE_INITIATE = WM_DDE_FIRST,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
19 WM_DDE_TERMINATE,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
20 WM_DDE_ADVISE,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
21 WM_DDE_UNADVISE,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
22 WM_DDE_ACK,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
23 WM_DDE_DATA,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
24 WM_DDE_REQUEST,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
25 WM_DDE_POKE,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
26 WM_DDE_EXECUTE,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
27 WM_DDE_LAST = WM_DDE_EXECUTE
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
28 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
29
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
30 struct DDEACK {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
31 ubyte bAppReturnCode;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
32 ubyte _bf;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
33
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
34 ubyte reserved() { return cast(ubyte) (_bf & 0x3F); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
35 bool fBusy() { return cast(bool) (_bf & 0x40); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
36 bool fAck() { return cast(bool) (_bf & 0x80); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
37
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
38 ubyte reserved(ubyte r) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
39 _bf = cast(ubyte) ((_bf & ~0x3F) | (r & 0x3F));
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
40 return cast(ubyte)(r & 0x3F);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
41 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
42
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
43 bool fBusy(bool f) { _bf = cast(ubyte) ((_bf & ~0x40) | (f << 6)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
44 bool fAck(bool f) { _bf = cast(ubyte) ((_bf & ~0x80) | (f << 7)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
45 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
46
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
47 struct DDEADVISE {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
48 ushort _bf;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
49 short cfFormat;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
50
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
51 ushort reserved() { return cast(ushort) (_bf & 0x3FFF); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
52 bool fDeferUpd() { return cast(bool) (_bf & 0x4000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
53 bool fAckReq() { return cast(bool) (_bf & 0x8000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
54
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
55 ushort reserved(ushort r) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
56 _bf = cast(ushort) ((_bf & ~0x3FFF) | (r & 0x3FFF));
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
57 return cast(ushort)(r & 0x3FFF);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
58 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
59
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
60 bool fDeferUpd(bool f) { _bf = cast(ushort) ((_bf & ~0x4000) | (f << 14)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
61 bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) | (f << 15)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
62 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
63
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
64 struct DDEDATA {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
65 ushort _bf;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
66 short cfFormat;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
67 byte _Value;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
68
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
69 ushort unused() { return cast(ushort) (_bf & 0x0FFF); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
70 bool fResponse() { return cast(bool) (_bf & 0x1000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
71 bool fRelease() { return cast(bool) (_bf & 0x2000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
72 bool reserved() { return cast(bool) (_bf & 0x4000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
73 bool fAckReq() { return cast(bool) (_bf & 0x8000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
74
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
75 byte* Value() { return &_Value; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
76
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
77 ushort unused(ushort r) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
78 _bf = cast(ushort) ((_bf & ~0x0FFF) | (r & 0x0FFF));
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
79 return cast(ushort)(r & 0x0FFF);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
80 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
81
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
82 bool fResponse(bool f) { _bf = cast(ushort) ((_bf & ~0x1000) | (f << 12)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
83 bool fRelease(bool f) { _bf = cast(ushort) ((_bf & ~0x2000) | (f << 13)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
84 bool reserved(bool f) { _bf = cast(ushort) ((_bf & ~0x4000) | (f << 14)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
85 bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) | (f << 15)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
86 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
87
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
88 struct DDEPOKE {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
89 ushort _bf;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
90 short cfFormat;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
91 byte _Value;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
92
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
93 ushort unused() { return cast(ushort) (_bf & 0x1FFF); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
94 bool fRelease() { return cast(bool) (_bf & 0x2000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
95 ubyte fReserved() { return cast(ubyte) ((_bf & 0xC000) >>> 14); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
96
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
97 byte* Value() { return &_Value; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
98
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
99 ushort unused(ushort u) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
100 _bf = cast(ushort) ((_bf & ~0x1FFF) | (u & 0x1FFF));
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
101 return cast(ushort)(u & 0x1FFF);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
102 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
103
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
104 bool fRelease(bool f) { _bf = cast(ushort) ((_bf & ~0x2000) | (f << 13)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
105 ubyte fReserved(ubyte r) { _bf = cast(ushort) ((_bf & ~0xC000) | (r << 14)); return r; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
106 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
107
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
108 deprecated struct DDELN {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
109 ushort _bf;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
110 short cfFormat;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
111
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
112 ushort unused() { return cast(ushort) (_bf & 0x1FFF); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
113 bool fRelease() { return cast(bool) (_bf & 0x2000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
114 bool fDeferUpd() { return cast(bool) (_bf & 0x4000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
115 bool fAckReq() { return cast(bool) (_bf & 0x8000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
116
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
117 ushort unused(ushort u) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
118 _bf = cast(ushort)((_bf & ~0x1FFF) | (u & 0x1FFF));
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
119 return cast(ushort)(u & 0x1FFF);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
120 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
121
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
122 bool fRelease(bool f) { _bf = cast(ushort) ((_bf & ~0x2000) | (f << 13)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
123 bool fDeferUpd(bool f) { _bf = cast(ushort) ((_bf & ~0x4000) | (f << 14)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
124 bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) | (f << 15)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
125 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
126
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
127 deprecated struct DDEUP {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
128 ushort _bf;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
129 short cfFormat;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
130 byte _rgb;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
131
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
132 ushort unused() { return cast(ushort) (_bf & 0x0FFF); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
133 bool fAck() { return cast(bool) (_bf & 0x1000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
134 bool fRelease() { return cast(bool) (_bf & 0x2000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
135 bool fReserved() { return cast(bool) (_bf & 0x4000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
136 bool fAckReq() { return cast(bool) (_bf & 0x8000); }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
137
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
138 byte* rgb() { return &_rgb; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
139
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
140 ushort unused(ushort r) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
141 _bf = cast(ushort) ((_bf & ~0x0FFF) | (r & 0x0FFF));
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
142 return cast(ushort)(r & 0x0FFF);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
143 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
144
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
145 bool fAck(bool f) { _bf = cast(ushort) ((_bf & ~0x1000) | (f << 12)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
146 bool fRelease(bool f) { _bf = cast(ushort) ((_bf & ~0x2000) | (f << 13)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
147 bool fReserved(bool f) { _bf = cast(ushort) ((_bf & ~0x4000) | (f << 14)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
148 bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) | (f << 15)); return f; }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
149 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
150
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
151 extern (Windows) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
152 BOOL DdeSetQualityOfService(HWND, SECURITY_QUALITY_OF_SERVICE*,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
153 PSECURITY_QUALITY_OF_SERVICE);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
154 BOOL ImpersonateDdeClientWindow(HWND, HWND);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
155 LPARAM PackDDElParam(UINT, UINT_PTR, UINT_PTR);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
156 BOOL UnpackDDElParam(UINT, LPARAM, PUINT_PTR, PUINT_PTR);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
157 BOOL FreeDDElParam(UINT, LPARAM);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
158 LPARAM ReuseDDElParam(LPARAM, UINT, UINT, UINT_PTR, UINT_PTR);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
159 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
160
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
161 debug (WindowsUnitTest) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
162 unittest {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
163 DDEACK ddeack;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
164
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
165 with (ddeack) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
166 reserved = 10;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
167 assert (_bf == 0x0A);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
168 fBusy = true;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
169 assert (_bf == 0x4A);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
170 fAck = true;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
171 assert (_bf == 0xCA);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
172
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
173 assert (reserved == 10);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
174 assert (fBusy == true);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
175 assert (fAck == true);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
176
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
177 reserved = 43;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
178 assert (_bf == 0xEB);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
179 fBusy = false;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
180 assert (_bf == 0xAB);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
181 fAck = false;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
182 assert (_bf == 0x2B);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
183
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
184 assert (reserved == 43);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
185 assert (fBusy == false);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
186 assert (fAck == false);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
187 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
188
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
189 DDEPOKE ddepoke;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
190
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
191 with (ddepoke) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
192 unused = 3456;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
193 assert (_bf == 0x0D80);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
194 fRelease = true;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
195 assert (_bf == 0x2D80);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
196 fReserved = 2;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
197 assert (_bf == 0xAD80);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
198
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
199 assert (unused == 3456);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
200 assert (fRelease == true);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
201 assert (fReserved == 2);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
202
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
203 unused = 2109;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
204 assert (_bf == 0xa83d);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
205 fRelease = false;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
206 assert (_bf == 0x883d);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
207 fReserved = 1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
208 assert (_bf == 0x483d);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
209
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
210 assert (unused == 2109);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
211 assert (fRelease == false);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
212 assert (fReserved == 1);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
213 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
214 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
215 }