blob: 8b299ec6152bdfca9579b6789e7e4d2c7588036c [file] [log] [blame]
Bram Moolenaaredf3f972016-08-29 22:49:24 +02001/* vi:set ts=8 sts=4 sw=4 noet:
Bram Moolenaar071d4272004-06-13 20:20:40 +00002 *
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 */
22/* avoid errors in function prototypes */
Bram Moolenaarcef9dcc2005-12-06 19:50:41 +000023# if !defined(FEAT_X11) && !defined(FEAT_GUI_GTK)
Bram Moolenaar071d4272004-06-13 20:20:40 +000024# 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
Bram Moolenaara06ecab2016-07-16 14:47:36 +020038# if defined(UNIX) || defined(VMS)
Bram Moolenaar071d4272004-06-13 20:20:40 +000039# include "os_unix.pro"
40# endif
Bram Moolenaar4f974752019-02-17 17:44:42 +010041# ifdef MSWIN
Bram Moolenaar071d4272004-06-13 20:20:40 +000042# include "os_win32.pro"
43# include "os_mswin.pro"
Bram Moolenaar693e40c2013-02-26 14:56:42 +010044# include "winclip.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +000045# if (defined(__GNUC__) && !defined(__MINGW32__)) \
46 || (defined(__BORLANDC__) && __BORLANDC__ < 0x502)
Bram Moolenaard99df422016-01-29 23:20:40 +010047extern int _stricoll(char *a, char *b);
Bram Moolenaar071d4272004-06-13 20:20:40 +000048# endif
49# endif
50# ifdef VMS
51# include "os_vms.pro"
52# endif
53# ifdef __BEOS__
54# include "os_beos.pro"
55# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000056# ifdef __QNX__
57# include "os_qnx.pro"
58# endif
59
Bram Moolenaar40e6a712010-05-16 22:32:54 +020060# ifdef FEAT_CRYPT
61# include "blowfish.pro"
Bram Moolenaar8f4ac012014-08-10 13:38:34 +020062# include "crypt.pro"
63# include "crypt_zip.pro"
Bram Moolenaar40e6a712010-05-16 22:32:54 +020064# endif
Bram Moolenaar3e460fd2019-01-26 16:21:07 +010065# include "autocmd.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +000066# include "buffer.pro"
67# include "charset.pro"
68# ifdef FEAT_CSCOPE
69# include "if_cscope.pro"
70# endif
Bram Moolenaar1abc52c2016-07-17 15:06:51 +020071# include "dict.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +000072# include "diff.pro"
73# include "digraph.pro"
74# include "edit.pro"
75# include "eval.pro"
Bram Moolenaar73dad1e2016-07-17 22:13:49 +020076# include "evalfunc.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +000077# include "ex_cmds.pro"
78# include "ex_cmds2.pro"
79# include "ex_docmd.pro"
80# include "ex_eval.pro"
81# include "ex_getln.pro"
82# include "fileio.pro"
Bram Moolenaar5fd0f502019-02-13 23:13:28 +010083# include "findfile.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +000084# include "fold.pro"
85# include "getchar.pro"
86# ifdef FEAT_HANGULIN
87# include "hangulin.pro"
88# endif
Bram Moolenaar58d98232005-07-23 22:25:46 +000089# include "hardcopy.pro"
Bram Moolenaarc01140a2006-03-24 22:21:52 +000090# include "hashtab.pro"
Bram Moolenaar4b471622019-01-31 13:48:09 +010091# include "indent.pro"
Bram Moolenaar7591bb32019-03-30 13:53:47 +010092# ifdef FEAT_INS_EXPAND
93# include "insexpand.pro"
94# endif
Bram Moolenaar520e1e42016-01-23 19:46:28 +010095# include "json.pro"
Bram Moolenaarda861d62016-07-17 15:46:27 +020096# include "list.pro"
Bram Moolenaar6e5ea8d2019-01-12 22:47:31 +010097# include "blob.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +000098# include "main.pro"
99# include "mark.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000100# include "memfile.pro"
101# include "memline.pro"
102# ifdef FEAT_MENU
103# include "menu.pro"
104# endif
Bram Moolenaar75464dc2016-07-02 20:27:50 +0200105# ifdef FEAT_ARABIC
106# include "arabic.pro"
107# endif
Bram Moolenaar9c13b352005-05-19 20:53:52 +0000108
Bram Moolenaarba4ef272016-01-30 21:48:49 +0100109/* These prototypes cannot be produced automatically. */
Bram Moolenaar9c13b352005-05-19 20:53:52 +0000110int
111# ifdef __BORLANDC__
112_RTLENTRYF
113# endif
Bram Moolenaarb5443cc2019-01-15 20:19:40 +0100114smsg(const char *, ...)
115#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
116 __attribute__((format(printf, 1, 0)))
117#endif
118 ;
Bram Moolenaara800b422010-06-27 01:15:55 +0200119
Bram Moolenaar9c13b352005-05-19 20:53:52 +0000120int
121# ifdef __BORLANDC__
122_RTLENTRYF
123# endif
Bram Moolenaarb5443cc2019-01-15 20:19:40 +0100124smsg_attr(int, const char *, ...)
125#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
126 __attribute__((format(printf, 2, 3)))
127#endif
128 ;
Bram Moolenaara800b422010-06-27 01:15:55 +0200129
130int
131# ifdef __BORLANDC__
132_RTLENTRYF
133# endif
Bram Moolenaarb5443cc2019-01-15 20:19:40 +0100134smsg_attr_keep(int, const char *, ...)
135#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
136 __attribute__((format(printf, 2, 3)))
137#endif
138 ;
Bram Moolenaare0429682018-07-01 16:44:03 +0200139
Bram Moolenaar0d8562a2019-02-19 21:34:05 +0100140/* These prototypes cannot be produced automatically. */
141int
142# ifdef __BORLANDC__
143_RTLENTRYF
144# endif
145semsg(const char *, ...)
146#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
147 __attribute__((format(printf, 1, 0)))
148#endif
149 ;
150
151/* These prototypes cannot be produced automatically. */
152void
153# ifdef __BORLANDC__
154_RTLENTRYF
155# endif
156siemsg(const char *, ...)
157#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
158 __attribute__((format(printf, 1, 0)))
159#endif
160 ;
161
Bram Moolenaare0429682018-07-01 16:44:03 +0200162int
163# ifdef __BORLANDC__
164_RTLENTRYF
165# endif
Bram Moolenaarf9e3e092019-01-13 23:38:42 +0100166vim_snprintf_add(char *, size_t, const char *, ...)
Bram Moolenaare80757c2018-04-10 12:42:44 +0200167#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
Bram Moolenaarea391762018-04-08 13:07:22 +0200168 __attribute__((format(printf, 3, 4)))
169#endif
170 ;
Bram Moolenaara800b422010-06-27 01:15:55 +0200171
Bram Moolenaar9c13b352005-05-19 20:53:52 +0000172int
173# ifdef __BORLANDC__
174_RTLENTRYF
175# endif
Bram Moolenaarf9e3e092019-01-13 23:38:42 +0100176vim_snprintf(char *, size_t, const char *, ...)
Bram Moolenaare80757c2018-04-10 12:42:44 +0200177#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
Bram Moolenaarea391762018-04-08 13:07:22 +0200178 __attribute__((format(printf, 3, 4)))
179#endif
180 ;
Bram Moolenaara800b422010-06-27 01:15:55 +0200181
Bram Moolenaarf9e3e092019-01-13 23:38:42 +0100182int vim_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
183int vim_vsnprintf_typval(char *str, size_t str_m, const char *fmt, va_list ap, typval_T *tvs);
Bram Moolenaar9c13b352005-05-19 20:53:52 +0000184
Bram Moolenaar071d4272004-06-13 20:20:40 +0000185# include "message.pro"
186# include "misc1.pro"
187# include "misc2.pro"
188#ifndef HAVE_STRPBRK /* not generated automatically from misc2.c */
Bram Moolenaard99df422016-01-29 23:20:40 +0100189char_u *vim_strpbrk(char_u *s, char_u *charset);
Bram Moolenaar071d4272004-06-13 20:20:40 +0000190#endif
191#ifndef HAVE_QSORT
192/* Use our own qsort(), don't define the prototype when not used. */
Bram Moolenaard99df422016-01-29 23:20:40 +0100193void qsort(void *base, size_t elm_count, size_t elm_size, int (*cmp)(const void *, const void *));
Bram Moolenaar071d4272004-06-13 20:20:40 +0000194#endif
195# include "move.pro"
Bram Moolenaar264b74f2019-01-24 17:18:42 +0100196# include "mbyte.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000197# include "normal.pro"
198# include "ops.pro"
199# include "option.pro"
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000200# include "popupmnu.pro"
201# ifdef FEAT_QUICKFIX
202# include "quickfix.pro"
203# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000204# include "regexp.pro"
205# include "screen.pro"
Bram Moolenaar80794b12010-06-13 05:20:42 +0200206# if defined(FEAT_CRYPT) || defined(FEAT_PERSISTENT_UNDO)
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200207# include "sha256.pro"
208# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000209# include "search.pro"
Bram Moolenaarbbea4702019-01-01 13:20:31 +0100210# ifdef FEAT_SIGNS
211# include "sign.pro"
212# endif
Bram Moolenaar2e4096b2005-03-20 22:25:45 +0000213# include "spell.pro"
Bram Moolenaar9ccfebd2016-07-19 16:39:08 +0200214# include "spellfile.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000215# include "syntax.pro"
216# include "tag.pro"
217# include "term.pro"
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200218# ifdef FEAT_TERMINAL
219# include "terminal.pro"
220# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000221# if defined(HAVE_TGETENT) && (defined(AMIGA) || defined(VMS))
222# include "termlib.pro"
223# endif
Bram Moolenaar98aefe72018-12-13 22:20:09 +0100224# ifdef FEAT_TEXT_PROP
225# include "textprop.pro"
226# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000227# include "ui.pro"
228# include "undo.pro"
Bram Moolenaara9b579f2016-07-17 18:29:19 +0200229# include "userfunc.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000230# include "version.pro"
231# include "window.pro"
232
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200233# ifdef FEAT_LUA
234# include "if_lua.pro"
235# endif
236
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000237# ifdef FEAT_MZSCHEME
238# include "if_mzsch.pro"
239# endif
240
Bram Moolenaar071d4272004-06-13 20:20:40 +0000241# ifdef FEAT_PYTHON
242# include "if_python.pro"
243# endif
244
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200245# ifdef FEAT_PYTHON3
246# include "if_python3.pro"
247# endif
248
Bram Moolenaar071d4272004-06-13 20:20:40 +0000249# ifdef FEAT_TCL
250# include "if_tcl.pro"
251# endif
252
253# ifdef FEAT_RUBY
254# include "if_ruby.pro"
255# endif
256
Bram Moolenaar67c53842010-05-22 18:28:27 +0200257/* Ugly solution for "BalloonEval" not being defined while it's used in some
258 * .pro files. */
Bram Moolenaar40e280d2017-11-19 20:34:59 +0100259# ifdef FEAT_BEVAL
260# include "beval.pro"
261# else
Bram Moolenaar67c53842010-05-22 18:28:27 +0200262# define BalloonEval int
263# endif
264
265# ifdef FEAT_NETBEANS_INTG
266# include "netbeans.pro"
267# endif
Bram Moolenaar509ce2a2016-03-11 22:52:15 +0100268# ifdef FEAT_JOB_CHANNEL
Bram Moolenaare0874f82016-01-24 20:36:41 +0100269# include "channel.pro"
Bram Moolenaarea391762018-04-08 13:07:22 +0200270
271/* Not generated automatically, to add extra attribute. */
272void ch_log(channel_T *ch, const char *fmt, ...)
Bram Moolenaare80757c2018-04-10 12:42:44 +0200273#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
Bram Moolenaarea391762018-04-08 13:07:22 +0200274 __attribute__((format(printf, 2, 3)))
275#endif
276 ;
277
Bram Moolenaare0874f82016-01-24 20:36:41 +0100278# endif
Bram Moolenaar67c53842010-05-22 18:28:27 +0200279
Bram Moolenaar613fe7a2017-07-22 21:11:53 +0200280# if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL)
Bram Moolenaar563bbea2019-01-22 21:45:40 +0100281# if defined(UNIX) || defined(MACOS_X) || defined(VMS)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000282# include "pty.pro"
283# endif
Bram Moolenaar613fe7a2017-07-22 21:11:53 +0200284# endif
285
286# ifdef FEAT_GUI
287# include "gui.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000288# if !defined(HAVE_SETENV) && !defined(HAVE_PUTENV) && !defined(VMS)
Bram Moolenaar613fe7a2017-07-22 21:11:53 +0200289extern int putenv(const char *string); /* in misc2.c */
Bram Moolenaar071d4272004-06-13 20:20:40 +0000290# ifdef USE_VIMPTY_GETENV
Bram Moolenaar613fe7a2017-07-22 21:11:53 +0200291extern char_u *vimpty_getenv(const char_u *string); /* in misc2.c */
Bram Moolenaar071d4272004-06-13 20:20:40 +0000292# endif
293# endif
Bram Moolenaar4f974752019-02-17 17:44:42 +0100294# ifdef FEAT_GUI_MSWIN
Bram Moolenaar071d4272004-06-13 20:20:40 +0000295# include "gui_w32.pro"
296# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000297# ifdef FEAT_GUI_GTK
298# include "gui_gtk.pro"
299# include "gui_gtk_x11.pro"
300# endif
301# ifdef FEAT_GUI_MOTIF
302# include "gui_motif.pro"
Bram Moolenaardfccaf02004-12-31 20:56:11 +0000303# include "gui_xmdlg.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000304# endif
305# ifdef FEAT_GUI_ATHENA
306# include "gui_athena.pro"
307# ifdef FEAT_BROWSE
Bram Moolenaard99df422016-01-29 23:20:40 +0100308extern char *vim_SelFile(Widget toplevel, char *prompt, char *init_path, int (*show_entry)(), int x, int y, guicolor_T fg, guicolor_T bg, guicolor_T scroll_fg, guicolor_T scroll_bg);
Bram Moolenaar071d4272004-06-13 20:20:40 +0000309# endif
310# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000311# ifdef FEAT_GUI_MAC
312# include "gui_mac.pro"
313# endif
314# ifdef FEAT_GUI_X11
315# include "gui_x11.pro"
316# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000317# ifdef FEAT_GUI_PHOTON
318# include "gui_photon.pro"
319# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000320# endif /* FEAT_GUI */
321
322# ifdef FEAT_OLE
323# include "if_ole.pro"
324# endif
325# if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11)
326# include "if_xcmdsrv.pro"
327# endif
328
329/*
Bram Moolenaarbb15b652005-10-03 21:52:09 +0000330 * The perl include files pollute the namespace, therefore proto.h must be
Bram Moolenaar071d4272004-06-13 20:20:40 +0000331 * included before the perl include files. But then CV is not defined, which
332 * is used in if_perl.pro. To get around this, the perl prototype files are
333 * not included here for the perl files. Use a dummy define for CV for the
334 * other files.
335 */
336#if defined(FEAT_PERL) && !defined(IN_PERL_FILE)
337# define CV void
338# ifdef __BORLANDC__
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000339 #pragma option -pc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000340# endif
341# include "if_perl.pro"
342# ifdef __BORLANDC__
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000343 #pragma option -p.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000344# endif
345# include "if_perlsfio.pro"
346#endif
347
Bram Moolenaardb003512006-03-15 22:48:35 +0000348#ifdef MACOS_CONVERT
Bram Moolenaarda2303d2005-08-30 21:55:26 +0000349# include "os_mac_conv.pro"
350#endif
Bram Moolenaard0573012017-10-28 21:11:06 +0200351#if defined(MACOS_X_DARWIN) && defined(FEAT_CLIPBOARD) && !defined(FEAT_GUI)
Bram Moolenaard43848c2010-07-14 14:28:26 +0200352/* functions in os_macosx.m */
353void clip_mch_lose_selection(VimClipboard *cbd);
354int clip_mch_own_selection(VimClipboard *cbd);
355void clip_mch_request_selection(VimClipboard *cbd);
356void clip_mch_set_selection(VimClipboard *cbd);
357#endif
Bram Moolenaarda2303d2005-08-30 21:55:26 +0000358
Bram Moolenaar071d4272004-06-13 20:20:40 +0000359#ifdef __BORLANDC__
360# define _PROTO_H
361#endif
362#endif /* !PROTO && !NOPROTO */