/[sudobot]/trunk/lib/common/flags.c
ViewVC logotype

Contents of /trunk/lib/common/flags.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 575 - (show annotations)
Mon Jul 29 17:59:26 2024 UTC (8 months ago) by rakinar2
File MIME type: text/x-c
File size: 449 byte(s)
chore: add trunk
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 }

team@onesoftnet.eu.org
ViewVC Help
Powered by ViewVC 1.1.26