]>
Commit | Line | Data |
---|---|---|
832b6fce A |
1 | #include "common.h" |
2 | #include <stdio.h> | |
3 | ||
4 | static bool b = false; | |
5 | static bool u = false; | |
19894a12 | 6 | static bool u2 = false; |
832b6fce A |
7 | static bool isOk = true; |
8 | ||
9 | void setB() | |
10 | { | |
19894a12 | 11 | if ( u || b || u2 ) |
832b6fce A |
12 | isOk = false; |
13 | b = true; | |
14 | } | |
15 | ||
16 | void setU() | |
17 | { | |
19894a12 | 18 | if ( u || u2 ) |
832b6fce A |
19 | isOk = false; |
20 | u = true; | |
21 | } | |
22 | ||
19894a12 A |
23 | void setU2() |
24 | { | |
25 | if ( u2 ) | |
26 | isOk = false; | |
27 | u2 = true; | |
28 | } | |
29 | ||
832b6fce A |
30 | // return true iff |
31 | // setB() was called, then setU() | |
32 | bool ok() | |
33 | { | |
34 | //fprintf(stderr, "isOk=%d, u=%d, b=%d\n", isOk, u, b); | |
19894a12 | 35 | return isOk && u && b && u2; |
832b6fce A |
36 | } |
37 |