Parent Directory
|
Revision Log
chore: add old version archive branches (2.x to 9.x-dev)
1 | #include <stdlib.h> |
2 | #include "flags.h" |
3 | |
4 | char *opt_env_file_path = NULL; |
5 | static int flags = 0; |
6 | |
7 | void flags_add(int flag) |
8 | { |
9 | flags |= flag; |
10 | } |
11 | |
12 | void flags_remove(int flag) |
13 | { |
14 | flags &= ~flag; |
15 | } |
16 | |
17 | void flags_set(int new_flags) |
18 | { |
19 | flags = new_flags; |
20 | } |
21 | |
22 | void flags_clear() |
23 | { |
24 | flags = 0; |
25 | } |
26 | |
27 | int flags_get() |
28 | { |
29 | return flags; |
30 | } |
31 | |
32 | bool flags_has(int flag) |
33 | { |
34 | return (flags & flag) == flag; |
35 | } |
36 | |
37 | void opt_cleanup() |
38 | { |
39 | free(opt_env_file_path); |
40 | } |
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |