forked from aniani/vim
Make automatic prototype generation work with more interfaces.
This commit is contained in:
3
Makefile
3
Makefile
@@ -86,7 +86,8 @@ DOSBIN_S = dosbin_s
|
||||
# - With these features: "make proto" (requires cproto and Motif installed;
|
||||
# ignore warnings for missing include files, fix problems for syntax errors).
|
||||
# - With these features: "make depend" (works best with gcc).
|
||||
# - "make lint" and check the output (ignore GTK warnings).
|
||||
# - If you have a lint program: "make lint" and check the output (ignore GTK
|
||||
# warnings).
|
||||
# - Enable the efence library in "src/Makefile" and run "make test". Disable
|
||||
# Python and Ruby to avoid trouble with threads (efence is not threadsafe).
|
||||
# - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
|
||||
|
@@ -12,6 +12,7 @@ The Python Interface to Vim *python* *Python*
|
||||
4. Range objects |python-range|
|
||||
5. Window objects |python-window|
|
||||
6. Dynamic loading |python-dynamic|
|
||||
7. Python 3 |python3|
|
||||
|
||||
{Vi does not have any of these commands}
|
||||
|
||||
@@ -327,5 +328,15 @@ The name of the DLL must match the Python version Vim was compiled with.
|
||||
Currently the name is "python24.dll". That is for Python 2.4. To know for
|
||||
sure edit "gvim.exe" and search for "python\d*.dll\c".
|
||||
|
||||
==============================================================================
|
||||
7. Python 3 *python3*
|
||||
|
||||
Python 3 support can exist next to Python 2.x.
|
||||
|
||||
*:py3* *:python3* *:py3file*
|
||||
|
||||
TODO
|
||||
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
@@ -1713,9 +1713,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+conceal|
|
||||
feature}
|
||||
Determine how text with the "conceal" syntax attribute is shown:
|
||||
Determine how text with the "conceal" syntax attribute |:syn-conceal|
|
||||
is shown:
|
||||
|
||||
'conceallevel' Effect
|
||||
Value Effect ~
|
||||
0 Text is shown normally
|
||||
1 Each block of concealed text is replaced with the
|
||||
character defined in 'listchars' (default is a dash)
|
||||
|
@@ -2566,9 +2566,12 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:pw editing.txt /*:pw*
|
||||
:pwd editing.txt /*:pwd*
|
||||
:py if_pyth.txt /*:py*
|
||||
:py3 if_pyth.txt /*:py3*
|
||||
:py3file if_pyth.txt /*:py3file*
|
||||
:pyf if_pyth.txt /*:pyf*
|
||||
:pyfile if_pyth.txt /*:pyfile*
|
||||
:python if_pyth.txt /*:python*
|
||||
:python3 if_pyth.txt /*:python3*
|
||||
:q editing.txt /*:q*
|
||||
:qa editing.txt /*:qa*
|
||||
:qall editing.txt /*:qall*
|
||||
@@ -6825,6 +6828,7 @@ new-cmdwin version6.txt /*new-cmdwin*
|
||||
new-color-schemes version6.txt /*new-color-schemes*
|
||||
new-commands version5.txt /*new-commands*
|
||||
new-commands-5.4 version5.txt /*new-commands-5.4*
|
||||
new-conceal version7.txt /*new-conceal*
|
||||
new-debug-itf version6.txt /*new-debug-itf*
|
||||
new-debug-mode version6.txt /*new-debug-mode*
|
||||
new-debug-support version7.txt /*new-debug-support*
|
||||
@@ -6848,9 +6852,11 @@ new-items-6 version6.txt /*new-items-6*
|
||||
new-items-7 version7.txt /*new-items-7*
|
||||
new-line-continuation version5.txt /*new-line-continuation*
|
||||
new-location-list version7.txt /*new-location-list*
|
||||
new-lua version7.txt /*new-lua*
|
||||
new-manpage-trans version7.txt /*new-manpage-trans*
|
||||
new-map-expression version7.txt /*new-map-expression*
|
||||
new-map-select version7.txt /*new-map-select*
|
||||
new-more-encryption version7.txt /*new-more-encryption*
|
||||
new-more-highlighting version7.txt /*new-more-highlighting*
|
||||
new-more-unicode version7.txt /*new-more-unicode*
|
||||
new-multi-byte version5.txt /*new-multi-byte*
|
||||
@@ -6863,10 +6869,12 @@ new-operator-mod version6.txt /*new-operator-mod*
|
||||
new-options-5.2 version5.txt /*new-options-5.2*
|
||||
new-options-5.4 version5.txt /*new-options-5.4*
|
||||
new-perl-python version5.txt /*new-perl-python*
|
||||
new-persistent-undo version7.txt /*new-persistent-undo*
|
||||
new-plugins version6.txt /*new-plugins*
|
||||
new-posix version7.txt /*new-posix*
|
||||
new-print-multi-byte version7.txt /*new-print-multi-byte*
|
||||
new-printing version6.txt /*new-printing*
|
||||
new-python3 version7.txt /*new-python3*
|
||||
new-runtime-dir version5.txt /*new-runtime-dir*
|
||||
new-script version5.txt /*new-script*
|
||||
new-script-5.4 version5.txt /*new-script-5.4*
|
||||
@@ -7096,6 +7104,7 @@ python-vim if_pyth.txt /*python-vim*
|
||||
python-window if_pyth.txt /*python-window*
|
||||
python-windows if_pyth.txt /*python-windows*
|
||||
python.vim syntax.txt /*python.vim*
|
||||
python3 if_pyth.txt /*python3*
|
||||
q repeat.txt /*q*
|
||||
q/ cmdline.txt /*q\/*
|
||||
q: cmdline.txt /*q:*
|
||||
@@ -7535,8 +7544,10 @@ sticky-type-checking eval.txt /*sticky-type-checking*
|
||||
str2float() eval.txt /*str2float()*
|
||||
str2nr() eval.txt /*str2nr()*
|
||||
strcasestr() eval.txt /*strcasestr()*
|
||||
strchars() eval.txt /*strchars()*
|
||||
strchr() eval.txt /*strchr()*
|
||||
strcspn() eval.txt /*strcspn()*
|
||||
strdisplaywidth() eval.txt /*strdisplaywidth()*
|
||||
strftime() eval.txt /*strftime()*
|
||||
stridx() eval.txt /*stridx()*
|
||||
string() eval.txt /*string()*
|
||||
@@ -7550,6 +7561,7 @@ strridx() eval.txt /*strridx()*
|
||||
strspn() eval.txt /*strspn()*
|
||||
strstr() eval.txt /*strstr()*
|
||||
strtrans() eval.txt /*strtrans()*
|
||||
strwidth() eval.txt /*strwidth()*
|
||||
style-changes develop.txt /*style-changes*
|
||||
style-examples develop.txt /*style-examples*
|
||||
style-functions develop.txt /*style-functions*
|
||||
|
File diff suppressed because it is too large
Load Diff
55
src/Makefile
55
src/Makefile
@@ -39,9 +39,10 @@
|
||||
# - Uncomment one or more of these lines to include an interface;
|
||||
# each makes Vim quite a bit bigger:
|
||||
# --enable-luainterp for Lua interpreter
|
||||
# --enable-mzschemeinterp for MzScheme interpreter
|
||||
# --enable-perlinterp for Perl interpreter
|
||||
# --enable-pythoninterp for Python interpreter
|
||||
# --enable-python3interp for Python3 interpreter
|
||||
# --enable-pythoninterp for Python interpreter
|
||||
# --enable-rubyinterp for Ruby interpreter
|
||||
# --enable-tclinterp for Tcl interpreter
|
||||
# --enable-cscope for Cscope interface
|
||||
@@ -368,6 +369,20 @@ CClink = $(CC)
|
||||
#CONF_OPT_DARWIN = --with-mac-arch=ppc
|
||||
#CONF_OPT_DARWIN = --with-mac-arch=both
|
||||
|
||||
# LUA
|
||||
# Uncomment this when you want to include the Lua interface.
|
||||
#CONF_OPT_LUA = --enable-luainterp
|
||||
# Lua installation dir (when not set uses $LUA_PREFIX or defaults to /usr)
|
||||
#CONF_OPT_LUA_PREFIX = --with-lua-prefix=/usr/local
|
||||
|
||||
# MZSCHEME
|
||||
# Uncomment this when you want to include the MzScheme interface.
|
||||
#CONF_OPT_MZSCHEME = --enable-mzschemeinterp
|
||||
# PLT/mrscheme/drscheme Home dir; the PLTHOME environment variable also works
|
||||
#CONF_OPT_PLTHOME = --with-plthome=/usr/local/plt
|
||||
#CONF_OPT_PLTHOME = --with-plthome=/usr/local/drscheme
|
||||
#CONF_OPT_PLTHOME = --with-plthome=/home/me/mz
|
||||
|
||||
# PERL
|
||||
# Uncomment this when you want to include the Perl interface.
|
||||
# The Perl option sometimes causes problems, because it adds extra flags
|
||||
@@ -391,30 +406,16 @@ CClink = $(CC)
|
||||
#CONF_OPT_PYTHON = --enable-pythoninterp
|
||||
#CONF_OPT_PYTHON3 = --enable-python3interp
|
||||
|
||||
# TCL
|
||||
# Uncomment this when you want to include the Tcl interface.
|
||||
#CONF_OPT_TCL = --enable-tclinterp
|
||||
#CONF_OPT_TCL = --enable-tclinterp --with-tclsh=tclsh8.4
|
||||
|
||||
# RUBY
|
||||
# Uncomment this when you want to include the Ruby interface.
|
||||
# Note: you need the development package (e.g., ruby1.9.1-dev on Ubuntu).
|
||||
#CONF_OPT_RUBY = --enable-rubyinterp
|
||||
#CONF_OPT_RUBY = --enable-rubyinterp --with-ruby-command=ruby1.9.1
|
||||
|
||||
# LUA
|
||||
# Uncomment this when you want to include the Lua interface.
|
||||
#CONF_OPT_LUA = --enable-luainterp
|
||||
# Lua installation dir (when not set uses $LUA_PREFIX or defaults to /usr)
|
||||
#CONF_OPT_LUA_PREFIX = --with-lua-prefix=/usr/local
|
||||
|
||||
# MZSCHEME
|
||||
# Uncomment this when you want to include the MzScheme interface.
|
||||
#CONF_OPT_MZSCHEME = --enable-mzschemeinterp
|
||||
# PLT/mrscheme/drscheme Home dir; the PLTHOME environment variable also works
|
||||
#CONF_OPT_PLTHOME = --with-plthome=/usr/local/plt
|
||||
#CONF_OPT_PLTHOME = --with-plthome=/usr/local/drscheme
|
||||
#CONF_OPT_PLTHOME = --with-plthome=/home/me/mz
|
||||
# TCL
|
||||
# Uncomment this when you want to include the Tcl interface.
|
||||
#CONF_OPT_TCL = --enable-tclinterp
|
||||
#CONF_OPT_TCL = --enable-tclinterp --with-tclsh=tclsh8.4
|
||||
|
||||
# CSCOPE
|
||||
# Uncomment this when you want to include the Cscope interface.
|
||||
@@ -545,7 +546,8 @@ CClink = $(CC)
|
||||
#CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes
|
||||
|
||||
# Use this with GCC to check for mistakes, unused arguments, etc.
|
||||
#CFLAGS = -g -Wall -Wextra -Wmissing-prototypes -Wunreachable-code -D_FORTIFY_SOURCE=1
|
||||
#CFLAGS = -g -Wall -Wextra -Wmissing-prototypes -Wunreachable-code -D_FORTIFY_SOURCE=1 -DU_DEBUG
|
||||
#CFLAGS = -g -O2 -Wall -Wextra -Wmissing-prototypes -D_FORTIFY_SOURCE=1 -DU_DEBUG
|
||||
#PYTHON_CFLAGS_EXTRA = -Wno-missing-field-initializers
|
||||
#MZSCHEME_CFLAGS_EXTRA = -Wno-unreachable-code -Wno-unused-parameter
|
||||
|
||||
@@ -1317,7 +1319,7 @@ ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(POST_DEFS)
|
||||
# with "-E".
|
||||
OSDEF_CFLAGS = $(PRE_DEFS) $(POST_DEFS)
|
||||
|
||||
LINT_CFLAGS = -DLINT -I. $(PRE_DEFS) $(POST_DEFS) -Dinline= -D__extension__= -Dalloca=alloca
|
||||
LINT_CFLAGS = -DLINT -I. $(PRE_DEFS) $(POST_DEFS) $(PYTHON_CFLAGS) -Dinline= -D__extension__= -Dalloca=alloca
|
||||
|
||||
LINT_EXTRA = -DUSE_SNIFF -DHANGUL_INPUT -D"__attribute__(x)="
|
||||
|
||||
@@ -1714,10 +1716,11 @@ proto: $(PRO_AUTO) $(PRO_MANUAL)
|
||||
|
||||
# Filter out arguments that cproto doesn't support.
|
||||
# Don't pass "-pthread" to cproto, it sees it as a list of individual flags.
|
||||
# Don't pass "-fstack-protector" to cproto, for the same reason.
|
||||
# The -E"gcc -E" argument must be separate to avoid problems with shell
|
||||
# quoting.
|
||||
CPROTO = cproto $(PROTO_FLAGS) -DPROTO \
|
||||
`echo '$(LINT_CFLAGS)' | sed -e 's/-pthread//g'`
|
||||
`echo '$(LINT_CFLAGS)' | sed -e 's/-pthread//g' -e 's/-fstack-protector//g'`
|
||||
|
||||
### Would be nice if this would work for "normal" make.
|
||||
### Currently it only works for (Free)BSD make.
|
||||
@@ -2997,10 +3000,10 @@ objects/hangulin.o: hangulin.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/if_lua.o: if_lua.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/if_lua.o: if_lua.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \
|
||||
arabic.h
|
||||
objects/if_mzsch.o: if_mzsch.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \
|
||||
|
@@ -8491,7 +8491,7 @@ ex_undo(eap)
|
||||
}
|
||||
|
||||
#ifdef FEAT_PERSISTENT_UNDO
|
||||
void
|
||||
static void
|
||||
ex_wundo(eap)
|
||||
exarg_T *eap;
|
||||
{
|
||||
@@ -8501,7 +8501,7 @@ ex_wundo(eap)
|
||||
u_write_undo(eap->arg, eap->forceit, curbuf, hash);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
ex_rundo(eap)
|
||||
exarg_T *eap;
|
||||
{
|
||||
|
@@ -42,19 +42,21 @@
|
||||
# undef _DEBUG
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
# undef HAVE_STDARG_H /* Python's config.h defines it as well. */
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#ifdef F_BLANK
|
||||
# undef F_BLANK
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
# undef HAVE_STDARG_H /* Python's config.h defines it as well. */
|
||||
#endif
|
||||
#ifdef _POSIX_C_SOURCE /* defined in feature.h */
|
||||
# undef _POSIX_C_SOURCE
|
||||
#endif
|
||||
#ifdef _XOPEN_SOURCE
|
||||
# undef _XOPEN_SOURCE /* pyconfig.h defines it as well. */
|
||||
#endif
|
||||
|
||||
#include <Python.h>
|
||||
#if defined(MACOS) && !defined(MACOS_X_UNIX)
|
||||
@@ -436,7 +438,7 @@ static Py_ssize_t RangeEnd;
|
||||
static void PythonIO_Flush(void);
|
||||
static int PythonIO_Init(void);
|
||||
static void PythonIO_Fini(void);
|
||||
PyMODINIT_FUNC Py3Init_vim(void);
|
||||
static PyMODINIT_FUNC Py3Init_vim(void);
|
||||
|
||||
/* Utility functions for the vim/python interface
|
||||
* ----------------------------------------------
|
||||
@@ -630,7 +632,7 @@ theend:
|
||||
}
|
||||
|
||||
/*
|
||||
* ":python"
|
||||
* ":python3"
|
||||
*/
|
||||
void ex_python3(exarg_T *eap)
|
||||
{
|
||||
@@ -650,7 +652,7 @@ void ex_python3(exarg_T *eap)
|
||||
#define BUFFER_SIZE 2048
|
||||
|
||||
/*
|
||||
* ":pyfile"
|
||||
* ":py3file"
|
||||
*/
|
||||
void
|
||||
ex_py3file(exarg_T *eap)
|
||||
@@ -2220,7 +2222,7 @@ PyDoc_STRVAR(vim_module_doc,"vim python interface\n");
|
||||
|
||||
static struct PyModuleDef vimmodule;
|
||||
|
||||
PyMODINIT_FUNC Py3Init_vim(void)
|
||||
static PyMODINIT_FUNC Py3Init_vim(void)
|
||||
{
|
||||
PyObject *mod;
|
||||
/* The special value is removed from sys.path in Python3_Init(). */
|
||||
|
@@ -22,6 +22,6 @@ void nv_diffgetput __ARGS((int put));
|
||||
void ex_diffgetput __ARGS((exarg_T *eap));
|
||||
int diff_mode_buf __ARGS((buf_T *buf));
|
||||
int diff_move_to __ARGS((int dir, long count));
|
||||
linenr_T diff_get_corresponding_line __ARGS((buf_T *buf1, linenr_T lnum1, buf_T *buf2, linenr_T lnum2));
|
||||
linenr_T diff_get_corresponding_line __ARGS((buf_T *buf1, linenr_T lnum1, buf_T *buf2, linenr_T lnum3));
|
||||
linenr_T diff_lnum_win __ARGS((linenr_T lnum, win_T *wp));
|
||||
/* vim: set ft=c : */
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* if_python.c */
|
||||
/* if_python3.c */
|
||||
int python3_enabled __ARGS((int verbose));
|
||||
void python3_end __ARGS((void));
|
||||
void ex_python3 __ARGS((exarg_T *eap));
|
||||
|
@@ -6,7 +6,7 @@ int process_env __ARGS((char_u *env, int is_viminit));
|
||||
void mainerr_arg_missing __ARGS((char_u *str));
|
||||
void time_push __ARGS((void *tv_rel, void *tv_start));
|
||||
void time_pop __ARGS((void *tp));
|
||||
void time_msg __ARGS((char *msg, void *tv_start));
|
||||
void time_msg __ARGS((char *mesg, void *tv_start));
|
||||
void server_to_input_buf __ARGS((char_u *str));
|
||||
char_u *eval_client_expr_to_string __ARGS((char_u *expr));
|
||||
char_u *serverConvert __ARGS((char_u *client_enc, char_u *data, char_u **tofree));
|
||||
|
@@ -1,5 +1,4 @@
|
||||
/* move.c */
|
||||
void do_check_cursorbind __ARGS((void));
|
||||
void update_topline_redraw __ARGS((void));
|
||||
void update_topline __ARGS((void));
|
||||
void update_curswant __ARGS((void));
|
||||
@@ -38,4 +37,5 @@ void scroll_cursor_halfway __ARGS((int atend));
|
||||
void cursor_correct __ARGS((void));
|
||||
int onepage __ARGS((int dir, long count));
|
||||
void halfpage __ARGS((int flag, linenr_T Prenum));
|
||||
void do_check_cursorbind __ARGS((void));
|
||||
/* vim: set ft=c : */
|
||||
|
@@ -8,6 +8,7 @@ void redraw_buf_later __ARGS((buf_T *buf, int type));
|
||||
void redrawWinline __ARGS((linenr_T lnum, int invalid));
|
||||
void update_curbuf __ARGS((int type));
|
||||
void update_screen __ARGS((int type));
|
||||
void update_single_line __ARGS((win_T *wp, linenr_T lnum));
|
||||
void update_debug_sign __ARGS((buf_T *buf, linenr_T lnum));
|
||||
void updateWindow __ARGS((win_T *wp));
|
||||
void rl_mirror __ARGS((char_u *str));
|
||||
@@ -46,6 +47,5 @@ void get_trans_bufname __ARGS((buf_T *buf));
|
||||
int redrawing __ARGS((void));
|
||||
int messaging __ARGS((void));
|
||||
void showruler __ARGS((int always));
|
||||
void update_single_line __ARGS((win_T *buf, linenr_T lnum));
|
||||
int number_width __ARGS((win_T *wp));
|
||||
/* vim: set ft=c : */
|
||||
|
@@ -4,5 +4,5 @@ void sha256_update __ARGS((context_sha256_T *ctx, char_u *input, UINT32_T length
|
||||
void sha256_finish __ARGS((context_sha256_T *ctx, char_u digest[32]));
|
||||
char_u *sha256_key __ARGS((char_u *buf, char_u *salt, int salt_len));
|
||||
int sha256_self_test __ARGS((void));
|
||||
void sha2_seed __ARGS((char_u header[], int header_len, char_u salt[], int salt_len));
|
||||
void sha2_seed __ARGS((char_u *header, int header_len, char_u *salt, int salt_len));
|
||||
/* vim: set ft=c : */
|
||||
|
@@ -47,7 +47,7 @@ int check_col __ARGS((int col));
|
||||
int check_row __ARGS((int row));
|
||||
void open_app_context __ARGS((void));
|
||||
void x11_setup_atoms __ARGS((Display *dpy));
|
||||
void x11_setup_selection __ARGS((Widget myShell));
|
||||
void x11_setup_selection __ARGS((Widget w));
|
||||
void clip_x11_request_selection __ARGS((Widget myShell, Display *dpy, VimClipboard *cbd));
|
||||
void clip_x11_lose_selection __ARGS((Widget myShell, VimClipboard *cbd));
|
||||
int clip_x11_own_selection __ARGS((Widget myShell, VimClipboard *cbd));
|
||||
|
Reference in New Issue
Block a user