-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathoptions.h
More file actions
59 lines (50 loc) · 1.63 KB
/
options.h
File metadata and controls
59 lines (50 loc) · 1.63 KB
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
/*
* Copyright (C) 2025 Clownacy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef OPTIONS_H
#define OPTIONS_H
#include "clowncommon/clowncommon.h"
typedef struct Options
{
char local_signifier;
cc_bool debug;
cc_bool case_insensitive;
cc_bool equ_set_descope_local_labels;
cc_bool output_local_labels_to_sym_file;
cc_bool warnings_enabled;
cc_bool pedantic_warnings_enabled;
cc_bool expand_all_macros;
cc_bool automatic_even;
struct
{
cc_bool zero_displacement;
} optimisation;
} Options;
typedef struct Options_ListEntry
{
struct Options_ListEntry *next;
Options options;
} Options_ListEntry;
typedef struct Options_State
{
Options_ListEntry *list;
} Options_State;
cc_bool Options_Initialise(Options_State *state, const Options *options);
void Options_Deinitialise(Options_State *state);
cc_bool Options_Push(Options_State *state);
cc_bool Options_Pop(Options_State *state);
#define Options_Get(STATE) (&(STATE)->list->options)
#endif /* OPTIONS_H */