-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoptions.h
52 lines (44 loc) · 1.53 KB
/
options.h
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
#pragma once
#include <stdbool.h>
typedef char* string;
#define BUFFER_OPTIONS \
OPTION(autoindent, bool, false) \
OPTION(cinwords, string, "if,else,while,do,for,switch") \
OPTION(expandtab, bool, false) \
OPTION(filetype, string, "") \
OPTION(modifiable, bool, true) \
OPTION(modified, bool, false) \
OPTION(readonly, bool, false) \
OPTION(shiftwidth, int, 8) \
OPTION(smartindent, bool, false) \
OPTION(suffixesadd, string, "") \
OPTION(tabstop, int, 8) \
#define WINDOW_OPTIONS \
OPTION(cursorline, bool, false) \
OPTION(number, bool, false) \
OPTION(numberwidth, int, 4) \
OPTION(relativenumber, bool, false) \
#define EDITOR_OPTIONS \
OPTION(equalalways, bool, true) \
OPTION(history, int, 50) \
OPTION(hlsearch, bool, false) \
OPTION(ignorecase, bool, false) \
OPTION(incsearch, bool, false) \
OPTION(path, string, ".,/usr/include,,") \
OPTION(ruler, bool, false) \
OPTION(showmode, bool, true) \
OPTION(sidescroll, int, 0) \
OPTION(smartcase, bool, false) \
OPTION(splitbelow, bool, false) \
OPTION(splitright, bool, false) \
struct editor;
struct window;
struct buffer;
void editor_init_options(struct editor *editor);
void window_init_options(struct window *window);
void editor_free_options(struct editor *editor);
void window_free_options(struct window *window);
void buffer_free_options(struct buffer *buffer);
void buffer_inherit_editor_options(struct buffer *buffer, struct editor *editor);
void window_inherit_parent_options(struct window *window);
char **options_get_sorted(int *len);