Mercurial > vim
annotate src/proto.h @ 33664:06b59278bfcf v9.0.2070
patch 9.0.2070: [security] disallow setting env in restricted mode
Commit: https://github.com/vim/vim/commit/6b89dd6a7257a1e2e9c7ea070b407bc4674a5118
Author: Christian Brabandt <cb@256bit.org>
Date: Thu Oct 26 22:14:17 2023 +0200
patch 9.0.2070: [security] disallow setting env in restricted mode
Problem: [security] disallow setting env in restricted mode
Solution: Setting environment variables in restricted mode could
potentially be used to execute shell commands. Disallow this.
restricted mode: disable allow setting of environment variables
Setting environment variables in restricted mode, may have some unwanted
consequences. So, for example by setting $GCONV_PATH in restricted mode
and then calling the iconv() function, one may be able to execute some
unwanted payload, because the `iconv_open()` function internally uses
the `$GCONV_PATH` variable to find its conversion data.
So let's disable setting environment variables, even so this is no
complete protection, since we are not clearing the existing environment.
I tried a few ways but wasn't successful :(
One could also argue to disable the iconv() function completely in
restricted mode, but who knows what other API functions can be
influenced by setting some other unrelated environment variables.
So let's leave it as it is currently.
closes: #13394
See: https://huntr.com/bounties/b0a2eda1-459c-4e36-98e6-0cc7d7faccfe/
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 26 Oct 2023 22:30:03 +0200 |
parents | 5acc0d2cf4f7 |
children | 500731fe8161 |
rev | line source |
---|---|
10042
4aead6a9b7a9
commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents:
9583
diff
changeset
|
1 /* vi:set ts=8 sts=4 sw=4 noet: |
7 | 2 * |
3 * VIM - Vi IMproved by Bram Moolenaar | |
4 * | |
5 * Do ":help uganda" in Vim to read copying and usage conditions. | |
6 * Do ":help credits" in Vim to see a list of people who contributed. | |
7 */ | |
8 | |
9 /* | |
10 * proto.h: include the (automatically generated) function prototypes | |
11 */ | |
12 | |
13 /* | |
14 * Don't include these while generating prototypes. Prevents problems when | |
15 * files are missing. | |
16 */ | |
17 #if !defined(PROTO) && !defined(NOPROTO) | |
18 | |
19 /* | |
20 * Machine-dependent routines. | |
21 */ | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18742
diff
changeset
|
22 // avoid errors in function prototypes |
573 | 23 # if !defined(FEAT_X11) && !defined(FEAT_GUI_GTK) |
7 | 24 # define Display int |
25 # define Widget int | |
26 # endif | |
27 # ifndef FEAT_GUI_GTK | |
28 # define GdkEvent int | |
29 # define GdkEventKey int | |
30 # endif | |
31 # ifndef FEAT_X11 | |
32 # define XImage int | |
33 # endif | |
34 | |
35 # ifdef AMIGA | |
36 # include "os_amiga.pro" | |
37 # endif | |
9536
b2aada04d84e
commit https://github.com/vim/vim/commit/a06ecab7a5159e744448ace731036f0dc5f87dd4
Christian Brabandt <cb@256bit.org>
parents:
9403
diff
changeset
|
38 # if defined(UNIX) || defined(VMS) |
7 | 39 # include "os_unix.pro" |
40 # endif | |
15868
7fad90423bd2
patch 8.1.0941: macros for MS-Windows are inconsistent
Bram Moolenaar <Bram@vim.org>
parents:
15850
diff
changeset
|
41 # ifdef MSWIN |
7 | 42 # include "os_win32.pro" |
43 # include "os_mswin.pro" | |
4168 | 44 # include "winclip.pro" |
16606
7e733046db1d
patch 8.1.1306: Borland support is outdated and doesn't work
Bram Moolenaar <Bram@vim.org>
parents:
16411
diff
changeset
|
45 # if (defined(__GNUC__) && !defined(__MINGW32__)) |
7807
1a5d34492798
commit https://github.com/vim/vim/commit/d99df423c559d85c17779b3685426c489554908c
Christian Brabandt <cb@256bit.org>
parents:
7743
diff
changeset
|
46 extern int _stricoll(char *a, char *b); |
7 | 47 # endif |
48 # endif | |
49 # ifdef VMS | |
50 # include "os_vms.pro" | |
51 # endif | |
52 # ifdef __QNX__ | |
53 # include "os_qnx.pro" | |
54 # endif | |
55 | |
2180
f60a0c9cbe6c
Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
799
diff
changeset
|
56 # ifdef FEAT_CRYPT |
f60a0c9cbe6c
Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
799
diff
changeset
|
57 # include "blowfish.pro" |
6122 | 58 # include "crypt.pro" |
59 # include "crypt_zip.pro" | |
2180
f60a0c9cbe6c
Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
799
diff
changeset
|
60 # endif |
25529
bb1097899693
patch 8.2.3301: memory allocation functions don't have their own place
Bram Moolenaar <Bram@vim.org>
parents:
25475
diff
changeset
|
61 # include "alloc.pro" |
17744
4a3dca734d36
patch 8.1.1869: code for the argument list is spread out
Bram Moolenaar <Bram@vim.org>
parents:
17652
diff
changeset
|
62 # include "arglist.pro" |
15634
746b95fd25ad
patch 8.1.0825: code for autocommands is mixed with file I/O code
Bram Moolenaar <Bram@vim.org>
parents:
15605
diff
changeset
|
63 # include "autocmd.pro" |
7 | 64 # include "buffer.pro" |
18199
e2be5a6485f5
patch 8.1.2094: the fileio.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
18174
diff
changeset
|
65 # include "bufwrite.pro" |
16632
30de89c1d090
patch 8.1.1318: code for text changes is in a "misc" file
Bram Moolenaar <Bram@vim.org>
parents:
16606
diff
changeset
|
66 # include "change.pro" |
7 | 67 # include "charset.pro" |
18265
fe5afdc03bd2
patch 8.1.2127: the indent.c file is a bit big
Bram Moolenaar <Bram@vim.org>
parents:
18199
diff
changeset
|
68 # include "cindent.pro" |
19920
5e41b2e63c73
patch 8.2.0516: client-server code is spread out
Bram Moolenaar <Bram@vim.org>
parents:
19774
diff
changeset
|
69 # include "clientserver.pro" |
19774
00a1b89256ea
patch 8.2.0443: clipboard code is spread out
Bram Moolenaar <Bram@vim.org>
parents:
19760
diff
changeset
|
70 # include "clipboard.pro" |
17779
87a8760babec
patch 8.1.1886: command line expansion code is spread out
Bram Moolenaar <Bram@vim.org>
parents:
17744
diff
changeset
|
71 # include "cmdexpand.pro" |
17652
9efb4dda9720
patch 8.1.1823: command line history code is spread out
Bram Moolenaar <Bram@vim.org>
parents:
17576
diff
changeset
|
72 # include "cmdhist.pro" |
17988
397a49a22fb4
patch 8.1.1990: cannot build with eval but without cscope
Bram Moolenaar <Bram@vim.org>
parents:
17966
diff
changeset
|
73 # include "if_cscope.pro" |
16381
1dcbaa780b8e
patch 8.1.1195: Vim script debugger functionality needs cleanup
Bram Moolenaar <Bram@vim.org>
parents:
16142
diff
changeset
|
74 # include "debugger.pro" |
9558
b591a350f190
commit https://github.com/vim/vim/commit/1abc52c1599fede69b4e76ffde0e879d6fb5080a
Christian Brabandt <cb@256bit.org>
parents:
9536
diff
changeset
|
75 # include "dict.pro" |
7 | 76 # include "diff.pro" |
77 # include "digraph.pro" | |
18124
2a806e3c39f6
patch 8.1.2057: the screen.c file is much too big
Bram Moolenaar <Bram@vim.org>
parents:
18100
diff
changeset
|
78 # include "drawline.pro" |
2a806e3c39f6
patch 8.1.2057: the screen.c file is much too big
Bram Moolenaar <Bram@vim.org>
parents:
18100
diff
changeset
|
79 # include "drawscreen.pro" |
7 | 80 # include "edit.pro" |
81 # include "eval.pro" | |
18010
cf8e0c7e0cb9
patch 8.1.2001: some source files are too big
Bram Moolenaar <Bram@vim.org>
parents:
17988
diff
changeset
|
82 # include "evalbuffer.pro" |
9571
5eaa708ab50d
commit https://github.com/vim/vim/commit/73dad1e64cb42842d8259cb1a255a6fa59822f76
Christian Brabandt <cb@256bit.org>
parents:
9562
diff
changeset
|
83 # include "evalfunc.pro" |
18010
cf8e0c7e0cb9
patch 8.1.2001: some source files are too big
Bram Moolenaar <Bram@vim.org>
parents:
17988
diff
changeset
|
84 # include "evalvars.pro" |
cf8e0c7e0cb9
patch 8.1.2001: some source files are too big
Bram Moolenaar <Bram@vim.org>
parents:
17988
diff
changeset
|
85 # include "evalwindow.pro" |
7 | 86 # include "ex_cmds.pro" |
87 # include "ex_cmds2.pro" | |
88 # include "ex_docmd.pro" | |
89 # include "ex_eval.pro" | |
90 # include "ex_getln.pro" | |
91 # include "fileio.pro" | |
17966
46f95606b9ec
patch 8.1.1979: code for handling file names is spread out
Bram Moolenaar <Bram@vim.org>
parents:
17950
diff
changeset
|
92 # include "filepath.pro" |
15814
99ebf78686a9
patch 8.1.0914: code related to findfile() is spread out
Bram Moolenaar <Bram@vim.org>
parents:
15699
diff
changeset
|
93 # include "findfile.pro" |
24780
7bc92a651472
patch 8.2.2928: the evalfunc.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
23390
diff
changeset
|
94 # include "float.pro" |
7 | 95 # include "fold.pro" |
96 # include "getchar.pro" | |
20637
6c5b11458f31
patch 8.2.0872: XIM code is mixed with multi-byte code
Bram Moolenaar <Bram@vim.org>
parents:
20591
diff
changeset
|
97 # include "gui_xim.pro" |
440 | 98 # include "hardcopy.pro" |
799 | 99 # include "hashtab.pro" |
21423
5db63c2c6929
patch 8.2.1262: src/ex_cmds.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
21054
diff
changeset
|
100 # include "help.pro" |
17389
635d7f5010b8
patch 8.1.1693: syntax coloring and highlighting is in one big file
Bram Moolenaar <Bram@vim.org>
parents:
17377
diff
changeset
|
101 # include "highlight.pro" |
15699
2d941023bd2f
patch 8.1.0857: indent functionality is not separated
Bram Moolenaar <Bram@vim.org>
parents:
15634
diff
changeset
|
102 # include "indent.pro" |
16142
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
15896
diff
changeset
|
103 # include "insexpand.pro" |
7712
bce3b5ddb393
commit https://github.com/vim/vim/commit/520e1e41f35b063ede63b41738c82d6636e78c34
Christian Brabandt <cb@256bit.org>
parents:
6122
diff
changeset
|
104 # include "json.pro" |
9560
1e68dfd7931b
commit https://github.com/vim/vim/commit/da861d631d7e22654faee2789286c685ad548911
Christian Brabandt <cb@256bit.org>
parents:
9558
diff
changeset
|
105 # include "list.pro" |
21437
b32b67a108f2
patch 8.2.1269: language and locale code spread out
Bram Moolenaar <Bram@vim.org>
parents:
21423
diff
changeset
|
106 # include "locale.pro" |
31287
fa309d9af73c
patch 9.0.0977: it is not easy to see what client-server commands are doing
Bram Moolenaar <Bram@vim.org>
parents:
30719
diff
changeset
|
107 # include "logfile.pro" |
15454
1d2b5c016f17
patch 8.1.0735: cannot handle binary data
Bram Moolenaar <Bram@vim.org>
parents:
15330
diff
changeset
|
108 # include "blob.pro" |
7 | 109 # include "main.pro" |
17576
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
17539
diff
changeset
|
110 # include "map.pro" |
7 | 111 # include "mark.pro" |
21054
b1fac55cf8a3
patch 8.2.1078: highlight and match functionality together in one file
Bram Moolenaar <Bram@vim.org>
parents:
20637
diff
changeset
|
112 # include "match.pro" |
7 | 113 # include "memfile.pro" |
114 # include "memline.pro" | |
115 # ifdef FEAT_MENU | |
116 # include "menu.pro" | |
117 # endif | |
9403
9b048dced116
commit https://github.com/vim/vim/commit/75464dc434c43efac60e8bfd9bec2a8b736407e9
Christian Brabandt <cb@256bit.org>
parents:
8493
diff
changeset
|
118 # ifdef FEAT_ARABIC |
9b048dced116
commit https://github.com/vim/vim/commit/75464dc434c43efac60e8bfd9bec2a8b736407e9
Christian Brabandt <cb@256bit.org>
parents:
8493
diff
changeset
|
119 # include "arabic.pro" |
9b048dced116
commit https://github.com/vim/vim/commit/75464dc434c43efac60e8bfd9bec2a8b736407e9
Christian Brabandt <cb@256bit.org>
parents:
8493
diff
changeset
|
120 # endif |
17458
cfdef48743ed
patch 8.1.1727: code for viminfo support is spread out
Bram Moolenaar <Bram@vim.org>
parents:
17389
diff
changeset
|
121 # ifdef FEAT_VIMINFO |
18773
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
122 # include "viminfo.pro" |
17458
cfdef48743ed
patch 8.1.1727: code for viminfo support is spread out
Bram Moolenaar <Bram@vim.org>
parents:
17389
diff
changeset
|
123 # endif |
272 | 124 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18742
diff
changeset
|
125 // These prototypes cannot be produced automatically. |
25475
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
126 int smsg(const char *, ...) ATTRIBUTE_COLD ATTRIBUTE_FORMAT_PRINTF(1, 2); |
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
127 |
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
128 int smsg_attr(int, const char *, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3); |
2280
941ff1cd317a
Add file save counter to undo information. Add undotree() function.
Bram Moolenaar <bram@vim.org>
parents:
2265
diff
changeset
|
129 |
25475
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
130 int smsg_attr_keep(int, const char *, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3); |
2280
941ff1cd317a
Add file save counter to undo information. Add undotree() function.
Bram Moolenaar <bram@vim.org>
parents:
2265
diff
changeset
|
131 |
25475
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
132 // These prototypes cannot be produced automatically. |
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
133 int semsg(const char *, ...) ATTRIBUTE_COLD ATTRIBUTE_FORMAT_PRINTF(1, 2); |
14237
487d7bda80ea
patch 8.1.0135: undo message delays screen update for CTRL-O u
Christian Brabandt <cb@256bit.org>
parents:
13618
diff
changeset
|
134 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18742
diff
changeset
|
135 // These prototypes cannot be produced automatically. |
25475
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
136 void siemsg(const char *, ...) ATTRIBUTE_COLD ATTRIBUTE_FORMAT_PRINTF(1, 2); |
15896
ac080f6a4db8
patch 8.1.0954: arguments of semsg() and siemsg() are not checked
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
137 |
25475
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
138 int vim_snprintf_add(char *, size_t, const char *, ...) ATTRIBUTE_FORMAT_PRINTF(3, 4); |
15896
ac080f6a4db8
patch 8.1.0954: arguments of semsg() and siemsg() are not checked
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
139 |
25475
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
140 int vim_snprintf(char *, size_t, const char *, ...) ATTRIBUTE_FORMAT_PRINTF(3, 4); |
2280
941ff1cd317a
Add file save counter to undo information. Add undotree() function.
Bram Moolenaar <bram@vim.org>
parents:
2265
diff
changeset
|
141 |
25475
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
142 int vim_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) |
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
143 ATTRIBUTE_FORMAT_PRINTF(3, 0); |
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
144 int vim_vsnprintf_typval(char *str, size_t str_m, const char *fmt, va_list ap, typval_T *tvs) |
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
145 ATTRIBUTE_FORMAT_PRINTF(3, 0); |
272 | 146 |
7 | 147 # include "message.pro" |
148 # include "misc1.pro" | |
149 # include "misc2.pro" | |
18773
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
150 # ifndef HAVE_STRPBRK // not generated automatically from misc2.c |
7807
1a5d34492798
commit https://github.com/vim/vim/commit/d99df423c559d85c17779b3685426c489554908c
Christian Brabandt <cb@256bit.org>
parents:
7743
diff
changeset
|
151 char_u *vim_strpbrk(char_u *s, char_u *charset); |
18773
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
152 # endif |
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
153 # ifndef HAVE_QSORT |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18742
diff
changeset
|
154 // Use our own qsort(), don't define the prototype when not used. |
7807
1a5d34492798
commit https://github.com/vim/vim/commit/d99df423c559d85c17779b3685426c489554908c
Christian Brabandt <cb@256bit.org>
parents:
7743
diff
changeset
|
155 void qsort(void *base, size_t elm_count, size_t elm_size, int (*cmp)(const void *, const void *)); |
18773
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
156 # endif |
18135
1868ec23360e
patch 8.1.2062: the mouse code is spread out
Bram Moolenaar <Bram@vim.org>
parents:
18124
diff
changeset
|
157 # include "mouse.pro" |
7 | 158 # include "move.pro" |
15605
62b3805506b3
patch 8.1.0810: too many #ifdefs
Bram Moolenaar <Bram@vim.org>
parents:
15567
diff
changeset
|
159 # include "mbyte.pro" |
18742
e9b2ade1adbd
patch 8.1.2361: MS-Windows: test failures related to VIMDLL
Bram Moolenaar <Bram@vim.org>
parents:
18671
diff
changeset
|
160 # ifdef VIMDLL |
e9b2ade1adbd
patch 8.1.2361: MS-Windows: test failures related to VIMDLL
Bram Moolenaar <Bram@vim.org>
parents:
18671
diff
changeset
|
161 // Function name differs when VIMDLL is defined |
e9b2ade1adbd
patch 8.1.2361: MS-Windows: test failures related to VIMDLL
Bram Moolenaar <Bram@vim.org>
parents:
18671
diff
changeset
|
162 int mbyte_im_get_status(void); |
e9b2ade1adbd
patch 8.1.2361: MS-Windows: test failures related to VIMDLL
Bram Moolenaar <Bram@vim.org>
parents:
18671
diff
changeset
|
163 void mbyte_im_set_active(int active_arg); |
e9b2ade1adbd
patch 8.1.2361: MS-Windows: test failures related to VIMDLL
Bram Moolenaar <Bram@vim.org>
parents:
18671
diff
changeset
|
164 # endif |
7 | 165 # include "normal.pro" |
166 # include "ops.pro" | |
167 # include "option.pro" | |
18100
df5778d73320
patch 8.1.2045: the option.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
18010
diff
changeset
|
168 # include "optionstr.pro" |
18174
1ec6539cef68
patch 8.1.2082: some files have a weird name to fit in 8.3 characters
Bram Moolenaar <Bram@vim.org>
parents:
18172
diff
changeset
|
169 # include "popupmenu.pro" |
17370
ba06a1c42274
patch 8.1.1684: profiling functionality is spread out
Bram Moolenaar <Bram@vim.org>
parents:
17324
diff
changeset
|
170 # if defined(FEAT_PROFILE) || defined(FEAT_RELTIME) |
18773
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
171 # include "profiler.pro" |
17370
ba06a1c42274
patch 8.1.1684: profiling functionality is spread out
Bram Moolenaar <Bram@vim.org>
parents:
17324
diff
changeset
|
172 # endif |
17950
bb0e25a8b5d7
patch 8.1.1971: manually enabling features causes build errors
Bram Moolenaar <Bram@vim.org>
parents:
17873
diff
changeset
|
173 # include "quickfix.pro" |
7 | 174 # include "regexp.pro" |
18164
f57481564f2c
patch 8.1.2077: the ops.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
18135
diff
changeset
|
175 # include "register.pro" |
17861
0a5c615cd949
patch 8.1.1927: code for dealing with script files is spread out
Bram Moolenaar <Bram@vim.org>
parents:
17809
diff
changeset
|
176 # include "scriptfile.pro" |
7 | 177 # include "screen.pro" |
17539
554240b9574b
patch 8.1.1767: FEAT_SESSION defined separately
Bram Moolenaar <Bram@vim.org>
parents:
17536
diff
changeset
|
178 # include "session.pro" |
2265
b7cb69ab616d
Added salt to blowfish encryption.
Bram Moolenaar <bram@vim.org>
parents:
2209
diff
changeset
|
179 # if defined(FEAT_CRYPT) || defined(FEAT_PERSISTENT_UNDO) |
2180
f60a0c9cbe6c
Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
799
diff
changeset
|
180 # include "sha256.pro" |
f60a0c9cbe6c
Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
799
diff
changeset
|
181 # endif |
7 | 182 # include "search.pro" |
15330
a6330a49e036
patch 8.1.0673: functionality for signs is spread out over several files
Bram Moolenaar <Bram@vim.org>
parents:
15138
diff
changeset
|
183 # ifdef FEAT_SIGNS |
16606
7e733046db1d
patch 8.1.1306: Borland support is outdated and doesn't work
Bram Moolenaar <Bram@vim.org>
parents:
16411
diff
changeset
|
184 # include "sign.pro" |
15330
a6330a49e036
patch 8.1.0673: functionality for signs is spread out over several files
Bram Moolenaar <Bram@vim.org>
parents:
15138
diff
changeset
|
185 # endif |
17004
353ed7ef78df
patch 8.1.1502: cannot play any sound
Bram Moolenaar <Bram@vim.org>
parents:
16778
diff
changeset
|
186 # include "sound.pro" |
220 | 187 # include "spell.pro" |
9583
b0c7061d6439
commit https://github.com/vim/vim/commit/9ccfebddc3ff2a3c2853cf706fd4c26f639bf381
Christian Brabandt <cb@256bit.org>
parents:
9571
diff
changeset
|
188 # include "spellfile.pro" |
18172
6e53d83e021d
patch 8.1.2081: the spell.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
18164
diff
changeset
|
189 # include "spellsuggest.pro" |
25206
dc66d0284518
patch 8.2.3139: functions for string manipulation are spread out
Bram Moolenaar <Bram@vim.org>
parents:
24780
diff
changeset
|
190 # include "strings.pro" |
7 | 191 # include "syntax.pro" |
192 # include "tag.pro" | |
193 # include "term.pro" | |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
10042
diff
changeset
|
194 # ifdef FEAT_TERMINAL |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
10042
diff
changeset
|
195 # include "terminal.pro" |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
10042
diff
changeset
|
196 # endif |
7 | 197 # if defined(HAVE_TGETENT) && (defined(AMIGA) || defined(VMS)) |
198 # include "termlib.pro" | |
199 # endif | |
18763
49b78d6465e5
patch 8.1.2371: FEAT_TEXT_PROP is a confusing name
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
200 # ifdef FEAT_PROP_POPUP |
16778
eda4d65f232c
patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents:
16632
diff
changeset
|
201 # include "popupwin.pro" |
15138
9df130fd5e0d
patch 8.1.0579: cannot attach properties to text
Bram Moolenaar <Bram@vim.org>
parents:
14237
diff
changeset
|
202 # include "textprop.pro" |
9df130fd5e0d
patch 8.1.0579: cannot attach properties to text
Bram Moolenaar <Bram@vim.org>
parents:
14237
diff
changeset
|
203 # endif |
17377
cb008de2a6ec
patch 8.1.1687: the evalfunc.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
17370
diff
changeset
|
204 # include "testing.pro" |
20209
6ca6a372fef6
patch 8.2.0660: the search.c file is a bit big
Bram Moolenaar <Bram@vim.org>
parents:
19920
diff
changeset
|
205 # include "textobject.pro" |
20237
918245588b50
patch 8.2.0674: some source files are too big
Bram Moolenaar <Bram@vim.org>
parents:
20209
diff
changeset
|
206 # include "textformat.pro" |
19396
a961efb326e5
patch 8.2.0256: time and timer related code is spread out
Bram Moolenaar <Bram@vim.org>
parents:
19181
diff
changeset
|
207 # include "time.pro" |
20587
f502455965c0
patch 8.2.0847: typval related code is spread out
Bram Moolenaar <Bram@vim.org>
parents:
20237
diff
changeset
|
208 # include "typval.pro" |
7 | 209 # include "ui.pro" |
210 # include "undo.pro" | |
16411
5b5c5daf57de
patch 8.1.1210: support for user commands is spread out
Bram Moolenaar <Bram@vim.org>
parents:
16381
diff
changeset
|
211 # include "usercmd.pro" |
9562
86af4a48c00a
commit https://github.com/vim/vim/commit/a9b579f3d7463720a316e11e77a7a9fbb9267986
Christian Brabandt <cb@256bit.org>
parents:
9560
diff
changeset
|
212 # include "userfunc.pro" |
7 | 213 # include "version.pro" |
23390
9a5f12b36273
patch 8.2.2238: Vim9: cannot load a Vim9 script without the +eval feature
Bram Moolenaar <Bram@vim.org>
parents:
22095
diff
changeset
|
214 # include "vim9script.pro" |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
18773
diff
changeset
|
215 # ifdef FEAT_EVAL |
26662
4b23672d1f0e
patch 8.2.3860: Vim9: codecov struggles with the file size
Bram Moolenaar <Bram@vim.org>
parents:
25529
diff
changeset
|
216 // include vim9.h here, the types defined there are used by function arguments. |
4b23672d1f0e
patch 8.2.3860: Vim9: codecov struggles with the file size
Bram Moolenaar <Bram@vim.org>
parents:
25529
diff
changeset
|
217 # include "vim9.h" |
31335
5acc0d2cf4f7
patch 9.0.1001: classes are not documented or implemented yet
Bram Moolenaar <Bram@vim.org>
parents:
31289
diff
changeset
|
218 # include "vim9class.pro" |
26662
4b23672d1f0e
patch 8.2.3860: Vim9: codecov struggles with the file size
Bram Moolenaar <Bram@vim.org>
parents:
25529
diff
changeset
|
219 # include "vim9cmds.pro" |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
18773
diff
changeset
|
220 # include "vim9compile.pro" |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
18773
diff
changeset
|
221 # include "vim9execute.pro" |
26662
4b23672d1f0e
patch 8.2.3860: Vim9: codecov struggles with the file size
Bram Moolenaar <Bram@vim.org>
parents:
25529
diff
changeset
|
222 # include "vim9expr.pro" |
4b23672d1f0e
patch 8.2.3860: Vim9: codecov struggles with the file size
Bram Moolenaar <Bram@vim.org>
parents:
25529
diff
changeset
|
223 # include "vim9instr.pro" |
21711
d2dee69de7c7
patch 8.2.1405: Vim9: vim9compile.c is getting too big
Bram Moolenaar <Bram@vim.org>
parents:
21437
diff
changeset
|
224 # include "vim9type.pro" |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
18773
diff
changeset
|
225 # endif |
7 | 226 # include "window.pro" |
227 | |
2320
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2310
diff
changeset
|
228 # ifdef FEAT_LUA |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2310
diff
changeset
|
229 # include "if_lua.pro" |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2310
diff
changeset
|
230 # endif |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2310
diff
changeset
|
231 |
14 | 232 # ifdef FEAT_MZSCHEME |
233 # include "if_mzsch.pro" | |
234 # endif | |
235 | |
7 | 236 # ifdef FEAT_PYTHON |
237 # include "if_python.pro" | |
238 # endif | |
239 | |
2329
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
240 # ifdef FEAT_PYTHON3 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
241 # include "if_python3.pro" |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
242 # endif |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
243 |
7 | 244 # ifdef FEAT_TCL |
245 # include "if_tcl.pro" | |
246 # endif | |
247 | |
248 # ifdef FEAT_RUBY | |
249 # include "if_ruby.pro" | |
250 # endif | |
251 | |
17324
066d77831630
patch 8.1.1661: cannot build with +textprop but without +balloon_eval
Bram Moolenaar <Bram@vim.org>
parents:
17063
diff
changeset
|
252 // Ugly solution for "BalloonEval" not being defined while it's used in some |
066d77831630
patch 8.1.1661: cannot build with +textprop but without +balloon_eval
Bram Moolenaar <Bram@vim.org>
parents:
17063
diff
changeset
|
253 // .pro files. |
066d77831630
patch 8.1.1661: cannot build with +textprop but without +balloon_eval
Bram Moolenaar <Bram@vim.org>
parents:
17063
diff
changeset
|
254 # ifndef FEAT_BEVAL |
066d77831630
patch 8.1.1661: cannot build with +textprop but without +balloon_eval
Bram Moolenaar <Bram@vim.org>
parents:
17063
diff
changeset
|
255 # define BalloonEval int |
066d77831630
patch 8.1.1661: cannot build with +textprop but without +balloon_eval
Bram Moolenaar <Bram@vim.org>
parents:
17063
diff
changeset
|
256 # endif |
18763
49b78d6465e5
patch 8.1.2371: FEAT_TEXT_PROP is a confusing name
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
257 # if defined(FEAT_BEVAL) || defined(FEAT_PROP_POPUP) |
12889
0ebade0c0ab2
patch 8.0.1321: can't build huge version with Athena
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
258 # include "beval.pro" |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2180
diff
changeset
|
259 # endif |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2180
diff
changeset
|
260 |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2180
diff
changeset
|
261 # ifdef FEAT_NETBEANS_INTG |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2180
diff
changeset
|
262 # include "netbeans.pro" |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2180
diff
changeset
|
263 # endif |
8493
caed4b2d305f
commit https://github.com/vim/vim/commit/509ce2a558e7e0c03242e32e844255af52f1c821
Christian Brabandt <cb@256bit.org>
parents:
8212
diff
changeset
|
264 # ifdef FEAT_JOB_CHANNEL |
22095
2cc0de1e05a6
patch 8.2.1597: the channel source file is too big
Bram Moolenaar <Bram@vim.org>
parents:
21745
diff
changeset
|
265 # include "job.pro" |
7743
6069f43cea4e
commit https://github.com/vim/vim/commit/e0874f8cbcddfcf9965a85ba35199964efb1d01a
Christian Brabandt <cb@256bit.org>
parents:
7712
diff
changeset
|
266 # include "channel.pro" |
31289
4f1e70a709bb
patch 9.0.0978: build errors without the +channel feature
Bram Moolenaar <Bram@vim.org>
parents:
31287
diff
changeset
|
267 # endif |
13610
e76499e85744
patch 8.0.1677: no compiler warning for wrong format in vim_snprintf()
Christian Brabandt <cb@256bit.org>
parents:
12889
diff
changeset
|
268 |
31289
4f1e70a709bb
patch 9.0.0978: build errors without the +channel feature
Bram Moolenaar <Bram@vim.org>
parents:
31287
diff
changeset
|
269 # ifdef FEAT_EVAL |
31287
fa309d9af73c
patch 9.0.0977: it is not easy to see what client-server commands are doing
Bram Moolenaar <Bram@vim.org>
parents:
30719
diff
changeset
|
270 // Not generated automatically so that we can add an extra attribute. |
25475
038eb6d9003a
patch 8.2.3274: macro for printf format check can be simplified
Bram Moolenaar <Bram@vim.org>
parents:
25206
diff
changeset
|
271 void ch_log(channel_T *ch, const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3); |
31287
fa309d9af73c
patch 9.0.0977: it is not easy to see what client-server commands are doing
Bram Moolenaar <Bram@vim.org>
parents:
30719
diff
changeset
|
272 void ch_error(channel_T *ch, const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3); |
7743
6069f43cea4e
commit https://github.com/vim/vim/commit/e0874f8cbcddfcf9965a85ba35199964efb1d01a
Christian Brabandt <cb@256bit.org>
parents:
7712
diff
changeset
|
273 # endif |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2180
diff
changeset
|
274 |
11737
7791a15353dc
patch 8.0.0751: OpenPTY missing with some combination of features
Christian Brabandt <cb@256bit.org>
parents:
11653
diff
changeset
|
275 # if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL) |
15567
c9230ee2b1ad
patch 8.1.0791: a few compiler warnings on VMS
Bram Moolenaar <Bram@vim.org>
parents:
15510
diff
changeset
|
276 # if defined(UNIX) || defined(MACOS_X) || defined(VMS) |
7 | 277 # include "pty.pro" |
278 # endif | |
11737
7791a15353dc
patch 8.0.0751: OpenPTY missing with some combination of features
Christian Brabandt <cb@256bit.org>
parents:
11653
diff
changeset
|
279 # endif |
7791a15353dc
patch 8.0.0751: OpenPTY missing with some combination of features
Christian Brabandt <cb@256bit.org>
parents:
11653
diff
changeset
|
280 |
7791a15353dc
patch 8.0.0751: OpenPTY missing with some combination of features
Christian Brabandt <cb@256bit.org>
parents:
11653
diff
changeset
|
281 # ifdef FEAT_GUI |
7791a15353dc
patch 8.0.0751: OpenPTY missing with some combination of features
Christian Brabandt <cb@256bit.org>
parents:
11653
diff
changeset
|
282 # include "gui.pro" |
7 | 283 # if !defined(HAVE_SETENV) && !defined(HAVE_PUTENV) && !defined(VMS) |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18742
diff
changeset
|
284 extern int putenv(const char *string); // in misc2.c |
7 | 285 # ifdef USE_VIMPTY_GETENV |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18742
diff
changeset
|
286 extern char_u *vimpty_getenv(const char_u *string); // in misc2.c |
7 | 287 # endif |
288 # endif | |
15868
7fad90423bd2
patch 8.1.0941: macros for MS-Windows are inconsistent
Bram Moolenaar <Bram@vim.org>
parents:
15850
diff
changeset
|
289 # ifdef FEAT_GUI_MSWIN |
7 | 290 # include "gui_w32.pro" |
291 # endif | |
292 # ifdef FEAT_GUI_GTK | |
293 # include "gui_gtk.pro" | |
294 # include "gui_gtk_x11.pro" | |
295 # endif | |
296 # ifdef FEAT_GUI_MOTIF | |
297 # include "gui_motif.pro" | |
44 | 298 # include "gui_xmdlg.pro" |
7 | 299 # endif |
19526
22f0dda71638
patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents:
19396
diff
changeset
|
300 # ifdef FEAT_GUI_HAIKU |
22f0dda71638
patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents:
19396
diff
changeset
|
301 # include "gui_haiku.pro" |
22f0dda71638
patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents:
19396
diff
changeset
|
302 # endif |
7 | 303 # ifdef FEAT_GUI_X11 |
304 # include "gui_x11.pro" | |
305 # endif | |
306 # ifdef FEAT_GUI_PHOTON | |
307 # include "gui_photon.pro" | |
308 # endif | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18742
diff
changeset
|
309 # endif // FEAT_GUI |
7 | 310 |
311 # ifdef FEAT_OLE | |
312 # include "if_ole.pro" | |
313 # endif | |
314 # if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11) | |
315 # include "if_xcmdsrv.pro" | |
316 # endif | |
317 | |
318 /* | |
539 | 319 * The perl include files pollute the namespace, therefore proto.h must be |
7 | 320 * included before the perl include files. But then CV is not defined, which |
321 * is used in if_perl.pro. To get around this, the perl prototype files are | |
322 * not included here for the perl files. Use a dummy define for CV for the | |
323 * other files. | |
324 */ | |
18773
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
325 # if defined(FEAT_PERL) && !defined(IN_PERL_FILE) |
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
326 # define CV void |
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
327 # include "if_perl.pro" |
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
328 # include "if_perlsfio.pro" |
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
329 # endif |
7 | 330 |
18773
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
331 # ifdef MACOS_CONVERT |
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
332 # include "os_mac_conv.pro" |
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
333 # endif |
30719
71137f73c94d
patch 9.0.0694: no native sound support on Mac OS
Bram Moolenaar <Bram@vim.org>
parents:
28303
diff
changeset
|
334 # ifdef MACOS_X |
71137f73c94d
patch 9.0.0694: no native sound support on Mac OS
Bram Moolenaar <Bram@vim.org>
parents:
28303
diff
changeset
|
335 # include "os_macosx.pro" |
71137f73c94d
patch 9.0.0694: no native sound support on Mac OS
Bram Moolenaar <Bram@vim.org>
parents:
28303
diff
changeset
|
336 # endif |
18773
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
337 # if defined(MACOS_X_DARWIN) && defined(FEAT_CLIPBOARD) && !defined(FEAT_GUI) |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18742
diff
changeset
|
338 // functions in os_macosx.m |
17063
3147c7c2e86b
patch 8.1.1531: clipboard type name is inconsistent
Bram Moolenaar <Bram@vim.org>
parents:
17004
diff
changeset
|
339 void clip_mch_lose_selection(Clipboard_T *cbd); |
3147c7c2e86b
patch 8.1.1531: clipboard type name is inconsistent
Bram Moolenaar <Bram@vim.org>
parents:
17004
diff
changeset
|
340 int clip_mch_own_selection(Clipboard_T *cbd); |
3147c7c2e86b
patch 8.1.1531: clipboard type name is inconsistent
Bram Moolenaar <Bram@vim.org>
parents:
17004
diff
changeset
|
341 void clip_mch_request_selection(Clipboard_T *cbd); |
3147c7c2e86b
patch 8.1.1531: clipboard type name is inconsistent
Bram Moolenaar <Bram@vim.org>
parents:
17004
diff
changeset
|
342 void clip_mch_set_selection(Clipboard_T *cbd); |
18773
38a3bef525e6
patch 8.1.2376: preprocessor indents are incorrect
Bram Moolenaar <Bram@vim.org>
parents:
18763
diff
changeset
|
343 # endif |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18742
diff
changeset
|
344 #endif // !PROTO && !NOPROTO |