blob: 448233ad12b01232969070e8ccedb4d36e22db63 [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 Moolenaareead75c2019-04-21 11:35:00 +020071# include "debugger.pro"
Bram Moolenaar1abc52c2016-07-17 15:06:51 +020072# include "dict.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +000073# include "diff.pro"
74# include "digraph.pro"
75# include "edit.pro"
76# include "eval.pro"
Bram Moolenaar73dad1e2016-07-17 22:13:49 +020077# include "evalfunc.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +000078# include "ex_cmds.pro"
79# include "ex_cmds2.pro"
80# include "ex_docmd.pro"
81# include "ex_eval.pro"
82# include "ex_getln.pro"
83# include "fileio.pro"
Bram Moolenaar5fd0f502019-02-13 23:13:28 +010084# include "findfile.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +000085# include "fold.pro"
86# include "getchar.pro"
87# ifdef FEAT_HANGULIN
88# include "hangulin.pro"
89# endif
Bram Moolenaar58d98232005-07-23 22:25:46 +000090# include "hardcopy.pro"
Bram Moolenaarc01140a2006-03-24 22:21:52 +000091# include "hashtab.pro"
Bram Moolenaar4b471622019-01-31 13:48:09 +010092# include "indent.pro"
Bram Moolenaar7591bb32019-03-30 13:53:47 +010093# ifdef FEAT_INS_EXPAND
94# include "insexpand.pro"
95# endif
Bram Moolenaar520e1e42016-01-23 19:46:28 +010096# include "json.pro"
Bram Moolenaarda861d62016-07-17 15:46:27 +020097# include "list.pro"
Bram Moolenaar6e5ea8d2019-01-12 22:47:31 +010098# include "blob.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +000099# include "main.pro"
100# include "mark.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101# include "memfile.pro"
102# include "memline.pro"
103# ifdef FEAT_MENU
104# include "menu.pro"
105# endif
Bram Moolenaar75464dc2016-07-02 20:27:50 +0200106# ifdef FEAT_ARABIC
107# include "arabic.pro"
108# endif
Bram Moolenaar9c13b352005-05-19 20:53:52 +0000109
Bram Moolenaarba4ef272016-01-30 21:48:49 +0100110/* These prototypes cannot be produced automatically. */
Bram Moolenaar9c13b352005-05-19 20:53:52 +0000111int
112# ifdef __BORLANDC__
113_RTLENTRYF
114# endif
Bram Moolenaarb5443cc2019-01-15 20:19:40 +0100115smsg(const char *, ...)
116#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
117 __attribute__((format(printf, 1, 0)))
118#endif
119 ;
Bram Moolenaara800b422010-06-27 01:15:55 +0200120
Bram Moolenaar9c13b352005-05-19 20:53:52 +0000121int
122# ifdef __BORLANDC__
123_RTLENTRYF
124# endif
Bram Moolenaarb5443cc2019-01-15 20:19:40 +0100125smsg_attr(int, const char *, ...)
126#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
127 __attribute__((format(printf, 2, 3)))
128#endif
129 ;
Bram Moolenaara800b422010-06-27 01:15:55 +0200130
131int
132# ifdef __BORLANDC__
133_RTLENTRYF
134# endif
Bram Moolenaarb5443cc2019-01-15 20:19:40 +0100135smsg_attr_keep(int, const char *, ...)
136#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
137 __attribute__((format(printf, 2, 3)))
138#endif
139 ;
Bram Moolenaare0429682018-07-01 16:44:03 +0200140
Bram Moolenaar0d8562a2019-02-19 21:34:05 +0100141/* These prototypes cannot be produced automatically. */
142int
143# ifdef __BORLANDC__
144_RTLENTRYF
145# endif
146semsg(const char *, ...)
147#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
148 __attribute__((format(printf, 1, 0)))
149#endif
150 ;
151
152/* These prototypes cannot be produced automatically. */
153void
154# ifdef __BORLANDC__
155_RTLENTRYF
156# endif
157siemsg(const char *, ...)
158#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
159 __attribute__((format(printf, 1, 0)))
160#endif
161 ;
162
Bram Moolenaare0429682018-07-01 16:44:03 +0200163int
164# ifdef __BORLANDC__
165_RTLENTRYF
166# endif
Bram Moolenaarf9e3e092019-01-13 23:38:42 +0100167vim_snprintf_add(char *, size_t, const char *, ...)
Bram Moolenaare80757c2018-04-10 12:42:44 +0200168#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
Bram Moolenaarea391762018-04-08 13:07:22 +0200169 __attribute__((format(printf, 3, 4)))
170#endif
171 ;
Bram Moolenaara800b422010-06-27 01:15:55 +0200172
Bram Moolenaar9c13b352005-05-19 20:53:52 +0000173int
174# ifdef __BORLANDC__
175_RTLENTRYF
176# endif
Bram Moolenaarf9e3e092019-01-13 23:38:42 +0100177vim_snprintf(char *, size_t, const char *, ...)
Bram Moolenaare80757c2018-04-10 12:42:44 +0200178#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
Bram Moolenaarea391762018-04-08 13:07:22 +0200179 __attribute__((format(printf, 3, 4)))
180#endif
181 ;
Bram Moolenaara800b422010-06-27 01:15:55 +0200182
Bram Moolenaarf9e3e092019-01-13 23:38:42 +0100183int vim_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
184int 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 +0000185
Bram Moolenaar071d4272004-06-13 20:20:40 +0000186# include "message.pro"
187# include "misc1.pro"
188# include "misc2.pro"
189#ifndef HAVE_STRPBRK /* not generated automatically from misc2.c */
Bram Moolenaard99df422016-01-29 23:20:40 +0100190char_u *vim_strpbrk(char_u *s, char_u *charset);
Bram Moolenaar071d4272004-06-13 20:20:40 +0000191#endif
192#ifndef HAVE_QSORT
193/* Use our own qsort(), don't define the prototype when not used. */
Bram Moolenaard99df422016-01-29 23:20:40 +0100194void qsort(void *base, size_t elm_count, size_t elm_size, int (*cmp)(const void *, const void *));
Bram Moolenaar071d4272004-06-13 20:20:40 +0000195#endif
196# include "move.pro"
Bram Moolenaar264b74f2019-01-24 17:18:42 +0100197# include "mbyte.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000198# include "normal.pro"
199# include "ops.pro"
200# include "option.pro"
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000201# include "popupmnu.pro"
202# ifdef FEAT_QUICKFIX
203# include "quickfix.pro"
204# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000205# include "regexp.pro"
206# include "screen.pro"
Bram Moolenaar80794b12010-06-13 05:20:42 +0200207# if defined(FEAT_CRYPT) || defined(FEAT_PERSISTENT_UNDO)
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200208# include "sha256.pro"
209# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000210# include "search.pro"
Bram Moolenaarbbea4702019-01-01 13:20:31 +0100211# ifdef FEAT_SIGNS
212# include "sign.pro"
213# endif
Bram Moolenaar2e4096b2005-03-20 22:25:45 +0000214# include "spell.pro"
Bram Moolenaar9ccfebd2016-07-19 16:39:08 +0200215# include "spellfile.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000216# include "syntax.pro"
217# include "tag.pro"
218# include "term.pro"
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200219# ifdef FEAT_TERMINAL
220# include "terminal.pro"
221# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000222# if defined(HAVE_TGETENT) && (defined(AMIGA) || defined(VMS))
223# include "termlib.pro"
224# endif
Bram Moolenaar98aefe72018-12-13 22:20:09 +0100225# ifdef FEAT_TEXT_PROP
226# include "textprop.pro"
227# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000228# include "ui.pro"
229# include "undo.pro"
Bram Moolenaara9b579f2016-07-17 18:29:19 +0200230# include "userfunc.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000231# include "version.pro"
232# include "window.pro"
233
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200234# ifdef FEAT_LUA
235# include "if_lua.pro"
236# endif
237
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000238# ifdef FEAT_MZSCHEME
239# include "if_mzsch.pro"
240# endif
241
Bram Moolenaar071d4272004-06-13 20:20:40 +0000242# ifdef FEAT_PYTHON
243# include "if_python.pro"
244# endif
245
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200246# ifdef FEAT_PYTHON3
247# include "if_python3.pro"
248# endif
249
Bram Moolenaar071d4272004-06-13 20:20:40 +0000250# ifdef FEAT_TCL
251# include "if_tcl.pro"
252# endif
253
254# ifdef FEAT_RUBY
255# include "if_ruby.pro"
256# endif
257
Bram Moolenaar67c53842010-05-22 18:28:27 +0200258/* Ugly solution for "BalloonEval" not being defined while it's used in some
259 * .pro files. */
Bram Moolenaar40e280d2017-11-19 20:34:59 +0100260# ifdef FEAT_BEVAL
261# include "beval.pro"
262# else
Bram Moolenaar67c53842010-05-22 18:28:27 +0200263# define BalloonEval int
264# endif
265
266# ifdef FEAT_NETBEANS_INTG
267# include "netbeans.pro"
268# endif
Bram Moolenaar509ce2a2016-03-11 22:52:15 +0100269# ifdef FEAT_JOB_CHANNEL
Bram Moolenaare0874f82016-01-24 20:36:41 +0100270# include "channel.pro"
Bram Moolenaarea391762018-04-08 13:07:22 +0200271
272/* Not generated automatically, to add extra attribute. */
273void ch_log(channel_T *ch, const char *fmt, ...)
Bram Moolenaare80757c2018-04-10 12:42:44 +0200274#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
Bram Moolenaarea391762018-04-08 13:07:22 +0200275 __attribute__((format(printf, 2, 3)))
276#endif
277 ;
278
Bram Moolenaare0874f82016-01-24 20:36:41 +0100279# endif
Bram Moolenaar67c53842010-05-22 18:28:27 +0200280
Bram Moolenaar613fe7a2017-07-22 21:11:53 +0200281# if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL)
Bram Moolenaar563bbea2019-01-22 21:45:40 +0100282# if defined(UNIX) || defined(MACOS_X) || defined(VMS)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000283# include "pty.pro"
284# endif
Bram Moolenaar613fe7a2017-07-22 21:11:53 +0200285# endif
286
287# ifdef FEAT_GUI
288# include "gui.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000289# if !defined(HAVE_SETENV) && !defined(HAVE_PUTENV) && !defined(VMS)
Bram Moolenaar613fe7a2017-07-22 21:11:53 +0200290extern int putenv(const char *string); /* in misc2.c */
Bram Moolenaar071d4272004-06-13 20:20:40 +0000291# ifdef USE_VIMPTY_GETENV
Bram Moolenaar613fe7a2017-07-22 21:11:53 +0200292extern char_u *vimpty_getenv(const char_u *string); /* in misc2.c */
Bram Moolenaar071d4272004-06-13 20:20:40 +0000293# endif
294# endif
Bram Moolenaar4f974752019-02-17 17:44:42 +0100295# ifdef FEAT_GUI_MSWIN
Bram Moolenaar071d4272004-06-13 20:20:40 +0000296# include "gui_w32.pro"
297# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000298# ifdef FEAT_GUI_GTK
299# include "gui_gtk.pro"
300# include "gui_gtk_x11.pro"
301# endif
302# ifdef FEAT_GUI_MOTIF
303# include "gui_motif.pro"
Bram Moolenaardfccaf02004-12-31 20:56:11 +0000304# include "gui_xmdlg.pro"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000305# endif
306# ifdef FEAT_GUI_ATHENA
307# include "gui_athena.pro"
308# ifdef FEAT_BROWSE
Bram Moolenaard99df422016-01-29 23:20:40 +0100309extern 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 +0000310# endif
311# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000312# ifdef FEAT_GUI_MAC
313# include "gui_mac.pro"
314# endif
315# ifdef FEAT_GUI_X11
316# include "gui_x11.pro"
317# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000318# ifdef FEAT_GUI_PHOTON
319# include "gui_photon.pro"
320# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000321# endif /* FEAT_GUI */
322
323# ifdef FEAT_OLE
324# include "if_ole.pro"
325# endif
326# if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11)
327# include "if_xcmdsrv.pro"
328# endif
329
330/*
Bram Moolenaarbb15b652005-10-03 21:52:09 +0000331 * The perl include files pollute the namespace, therefore proto.h must be
Bram Moolenaar071d4272004-06-13 20:20:40 +0000332 * included before the perl include files. But then CV is not defined, which
333 * is used in if_perl.pro. To get around this, the perl prototype files are
334 * not included here for the perl files. Use a dummy define for CV for the
335 * other files.
336 */
337#if defined(FEAT_PERL) && !defined(IN_PERL_FILE)
338# define CV void
339# ifdef __BORLANDC__
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000340 #pragma option -pc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000341# endif
342# include "if_perl.pro"
343# ifdef __BORLANDC__
Bram Moolenaaraab21c32005-01-25 21:46:35 +0000344 #pragma option -p.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000345# endif
346# include "if_perlsfio.pro"
347#endif
348
Bram Moolenaardb003512006-03-15 22:48:35 +0000349#ifdef MACOS_CONVERT
Bram Moolenaarda2303d2005-08-30 21:55:26 +0000350# include "os_mac_conv.pro"
351#endif
Bram Moolenaard0573012017-10-28 21:11:06 +0200352#if defined(MACOS_X_DARWIN) && defined(FEAT_CLIPBOARD) && !defined(FEAT_GUI)
Bram Moolenaard43848c2010-07-14 14:28:26 +0200353/* functions in os_macosx.m */
354void clip_mch_lose_selection(VimClipboard *cbd);
355int clip_mch_own_selection(VimClipboard *cbd);
356void clip_mch_request_selection(VimClipboard *cbd);
357void clip_mch_set_selection(VimClipboard *cbd);
358#endif
Bram Moolenaarda2303d2005-08-30 21:55:26 +0000359
Bram Moolenaar071d4272004-06-13 20:20:40 +0000360#ifdef __BORLANDC__
361# define _PROTO_H
362#endif
363#endif /* !PROTO && !NOPROTO */