Compare commits

...

37 Commits

Author SHA1 Message Date
Bram Moolenaar
ef2f028a66 updated for version 7.3.067
Problem:    Ruby: Init_prelude is not always available.
Solution:   Remove use of Init_prelude. (Yasuhiro Matsumoto)
2010-11-24 17:03:38 +01:00
Bram Moolenaar
0785ccf995 updated for version 7.3.066
Problem:    Crash when changing to another window while in a :vimgrep command.
            (Christian Brabandt)
Solution:   When wiping out the dummy before, remove it from aucmd_win.
2010-11-24 16:32:05 +01:00
Bram Moolenaar
4dbbff57ba updated for version 7.3.065
Problem:    Can't get current line number in a source file.
Solution:   Add the <slnum> item, similar to <sfile>.
2010-11-24 15:50:59 +01:00
Bram Moolenaar
0818b87cbf updated for version 7.3.064
Problem:    Win32: ":dis +" shows nothing, but "+p does insert text.
Solution:   Display the * register, since that's what will be inserted.
            (Christian Brabandt)
2010-11-24 14:28:58 +01:00
Bram Moolenaar
96e5ceed93 updated for version 7.3.063
Problem:    Win32: Running a filter command makes Vim lose focus.
Solution:   Use SW_SHOWMINNOACTIVE instead of SW_SHOWMINIMIZED. (Hong Xu)
2010-11-24 12:35:21 +01:00
Bram Moolenaar
166af9bb6f Updated runtime files. 2010-11-16 20:34:40 +01:00
Bram Moolenaar
644d37b84d updated for version 7.3.062
Problem:    Python doesn't work properly when installed in another directory
            than expected.
Solution:   Figure out home directory in configure and use Py_SetPythonHome()
            at runtime. (Roland Puntaier)
2010-11-16 19:26:02 +01:00
Bram Moolenaar
00b78c17b2 updated for version 7.3.061
Problem:    Remote ":drop" does not respect 'autochdir'. (Peter Odding)
Solution:   Don't restore the directory when 'autochdir' is set. (Benjamin
            Fritz)
2010-11-16 16:25:51 +01:00
Bram Moolenaar
7ad7d01074 updated for version 7.3.060
Problem:    Netbeans: crash when socket is disconnected unexpectedly.
Solution:   Don't cleanup when a read fails, put a message in the queue and
            disconnect later. (Xavier de Gaye)
2010-11-16 15:49:02 +01:00
Bram Moolenaar
03531f79c3 updated for version 7.3.059
Problem:    Netbeans: Problem with recursively handling messages for Athena
            and Motif.
Solution:   Call netbeans_parse_messages() in the main loop, like it's done
            for GTK. (Xavier de Gaye)
2010-11-16 15:04:57 +01:00
Bram Moolenaar
3c53160348 updated for version 7.3.058
Problem:    Error "code converter not found" when loading Ruby script.
Solution:   Load Gem module. (Yasuhiro Matsumoto)
2010-11-16 14:46:19 +01:00
Bram Moolenaar
66b4bf8980 updated for version 7.3.057
Problem:    Segfault with command line abbreviation. (Randy Morris)
Solution:   Don't retrigger the abbreviation when abandoning the command line.
            Continue editing the command line after the error.
2010-11-16 14:06:08 +01:00
Bram Moolenaar
bf55e1442d updated for version 7.3.056
Problem:    "getline" argument in do_cmdline() shadows global.
Solution:   Rename the argument.
Files:      src/ex_docmd.c
2010-11-16 11:32:01 +01:00
Bram Moolenaar
67b3f99eb0 updated for version 7.3.055
Problem:    Recursively nested lists and dictionaries cause a near-endless
            loop when comparing them with a copy. (ZyX)
Solution:   Limit recursiveness in a way that non-recursive structures can
            still be nested very deep.
Files:      src/eval.c, src/testdir/test55.in, src/testdir/test55.ok
2010-11-10 20:41:57 +01:00
Bram Moolenaar
a3e7b1f42b updated for version 7.3.054
Problem:    Can define a user command for :Print, but it doesn't work. (Aaron
            Thoma)
Solution:   Let user command :Print overrule the builtin command (Christian
            Brabandt)  Disallow :X and :Next as a user defined command.
2010-11-10 19:00:01 +01:00
Bram Moolenaar
2a8caa414e updated for version 7.3.053
Problem:    complete() function doesn't reset complete direction.  Can't use
            an empty string in the list of matches.
Solution:   Set compl_direction to FORWARD.  Add "empty" key to allow empty
            words. (Kikuchan)
2010-11-10 17:11:33 +01:00
Bram Moolenaar
37dd018cdd updated for version 7.3.052
Problem:    When 'completefunc' opens a new window all kinds of errors follow.
            (Xavier Deguillard)
Solution:   When 'completefunc' goes to another window or buffer and when it
            deletes text abort completion.  Add a test for 'completefunc'.
2010-11-10 16:54:20 +01:00
Bram Moolenaar
27d9eceb66 updated for version 7.3.051
Problem:    Crash when /home/mool/bin:/usr/local/sbin:/usr/local/bin:/home/mool/java/jdk/bin:/bin:/sbin:/usr/bin:/usr/games:/usr/sbin:/usr/X11R6/bin:/usr/local/linux-jdk1.3.1/bin:/usr/local/lib/python2.2/Tools/idle is empty.
Solution:   Check for vim_getenv() returning NULL. (Yasuhiro Matsumoto)
2010-11-10 15:37:05 +01:00
Bram Moolenaar
22e193ddd5 updated for version 7.3.050
Problem:    The link script is clumsy.
Solution:   Use the --as-needed linker option if available. (Kirill A.
            Shutemov)
2010-11-03 22:32:24 +01:00
Bram Moolenaar
2d0860d06c updated for version 7.3.049
Problem:    PLT has rebranded their Scheme to Racket.
Solution:   Add support for Racket 5.x. (Sergey Khorev)
2010-11-03 21:59:30 +01:00
Bram Moolenaar
dba01a0197 updated for version 7.3.048
Problem:    ":earlier 1f" doesn't work after loading undo file.
Solution:   Set b_u_save_nr_cur when loading an undo file. (Christian
            Brabandt)
            Fix only showing time in ":undolist"
2010-11-03 19:32:42 +01:00
Bram Moolenaar
16a6165bb3 updated for version 7.3.047
Problem:    Missing makefile updates for test 75.
Solution:   Update the makefiles.
2010-10-27 18:36:36 +02:00
Bram Moolenaar
0536570fa2 Updated runtile files. 2010-10-27 18:34:44 +02:00
Bram Moolenaar
2d73ff4500 updated for version 7.3.046
Problem:    Can't build Ruby on MS-Windows.
Solution:   Add #ifdef, don't use WIN3264 before including vim.h.
2010-10-27 17:40:59 +02:00
Bram Moolenaar
b3ae56cf2b updated for version 7.3.045
Problem:    Compiler warning for uninitialized variable.
Solution:   Initialize the variable always.
2010-10-27 17:39:05 +02:00
Bram Moolenaar
ee236d0d19 updated for version 7.3.044
Problem:    The preview window opened by the popup menu is larger than
            specified with 'previewheight'. (Benjamin Haskell)
Solution:   Use 'previewheight' if it's set and smaller.
2010-10-27 17:11:15 +02:00
Bram Moolenaar
3ca71f1f1f updated for version 7.3.043
Problem:    Can't load Ruby dynamically on Unix.
Solution:   Adjust the configure script. (James Vega)
2010-10-27 16:49:47 +02:00
Bram Moolenaar
beca055b0c updated for version 7.3.042
Problem:    No spell highlighting when re-using an empty buffer.
Solution:   Clear the spell checking info only when clearing the options for a
            buffer. (James Vega)
2010-10-27 16:18:00 +02:00
Bram Moolenaar
22df3f90fc updated for version 7.3.041
Problem:    Compiler warning for accessing mediumVersion. (Tony Mechelynck)
Solution:   Use the pointer instead of the array itself. (Dominique Pelle)
2010-10-27 16:01:27 +02:00
Bram Moolenaar
c395a3aac2 updated for version 7.3.040
Problem:    Comparing strings while ignoring case goes beyond end of the
            string when there are illegal bytes. (Dominique Pelle)
Solution:   Explicitly check for illegal bytes.
2010-10-27 13:37:44 +02:00
Bram Moolenaar
fc3c83e47e updated for version 7.3.039
Problem:    Crash when using skk.vim plugin.
Solution:   Get length of expression evaluation result only after checking for
            NULL.  (Noriaki Yagi, Dominique Pelle)
2010-10-27 12:58:23 +02:00
Bram Moolenaar
264e9fd61b updated for version 7.3.038
Problem:    v:windowid isn't set on MS-Windows.
Solution:   Set it to the window handle. (Chris Sutcliffe)
2010-10-27 12:33:17 +02:00
Bram Moolenaar
6b5ef067a5 updated for version 7.3.037
Problem:    Compiler warnings for loss of data. (Mike Williams)
Solution:   Add type casts.
2010-10-27 12:18:00 +02:00
Bram Moolenaar
786989ba37 updated for version 7.3.036
Problem:    Win32 GUI: When building without menus, the font for dialogs and
            tab page headers also changes.
Solution:   Define USE_SYSMENU_FONT always. (Harig G.)
2010-10-27 12:15:33 +02:00
Bram Moolenaar
8bbe993c79 updated for version 7.3.035
Problem:    Stray semicolon after if statement. (Hari G)
Solution:   Remove the semicolon.
2010-10-24 14:33:43 +02:00
Bram Moolenaar
ebbcb824ba updated for version 7.3.034
Problem:    Win32: may be loading .dll from the wrong directory.
Solution:   Go to the Vim executable directory when opening a library.
2010-10-23 14:02:54 +02:00
Bram Moolenaar
b8e86705ca updated for version 7.3.033
Problem:    Can't build without FEAT_LOCALMAP.
Solution:   Add an #ifdef. (John Marriott)
2010-10-22 22:13:52 +02:00
78 changed files with 1716 additions and 606 deletions

View File

@@ -1,6 +1,6 @@
" Vim autoload file for the tohtml plugin.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2010 Aug 12
" Last Change: 2010 Oct 07
"
" Additional contributors:
"
@@ -13,10 +13,284 @@
let s:cpo_sav = &cpo
set cpo-=C
func! tohtml#Convert2HTML(line1, line2)
" Automatically find charsets from all encodings supported natively by Vim. With
" the 8bit- and 2byte- prefixes, Vim can actually support more encodings than
" this. Let the user specify these however since they won't be supported on
" every system. TODO: how? g:html_charsets and g:html_encodings?
"
" Note, not all of Vim's supported encodings have a charset to use.
"
" Names in this list are from:
" http://www.iana.org/assignments/character-sets
" g:tohtml#encoding_to_charset: {{{
let g:tohtml#encoding_to_charset = {
\ 'latin1' : 'ISO-8859-1',
\ 'iso-8859-2' : 'ISO-8859-2',
\ 'iso-8859-3' : 'ISO-8859-3',
\ 'iso-8859-4' : 'ISO-8859-4',
\ 'iso-8859-5' : 'ISO-8859-5',
\ 'iso-8859-6' : 'ISO-8859-6',
\ 'iso-8859-7' : 'ISO-8859-7',
\ 'iso-8859-8' : 'ISO-8859-8',
\ 'iso-8859-9' : 'ISO-8859-9',
\ 'iso-8859-10' : '',
\ 'iso-8859-13' : 'ISO-8859-13',
\ 'iso-8859-14' : '',
\ 'iso-8859-15' : 'ISO-8859-15',
\ 'koi8-r' : 'KOI8-R',
\ 'koi8-u' : 'KOI8-U',
\ 'macroman' : 'macintosh',
\ 'cp437' : '',
\ 'cp775' : '',
\ 'cp850' : '',
\ 'cp852' : '',
\ 'cp855' : '',
\ 'cp857' : '',
\ 'cp860' : '',
\ 'cp861' : '',
\ 'cp862' : '',
\ 'cp863' : '',
\ 'cp865' : '',
\ 'cp866' : 'IBM866',
\ 'cp869' : '',
\ 'cp874' : '',
\ 'cp1250' : 'windows-1250',
\ 'cp1251' : 'windows-1251',
\ 'cp1253' : 'windows-1253',
\ 'cp1254' : 'windows-1254',
\ 'cp1255' : 'windows-1255',
\ 'cp1256' : 'windows-1256',
\ 'cp1257' : 'windows-1257',
\ 'cp1258' : 'windows-1258',
\ 'euc-jp' : 'EUC-JP',
\ 'sjis' : 'Shift_JIS',
\ 'cp932' : 'Shift_JIS',
\ 'cp949' : '',
\ 'euc-kr' : 'EUC-KR',
\ 'cp936' : 'GBK',
\ 'euc-cn' : 'GB2312',
\ 'big5' : 'Big5',
\ 'cp950' : 'Big5',
\ 'utf-8' : 'UTF-8',
\ 'ucs-2' : 'UTF-8',
\ 'ucs-2le' : 'UTF-8',
\ 'utf-16' : 'UTF-8',
\ 'utf-16le' : 'UTF-8',
\ 'ucs-4' : 'UTF-8',
\ 'ucs-4le' : 'UTF-8',
\ }
lockvar g:tohtml#encoding_to_charset
" Notes:
" 1. All UCS/UTF are converted to UTF-8 because it is much better supported
" 2. Any blank spaces are there because Vim supports it but at least one major
" web browser does not according to http://wiki.whatwg.org/wiki/Web_Encodings.
" }}}
" Only automatically find encodings supported natively by Vim, let the user
" specify the encoding if it's not natively supported. This function is only
" used when the user specifies the charset, they better know what they are
" doing!
"
" Names in this list are from:
" http://www.iana.org/assignments/character-sets
" g:tohtml#charset_to_encoding: {{{
let g:tohtml#charset_to_encoding = {
\ 'iso_8859-1:1987' : 'latin1',
\ 'iso-ir-100' : 'latin1',
\ 'iso_8859-1' : 'latin1',
\ 'iso-8859-1' : 'latin1',
\ 'latin1' : 'latin1',
\ 'l1' : 'latin1',
\ 'ibm819' : 'latin1',
\ 'cp819' : 'latin1',
\ 'csisolatin1' : 'latin1',
\ 'iso_8859-2:1987' : 'iso-8859-2',
\ 'iso-ir-101' : 'iso-8859-2',
\ 'iso_8859-2' : 'iso-8859-2',
\ 'iso-8859-2' : 'iso-8859-2',
\ 'latin2' : 'iso-8859-2',
\ 'l2' : 'iso-8859-2',
\ 'csisolatin2' : 'iso-8859-2',
\ 'iso_8859-3:1988' : 'iso-8859-3',
\ 'iso-ir-109' : 'iso-8859-3',
\ 'iso_8859-3' : 'iso-8859-3',
\ 'iso-8859-3' : 'iso-8859-3',
\ 'latin3' : 'iso-8859-3',
\ 'l3' : 'iso-8859-3',
\ 'csisolatin3' : 'iso-8859-3',
\ 'iso_8859-4:1988' : 'iso-8859-4',
\ 'iso-ir-110' : 'iso-8859-4',
\ 'iso_8859-4' : 'iso-8859-4',
\ 'iso-8859-4' : 'iso-8859-4',
\ 'latin4' : 'iso-8859-4',
\ 'l4' : 'iso-8859-4',
\ 'csisolatin4' : 'iso-8859-4',
\ 'iso_8859-5:1988' : 'iso-8859-5',
\ 'iso-ir-144' : 'iso-8859-5',
\ 'iso_8859-5' : 'iso-8859-5',
\ 'iso-8859-5' : 'iso-8859-5',
\ 'cyrillic' : 'iso-8859-5',
\ 'csisolatincyrillic' : 'iso-8859-5',
\ 'iso_8859-6:1987' : 'iso-8859-6',
\ 'iso-ir-127' : 'iso-8859-6',
\ 'iso_8859-6' : 'iso-8859-6',
\ 'iso-8859-6' : 'iso-8859-6',
\ 'ecma-114' : 'iso-8859-6',
\ 'asmo-708' : 'iso-8859-6',
\ 'arabic' : 'iso-8859-6',
\ 'csisolatinarabic' : 'iso-8859-6',
\ 'iso_8859-7:1987' : 'iso-8859-7',
\ 'iso-ir-126' : 'iso-8859-7',
\ 'iso_8859-7' : 'iso-8859-7',
\ 'iso-8859-7' : 'iso-8859-7',
\ 'elot_928' : 'iso-8859-7',
\ 'ecma-118' : 'iso-8859-7',
\ 'greek' : 'iso-8859-7',
\ 'greek8' : 'iso-8859-7',
\ 'csisolatingreek' : 'iso-8859-7',
\ 'iso_8859-8:1988' : 'iso-8859-8',
\ 'iso-ir-138' : 'iso-8859-8',
\ 'iso_8859-8' : 'iso-8859-8',
\ 'iso-8859-8' : 'iso-8859-8',
\ 'hebrew' : 'iso-8859-8',
\ 'csisolatinhebrew' : 'iso-8859-8',
\ 'iso_8859-9:1989' : 'iso-8859-9',
\ 'iso-ir-148' : 'iso-8859-9',
\ 'iso_8859-9' : 'iso-8859-9',
\ 'iso-8859-9' : 'iso-8859-9',
\ 'latin5' : 'iso-8859-9',
\ 'l5' : 'iso-8859-9',
\ 'csisolatin5' : 'iso-8859-9',
\ 'iso-8859-10' : 'iso-8859-10',
\ 'iso-ir-157' : 'iso-8859-10',
\ 'l6' : 'iso-8859-10',
\ 'iso_8859-10:1992' : 'iso-8859-10',
\ 'csisolatin6' : 'iso-8859-10',
\ 'latin6' : 'iso-8859-10',
\ 'iso-8859-13' : 'iso-8859-13',
\ 'iso-8859-14' : 'iso-8859-14',
\ 'iso-ir-199' : 'iso-8859-14',
\ 'iso_8859-14:1998' : 'iso-8859-14',
\ 'iso_8859-14' : 'iso-8859-14',
\ 'latin8' : 'iso-8859-14',
\ 'iso-celtic' : 'iso-8859-14',
\ 'l8' : 'iso-8859-14',
\ 'iso-8859-15' : 'iso-8859-15',
\ 'iso_8859-15' : 'iso-8859-15',
\ 'latin-9' : 'iso-8859-15',
\ 'koi8-r' : 'koi8-r',
\ 'cskoi8r' : 'koi8-r',
\ 'koi8-u' : 'koi8-u',
\ 'macintosh' : 'macroman',
\ 'mac' : 'macroman',
\ 'csmacintosh' : 'macroman',
\ 'ibm437' : 'cp437',
\ 'cp437' : 'cp437',
\ '437' : 'cp437',
\ 'cspc8codepage437' : 'cp437',
\ 'ibm775' : 'cp775',
\ 'cp775' : 'cp775',
\ 'cspc775baltic' : 'cp775',
\ 'ibm850' : 'cp850',
\ 'cp850' : 'cp850',
\ '850' : 'cp850',
\ 'cspc850multilingual' : 'cp850',
\ 'ibm852' : 'cp852',
\ 'cp852' : 'cp852',
\ '852' : 'cp852',
\ 'cspcp852' : 'cp852',
\ 'ibm855' : 'cp855',
\ 'cp855' : 'cp855',
\ '855' : 'cp855',
\ 'csibm855' : 'cp855',
\ 'ibm857' : 'cp857',
\ 'cp857' : 'cp857',
\ '857' : 'cp857',
\ 'csibm857' : 'cp857',
\ 'ibm860' : 'cp860',
\ 'cp860' : 'cp860',
\ '860' : 'cp860',
\ 'csibm860' : 'cp860',
\ 'ibm861' : 'cp861',
\ 'cp861' : 'cp861',
\ '861' : 'cp861',
\ 'cp-is' : 'cp861',
\ 'csibm861' : 'cp861',
\ 'ibm862' : 'cp862',
\ 'cp862' : 'cp862',
\ '862' : 'cp862',
\ 'cspc862latinhebrew' : 'cp862',
\ 'ibm863' : 'cp863',
\ 'cp863' : 'cp863',
\ '863' : 'cp863',
\ 'csibm863' : 'cp863',
\ 'ibm865' : 'cp865',
\ 'cp865' : 'cp865',
\ '865' : 'cp865',
\ 'csibm865' : 'cp865',
\ 'ibm866' : 'cp866',
\ 'cp866' : 'cp866',
\ '866' : 'cp866',
\ 'csibm866' : 'cp866',
\ 'ibm869' : 'cp869',
\ 'cp869' : 'cp869',
\ '869' : 'cp869',
\ 'cp-gr' : 'cp869',
\ 'csibm869' : 'cp869',
\ 'windows-1250' : 'cp1250',
\ 'windows-1251' : 'cp1251',
\ 'windows-1253' : 'cp1253',
\ 'windows-1254' : 'cp1254',
\ 'windows-1255' : 'cp1255',
\ 'windows-1256' : 'cp1256',
\ 'windows-1257' : 'cp1257',
\ 'windows-1258' : 'cp1258',
\ 'extended_unix_code_packed_format_for_japanese' : 'euc-jp',
\ 'cseucpkdfmtjapanese' : 'euc-jp',
\ 'euc-jp' : 'euc-jp',
\ 'shift_jis' : 'sjis',
\ 'ms_kanji' : 'sjis',
\ 'sjis' : 'sjis',
\ 'csshiftjis' : 'sjis',
\ 'ibm-thai' : 'cp874',
\ 'csibmthai' : 'cp874',
\ 'ks_c_5601-1987' : 'cp949',
\ 'iso-ir-149' : 'cp949',
\ 'ks_c_5601-1989' : 'cp949',
\ 'ksc_5601' : 'cp949',
\ 'korean' : 'cp949',
\ 'csksc56011987' : 'cp949',
\ 'euc-kr' : 'euc-kr',
\ 'cseuckr' : 'euc-kr',
\ 'gbk' : 'cp936',
\ 'cp936' : 'cp936',
\ 'ms936' : 'cp936',
\ 'windows-936' : 'cp936',
\ 'gb_2312-80' : 'euc-cn',
\ 'iso-ir-58' : 'euc-cn',
\ 'chinese' : 'euc-cn',
\ 'csiso58gb231280' : 'euc-cn',
\ 'big5' : 'big5',
\ 'csbig5' : 'big5',
\ 'utf-8' : 'utf-8',
\ 'iso-10646-ucs-2' : 'ucs-2',
\ 'csunicode' : 'ucs-2',
\ 'utf-16' : 'utf-16',
\ 'utf-16be' : 'utf-16',
\ 'utf-16le' : 'utf-16le',
\ 'utf-32' : 'ucs-4',
\ 'utf-32be' : 'ucs-4',
\ 'utf-32le' : 'ucs-4le',
\ 'iso-10646-ucs-4' : 'ucs-4',
\ 'csucs4' : 'ucs-4'
\ }
lockvar g:tohtml#charset_to_encoding
"}}}
func! tohtml#Convert2HTML(line1, line2) "{{{
let s:settings = tohtml#GetUserSettings()
if !&diff || s:settings.diff_one_file
if !&diff || s:settings.diff_one_file "{{{
if a:line2 >= a:line1
let g:html_start_line = a:line1
let g:html_end_line = a:line2
@@ -24,31 +298,50 @@ func! tohtml#Convert2HTML(line1, line2)
let g:html_start_line = a:line2
let g:html_end_line = a:line1
endif
runtime syntax/2html.vim
else
runtime syntax/2html.vim "}}}
else "{{{
let win_list = []
let buf_list = []
windo | if &diff | call add(win_list, winbufnr(0)) | endif
let s:settings.whole_filler = 1
let g:html_diff_win_num = 0
for window in win_list
" switch to the next buffer to convert
exe ":" . bufwinnr(window) . "wincmd w"
" figure out whether current charset and encoding will work, if not
" default to UTF-8
if !exists('g:html_use_encoding') &&
\ (&l:fileencoding!='' && &l:fileencoding!=s:settings.vim_encoding ||
\ &l:fileencoding=='' && &encoding!=s:settings.vim_encoding)
echohl WarningMsg
echomsg "TOhtml: mismatched file encodings in Diff buffers, using UTF-8"
echohl None
let s:settings.vim_encoding = 'utf-8'
let s:settings.encoding = 'UTF-8'
endif
" set up for diff-mode conversion
let g:html_start_line = 1
let g:html_end_line = line('$')
let g:html_diff_win_num += 1
" convert this file
runtime syntax/2html.vim
" remember the HTML buffer for later combination
call add(buf_list, bufnr('%'))
endfor
unlet g:html_diff_win_num
call tohtml#Diff2HTML(win_list, buf_list)
endif
endif "}}}
unlet g:html_start_line
unlet g:html_end_line
unlet s:settings
endfunc
endfunc "}}}
func! tohtml#Diff2HTML(win_list, buf_list)
func! tohtml#Diff2HTML(win_list, buf_list) "{{{
let xml_line = ""
let tag_close = '>'
@@ -87,7 +380,7 @@ func! tohtml#Diff2HTML(win_list, buf_list)
call add(html, '<head>')
" include encoding as close to the top as possible, but only if not already
" contained in XML information (to avoid haggling over content type)
" contained in XML information
if s:settings.encoding != "" && !s:settings.use_xhtml
call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . tag_close)
endif
@@ -133,7 +426,8 @@ func! tohtml#Diff2HTML(win_list, buf_list)
let s:body_end_line = getline('.')
endif
" Grab the style information. Some of this will be duplicated...
" Grab the style information. Some of this will be duplicated so only insert
" it if it's not already there. {{{
1
let style_start = search('^<style type="text/css">')
1
@@ -151,8 +445,10 @@ func! tohtml#Diff2HTML(win_list, buf_list)
let insert_index += 1
endif
endfor
endif
endif " }}}
" everything new will get added before the diff styles so diff highlight
" properly overrides normal highlight
if diff_style_start != 0
let insert_index = diff_style_start
endif
@@ -203,6 +499,20 @@ func! tohtml#Diff2HTML(win_list, buf_list)
" just in case some user autocmd creates content in the new buffer, make sure
" it is empty before proceeding
%d
" set the fileencoding to match the charset we'll be using
let &l:fileencoding=s:settings.vim_encoding
" According to http://www.w3.org/TR/html4/charset.html#doc-char-set, the byte
" order mark is highly recommend on the web when using multibyte encodings. But,
" it is not a good idea to include it on UTF-8 files. Otherwise, let Vim
" determine when it is actually inserted.
if s:settings.vim_encoding == 'utf-8'
setlocal nobomb
else
setlocal bomb
endif
call append(0, html)
if len(style) > 0
@@ -210,7 +520,7 @@ func! tohtml#Diff2HTML(win_list, buf_list)
let style_start = search('^</head>')-1
" Insert javascript to toggle matching folds open and closed in all windows,
" if dynamic folding is active.
" if dynamic folding is active. {{{
if s:settings.dynamic_folds
call append(style_start, [
\ "<script type='text/javascript'>",
@@ -234,13 +544,13 @@ func! tohtml#Diff2HTML(win_list, buf_list)
\ s:settings.use_xhtml ? '//]]>' : " -->",
\ "</script>"
\ ])
endif
endif "}}}
" Insert styles from all the generated html documents and additional styles
" for the table-based layout of the side-by-side diff. The diff should take
" up the full browser window (but not more), and be static in size,
" horizontally scrollable when the lines are too long. Otherwise, the diff
" is pretty useless for really long lines.
" is pretty useless for really long lines. {{{
if s:settings.use_css
call append(style_start,
\ ['<style type="text/css">']+
@@ -252,28 +562,28 @@ func! tohtml#Diff2HTML(win_list, buf_list)
\ 'td div { overflow: auto; }',
\ s:settings.use_xhtml ? '' : '-->',
\ '</style>'
\ ])
endif
\])
endif "}}}
endif
let &paste = s:old_paste
let &magic = s:old_magic
endfunc
endfunc "}}}
" Gets a single user option and sets it in the passed-in Dict, or gives it the
" default value if the option doesn't actually exist.
func! tohtml#GetOption(settings, option, default)
func! tohtml#GetOption(settings, option, default) "{{{
if exists('g:html_'.a:option)
let a:settings[a:option] = g:html_{a:option}
else
let a:settings[a:option] = a:default
endif
endfunc
endfunc "}}}
" returns a Dict containing the values of all user options for 2html, including
" default values for those not given an explicit value by the user. Discards the
" html_ prefix of the option for nicer looking code.
func! tohtml#GetUserSettings()
func! tohtml#GetUserSettings() "{{{
if exists('s:settings')
" just restore the known options if we've already retrieved them
return s:settings
@@ -289,7 +599,7 @@ func! tohtml#GetUserSettings()
let g:html_use_xhtml = g:use_xhtml
endif
" get current option settings with appropriate defaults
" get current option settings with appropriate defaults {{{
call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") )
call tohtml#GetOption(user_settings, 'diff_one_file', 0 )
call tohtml#GetOption(user_settings, 'number_lines', &number )
@@ -302,8 +612,9 @@ func! tohtml#GetUserSettings()
call tohtml#GetOption(user_settings, 'no_pre', 0 )
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
" }}}
" override those settings that need it
" override those settings that need it {{{
" hover opening implies dynamic folding
if user_settings.hover_unfold
@@ -330,49 +641,91 @@ func! tohtml#GetUserSettings()
" aren't allowed inside a <pre> block
if !user_settings.use_css
let user_settings.no_pre = 1
endif
endif "}}}
" Figure out proper MIME charset from the 'encoding' option.
if exists("g:html_use_encoding")
if exists("g:html_use_encoding") "{{{
" user specified the desired MIME charset, figure out proper
" 'fileencoding' from it or warn the user if we cannot
let user_settings.encoding = g:html_use_encoding
let user_settings.vim_encoding = tohtml#EncodingFromCharset(g:html_use_encoding)
if user_settings.vim_encoding == ''
echohl WarningMsg
echomsg "TOhtml: file encoding for"
\ g:html_use_encoding
\ "unknown, please set 'fileencoding'"
echohl None
endif
else
let vim_encoding = &encoding
if vim_encoding =~ '^8bit\|^2byte'
let vim_encoding = substitute(vim_encoding, '^8bit-\|^2byte-', '', '')
" Figure out proper MIME charset from 'fileencoding' if possible
if &l:fileencoding != ''
let user_settings.vim_encoding = &l:fileencoding
call tohtml#CharsetFromEncoding(user_settings)
endif
if vim_encoding == 'latin1'
let user_settings.encoding = 'iso-8859-1'
elseif vim_encoding =~ "^cp12"
let user_settings.encoding = substitute(vim_encoding, 'cp', 'windows-', '')
elseif vim_encoding == 'sjis' || vim_encoding == 'cp932'
let user_settings.encoding = 'Shift_JIS'
elseif vim_encoding == 'big5' || vim_encoding == 'cp950'
let user_settings.encoding = "Big5"
elseif vim_encoding == 'euc-cn'
let user_settings.encoding = 'GB_2312-80'
elseif vim_encoding == 'euc-tw'
let user_settings.encoding = ""
elseif vim_encoding =~ '^euc\|^iso\|^koi'
let user_settings.encoding = substitute(vim_encoding, '.*', '\U\0', '')
elseif vim_encoding == 'cp949'
let user_settings.encoding = 'KS_C_5601-1987'
elseif vim_encoding == 'cp936'
let user_settings.encoding = 'GBK'
elseif vim_encoding =~ '^ucs\|^utf'
" else from 'encoding' if possible
if &l:fileencoding == '' || user_settings.encoding == ''
let user_settings.vim_encoding = &encoding
call tohtml#CharsetFromEncoding(user_settings)
endif
" else default to UTF-8 and warn user
if user_settings.encoding == ''
let user_settings.vim_encoding = 'utf-8'
let user_settings.encoding = 'UTF-8'
else
let user_settings.encoding = ""
echohl WarningMsg
echomsg "TOhtml: couldn't determine MIME charset, using UTF-8"
echohl None
endif
endif
endif "}}}
" TODO: font
return user_settings
endif
endfunc
endfunc "}}}
" get the proper HTML charset name from a Vim encoding option.
function! tohtml#CharsetFromEncoding(settings) "{{{
let l:vim_encoding = a:settings.vim_encoding
if exists('g:html_charset_override') && has_key(g:html_charset_override, l:vim_encoding)
let a:settings.encoding = g:html_charset_override[l:vim_encoding]
else
if l:vim_encoding =~ '^8bit\|^2byte'
" 8bit- and 2byte- prefixes are to indicate encodings available on the
" system that Vim will convert with iconv(), look up just the encoding name,
" not Vim's prefix.
let l:vim_encoding = substitute(l:vim_encoding, '^8bit-\|^2byte-', '', '')
endif
if has_key(g:tohtml#encoding_to_charset, l:vim_encoding)
let a:settings.encoding = g:tohtml#encoding_to_charset[l:vim_encoding]
else
let a:settings.encoding = ""
endif
endif
if a:settings.encoding != ""
let l:vim_encoding = tohtml#EncodingFromCharset(a:settings.encoding)
if l:vim_encoding != ""
" if the Vim encoding to HTML encoding conversion is set up (by default or
" by the user) to convert to a different encoding, we need to also change
" the Vim encoding of the new buffer
let a:settings.vim_encoding = l:vim_encoding
endif
endif
endfun "}}}
" Get the proper Vim encoding option setting from an HTML charset name.
function! tohtml#EncodingFromCharset(encoding) "{{{
if exists('g:html_encoding_override') && has_key(g:html_encoding_override, a:encoding)
return g:html_encoding_override[a:encoding]
elseif has_key(g:tohtml#charset_to_encoding, tolower(a:encoding))
return g:tohtml#charset_to_encoding[tolower(a:encoding)]
else
return ""
endif
endfun "}}}
let &cpo = s:cpo_sav
unlet s:cpo_sav
" Make sure any patches will probably use consistent indent
" vim: ts=8 sw=2 sts=2 noet
" vim: ts=8 sw=2 sts=2 noet fdm=marker

View File

@@ -1,4 +1,4 @@
*arabic.txt* For Vim version 7.3. Last change: 2005 Mar 29
*arabic.txt* For Vim version 7.3. Last change: 2010 Nov 13
VIM REFERENCE MANUAL by Nadim Shaikli
@@ -146,7 +146,7 @@ o Enable Arabic settings [short-cut]
:set arabic
<
The two above noted possible invocations are the preferred manner
in which users are instructed to proceed. Baring an enabled 'termbidi'
in which users are instructed to proceed. Barring an enabled 'termbidi'
setting, both command options:
1. set the appropriate keymap

View File

@@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.3. Last change: 2010 Sep 30
*diff.txt* For Vim version 7.3. Last change: 2010 Nov 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -373,8 +373,8 @@ get an error message. Possible causes:
If it's not clear what the problem is set the 'verbose' option to one or more
to see more messages.
The self-installing Vim includes a diff program. If you don't have it you
might want to download a diff.exe. For example from
The self-installing Vim for MS-Windows includes a diff program. If you don't
have it you might want to download a diff.exe. For example from
http://jlb.twu.net/code/unixkit.php.

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.3. Last change: 2010 Oct 18
*eval.txt* For Vim version 7.3. Last change: 2010 Nov 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1660,7 +1660,11 @@ v:warningmsg Last given warning message. It's allowed to set this variable.
*v:windowid* *windowid-variable*
v:windowid When any X11 based GUI is running or when running in a
terminal and Vim connects to the X server (|-X|) this will be
set to the window ID. Otherwise the value is zero.
set to the window ID.
When an MS-Windows GUI is running this will be set to the
window handle.
Otherwise the value is zero.
Note: for windows inside Vim use |winnr()|.
==============================================================================
4. Builtin Functions *functions*
@@ -4005,7 +4009,7 @@ maparg({name}[, {mode} [, {abbr} [, {dict}]]]) *maparg()*
"lhs" The {lhs} of the mapping.
"rhs" The {rhs} of the mapping as typed.
"silent" 1 for a |:map-silent| mapping, else 0.
"noremap" 1 if the {rhs} of the mapping is remappable.
"noremap" 1 if the {rhs} of the mapping is not remappable.
"expr" 1 for an expression mapping (|:map-<expr>|).
"buffer" 1 for a buffer local mapping (|:map-local|).
"mode" Modes for which the mapping is defined. In
@@ -4013,9 +4017,9 @@ maparg({name}[, {mode} [, {abbr} [, {dict}]]]) *maparg()*
characters will be used:
" " Normal, Visual and Operator-pending
"!" Insert and Commandline mode
(|mapmpde-ic|)
"sid" the Script local ID, used for <sid> mappings
(|<SID>|)
(|mapmode-ic|)
"sid" The script local ID, used for <sid> mappings
(|<SID>|).
The mappings local to the current buffer are checked first,
then the global mappings.

View File

@@ -1,4 +1,4 @@
*gui.txt* For Vim version 7.3. Last change: 2010 May 14
*gui.txt* For Vim version 7.3. Last change: 2010 Nov 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -156,26 +156,26 @@ configure which ones appear with the 'guioptions' option.
The interface looks like this (with ":set guioptions=mlrb"):
+------------------------------+
| File Edit Help | <- Menu bar (m)
+-+--------------------------+-+
|^| |^|
|#| Text area. |#|
| | | |
|v|__________________________|v|
Normal status line -> |-+ File.c 5,2 +-|
between Vim windows |^|""""""""""""""""""""""""""|^|
| | | |
| | Another file buffer. | |
| | | |
|#| |#|
Left scrollbar (l) -> |#| |#| <- Right
|#| |#| scrollbar (r)
| | | |
|v| |v|
+-+--------------------------+-+
| |< #### >| | <- Bottom
+-+--------------------------+-+ scrollbar (b)
+------------------------------+ `
| File Edit Help | <- Menu bar (m) `
+-+--------------------------+-+ `
|^| |^| `
|#| Text area. |#| `
| | | | `
|v|__________________________|v| `
Normal status line -> |-+ File.c 5,2 +-| `
between Vim windows |^|""""""""""""""""""""""""""|^| `
| | | | `
| | Another file buffer. | | `
| | | | `
|#| |#| `
Left scrollbar (l) -> |#| |#| <- Right `
|#| |#| scrollbar (r) `
| | | | `
|v| |v| `
+-+--------------------------+-+ `
| |< #### >| | <- Bottom `
+-+--------------------------+-+ scrollbar (b) `
Any of the scrollbar or menu components may be turned off by not putting the
appropriate letter in the 'guioptions' string. The bottom scrollbar is

View File

@@ -1,4 +1,4 @@
*if_ruby.txt* For Vim version 7.3. Last change: 2010 Jul 20
*if_ruby.txt* For Vim version 7.3. Last change: 2010 Oct 27
VIM REFERENCE MANUAL by Shugo Maeda
@@ -40,6 +40,9 @@ downloading Ruby there.
wasn't compiled in. To avoid errors, see
|script-here|.
Command to try it out: >
:ruby print "Hello" # this is a comment
Example Vim script: >
function! RedGem()
@@ -187,12 +190,12 @@ $curbuf The current buffer object.
==============================================================================
6. Dynamic loading *ruby-dynamic*
On MS-Windows the Ruby library can be loaded dynamically. The |:version|
output then includes |+ruby/dyn|.
On MS-Windows and Unix the Ruby library can be loaded dynamically. The
|:version| output then includes |+ruby/dyn|.
This means that Vim will search for the Ruby DLL file only when needed. When
you don't use the Ruby interface you don't need it, thus you can use Vim
without this DLL file.
This means that Vim will search for the Ruby DLL file or shared library only
when needed. When you don't use the Ruby interface you don't need it, thus
you can use Vim even though this library file is not on your system.
You need to install the right version of Ruby for this to work. You can find
the package to download from:

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.3. Last change: 2010 Sep 29
*insert.txt* For Vim version 7.3. Last change: 2010 Nov 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -382,6 +382,10 @@ mappings it's often better to use <Esc> (first put an "x" in the text, <Esc>
will then always put the cursor on it). Or use CTRL-\ CTRL-O, but then
beware of the cursor possibly being beyond the end of the line.
The CTRL-O command takes you to Normal mode. If you then use a command enter
Insert mode again it doesn't nest. Thus when typing "a<C-O>a" and then <Esc>
takes you back to Normal mode, you do not need to type <Esc> twice.
The shifted cursor keys are not available on all terminals.
Another side effect is that a count specified before the "i" or "a" command is
@@ -1033,6 +1037,8 @@ items:
items that only differ in case are added
dup when non-zero this match will be added even when an
item with the same word is already present.
empty when non-zero this match will be added even when it is
an empty string
All of these except 'icase' must be a string. If an item does not meet these
requirements then an error message is given and further items in the list are
@@ -1043,7 +1049,8 @@ be relatively short. The "info" item can be longer, it will be displayed in
the preview window when "preview" appears in 'completeopt'. The "info" item
will also remain displayed after the popup menu has been removed. This is
useful for function arguments. Use a single space for "info" to remove
existing text in the preview window.
existing text in the preview window. The size of the preview window is three
lines, but 'previewheight' is used when it has a value of 1 or 2.
The "kind" item uses a single letter to indicate the kind of completion. This
may be used to show the completion differently (different color or icon).
@@ -1059,9 +1066,9 @@ match to the total list. These matches should then not appear in the returned
list! Call |complete_check()| now and then to allow the user to press a key
while still searching for matches. Stop searching when it returns non-zero.
The function is allowed to move the cursor, it is restored afterwards. This
option cannot be set from a |modeline| or in the |sandbox|, for security
reasons.
*E839* *E840*
The function is allowed to move the cursor, it is restored afterwards.
The function is not allowed to move to another window or delete text.
An example that completes the names of the months: >
fun! CompleteMonths(findstart, base)

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 7.3. Last change: 2010 Sep 29
*intro.txt* For Vim version 7.3. Last change: 2010 Nov 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -703,7 +703,7 @@ Lines longer than the window width will wrap, unless the 'wrap' option is off
(see below). The 'linebreak' option can be set to wrap at a blank character.
If the window has room after the last line of the buffer, Vim will show '~' in
the first column of the last lines in the window, like this: >
the first column of the last lines in the window, like this:
+-----------------------+
|some line |
@@ -715,7 +715,7 @@ the first column of the last lines in the window, like this: >
Thus the '~' lines indicate that the end of the buffer was reached.
If the last line in a window doesn't fit, Vim will indicate this with a '@' in
the first column of the last lines in the window, like this: >
the first column of the last lines in the window, like this:
+-----------------------+
|first line |

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.3. Last change: 2010 Sep 29
*map.txt* For Vim version 7.3. Last change: 2010 Nov 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1093,16 +1093,20 @@ is executed, it is transformed into a normal Ex command and then executed.
For starters: See section |40.2| in the user manual.
*E183* *user-cmd-ambiguous*
*E183* *E841* *user-cmd-ambiguous*
All user defined commands must start with an uppercase letter, to avoid
confusion with builtin commands. (There are a few builtin commands, notably
:Next, :Print and :X, which do start with an uppercase letter. The builtin
will always take precedence in these cases). The other characters of the user
command can be uppercase letters, lowercase letters or digits. When using
digits, note that other commands that take a numeric argument may become
ambiguous. For example, the command ":Cc2" could be the user command ":Cc2"
without an argument, or the command ":Cc" with argument "2". It is advised to
put a space between the command name and the argument to avoid these problems.
confusion with builtin commands. Exceptions are these builtin commands:
:Next
:X
They cannot be used for a user defined command. ":Print" is also an existing
command, but it is deprecated and can be overruled.
The other characters of the user command can be uppercase letters, lowercase
letters or digits. When using digits, note that other commands that take a
numeric argument may become ambiguous. For example, the command ":Cc2" could
be the user command ":Cc2" without an argument, or the command ":Cc" with
argument "2". It is advised to put a space between the command name and the
argument to avoid these problems.
When using a user-defined command, the command can be abbreviated. However, if
an abbreviation is not unique, an error will be issued. Furthermore, a

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.3. Last change: 2010 Oct 20
*options.txt* For Vim version 7.3. Last change: 2010 Nov 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1699,7 +1699,8 @@ A jump table for the options with a short description can be found at |Q_op|.
with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U|
See |complete-functions| for an explanation of how the function is
invoked and what it should return.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'completeopt'* *'cot'*
'completeopt' 'cot' string (default: "menu,preview")
@@ -2843,6 +2844,7 @@ A jump table for the options with a short description can be found at |Q_op|.
"dos" is not present or no <CR><NL> is found in the file.
Except: if "unix" was chosen, but there is a <CR> before
the first <NL>, and there appear to be more <CR>s than <NL>s in
the first few lines, "mac" is used.
4. If 'fileformat' is still not set, the first name from
'fileformats' is used.
When reading a file into an existing buffer, the same is done, but
@@ -3089,6 +3091,10 @@ A jump table for the options with a short description can be found at |Q_op|.
Specifies for which type of commands folds will be opened, if the
command moves the cursor into a closed fold. It is a comma separated
list of items.
NOTE: When the command is part of a mapping this option is not used.
Add the |zv| command to the mapping to get the same effect.
(rationale: the mapping may want to control opening folds itself)
item commands ~
all any
block "(", "{", "[[", "[{", etc.
@@ -3103,8 +3109,6 @@ A jump table for the options with a short description can be found at |Q_op|.
Also for |[s| and |]s|.
tag jumping to a tag: ":ta", CTRL-T, etc.
undo undo or redo: "u" and CTRL-R
When the command is part of a mapping this option is not used. Add
the |zv| command to the mapping to get the same effect.
When a movement command is used for an operator (e.g., "dl" or "y%")
this option is not used. This means the operator will include the
whole closed fold.
@@ -6228,8 +6232,9 @@ A jump table for the options with a short description can be found at |Q_op|.
Do smart autoindenting when starting a new line. Works for C-like
programs, but can also be used for other languages. 'cindent' does
something like this, works better in most cases, but is more strict,
see |C-indenting|. When 'cindent' is on, setting 'si' has no effect.
'indentexpr' is a more advanced alternative.
see |C-indenting|. When 'cindent' is on or 'smartindent' is set,
setting 'si' has no effect. 'indentexpr' is a more advanced
alternative.
Normally 'autoindent' should also be on when using 'smartindent'.
An indent is automatically inserted:
- After a line ending in '{'.
@@ -7531,8 +7536,7 @@ A jump table for the options with a short description can be found at |Q_op|.
with an uppercase letter, and don't contain a lowercase
letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
and "_K_L_M" are not. Nested List and Dict items may not be
read back correctly, you end up with a string representation
instead.
read back correctly, you end up with an empty item.
" Maximum number of lines saved for each register. Old name of
the '<' item, with the disadvantage that you need to put a
backslash before the ", otherwise it will be recognized as the

View File

@@ -1,4 +1,4 @@
*pi_tar.txt* For Vim version 7.3. Last change: 2010 Aug 09
*pi_tar.txt* For Vim version 7.3. Last change: 2010 Nov 03
+====================+
| Tar File Interface |
@@ -60,11 +60,11 @@ Copyright 2005-2010: The GPL (gnu public license) applies to *tar-copyright*
<.vimrc> file.
Default
Variable Value Explanation
*g:tar_browseoptions* "Ptf" used to get a list of contents
*g:tar_readoptions* "OPxf" used to extract a file from a tarball
*g:tar_cmd* "tar" the name of the tar program
*g:tar_nomax* 0 if true, file window will not be maximized
*g:tar_secure* undef if exists:
*g:tar_browseoptions* "Ptf" used to get a list of contents
*g:tar_readoptions* "OPxf" used to extract a file from a tarball
*g:tar_cmd* "tar" the name of the tar program
*g:tar_nomax* 0 if true, file window will not be maximized
*g:tar_secure* undef if exists:
"--"s will be used to prevent unwanted
option expansion in tar commands.
Please be sure that your tar command
@@ -76,7 +76,7 @@ Copyright 2005-2010: The GPL (gnu public license) applies to *tar-copyright*
"-"
Not all tar's support the "--" which is why
it isn't default.
*g:tar_writeoptions* "uf" used to update/replace a file
*g:tar_writeoptions* "uf" used to update/replace a file
==============================================================================

View File

@@ -1,4 +1,4 @@
*quotes.txt* For Vim version 7.3. Last change: 2006 Apr 24
*quotes.txt* For Vim version 7.3. Last change: 2010 Nov 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -260,15 +260,16 @@ Eccettuato, Italy)
In summary:
__ ___ _ _ _ ___ _____
\ \ / (_)_ __ ___ (_)___ | | | |/ _ \_ _|
\ \ / /| | '_ ` _ \ | / __| | |_| | | | || |
\ V / | | | | | | | | \__ \ | _ | |_| || |
\_/ |_|_| |_| |_| |_|___/ |_| |_|\___/ |_|
____ _____ _ _ _____ _____ _ _
/ ___|_ _| | | | ___| ___| | |
\___ \ | | | | | | |_ | |_ | | |
___) || | | |_| | _| | _| |_|_|
|____/ |_| \___/|_| |_| (_|_) (Tony Nugent, Australia)
__ ___ _ _ _ ___ _____ `
\ \ / (_)_ __ ___ (_)___ | | | |/ _ \_ _| `
\ \ / /| | '_ ` _ \ | / __| | |_| | | | || | `
\ V / | | | | | | | | \__ \ | _ | |_| || | `
\_/ |_|_| |_| |_| |_|___/ |_| |_|\___/ |_| `
____ _____ _ _ _____ _____ _ _ `
/ ___|_ _| | | | ___| ___| | | `
\___ \ | | | | | | |_ | |_ | | | `
___) || | | |_| | _| | _| |_|_| `
|____/ |_| \___/|_| |_| (_|_) (Tony Nugent, Australia) `
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.3. Last change: 2010 Sep 23
*syntax.txt* For Vim version 7.3. Last change: 2010 Oct 7
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -390,10 +390,10 @@ Or use the ":TOhtml" user command. It is defined in a standard plugin.
:10,40TOhtml
Warning: This is slow! The script must process every character of every line.
Because it is so slow, by default a progress bar is displayed in the
statusline for each step that usually takes a long time. If you don't like
seeing this progress bar, you can disable it and get a very minor speed
Warning: This can be slow! The script must process every character of every
line. Because it can take a long time, by default a progress bar is displayed
in the statusline for each major step in the conversion process. If you don't
like seeing this progress bar, you can disable it and get a very minor speed
improvement with: >
let g:html_no_progress = 1
@@ -475,40 +475,69 @@ risk of making some things look a bit different, use: >
This will use <br> at the end of each line and use "&nbsp;" for repeated
spaces.
The current value of 'encoding' is used to specify the charset of the HTML
file. This only works for those values of 'encoding' that have an equivalent
HTML charset name. To overrule this set g:html_use_encoding to the name of
the charset to be used: >
:let g:html_use_encoding = "foobar"
To omit the line that specifies the charset, set g:html_use_encoding to an
empty string: >
:let g:html_use_encoding = ""
To go back to the automatic mechanism, delete the g:html_use_encoding
variable: >
:unlet g:html_use_encoding
<
For diff mode a sequence of more than 3 filler lines is displayed as three
lines with the middle line mentioning the total number of inserted lines. If
you prefer to see all the inserted lines use: >
For diff mode on a single file (with g:html_diff_one_file) a sequence of more
than 3 filler lines is displayed as three lines with the middle line
mentioning the total number of inserted lines. If you prefer to see all the
inserted lines as with the side-by-side diff, use: >
:let g:html_whole_filler = 1
And to go back to displaying up to three lines again: >
:unlet g:html_whole_filler
<
TOhtml uses the current value of 'fileencoding' if set, or 'encoding' if not,
to determine the charset and 'fileencoding' of the HTML file. In general, this
works for the encodings mentioned specifically by name in |encoding-names|, but
TOhtml will only automatically use those encodings which are widely supported.
However, you can override this to support specific encodings that may not be
automatically detected by default.
To overrule all automatic charset detection, set g:html_use_encoding to the
name of the charset to be used. TOhtml will try to determine the appropriate
'fileencoding' setting from the charset, but you may need to set it manually
if TOhtml cannot determine the encoding. It is recommended to set this
variable to something widely supported, like UTF-8, for anything you will be
hosting on a webserver: >
:let g:html_use_encoding = "UTF-8"
You can also use this option to omit the line that specifies the charset
entirely, by setting g:html_use_encoding to an empty string: >
:let g:html_use_encoding = ""
To go back to the automatic mechanism, delete the g:html_use_encoding
variable: >
:unlet g:html_use_encoding
If you specify a charset with g:html_use_encoding for which TOhtml cannot
automatically detect the corresponding 'fileencoding' setting, you can use
g:html_encoding_override to allow TOhtml to detect the correct encoding.
This is a dictionary of charset-encoding pairs that will replace existing
pairs automatically detected by TOhtml, or supplement with new pairs. For
example, to allow TOhtml to detect the HTML charset "windows-1252" properly as
the encoding "8bit-cp1252", use: >
:let g:html_encoding_override = {'windows-1252': '8bit-cp1252'}
<
The g:html_charset_override is similar, it allows TOhtml to detect the HTML
charset for any 'fileencoding' or 'encoding' which is not detected
automatically. You can also use it to override specific existing
encoding-charset pairs. For example, TOhtml will by default use UTF-8 for all
Unicode/UCS encodings. To use UTF-16 and UTF-32 instead, use: >
:let g:html_charset_override = {'ucs-4': 'UTF-32', 'utf-16': 'UTF-16'}
Note that documents encoded in either UTF-32 or UTF-16 have known
compatibility problems with at least one major browser.
*convert-to-XML* *convert-to-XHTML*
An alternative is to have the script generate XHTML (XML compliant HTML). To
do this set the "html_use_xhtml" variable: >
If you do not like plain HTML, an alternative is to have the script generate
XHTML (XML compliant HTML). To do this set the "html_use_xhtml" variable: >
:let g:html_use_xhtml = 1
Any of these options can be enabled or disabled by setting them explicitly to
the desired value, or restored to their default by removing the variable using
|:unlet|.
Any of the on/off options listed above can be enabled or disabled by setting
them explicitly to the desired value, or restored to their default by removing
the variable using |:unlet|.
Remarks:
- This only works in a version with GUI support. If the GUI is not actually
running (possible for X11) it still works, but not very well (the colors
may be wrong).
- Some truly ancient browsers may not show the background colors.
- From most browsers you can also print the file (in color)!
- This version of TOhtml may work with older versions of Vim, but some
features such as conceal support will not function, and the colors may be
incorrect for an old Vim without GUI support compiled in.
Here is an example how to run the script over all .c and .h files from a
Unix shell: >

View File

@@ -4216,7 +4216,9 @@ E835 options.txt /*E835*
E836 if_pyth.txt /*E836*
E837 if_pyth.txt /*E837*
E838 netbeans.txt /*E838*
E839 insert.txt /*E839*
E84 windows.txt /*E84*
E840 insert.txt /*E840*
E85 options.txt /*E85*
E86 windows.txt /*E86*
E87 windows.txt /*E87*
@@ -8086,6 +8088,7 @@ v:val eval.txt /*v:val*
v:var eval.txt /*v:var*
v:version eval.txt /*v:version*
v:warningmsg eval.txt /*v:warningmsg*
v:windowid eval.txt /*v:windowid*
v_! change.txt /*v_!*
v_$ visual.txt /*v_$*
v_: cmdline.txt /*v_:*
@@ -8360,6 +8363,7 @@ window-size term.txt /*window-size*
window-size-functions usr_41.txt /*window-size-functions*
window-tag windows.txt /*window-tag*
window-variable eval.txt /*window-variable*
windowid-variable eval.txt /*windowid-variable*
windows windows.txt /*windows*
windows-3.1 os_win32.txt /*windows-3.1*
windows-intro windows.txt /*windows-intro*

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.3. Last change: 2010 Oct 20
*todo.txt* For Vim version 7.3. Last change: 2010 Nov 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,12 +30,22 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Crash when using vimgrep with an ftp file. (Christian Brabandt, 2010 Nov 5)
Crash with dragn-n-drop of file combined with netrw (Marius Gedminas, 2008 Jun
11) I can't reproduce it. It's probably caused by a handle_drop() call
in combination with autocommands that invoke a ":redraw" command.
Another valgrind output Jun 30.
'cursorline' is displayed too short when there are concealed characters and
'list' is set, 'listchars' at default value. (Dennis Preiser, 2010 Aug 15)
Conceal: using Tab for cchar causes problems. Should reject it. (ZyX, 2010
Aug 25)
Problems with building after 7.3.050, -as-needed does not work for gcc 4.4.1?
(Charles Campbell, 2010 Nov 7) Or is the problem that we should use -ltinfo,
because nothing is used from ncurses?
Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2,
only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
21, Ben Fritz, 2010 Sep 14)
@@ -45,16 +55,8 @@ Windows keys not set properly on Windows 7? (cncyber, 2010 Aug 26)
This line hangs Vim, because of syntax HL:
call append(line, "INFO ....12....18....24....30....36....42....48....54....60....66....72....78%$")
Patch to add v:windowid. (Christian J. Robinson, 2010 Oct 13, update by Lech
Lorens, Oct 14)
maparg() doesn't return the flags, such as <buffer>, <script>, <silent>.
These are needed to save and restore a mapping.
Also: the rhs string is not always correct. (Hari Krishna Dara, 2009 Sept 29)
Patch by Christian Brabandt, 2010 Sep 17.
Building the MingW version without clipboard but with multi-byte doesn't
build. (Bill Lam, 2010 Sep 18)
work. (Bill Lam, 2010 Sep 18)
Bug: E685 error for func_unref(). (ZyX, 2010 Aug 5)
@@ -62,48 +64,41 @@ Using ":break" or something else that stops executing commands inside a
":finally" does not rethrow a previously uncaught exception. (ZyX, 2010 Oct
15)
Patch to fix warning for accessing mediumVersion. (Dominique Pelle, 2010 Aug
18)
Patch for 2html to support 'fileencoding'. (Benjamin Fritz, 2010 Sep 10)
Patch to use 'previewheight' for popup menu. (Benjamin Haskell, 2010 Sep 29)
Three patches for undo persistence. (Christian Brabandt, 2010 Sep 4)
ml_get error for using :copen in a custom complete function. (Xavier
Deguillard, 2010 Oct 19) Other way to reproduce it by Lech Lorens, Oct 20.
string() can't parse back "inf" and "nan". Fix documentation or fix code?
(ZyX, 2010 Aug 23)
Patch to use "--as-needed" instead of the link.sh functionality. (Kirill A.
Shutemov, 2010 Aug 25)
maparg() does not show the <script> flag. How to restore the script ID?
Patch to fix complete(). (Kikuchan, 2010 Oct 15)
Ruby: Patch to load Gem module. Why is this needed? (Yasuhiro Matsumoto, 2010
Oct 6)
":command Print echo 'print'" works, but ":Print" doesn't. Builtin Print
should be overruled. (Aaron Thoma)
Patch by Christian Brabandt, 2010 Sep 5.
Comparing recursive structure loops forever. (ZyX, 2010 Aug 22, info from John
Beckett Aug 23)
Patch from Christian Brabandt, 2010 Oct 2
":drop" does not respect 'autochdir'. (Peter Odding, 2010 Jul 24)
Patch from Benjamin Fritz, 2010 Oct 13.
Patch to fix \%V item in regexp. (Christian Brabandt, 2010 Nov 8)
Not quite right.
Highlighting stops working after changing it many times. Script to reproduce
it: Pablo Contreras, 2010 Oct 12 Windows XP and 7. Font is never freed?
When 'cursorcolumn' is set locally to a window, ":new" opens a window with the
same highlighting but 'cursorcolumn' is empty. (Tyru, 2010 Nov 15)
GTK: drawing a double-width combining character over single-width characters
doesn't look right. (Dominique Pelle, 2010 Aug 8)
GTK: patch to fix hitting Enter in a dialog. (Britton Kerin, 2010 Nov 11)
GTK: tear-off menu does not work. (Kurt Sonnenmoser, 2010 Oct 25)
":find" completion does not escape space in directory name. (Isz, 2010 Nov 2)
Win32: When using Chinese tear-off menu doesn't work. (Weasley, 2010 Oct 31)
Patch by Alex Jakushev, 2010 Nov 2.
Using control characters in 'statusline' doesn't work well. (ZyX, 2010 Nov 1)
Patch by Caio Ariede, 2010 Nov 3
Using ":call" inside "if 0" does not see that a function returns a Dict and
gives error for "." as string concatenation. (Yasuhiro Matsumoto, 2010 Oct 20)
Patch: Oct 20.
Patch to move check for emsg_not_now() up to avoid statusline not being
updated. (James Vega, 2010 Nov 4)
Copy/paste between Vim and Google chrome doesn't work well for multi-byte
characters. (Ben Haskell, 2010 Sep 17)
@@ -123,18 +118,32 @@ the system encoding (usually utf-8).
Problem producing tags file when hebrew.frx is present. It has a BOM.
Results in E670. (Tony Mechelynck, 2010 May 2)
Patch for dynamic loading Ruby on Unix. (Jon, 2010 Aug 23)
Included, but also need a change to configure.
Patch to support sorting on floating point number.
Ruby: ":ruby print $buffer.number" returns zero.
setpos() does not restore cursor position after :normal. (Tyru, 2010 Aug 11)
7 The 'directory' option supports changing path separators to "%" to make
file names unique, also support this for 'backupdir'. (Mikolaj Machowski)
Patch by Christian Brabandt, 2010 Oct 21.
getpos()/setpos() don't include curswant. getpos() could return a fifth
element. setpos() could accept an optional fifth element.
Patch by Christian Brabandt, 2010 Sep 6. Check that new argument is optional
and that it's documented.
With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott,
2010 Oct 24)
Patch to add random number generator. (Hong Xu, 2010 Nov 8, update Nov 10)
Alternative from Christian Brabandt. (2010 Sep 19)
Messages in message.txt are highlighted as examples.
When using cp850 the NBSP (0xff) is not drawn correctly. (Brett Stahlman, 2010
Oct 22) 'isprint' is set to "@,161-255".
Test 73 fails on MS-Windows when compiled with DJGPP and run twice. How to
delete the Xfind directory? Add an rmdir() function, just like we have
mkdir().
@@ -158,17 +167,33 @@ Echo starts in the wrong column:
while 1 | let s = input('A') | echo 'R' | endw
(Boyko Bantchev, 2010 Aug 9)
Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
Patch: Let rare word highlighting overrule good word highlighting.
(Jakson A. Aquino, 2010 Jul 30)
Patch to make more characters work in dialogs. (Yankwei Jia, 2010 Aug 4)
Patch for VisVim, pass file name to VimOpenFile. (Jiri Sedlak, 2010 Nov 12)
When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
instead of one. (Constantin Pan, 2010 Sep 10)
Writing nested List and Dict in viminfo gives error message and can't be read
back. (Yukihiro Nakadaira, 2010 Nov 13)
Dos uninstal may delete vim.bat from the wrong directory (e.g., when someone
makes his own wrapper). Add a magic string with the version number to the
.bat file and check for it in the uninstaller. E.g.
# uninstall key: vim7.3*
Problem with cursor in the wrong column. (SungHyun Nam, 2010 Mar 11)
Additional info by Dominique Pelle. (also on 2010 Apr 10)
CreateFile and CreateFileW are used without sharing, filewritable() fails when
the file was already open (e.g. script is being sourced). Add FILE_SHARE_READ|
FILE_SHARE_WRITE in mch_access()? (Phillippe Vaucher, 2010 Nov 2)
Is ~/bin (literally) in $PATH supposed to work? (Paul, 2010 March 29)
Looks like only bash can do it. (Yakov Lerner)
@@ -209,6 +234,9 @@ like it has ":keepjumps" before it.
Coverity: ask someone to create new user: Dominique.
Check if there are new reported defects: http://scan.coverity.com/rung2.html
Patch to support :undo absolute jump to file save number. (Christian Brabandt,
2010 Nov 5)
When setting 'undofile' while the file is already loaded, but unchanged, try
to read the undo file. Requires computing a checksum of the text. (Andy
Wokula)
@@ -258,6 +286,9 @@ Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2)
For running gvim on an USB stick: avoid the OLE registration. Use a command
line argument -noregister.
When using an expression in 'statusline' leading white space sometimes goes
missing (but not always). (ZyX, 2010 Nov 1)
When a mapping exists both for insert mode and lang-insert mode, the last one
doesn't work. (Tyru, 2010 May 6) Or is this intended?
@@ -429,6 +460,11 @@ correct. Don't use it in the swap file.
Completion for ":buf" doesn't work properly on Win32 when 'shellslash' is off.
(Henrik Ohman, 2009, Jan 29)
shellescape() depends on 'shellshash' for quoting. That doesn't work when
'shellslash' is set but using cmd.exe. (Ben Fritz)
Use a different option or let it depend on whether 'shell' looks like a
unix-like shell?
Allow patches to add something to version.c, like with an official patch, so
that :version output shows which patches have been applied.
@@ -478,11 +514,6 @@ Having "Syntax" in 'eventignore' for :bufdo may cause problems, e.g. for
option only for when jumping to another buffer, not when the command argument
is executed.
Crash with dragn-n-drop of file combined with netrw (Marius Gedminas, 2008 Jun
11) I can't reproduce it. It's probably caused by a handle_drop() call
in combination with autocommands that invoke a ":redraw" command.
Another valgrind output Jun 30.
":pedit %" with a BufReadPre autocommand causes the cursor to move to the
first line. (Ingo Karkat, 2008 Jul 1) Ian Kelling is working on this.
@@ -895,6 +926,8 @@ if_ruby.c.
Patch to dynamically load Python on Solaris. (Danek Duvall, 2009 Feb 16)
Needs more work.
Python3 interface doesn't handle utf-8 correctly? (Nov 2010, lilydjwg)
The need_fileinfo flag is messy. Instead make the message right away and put
it in keep_msg?
@@ -1556,6 +1589,8 @@ Athena and Motif:
Athena GUI:
9 The first event for any button in the menu or toolbar appears to get lost.
The second click on a menu does work.
9 When dragging the scrollbar thumb very fast, focus is only obtained in
the scrollbar itself. And the thumb is no longer updated when moving
through files.
@@ -1879,11 +1914,6 @@ Macintosh:
works.
8 A very long message in confirm() can't be quit. Make this possible with
CTRL-C.
7 clip_x11_own_selection() uses CurrentTime, that is not allowed. VNC X
server has a problem with this. (Mark Waggoner) Remembering the timestamp
of events isn't always possible. We don't get them in an xterm. GTK
doesn't obtain the selection again when the timestamp differs, thus it
won't work for GTK anyway.
8 When the clipboard isn't supported: ":yank*" gives a confusing error
message. Specifically mention that the register name is invalid.
8 "gf" always excludes trailing punctuation characters. file_name_in_line()
@@ -4278,8 +4308,6 @@ Writing files:
8 'backupskip' doesn't write a backup file at all, a bit dangerous for some
applications. Add 'backupelsewhere' to write a backup file in another
directory? Or add a flag to 'backupdir'?
7 The 'directory' option supports changing path separators to "%" to make
file names unique, also support this for 'backupdir'. (Mikolaj Machowski)
6 Add an option to write a new, numbered, backup file each time. Like
'patchmode', e.g., 'backupmode'.
6 Make it possible to write 'patchmode' files to a different directory.
@@ -4378,6 +4406,8 @@ Debug mode:
Various improvements:
9 Python: be able to define a Python function that can be called directly
from Vim script. Requires converting the arguments and return value.
8 ":sign unplace * file={filename}" should work. Also: ":sign unplace *
buffer={bufnr}". So one can remove all signs for one file/buffer.
7 Add plugins for formatting? Should be able to make a choice depending on

View File

@@ -1,4 +1,4 @@
*undo.txt* For Vim version 7.3. Last change: 2010 Sep 30
*undo.txt* For Vim version 7.3. Last change: 2010 Oct 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -239,7 +239,9 @@ Vim saves undo trees in a separate undo file, one for each edited file, using
a simple scheme that maps filesystem paths directly to undo files. Vim will
detect if an undo file is no longer synchronized with the file it was written
for (with a hash of the file contents) and ignore it when the file was changed
after the undo file was written, to prevent corruption.
after the undo file was written, to prevent corruption. An undo file is also
ignored if its owner differs from the owner of the edited file. Set 'verbose'
to get a message about that.
Undo files are normally saved in the same directory as the file. This can be
changed with the 'undodir' option.

View File

@@ -1,4 +1,4 @@
*usr_01.txt* For Vim version 7.3. Last change: 2008 May 07
*usr_01.txt* For Vim version 7.3. Last change: 2010 Nov 03
VIM USER MANUAL - by Bram Moolenaar
@@ -40,13 +40,20 @@ the commands and options used for it. Use these two commands:
Press CTRL-] to jump to a subject under the cursor.
Press CTRL-O to jump back (repeat to go further back).
Many links are in vertical bars, like this: |bars|. An option name, like
'number', a command in double quotes like ":write" and any other word can also
be used as a link. Try it out: Move the cursor to CTRL-] and press CTRL-]
on it.
Many links are in vertical bars, like this: |bars|. The bars themselves may
be hidden or invisible, see below. An option name, like 'number', a command
in double quotes like ":write" and any other word can also be used as a link.
Try it out: Move the cursor to CTRL-] and press CTRL-] on it.
Other subjects can be found with the ":help" command, see |help.txt|.
The bars and stars are usually hidden with the |conceal| feature. They also
use |hl-Ignore|, using the same color for the text as the background. You can
make them visible with: >
:set conceallevel=0
:hi link HelpBar Normal
:hi link HelpStar Normal
==============================================================================
*01.2* Vim installed

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 7.3. Last change: 2010 Jul 20
*usr_41.txt* For Vim version 7.3. Last change: 2010 Oct 31
VIM USER MANUAL - by Bram Moolenaar
@@ -793,6 +793,7 @@ Syntax and highlighting: *syntax-functions* *highlighting-functions*
synID() get syntax ID at a specific position
synIDattr() get a specific attribute of a syntax ID
synIDtrans() get translated syntax ID
synstack() get list of syntax IDs at a specific position
diff_hlID() get highlight ID for diff mode at a position
matchadd() define a pattern to highlight (a "match")
matcharg() get info about |:match| arguments

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 7.3. Last change: 2010 Sep 23
*various.txt* For Vim version 7.3. Last change: 2010 Nov 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -101,6 +101,7 @@ g8 Print the hex values of the bytes used in the
:[range]P[rint] [count] [flags]
Just as ":print". Was apparently added to Vi for
people that keep the shift key pressed too long...
Note: A user command can overrule this command.
See |ex-flags| for [flags].
*:l* *:list*

View File

@@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.3. Last change: 2010 Oct 20
*version7.txt* For Vim version 7.3. Last change: 2010 Nov 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1673,7 +1673,7 @@ The GTK font dialog uses a font size zero when the font name doesn't include a
size. Use a default size of 10.
This example in the documentation didn't work:
:e `=foo . ".c" `
:e `=foo . ".c"`
Skip over the expression in `=expr` when looking for comments, |, % and #.
When ":helpgrep" doesn't find anything there is no error message.

View File

@@ -214,7 +214,7 @@ EOF
}
# main
usage() if $#ARGV < 2;
usage() if $#ARGV < 1;
print "Processing tags...\n";
readTagFile( $ARGV[ 0 ] );

View File

@@ -1,23 +1,60 @@
" Vim plugin for converting a syntax highlighted file to HTML.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2010 Aug 12
" Last Change: 2010 Oct 28
"
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
" $VIMRUNTIME/syntax/2html.vim
"
" TODO:
" * Patch to leave tab characters in when noexpandtab set (Andy Spencer)
" * Make folds show up when using a range and dynamic folding
" * Remove fold column when there are no folds and using dynamic folding
" * Restore open/closed folds and cursor position after processing each file
" with option not to restore for speed increase
" * Add extra meta info (generation time, etc.)
" * Tidy up so we can use strict doctype more?
" * Tidy up so we can use strict doctype in even more situations?
" * Implementation detail: add threshold for writing the lines to the html
" buffer before we're done (5000 or so lines should do it)
" * TODO comments for code cleanup scattered throughout
"
"
" Changelog:
" 7.3_v7 (this version): see betas released on vim_dev below:
" 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way.
" 7.3_v7b2: Remove automatic detection of encodings that are not
" supported by all major browsers according to
" http://wiki.whatwg.org/wiki/Web_Encodings and convert
" to UTF-8 for all Unicode encodings. Make HTML
" encoding to Vim encoding detection be
" case-insensitive for built-in pairs.
" 7.3_v7b1: Remove use of setwinvar() function which cannot be
" called in restricted mode (Andy Spencer). Use
" 'fencoding' instead of 'encoding' to determine by
" charset, and make sure the 'fenc' of the generated
" file matches its indicated charset. Add charsets for
" all of Vim's natively supported encodings.
" 7.3_v6 (0d3f0e3d289b): Really fix bug with 'nowrapscan', 'magic' and other
" user settings interfering with diff mode generation,
" trailing whitespace (e.g. line number column) when
" using html_no_pre, and bugs when using
" html_hover_unfold.
" 7.3_v5 ( unreleased ): Fix bug with 'nowrapscan' and also with out-of-sync
" folds in diff mode when first line was folded.
" 7.3_v4 (7e008c174cc3): Bugfixes, especially for xhtml markup, and diff mode.
" 7.3_v3 (a29075150aee): Refactor option handling and make html_use_css
" default to true when not set to anything. Use strict
" doctypes where possible. Rename use_xhtml option to
" html_use_xhtml for consistency. Use .xhtml extension
" when using this option. Add meta tag for settings.
" 7.3_v2 (80229a724a11): Fix syntax highlighting in diff mode to use both the
" diff colors and the normal syntax colors
" 7.3_v1 (e7751177126b): Add conceal support and meta tags in output
" Pre-v1 baseline: Mercurial changeset 3c9324c0800e
if exists('g:loaded_2html_plugin')
finish
endif
let g:loaded_2html_plugin = 'vim7.3_v6'
let g:loaded_2html_plugin = 'vim7.3_v7'
" Define the :TOhtml command when:
" - 'compatible' is not set

View File

@@ -1,6 +1,6 @@
" Vim syntax support file
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2010 Aug 12
" Last Change: 2010 Sep 04
"
" Additional contributors:
"
@@ -265,6 +265,19 @@ set paste
let s:old_magic = &magic
set magic
" set the fileencoding to match the charset we'll be using
let &l:fileencoding=s:settings.vim_encoding
" According to http://www.w3.org/TR/html4/charset.html#doc-char-set, the byte
" order mark is highly recommend on the web when using multibyte encodings. But,
" it is not a good idea to include it on UTF-8 files. Otherwise, let Vim
" determine when it is actually inserted.
if s:settings.vim_encoding == 'utf-8'
setlocal nobomb
else
setlocal bomb
endif
let s:lines = []
if s:settings.use_xhtml
@@ -1071,14 +1084,14 @@ let &magic = s:old_magic
let @/ = s:old_search
let &more = s:old_more
exe s:orgwin . "wincmd w"
let &l:stl = s:origwin_stl
let &l:et = s:old_et
let &l:scrollbind = s:old_bind
exe s:newwin . "wincmd w"
let &l:stl = s:newwin_stl
exec 'resize' s:old_winheight
let &l:winfixheight = s:old_winfixheight
call setwinvar(s:orgwin,'&stl', s:origwin_stl)
call setwinvar(s:newwin,'&stl', s:newwin_stl)
let &ls=s:ls
" Save a little bit of memory (worth doing?)

View File

@@ -3,8 +3,8 @@
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2010 May 06
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/tip/runtime/syntax/debchangelog.vim
" Last Change: 2010 Oct 21
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim
" Standard syntax initialization
if version < 600
@@ -19,7 +19,7 @@ syn case ignore
" Define some common expressions we can use later on
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\="
syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|%(etch|lenny)-%(backports|volatile)|%(dapper|hardy|jaunty|karmic|lucid|maverick)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|%(lenny|squeeze)-%(backports%(-sloppy)=|volatile)|%(dapper|hardy|jaunty|karmic|lucid|maverick|natty)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogVersion contained "(.\{-})"
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"

View File

@@ -3,8 +3,8 @@
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2009 Aug 17
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/tip/runtime/syntax/debcontrol.vim
" Last Change: 2010 Oct 21
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim
" Standard syntax initialization
if version < 600
@@ -27,7 +27,7 @@ syn match debControlSpace " "
syn match debcontrolArchitecture contained "\%(all\|any\|alpha\|amd64\|arm\%(e[bl]\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\|hurd-i386\|kfreebsd-\%(i386\|amd64\|gnu\)\|knetbsd-i386\|kopensolaris-i386\|netbsd-\%(alpha\|i386\)\)"
syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
syn match debcontrolPackageType contained "u\?deb"
syn match debcontrolVariable contained "\${.\{-}}"
syn match debcontrolDmUpload contained "\cyes"

View File

@@ -2,8 +2,8 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
" Last Change: 2010 May 06
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/tip/runtime/syntax/debsources.vim
" Last Change: 2010 Oct 21
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debsources.vim
" Standard syntax initialization
if version < 600
@@ -23,7 +23,7 @@ syn match debsourcesComment /#.*/ contains=@Spell
" Match uri's
syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(etch\|lenny\|squeeze\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|dapper\|hardy\|jaunty\|karmic\|lucid\|maverick\)\([-[:alnum:]_./]*\)+
syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(lenny\|squeeze\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|dapper\|hardy\|jaunty\|karmic\|lucid\|maverick\|natty\)\([-[:alnum:]_./]*\)+
" Associate our matches and regions with pretty colours
hi def link debsourcesLine Error

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Bram Moolenaar (Bram@vim.org)
" Last Change: 2009 May 18
" Last Change: 2010 Nov 03
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -30,6 +30,7 @@ syn match helpVim "VIM REFERENCE.*"
syn match helpOption "'[a-z]\{2,\}'"
syn match helpOption "'t_..'"
syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore
syn match helpGraphic ".* \ze`$" nextgroup=helpIgnore
syn match helpIgnore "." contained conceal
syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes:
syn match helpSpecial "\<N\>"

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" This is a GENERATED FILE. Please always refer to source file at the URI below.
" Language: XF86Config (XFree86 configuration file)
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
" Last Change: 2005 Jul 12
" Former Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
" Last Change: 2010 Nov 01
" URL: http://trific.ath.cx/Ftp/vim/syntax/xf86conf.vim
" Required Vim Version: 6.0
"
@@ -63,7 +63,7 @@ syn match xf86confModeLineValue "\"[^\"]\+\"\(\_s\+[0-9.]\+\)\{9}" nextgroup=xf8
" Sections and subsections
if b:xf86conf_xfree86_version >= 4
syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,xf86confSectionError
syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,xf86confSectionError
syn region xf86confSectionModule matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Module\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionAny,xf86confComment,xf86confOption,xf86confKeyword
syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOption,xf86confKeyword
syn region xf86confSectionModes matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Modes\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment
@@ -165,7 +165,7 @@ syn match xf86confSync "\(\s\+[+-][CHV]_*Sync\)\+" contained
" Synchronization
if b:xf86conf_xfree86_version >= 4
syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\)\""
syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\)\""
syn sync match xf86confSyncSectionModule grouphere xf86confSectionModule "^\s*Section\s\+\"Module\""
syn sync match xf86confSyncSectionModes groupthere xf86confSectionModes "^\s*Section\s\+\"Modes\""
else

View File

@@ -1,6 +1,6 @@
#
# Makefile for VIM on Win32, using Cygnus gcc
# Last updated by Dan Sharp. Last Change: 2010 Feb 24
# Last updated by Dan Sharp. Last Change: 2010 Nov 03
#
# Also read INSTALLpc.txt!
#
@@ -27,6 +27,7 @@
# MZSCHEME_VER define to version of MzScheme being used (209_000)
# DYNAMIC_MZSCHEME no or yes: use yes to load the MzScheme DLLs dynamically (yes)
# MZSCHEME_DLLS path to MzScheme DLLs (libmzgc and libmzsch), for "static" build.
# MZSCHEME_USE_RACKET define to use "racket" instead of "mzsch".
# LUA define to path to Lua dir to get Lua support (not defined)
# LUA_VER define to version of Lua being used (51)
# DYNAMIC_LUA no or yes: use yes to load the Lua DLL dynamically (yes)
@@ -254,16 +255,22 @@ ifndef MZSCHEME_GENERATE_BASE
MZSCHEME_GENERATE_BASE=no
endif
ifndef MZSCHEME_USE_RACKET
MZSCHEME_MAIN_LIB=mzsch
else
MZSCHEME_MAIN_LIB=racket
endif
ifeq (yes, $(DYNAMIC_MZSCHEME))
DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
else
ifndef MZSCHEME_DLLS
MZSCHEME_DLLS = $(MZSCHEME)
endif
ifeq (yes,$(MZSCHEME_PRECISE_GC))
MZSCHEME_LIB=-lmzsch$(MZSCHEME_VER)
MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
else
MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
MZSCHEME_LIB = -l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
endif
EXTRA_LIBS += -L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)/lib $(MZSCHEME_LIB)
endif

View File

@@ -141,11 +141,17 @@ ifndef MZSCHEME_GENERATE_BASE
MZSCHEME_GENERATE_BASE=no
endif
ifndef MZSCHEME_USE_RACKET
MZSCHEME_MAIN_LIB=mzsch
else
MZSCHEME_MAIN_LIB=racket
endif
ifeq (no,$(DYNAMIC_MZSCHEME))
ifeq (yes,$(MZSCHEME_PRECISE_GC))
MZSCHEME_LIB=-lmzsch$(MZSCHEME_VER)
MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
else
MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
MZSCHEME_LIB = -l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
endif
# the modern MinGW can dynamically link to dlls directly.
# point MZSCHEME_DLLS to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
@@ -343,7 +349,7 @@ endif
ifdef MZSCHEME
CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME)/collects\"
ifeq (yes, $(DYNAMIC_MZSCHEME))
CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
endif
endif

View File

@@ -705,12 +705,18 @@ PYTHON3_LIB = $(PYTHON3)\libs\python$(PYTHON3_VER).lib
MZSCHEME_VER = 205_000
!endif
CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
!if EXIST("$(MZSCHEME)\collects\scheme\base.ss")
# for MzScheme 4.x we need to include byte code for basic Scheme stuff
!if EXIST("$(MZSCHEME)\collects\scheme\base.ss") \
|| EXIST("$(MZSCHEME)\collects\scheme\base.rkt")
# for MzScheme >= 4 we need to include byte code for basic Scheme stuff
MZSCHEME_EXTRA_DEP = mzscheme_base.c
CFLAGS = $(CFLAGS) -DINCLUDE_MZSCHEME_BASE
!endif
!if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib") \
!if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib")
MZSCHEME_MAIN_LIB=mzsch
!else
MZSCHEME_MAIN_LIB=racket
!endif
!if EXIST("$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib") \
&& !EXIST("$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib")
!message Building with Precise GC
MZSCHEME_PRECISE_GC = yes
@@ -722,7 +728,7 @@ CFLAGS = $(CFLAGS) -DMZ_PRECISE_GC
!endif
!message MzScheme DLLs will be loaded dynamically
CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME \
-DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" \
-DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \
-DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
!else
!if "$(MZSCHEME_DEBUG)" == "yes"
@@ -730,10 +736,10 @@ CFLAGS = $(CFLAGS) -DMZSCHEME_FORCE_GC
!endif
!if "$(MZSCHEME_PRECISE_GC)" == "yes"
# Precise GC does not use separate dll
MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
!else
MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \
$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
!endif
!endif
MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj

View File

@@ -414,12 +414,16 @@ CClink = $(CC)
# However, this may still cause problems, such as "import termios" failing.
# Build two separate versions of Vim in that case.
#CONF_OPT_PYTHON = --enable-pythoninterp
#CONF_OPT_PYTHON = --enable-pythoninterp=dynamic
#CONF_OPT_PYTHON3 = --enable-python3interp
#CONF_OPT_PYTHON3 = --enable-python3interp=dynamic
# RUBY
# Uncomment this when you want to include the Ruby interface.
# First one for static linking, second one for loading when used.
# Note: you need the development package (e.g., ruby1.9.1-dev on Ubuntu).
#CONF_OPT_RUBY = --enable-rubyinterp
#CONF_OPT_RUBY = --enable-rubyinterp=dynamic
#CONF_OPT_RUBY = --enable-rubyinterp --with-ruby-command=ruby1.9.1
# TCL
@@ -1047,8 +1051,9 @@ INSTALL_PROG = cp
INSTALL_DATA = cp
INSTALL_DATA_R = cp -r
### Program to run on installed binary
### Program to run on installed binary. Use the second one to disable strip.
#STRIP = strip
#STRIP = /bin/true
### Permissions for binaries {{{1
BINMOD = 755
@@ -1321,7 +1326,7 @@ SHELL = /bin/sh
.SUFFIXES: .c .o .pro
PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS)
POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(TCL_CFLAGS) $(RUBY_CFLAGS) $(EXTRA_DEFS)
POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(TCL_CFLAGS) $(EXTRA_DEFS)
ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(POST_DEFS)
@@ -1329,7 +1334,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) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) -Dinline= -D__extension__= -Dalloca=alloca
LINT_CFLAGS = -DLINT -I. $(PRE_DEFS) $(POST_DEFS) $(RUBY_CFLAGS) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) -Dinline= -D__extension__= -Dalloca=alloca
LINT_EXTRA = -DUSE_SNIFF -DHANGUL_INPUT -D"__attribute__(x)="
@@ -1695,7 +1700,8 @@ $(VIMTARGET): auto/config.mk objects $(OBJ) version.c version.h
$(CCC) version.c -o objects/version.o
@LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \
-o $(VIMTARGET) $(OBJ) objects/version.o $(ALL_LIBS)" \
MAKE="$(MAKE)" sh $(srcdir)/link.sh
MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \
sh $(srcdir)/link.sh
xxd/xxd$(EXEEXT): xxd/xxd.c
cd xxd; CC="$(CC)" CFLAGS="$(CPPFLAGS) $(CFLAGS)" \
@@ -2532,7 +2538,7 @@ objects/if_python3.o: if_python3.c if_py_both.h
$(CCC) $(PYTHON3_CFLAGS) $(PYTHON3_CFLAGS_EXTRA) -o $@ if_python3.c
objects/if_ruby.o: if_ruby.c
$(CCC) -o $@ if_ruby.c
$(CCC) $(RUBY_CFLAGS) -o $@ if_ruby.c
objects/if_sniff.o: if_sniff.c
$(CCC) -o $@ if_sniff.c

175
src/auto/configure vendored
View File

@@ -593,6 +593,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
LINK_AS_NEEDED
DEPEND_CFLAGS_FILTER
MAKEMO
MSGFMT
@@ -1427,7 +1428,7 @@ Optional Features:
--enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
--enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
--enable-tclinterp Include Tcl interpreter.
--enable-rubyinterp Include Ruby interpreter.
--enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
--enable-cscope Include cscope interface.
--enable-workshop Include Sun Visual Workshop support.
--disable-netbeans Disable NetBeans integration support.
@@ -4862,16 +4863,36 @@ $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
$as_echo_n "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
if test -f /usr/include/plt/scheme.h; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
if test -f $vi_cv_path_mzscheme_pfx/include/racket/scheme.h; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
SCHEME_INC=/usr/include/plt
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
vi_cv_path_mzscheme_pfx=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
$as_echo_n "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
if test -f /usr/include/plt/scheme.h; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
SCHEME_INC=/usr/include/plt
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
$as_echo_n "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
if test -f /usr/include/racket/scheme.h; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
SCHEME_INC=/usr/include/racket
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
vi_cv_path_mzscheme_pfx=
fi
fi
fi
fi
fi
@@ -4883,12 +4904,22 @@ $as_echo "no" >&6; }
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libracket.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"
else
if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.so"; then
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme3m"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.so"; then
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lracket3m"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket.so"; then
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lracket -lmzgc"
else
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc"
fi
@@ -4901,10 +4932,20 @@ $as_echo "no" >&6; }
fi
if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
SCHEME_COLLECTS=lib/plt/
else
if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
SCHEME_COLLECTS=lib/racket/
fi
fi
if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
MZSCHEME_EXTRA="mzscheme_base.c"
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
MZSCHEME_EXTRA="mzscheme_base.c"
else
if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
MZSCHEME_EXTRA="mzscheme_base.c"
fi
fi
if test "X$MZSCHEME_EXTRA" != "X" ; then
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
fi
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
@@ -5285,9 +5326,9 @@ fi
PYTHON_LIBS="${vi_cv_path_python_plibs}"
if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\""
else
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}"
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\""
fi
PYTHON_SRC="if_python.c"
if test "x$MACOSX" = "xyes"; then
@@ -5298,7 +5339,7 @@ fi
if test "${vi_cv_var_python_version}" = "1.4"; then
PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o"
fi
PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'"
PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
$as_echo_n "checking if -pthread should be used... " >&6; }
@@ -5560,9 +5601,9 @@ fi
PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}"
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
else
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}"
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
fi
PYTHON3_SRC="if_python3.c"
if test "x$MACOSX" = "xyes"; then
@@ -5667,10 +5708,10 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
$as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL" >&5
$as_echo_n "checking whether we can do without RTLD_GLOBAL... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
$as_echo_n "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
cflags_save=$CFLAGS
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
CFLAGS="$CFLAGS $PYTHON_CFLAGS"
ldflags_save=$LDFLAGS
LDFLAGS="$LDFLAGS -ldl"
if test "$cross_compiling" = yes; then :
@@ -5689,15 +5730,17 @@ else
* Only the first pyhton version used will be switched on.
*/
int no_rtl_global_needed_for(char *python_instsoname)
int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
{
int needed = 0;
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
if (pylib != 0)
{
void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
void (*init)(void) = dlsym(pylib, "Py_Initialize");
int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
void (*final)(void) = dlsym(pylib, "Py_Finalize");
(*pfx)(prefix);
(*init)();
needed = (*simple)("import termios") == -1;
(*final)();
@@ -5709,7 +5752,7 @@ else
int main(int argc, char** argv)
{
int not_needed = 0;
if (no_rtl_global_needed_for("libpython2.7.so.1.0") && no_rtl_global_needed_for("libpython3.1.so.1.0"))
if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}"))
not_needed = 1;
return !not_needed;
}
@@ -5726,8 +5769,76 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
CFLAGS=$cflags_save
LDFLAGS=$ldflags_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
$as_echo_n "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
cflags_save=$CFLAGS
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
ldflags_save=$LDFLAGS
LDFLAGS="$LDFLAGS -ldl"
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot run test program while cross compiling
See \`config.log' for more details." "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <dlfcn.h>
#include <wchar.h>
/* If this program fails, then RTLD_GLOBAL is needed.
* RTLD_GLOBAL will be used and then it is not possible to
* have both python versions enabled in the same vim instance.
* Only the first pyhton version used will be switched on.
*/
int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
{
int needed = 0;
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
if (pylib != 0)
{
void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
void (*init)(void) = dlsym(pylib, "Py_Initialize");
int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
void (*final)(void) = dlsym(pylib, "Py_Finalize");
(*pfx)(prefix);
(*init)();
needed = (*simple)("import termios") == -1;
(*final)();
dlclose(pylib);
}
return !needed;
}
int main(int argc, char** argv)
{
int not_needed = 0;
if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}"))
not_needed = 1;
return !not_needed;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; };$as_echo "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
CFLAGS=$cflags_save
LDFLAGS=$ldflags_save
PYTHON_SRC="if_python.c"
PYTHON_OBJ="objects/if_python.o"
PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
@@ -6103,7 +6214,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
$as_echo "$enable_rubyinterp" >&6; }
if test "$enable_rubyinterp" = "yes"; then
if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
$as_echo_n "checking --with-ruby-command argument... " >&6; }
@@ -6209,6 +6320,13 @@ $as_echo "$rubyhdrdir" >&6; }
RUBY_PRO="if_ruby.pro"
$as_echo "#define FEAT_RUBY 1" >>confdefs.h
if test "$enable_rubyinterp" = "dynamic"; then
libruby=`$vi_cv_path_ruby -r rbconfig -e 'printf "lib%s.%s\n", Config::CONFIG["RUBY_SO_NAME"], Config::CONFIG["DLEXT"]'`
$as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
RUBY_LIBS=
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
$as_echo "not found; disabling Ruby" >&6; }
@@ -12357,6 +12475,23 @@ $as_echo "no" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
$as_echo_n "checking linker --as-needed support... " >&6; }
LINK_AS_NEEDED=
# Check if linker supports --as-needed and --no-as-needed options
if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
LDFLAGS="$LDFLAGS -Wl,--as-needed"
LINK_AS_NEEDED=yes
fi
if test "$LINK_AS_NEEDED" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
cat >confcache <<\_ACEOF

View File

@@ -639,6 +639,9 @@ free_buffer_stuff(buf, free_options)
{
clear_wininfo(buf); /* including window-local options */
free_buf_options(buf, TRUE);
#ifdef FEAT_SPELL
ga_clear(&buf->b_s.b_langp);
#endif
}
#ifdef FEAT_EVAL
vars_clear(&buf->b_vars.dv_hashtab); /* free all internal variables */
@@ -661,9 +664,6 @@ free_buffer_stuff(buf, free_options)
vim_free(buf->b_start_fenc);
buf->b_start_fenc = NULL;
#endif
#ifdef FEAT_SPELL
ga_clear(&buf->b_s.b_langp);
#endif
}
/*

View File

@@ -349,6 +349,9 @@
/* Define if you want to include the Ruby interpreter. */
#undef FEAT_RUBY
/* Define for linking via dlopen() or LoadLibrary() */
#undef DYNAMIC_RUBY
/* Define if you want to include the Tcl interpreter. */
#undef FEAT_TCL

View File

@@ -30,6 +30,7 @@ TAGPRG = @TAGPRG@
CPP = @CPP@
CPP_MM = @CPP_MM@
DEPEND_CFLAGS_FILTER = @DEPEND_CFLAGS_FILTER@
LINK_AS_NEEDED = @LINK_AS_NEEDED@
X_CFLAGS = @X_CFLAGS@
X_LIBS_DIR = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@

View File

@@ -568,13 +568,27 @@ if test "$enable_mzschemeinterp" = "yes"; then
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
else
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if scheme.h can be found in /usr/include/plt/)
if test -f /usr/include/plt/scheme.h; then
AC_MSG_CHECKING(if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket)
if test -f $vi_cv_path_mzscheme_pfx/include/racket/scheme.h; then
AC_MSG_RESULT(yes)
SCHEME_INC=/usr/include/plt
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
else
AC_MSG_RESULT(no)
vi_cv_path_mzscheme_pfx=
AC_MSG_CHECKING(if scheme.h can be found in /usr/include/plt/)
if test -f /usr/include/plt/scheme.h; then
AC_MSG_RESULT(yes)
SCHEME_INC=/usr/include/plt
else
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if scheme.h can be found in /usr/include/racket/)
if test -f /usr/include/racket/scheme.h; then
AC_MSG_RESULT(yes)
SCHEME_INC=/usr/include/racket
else
AC_MSG_RESULT(no)
vi_cv_path_mzscheme_pfx=
fi
fi
fi
fi
fi
@@ -586,13 +600,23 @@ if test "$enable_mzschemeinterp" = "yes"; then
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libracket.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"
else
dnl Using shared objects
if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.so"; then
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme3m"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.so"; then
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lracket3m"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket.so"; then
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lracket -lmzgc"
else
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc"
fi
@@ -607,10 +631,20 @@ if test "$enable_mzschemeinterp" = "yes"; then
fi
if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
SCHEME_COLLECTS=lib/plt/
else
if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
SCHEME_COLLECTS=lib/racket/
fi
fi
if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
dnl need to generate bytecode for MzScheme base
MZSCHEME_EXTRA="mzscheme_base.c"
else
if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
MZSCHEME_EXTRA="mzscheme_base.c"
fi
fi
if test "X$MZSCHEME_EXTRA" != "X" ; then
dnl need to generate bytecode for MzScheme base
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
fi
@@ -857,9 +891,9 @@ eof
PYTHON_LIBS="${vi_cv_path_python_plibs}"
if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\""
else
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}"
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\""
fi
PYTHON_SRC="if_python.c"
dnl For Mac OSX 10.2 config.o is included in the Python library.
@@ -871,7 +905,7 @@ eof
if test "${vi_cv_var_python_version}" = "1.4"; then
PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o"
fi
PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'"
PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'"
dnl On FreeBSD linking with "-pthread" is required to use threads.
dnl _THREAD_SAFE must be used for compiling then.
@@ -1029,9 +1063,9 @@ eof
PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}"
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
else
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}"
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
fi
PYTHON3_SRC="if_python3.c"
dnl For Mac OSX 10.2 config.o is included in the Python library.
@@ -1109,9 +1143,9 @@ dnl with dlopen(), dlsym(), dlclose()
if test "$python_ok" = yes && test "$python3_ok" = yes; then
AC_DEFINE(DYNAMIC_PYTHON)
AC_DEFINE(DYNAMIC_PYTHON3)
AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL)
AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL for Python)
cflags_save=$CFLAGS
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
CFLAGS="$CFLAGS $PYTHON_CFLAGS"
ldflags_save=$LDFLAGS
LDFLAGS="$LDFLAGS -ldl"
AC_RUN_IFELSE([
@@ -1122,15 +1156,17 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
* Only the first pyhton version used will be switched on.
*/
int no_rtl_global_needed_for(char *python_instsoname)
int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
{
int needed = 0;
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
if (pylib != 0)
{
void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
void (*init)(void) = dlsym(pylib, "Py_Initialize");
int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
void (*final)(void) = dlsym(pylib, "Py_Finalize");
(*pfx)(prefix);
(*init)();
needed = (*simple)("import termios") == -1;
(*final)();
@@ -1142,13 +1178,60 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
int main(int argc, char** argv)
{
int not_needed = 0;
if (no_rtl_global_needed_for("libpython2.7.so.1.0") && no_rtl_global_needed_for("libpython3.1.so.1.0"))
if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}"))
not_needed = 1;
return !not_needed;
}],
[AC_MSG_RESULT(yes);AC_DEFINE(PY_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)])
CFLAGS=$cflags_save
LDFLAGS=$ldflags_save
AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL for Python3)
cflags_save=$CFLAGS
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
ldflags_save=$LDFLAGS
LDFLAGS="$LDFLAGS -ldl"
AC_RUN_IFELSE([
#include <dlfcn.h>
#include <wchar.h>
/* If this program fails, then RTLD_GLOBAL is needed.
* RTLD_GLOBAL will be used and then it is not possible to
* have both python versions enabled in the same vim instance.
* Only the first pyhton version used will be switched on.
*/
int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
{
int needed = 0;
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
if (pylib != 0)
{
void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
void (*init)(void) = dlsym(pylib, "Py_Initialize");
int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
void (*final)(void) = dlsym(pylib, "Py_Finalize");
(*pfx)(prefix);
(*init)();
needed = (*simple)("import termios") == -1;
(*final)();
dlclose(pylib);
}
return !needed;
}
int main(int argc, char** argv)
{
int not_needed = 0;
if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}"))
not_needed = 1;
return !not_needed;
}],
[AC_MSG_RESULT(yes);AC_DEFINE(PY3_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)])
CFLAGS=$cflags_save
LDFLAGS=$ldflags_save
PYTHON_SRC="if_python.c"
PYTHON_OBJ="objects/if_python.o"
PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
@@ -1299,10 +1382,10 @@ AC_SUBST(TCL_LIBS)
AC_MSG_CHECKING(--enable-rubyinterp argument)
AC_ARG_ENABLE(rubyinterp,
[ --enable-rubyinterp Include Ruby interpreter.], ,
[ --enable-rubyinterp[=OPTS] Include Ruby interpreter. [default=no] [OPTS=no/yes/dynamic]], ,
[enable_rubyinterp="no"])
AC_MSG_RESULT($enable_rubyinterp)
if test "$enable_rubyinterp" = "yes"; then
if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
AC_MSG_CHECKING(--with-ruby-command argument)
AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)],
RUBY_CMD="$withval"; AC_MSG_RESULT($RUBY_CMD),
@@ -1360,6 +1443,12 @@ if test "$enable_rubyinterp" = "yes"; then
RUBY_OBJ="objects/if_ruby.o"
RUBY_PRO="if_ruby.pro"
AC_DEFINE(FEAT_RUBY)
if test "$enable_rubyinterp" = "dynamic"; then
libruby=`$vi_cv_path_ruby -r rbconfig -e 'printf "lib%s.%s\n", Config::CONFIG[["RUBY_SO_NAME"]], Config::CONFIG[["DLEXT"]]'`
AC_DEFINE(DYNAMIC_RUBY)
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
RUBY_LIBS=
fi
else
AC_MSG_RESULT(not found; disabling Ruby)
fi
@@ -3487,6 +3576,23 @@ if test "$GCC" = yes; then
fi
AC_SUBST(DEPEND_CFLAGS_FILTER)
dnl link.sh tries to avoid overlinking in a hackish way.
dnl At least GNU ld supports --as-needed which provides the same functionality
dnl at linker level. Let's use it.
AC_MSG_CHECKING(linker --as-needed support)
LINK_AS_NEEDED=
# Check if linker supports --as-needed and --no-as-needed options
if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
LDFLAGS="$LDFLAGS -Wl,--as-needed"
LINK_AS_NEEDED=yes
fi
if test "$LINK_AS_NEEDED" = yes; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_SUBST(LINK_AS_NEEDED)
dnl write output files
AC_OUTPUT(auto/config.mk:config.mk.in)

View File

@@ -58,6 +58,10 @@ static char *ctrl_x_msgs[] =
};
static char e_hitend[] = N_("Hit end of paragraph");
#ifdef FEAT_COMPL_FUNC
static char e_complwin[] = N_("E839: Completion function changed window");
static char e_compldel[] = N_("E840: Completion function deleted text");
#endif
/*
* Structure used to store one match for insert completion.
@@ -2658,6 +2662,7 @@ set_completion(startcol, list)
if (stop_arrow() == FAIL)
return;
compl_direction = FORWARD;
if (startcol > curwin->w_cursor.col)
startcol = curwin->w_cursor.col;
compl_col = startcol;
@@ -3833,6 +3838,8 @@ expand_by_function(type, base)
char_u *args[2];
char_u *funcname;
pos_T pos;
win_T *curwin_save;
buf_T *curbuf_save;
funcname = (type == CTRL_X_FUNCTION) ? curbuf->b_p_cfu : curbuf->b_p_ofu;
if (*funcname == NUL)
@@ -3843,13 +3850,27 @@ expand_by_function(type, base)
args[1] = base;
pos = curwin->w_cursor;
curwin_save = curwin;
curbuf_save = curbuf;
matchlist = call_func_retlist(funcname, 2, args, FALSE);
if (curwin_save != curwin || curbuf_save != curbuf)
{
EMSG(_(e_complwin));
goto theend;
}
curwin->w_cursor = pos; /* restore the cursor position */
if (matchlist == NULL)
return;
check_cursor();
if (!equalpos(curwin->w_cursor, pos))
{
EMSG(_(e_compldel));
goto theend;
}
if (matchlist != NULL)
ins_compl_add_list(matchlist);
ins_compl_add_list(matchlist);
list_unref(matchlist);
theend:
if (matchlist != NULL)
list_unref(matchlist);
}
#endif /* FEAT_COMPL_FUNC */
@@ -3889,6 +3910,7 @@ ins_compl_add_tv(tv, dir)
char_u *word;
int icase = FALSE;
int adup = FALSE;
int aempty = FALSE;
char_u *(cptext[CPT_COUNT]);
if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
@@ -3906,13 +3928,15 @@ ins_compl_add_tv(tv, dir)
icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase");
if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
adup = get_dict_number(tv->vval.v_dict, (char_u *)"dup");
if (get_dict_string(tv->vval.v_dict, (char_u *)"empty", FALSE) != NULL)
aempty = get_dict_number(tv->vval.v_dict, (char_u *)"empty");
}
else
{
word = get_tv_string_chk(tv);
vim_memset(cptext, 0, sizeof(cptext));
}
if (word == NULL || *word == NUL)
if (word == NULL || (!aempty && *word == NUL))
return FAIL;
return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup);
}
@@ -4994,6 +5018,8 @@ ins_complete(c)
int col;
char_u *funcname;
pos_T pos;
win_T *curwin_save;
buf_T *curbuf_save;
/* Call 'completefunc' or 'omnifunc' and get pattern length as a
* string */
@@ -5009,8 +5035,21 @@ ins_complete(c)
args[0] = (char_u *)"1";
args[1] = NULL;
pos = curwin->w_cursor;
curwin_save = curwin;
curbuf_save = curbuf;
col = call_func_retnr(funcname, 2, args, FALSE);
if (curwin_save != curwin || curbuf_save != curbuf)
{
EMSG(_(e_complwin));
return FAIL;
}
curwin->w_cursor = pos; /* restore the cursor position */
check_cursor();
if (!equalpos(curwin->w_cursor, pos))
{
EMSG(_(e_compldel));
return FAIL;
}
if (col < 0)
col = curs_col;

View File

@@ -434,9 +434,9 @@ static listitem_T *listitem_alloc __ARGS((void));
static void listitem_free __ARGS((listitem_T *item));
static void listitem_remove __ARGS((list_T *l, listitem_T *item));
static long list_len __ARGS((list_T *l));
static int list_equal __ARGS((list_T *l1, list_T *l2, int ic));
static int dict_equal __ARGS((dict_T *d1, dict_T *d2, int ic));
static int tv_equal __ARGS((typval_T *tv1, typval_T *tv2, int ic));
static int list_equal __ARGS((list_T *l1, list_T *l2, int ic, int recursive));
static int dict_equal __ARGS((dict_T *d1, dict_T *d2, int ic, int recursive));
static int tv_equal __ARGS((typval_T *tv1, typval_T *tv2, int ic, int recursive));
static listitem_T *list_find __ARGS((list_T *l, long n));
static long list_find_nr __ARGS((list_T *l, long idx, int *errorp));
static long list_idx_of_item __ARGS((list_T *l, listitem_T *item));
@@ -4350,7 +4350,8 @@ eval4(arg, rettv, evaluate)
else
{
/* Compare two Lists for being equal or unequal. */
n1 = list_equal(rettv->vval.v_list, var2.vval.v_list, ic);
n1 = list_equal(rettv->vval.v_list, var2.vval.v_list,
ic, FALSE);
if (type == TYPE_NEQUAL)
n1 = !n1;
}
@@ -4379,7 +4380,8 @@ eval4(arg, rettv, evaluate)
else
{
/* Compare two Dictionaries for being equal or unequal. */
n1 = dict_equal(rettv->vval.v_dict, var2.vval.v_dict, ic);
n1 = dict_equal(rettv->vval.v_dict, var2.vval.v_dict,
ic, FALSE);
if (type == TYPE_NEQUAL)
n1 = !n1;
}
@@ -5914,10 +5916,11 @@ list_len(l)
* Return TRUE when two lists have exactly the same values.
*/
static int
list_equal(l1, l2, ic)
list_equal(l1, l2, ic, recursive)
list_T *l1;
list_T *l2;
int ic; /* ignore case for strings */
int recursive; /* TRUE when used recursively */
{
listitem_T *item1, *item2;
@@ -5931,7 +5934,7 @@ list_equal(l1, l2, ic)
for (item1 = l1->lv_first, item2 = l2->lv_first;
item1 != NULL && item2 != NULL;
item1 = item1->li_next, item2 = item2->li_next)
if (!tv_equal(&item1->li_tv, &item2->li_tv, ic))
if (!tv_equal(&item1->li_tv, &item2->li_tv, ic, recursive))
return FALSE;
return item1 == NULL && item2 == NULL;
}
@@ -5953,10 +5956,11 @@ dict_lookup(hi)
* Return TRUE when two dictionaries have exactly the same key/values.
*/
static int
dict_equal(d1, d2, ic)
dict_equal(d1, d2, ic, recursive)
dict_T *d1;
dict_T *d2;
int ic; /* ignore case for strings */
int recursive; /* TRUE when used recursively */
{
hashitem_T *hi;
dictitem_T *item2;
@@ -5977,7 +5981,7 @@ dict_equal(d1, d2, ic)
item2 = dict_find(d2, hi->hi_key, -1);
if (item2 == NULL)
return FALSE;
if (!tv_equal(&HI2DI(hi)->di_tv, &item2->di_tv, ic))
if (!tv_equal(&HI2DI(hi)->di_tv, &item2->di_tv, ic, recursive))
return FALSE;
--todo;
}
@@ -5985,41 +5989,54 @@ dict_equal(d1, d2, ic)
return TRUE;
}
static int tv_equal_recurse_limit;
/*
* Return TRUE if "tv1" and "tv2" have the same value.
* Compares the items just like "==" would compare them, but strings and
* numbers are different. Floats and numbers are also different.
*/
static int
tv_equal(tv1, tv2, ic)
tv_equal(tv1, tv2, ic, recursive)
typval_T *tv1;
typval_T *tv2;
int ic; /* ignore case */
int ic; /* ignore case */
int recursive; /* TRUE when used recursively */
{
char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN];
char_u *s1, *s2;
static int recursive = 0; /* cach recursive loops */
static int recursive_cnt = 0; /* catch recursive loops */
int r;
if (tv1->v_type != tv2->v_type)
return FALSE;
/* Catch lists and dicts that have an endless loop by limiting
* recursiveness to 1000. We guess they are equal then. */
if (recursive >= 1000)
* recursiveness to a limit. We guess they are equal then.
* A fixed limit has the problem of still taking an awful long time.
* Reduce the limit every time running into it. That should work fine for
* deeply linked structures that are not recursively linked and catch
* recursiveness quickly. */
if (!recursive)
tv_equal_recurse_limit = 1000;
if (recursive_cnt >= tv_equal_recurse_limit)
{
--tv_equal_recurse_limit;
return TRUE;
}
switch (tv1->v_type)
{
case VAR_LIST:
++recursive;
r = list_equal(tv1->vval.v_list, tv2->vval.v_list, ic);
--recursive;
++recursive_cnt;
r = list_equal(tv1->vval.v_list, tv2->vval.v_list, ic, TRUE);
--recursive_cnt;
return r;
case VAR_DICT:
++recursive;
r = dict_equal(tv1->vval.v_dict, tv2->vval.v_dict, ic);
--recursive;
++recursive_cnt;
r = dict_equal(tv1->vval.v_dict, tv2->vval.v_dict, ic, TRUE);
--recursive_cnt;
return r;
case VAR_FUNC:
@@ -9391,7 +9408,7 @@ f_count(argvars, rettv)
}
for ( ; li != NULL; li = li->li_next)
if (tv_equal(&li->li_tv, &argvars[1], ic))
if (tv_equal(&li->li_tv, &argvars[1], ic, FALSE))
++n;
}
}
@@ -9418,7 +9435,7 @@ f_count(argvars, rettv)
if (!HASHITEM_EMPTY(hi))
{
--todo;
if (tv_equal(&HI2DI(hi)->di_tv, &argvars[1], ic))
if (tv_equal(&HI2DI(hi)->di_tv, &argvars[1], ic, FALSE))
++n;
}
}
@@ -12574,7 +12591,7 @@ f_index(argvars, rettv)
}
for ( ; item != NULL; item = item->li_next, ++idx)
if (tv_equal(&item->li_tv, &argvars[1], ic))
if (tv_equal(&item->li_tv, &argvars[1], ic, FALSE))
{
rettv->vval.v_number = idx;
break;

View File

@@ -733,7 +733,7 @@ do_cmdline_cmd(cmd)
* do_cmdline(): execute one Ex command line
*
* 1. Execute "cmdline" when it is not NULL.
* If "cmdline" is NULL, or more lines are needed, getline() is used.
* If "cmdline" is NULL, or more lines are needed, fgetline() is used.
* 2. Split up in parts separated with '|'.
*
* This function can be called recursively!
@@ -741,7 +741,7 @@ do_cmdline_cmd(cmd)
* flags:
* DOCMD_VERBOSE - The command will be included in the error message.
* DOCMD_NOWAIT - Don't call wait_return() and friends.
* DOCMD_REPEAT - Repeat execution until getline() returns NULL.
* DOCMD_REPEAT - Repeat execution until fgetline() returns NULL.
* DOCMD_KEYTYPED - Don't reset KeyTyped.
* DOCMD_EXCRESET - Reset the exception environment (used for debugging).
* DOCMD_KEEPLINE - Store first typed line (for repeating with ".").
@@ -749,15 +749,15 @@ do_cmdline_cmd(cmd)
* return FAIL if cmdline could not be executed, OK otherwise
*/
int
do_cmdline(cmdline, getline, cookie, flags)
do_cmdline(cmdline, fgetline, cookie, flags)
char_u *cmdline;
char_u *(*getline) __ARGS((int, void *, int));
void *cookie; /* argument for getline() */
char_u *(*fgetline) __ARGS((int, void *, int));
void *cookie; /* argument for fgetline() */
int flags;
{
char_u *next_cmdline; /* next cmd to execute */
char_u *cmdline_copy = NULL; /* copy of cmd line */
int used_getline = FALSE; /* used "getline" to obtain command */
int used_getline = FALSE; /* used "fgetline" to obtain command */
static int recursive = 0; /* recursive depth */
int msg_didout_before_start = 0;
int count = 0; /* line number count */
@@ -775,14 +775,14 @@ do_cmdline(cmdline, getline, cookie, flags)
struct msglist **saved_msg_list = NULL;
struct msglist *private_msg_list;
/* "getline" and "cookie" passed to do_one_cmd() */
/* "fgetline" and "cookie" passed to do_one_cmd() */
char_u *(*cmd_getline) __ARGS((int, void *, int));
void *cmd_cookie;
struct loop_cookie cmd_loop_cookie;
void *real_cookie;
int getline_is_func;
#else
# define cmd_getline getline
# define cmd_getline fgetline
# define cmd_cookie cookie
#endif
static int call_depth = 0; /* recursiveness */
@@ -822,10 +822,10 @@ do_cmdline(cmdline, getline, cookie, flags)
cstack.cs_lflags = 0;
ga_init2(&lines_ga, (int)sizeof(wcmd_T), 10);
real_cookie = getline_cookie(getline, cookie);
real_cookie = getline_cookie(fgetline, cookie);
/* Inside a function use a higher nesting level. */
getline_is_func = getline_equal(getline, cookie, get_func_line);
getline_is_func = getline_equal(fgetline, cookie, get_func_line);
if (getline_is_func && ex_nesting_level == func_level(real_cookie))
++ex_nesting_level;
@@ -837,7 +837,7 @@ do_cmdline(cmdline, getline, cookie, flags)
breakpoint = func_breakpoint(real_cookie);
dbg_tick = func_dbg_tick(real_cookie);
}
else if (getline_equal(getline, cookie, getsourceline))
else if (getline_equal(fgetline, cookie, getsourceline))
{
fname = sourcing_name;
breakpoint = source_breakpoint(real_cookie);
@@ -881,7 +881,8 @@ do_cmdline(cmdline, getline, cookie, flags)
* KeyTyped is only set when calling vgetc(). Reset it here when not
* calling vgetc() (sourced command lines).
*/
if (!(flags & DOCMD_KEYTYPED) && !getline_equal(getline, cookie, getexline))
if (!(flags & DOCMD_KEYTYPED)
&& !getline_equal(fgetline, cookie, getexline))
KeyTyped = FALSE;
/*
@@ -894,7 +895,7 @@ do_cmdline(cmdline, getline, cookie, flags)
do
{
#ifdef FEAT_EVAL
getline_is_func = getline_equal(getline, cookie, get_func_line);
getline_is_func = getline_equal(fgetline, cookie, get_func_line);
#endif
/* stop skipping cmds for an error msg after all endif/while/for */
@@ -909,7 +910,7 @@ do_cmdline(cmdline, getline, cookie, flags)
/*
* 1. If repeating a line in a loop, get a line from lines_ga.
* 2. If no line given: Get an allocated line with getline().
* 2. If no line given: Get an allocated line with fgetline().
* 3. If a line is given: Make a copy, so we can mess with it.
*/
@@ -938,12 +939,12 @@ do_cmdline(cmdline, getline, cookie, flags)
}
#ifdef FEAT_PROFILE
else if (do_profiling == PROF_YES
&& getline_equal(getline, cookie, getsourceline))
&& getline_equal(fgetline, cookie, getsourceline))
script_line_end();
#endif
/* Check if a sourced file hit a ":finish" command. */
if (source_finished(getline, cookie))
if (source_finished(fgetline, cookie))
{
retval = FAIL;
break;
@@ -954,7 +955,7 @@ do_cmdline(cmdline, getline, cookie, flags)
&& *dbg_tick != debug_tick)
{
*breakpoint = dbg_find_breakpoint(
getline_equal(getline, cookie, getsourceline),
getline_equal(fgetline, cookie, getsourceline),
fname, sourcing_lnum);
*dbg_tick = debug_tick;
}
@@ -969,7 +970,7 @@ do_cmdline(cmdline, getline, cookie, flags)
dbg_breakpoint(fname, sourcing_lnum);
/* Find next breakpoint. */
*breakpoint = dbg_find_breakpoint(
getline_equal(getline, cookie, getsourceline),
getline_equal(fgetline, cookie, getsourceline),
fname, sourcing_lnum);
*dbg_tick = debug_tick;
}
@@ -978,7 +979,7 @@ do_cmdline(cmdline, getline, cookie, flags)
{
if (getline_is_func)
func_line_start(real_cookie);
else if (getline_equal(getline, cookie, getsourceline))
else if (getline_equal(fgetline, cookie, getsourceline))
script_line_start();
}
# endif
@@ -987,7 +988,7 @@ do_cmdline(cmdline, getline, cookie, flags)
if (cstack.cs_looplevel > 0)
{
/* Inside a while/for loop we need to store the lines and use them
* again. Pass a different "getline" function to do_one_cmd()
* again. Pass a different "fgetline" function to do_one_cmd()
* below, so that it stores lines in or reads them from
* "lines_ga". Makes it possible to define a function inside a
* while/for loop. */
@@ -995,27 +996,27 @@ do_cmdline(cmdline, getline, cookie, flags)
cmd_cookie = (void *)&cmd_loop_cookie;
cmd_loop_cookie.lines_gap = &lines_ga;
cmd_loop_cookie.current_line = current_line;
cmd_loop_cookie.getline = getline;
cmd_loop_cookie.getline = fgetline;
cmd_loop_cookie.cookie = cookie;
cmd_loop_cookie.repeating = (current_line < lines_ga.ga_len);
}
else
{
cmd_getline = getline;
cmd_getline = fgetline;
cmd_cookie = cookie;
}
#endif
/* 2. If no line given, get an allocated line with getline(). */
/* 2. If no line given, get an allocated line with fgetline(). */
if (next_cmdline == NULL)
{
/*
* Need to set msg_didout for the first line after an ":if",
* otherwise the ":if" will be overwritten.
*/
if (count == 1 && getline_equal(getline, cookie, getexline))
if (count == 1 && getline_equal(fgetline, cookie, getexline))
msg_didout = TRUE;
if (getline == NULL || (next_cmdline = getline(':', cookie,
if (fgetline == NULL || (next_cmdline = fgetline(':', cookie,
#ifdef FEAT_EVAL
cstack.cs_idx < 0 ? 0 : (cstack.cs_idx + 1) * 2
#else
@@ -1142,7 +1143,7 @@ do_cmdline(cmdline, getline, cookie, flags)
* If the command was typed, remember it for the ':' register.
* Do this AFTER executing the command to make :@: work.
*/
if (getline_equal(getline, cookie, getexline)
if (getline_equal(fgetline, cookie, getexline)
&& new_last_cmdline != NULL)
{
vim_free(last_cmdline);
@@ -1163,7 +1164,7 @@ do_cmdline(cmdline, getline, cookie, flags)
#ifdef FEAT_EVAL
/* reset did_emsg for a function that is not aborted by an error */
if (did_emsg && !force_abort
&& getline_equal(getline, cookie, get_func_line)
&& getline_equal(fgetline, cookie, get_func_line)
&& !func_has_abort(real_cookie))
did_emsg = FALSE;
@@ -1202,7 +1203,7 @@ do_cmdline(cmdline, getline, cookie, flags)
if (breakpoint != NULL)
{
*breakpoint = dbg_find_breakpoint(
getline_equal(getline, cookie, getsourceline),
getline_equal(fgetline, cookie, getsourceline),
fname,
((wcmd_T *)lines_ga.ga_data)[current_line].lnum-1);
*dbg_tick = debug_tick;
@@ -1296,8 +1297,8 @@ do_cmdline(cmdline, getline, cookie, flags)
#endif
)
&& !(did_emsg && used_getline
&& (getline_equal(getline, cookie, getexmodeline)
|| getline_equal(getline, cookie, getexline)))
&& (getline_equal(fgetline, cookie, getexmodeline)
|| getline_equal(fgetline, cookie, getexline)))
&& (next_cmdline != NULL
#ifdef FEAT_EVAL
|| cstack.cs_idx >= 0
@@ -1316,9 +1317,9 @@ do_cmdline(cmdline, getline, cookie, flags)
* unclosed conditional.
*/
if (!got_int && !did_throw
&& ((getline_equal(getline, cookie, getsourceline)
&& !source_finished(getline, cookie))
|| (getline_equal(getline, cookie, get_func_line)
&& ((getline_equal(fgetline, cookie, getsourceline)
&& !source_finished(fgetline, cookie))
|| (getline_equal(fgetline, cookie, get_func_line)
&& !func_has_ended(real_cookie))))
{
if (cstack.cs_flags[cstack.cs_idx] & CSF_TRY)
@@ -1354,7 +1355,7 @@ do_cmdline(cmdline, getline, cookie, flags)
/* If a missing ":endtry", ":endwhile", ":endfor", or ":endif" or a memory
* lack was reported above and the error message is to be converted to an
* exception, do this now after rewinding the cstack. */
do_errthrow(&cstack, getline_equal(getline, cookie, get_func_line)
do_errthrow(&cstack, getline_equal(fgetline, cookie, get_func_line)
? (char_u *)"endfunction" : (char_u *)NULL);
if (trylevel == 0)
@@ -1449,9 +1450,9 @@ do_cmdline(cmdline, getline, cookie, flags)
*/
if (did_throw)
need_rethrow = TRUE;
if ((getline_equal(getline, cookie, getsourceline)
if ((getline_equal(fgetline, cookie, getsourceline)
&& ex_nesting_level > source_level(real_cookie))
|| (getline_equal(getline, cookie, get_func_line)
|| (getline_equal(fgetline, cookie, get_func_line)
&& ex_nesting_level > func_level(real_cookie) + 1))
{
if (!did_throw)
@@ -1460,16 +1461,16 @@ do_cmdline(cmdline, getline, cookie, flags)
else
{
/* When leaving a function, reduce nesting level. */
if (getline_equal(getline, cookie, get_func_line))
if (getline_equal(fgetline, cookie, get_func_line))
--ex_nesting_level;
/*
* Go to debug mode when returning from a function in which we are
* single-stepping.
*/
if ((getline_equal(getline, cookie, getsourceline)
|| getline_equal(getline, cookie, get_func_line))
if ((getline_equal(fgetline, cookie, getsourceline)
|| getline_equal(fgetline, cookie, get_func_line))
&& ex_nesting_level + 1 <= debug_break_level)
do_debug(getline_equal(getline, cookie, getsourceline)
do_debug(getline_equal(fgetline, cookie, getsourceline)
? (char_u *)_("End of sourced file")
: (char_u *)_("End of function"));
}
@@ -2871,8 +2872,10 @@ find_command(eap, full)
}
#ifdef FEAT_USR_CMDS
/* Look for a user defined command as a last resort */
if (eap->cmdidx == CMD_SIZE && *eap->cmd >= 'A' && *eap->cmd <= 'Z')
/* Look for a user defined command as a last resort. Let ":Print" be
* overruled by a user defined command. */
if ((eap->cmdidx == CMD_SIZE || eap->cmdidx == CMD_Print)
&& *eap->cmd >= 'A' && *eap->cmd <= 'Z')
{
/* User defined commands may contain digits. */
while (ASCII_ISALNUM(*p))
@@ -5588,6 +5591,7 @@ ex_command(eap)
int compl = EXPAND_NOTHING;
char_u *compl_arg = NULL;
int has_attr = (eap->arg[0] == '-');
int name_len;
p = eap->arg;
@@ -5613,6 +5617,7 @@ ex_command(eap)
return;
}
end = p;
name_len = (int)(end - name);
/* If there is nothing after the name, and no attributes were specified,
* we are listing commands
@@ -5627,6 +5632,13 @@ ex_command(eap)
EMSG(_("E183: User defined commands must start with an uppercase letter"));
return;
}
else if ((name_len == 1 && *name == 'X')
|| (name_len <= 4
&& STRNCMP(name, "Next", name_len > 4 ? 4 : name_len) == 0))
{
EMSG(_("E841: Reserved name, cannot be used for user defined command"));
return;
}
else
uc_add_command(name, end - name, p, argt, def, flags, compl, compl_arg,
eap->forceit);
@@ -9394,7 +9406,7 @@ ex_findpat(eap)
ex_ptag(eap)
exarg_T *eap;
{
g_do_tagpreview = p_pvh;
g_do_tagpreview = p_pvh; /* will be reset to 0 in ex_tag_cmd() */
ex_tag_cmd(eap, cmdnames[eap->cmdidx].cmd_name + 1);
}
@@ -9526,17 +9538,23 @@ find_cmdline_var(src, usedlen)
#define SPEC_CFILE 4
"<sfile>", /* ":so" file name */
#define SPEC_SFILE 5
"<slnum>", /* ":so" file line number */
#define SPEC_SLNUM 6
#ifdef FEAT_AUTOCMD
"<afile>", /* autocommand file name */
# define SPEC_AFILE 6
# define SPEC_AFILE 7
"<abuf>", /* autocommand buffer number */
# define SPEC_ABUF 7
# define SPEC_ABUF 8
"<amatch>", /* autocommand match name */
# define SPEC_AMATCH 8
# define SPEC_AMATCH 9
#endif
#ifdef FEAT_CLIENTSERVER
"<client>"
# define SPEC_CLIENT 9
# ifdef FEAT_AUTOCMD
# define SPEC_CLIENT 10
# else
# define SPEC_CLIENT 7
# endif
#endif
};
@@ -9561,6 +9579,7 @@ find_cmdline_var(src, usedlen)
* '<cWORD>' to WORD under the cursor
* '<cfile>' to path name under the cursor
* '<sfile>' to sourced file name
* '<slnum>' to sourced file line number
* '<afile>' to file name for autocommand
* '<abuf>' to buffer number for autocommand
* '<amatch>' to matching name for autocommand
@@ -9592,10 +9611,7 @@ eval_vars(src, srcstart, usedlen, lnump, errormsg, escaped)
#ifdef FEAT_MODIFY_FNAME
int skip_mod = FALSE;
#endif
#if defined(FEAT_AUTOCMD) || defined(FEAT_CLIENTSERVER)
char_u strbuf[30];
#endif
*errormsg = NULL;
if (escaped != NULL)
@@ -9784,6 +9800,15 @@ eval_vars(src, srcstart, usedlen, lnump, errormsg, escaped)
return NULL;
}
break;
case SPEC_SLNUM: /* line in file for ":so" command */
if (sourcing_name == NULL || sourcing_lnum == 0)
{
*errormsg = (char_u *)_("E842: no line number to use for \"<slnum>\"");
return NULL;
}
sprintf((char *)strbuf, "%ld", (long)sourcing_lnum);
result = strbuf;
break;
#if defined(FEAT_CLIENTSERVER)
case SPEC_CLIENT: /* Source of last submitted input */
sprintf((char *)strbuf, PRINTF_HEX_LONG_U,

View File

@@ -688,28 +688,35 @@ getcmdline(firstc, count, indent)
p = get_expr_line();
--textlock;
restore_cmdline(&save_ccline);
len = (int)STRLEN(p);
if (p != NULL && realloc_cmdbuff(len + 1) == OK)
if (p != NULL)
{
ccline.cmdlen = len;
STRCPY(ccline.cmdbuff, p);
vim_free(p);
len = (int)STRLEN(p);
if (realloc_cmdbuff(len + 1) == OK)
{
ccline.cmdlen = len;
STRCPY(ccline.cmdbuff, p);
vim_free(p);
/* Restore the cursor or use the position set with
* set_cmdline_pos(). */
if (new_cmdpos > ccline.cmdlen)
ccline.cmdpos = ccline.cmdlen;
else
ccline.cmdpos = new_cmdpos;
/* Restore the cursor or use the position set with
* set_cmdline_pos(). */
if (new_cmdpos > ccline.cmdlen)
ccline.cmdpos = ccline.cmdlen;
else
ccline.cmdpos = new_cmdpos;
KeyTyped = FALSE; /* Don't do p_wc completion. */
redrawcmd();
goto cmdline_changed;
KeyTyped = FALSE; /* Don't do p_wc completion. */
redrawcmd();
goto cmdline_changed;
}
}
}
beep_flush();
c = ESC;
got_int = FALSE; /* don't abandon the command line */
did_emsg = FALSE;
emsg_on_display = FALSE;
redrawcmd();
goto cmdline_not_changed;
}
#endif
else
@@ -4744,7 +4751,11 @@ expand_shellcmd(filepat, num_file, file, flagsarg)
|| (pat[1] == '.' && vim_ispathsep(pat[2])))))
path = (char_u *)".";
else
{
path = vim_getenv((char_u *)"PATH", &mustfree);
if (path == NULL)
path = (char_u *)"";
}
/*
* Go over all directories in $PATH. Expand matches in that directory and

View File

@@ -3290,9 +3290,9 @@ do_map(maptype, arg, mode, abbrev)
*/
if (haskey)
keys = replace_termcodes(keys, &keys_buf, TRUE, TRUE, special);
orig_rhs = rhs;
if (hasarg)
{
orig_rhs = rhs;
if (STRICMP(rhs, "<nop>") == 0) /* "<Nop>" means nothing */
rhs = (char_u *)"";
else
@@ -3922,7 +3922,7 @@ showmap(mp, local)
if (mapchars != NULL)
{
msg_puts(mapchars);
len = STRLEN(mapchars);
len = (int)STRLEN(mapchars);
vim_free(mapchars);
}
@@ -5086,7 +5086,11 @@ check_map(keys, mode, exact, ign_mod, abbr, mp_ptr, local_ptr)
if (mp_ptr != NULL)
*mp_ptr = mp;
if (local_ptr != NULL)
#ifdef FEAT_LOCALMAP
*local_ptr = local;
#else
*local_ptr = 0;
#endif
return mp->m_str;
}
}

View File

@@ -510,6 +510,7 @@ EXTERN VimClipboard clip_star; /* PRIMARY selection in X11 */
EXTERN VimClipboard clip_plus; /* CLIPBOARD selection in X11 */
# else
# define clip_plus clip_star /* there is only one clipboard */
# define ONE_CLIPBOARD
# endif
EXTERN int clip_unnamed INIT(= FALSE);
EXTERN int clip_autoselect INIT(= FALSE);

View File

@@ -289,13 +289,13 @@ typedef struct tagNMTTDISPINFOW {
#ifdef FEAT_MENU
static UINT s_menu_id = 100;
#endif
/*
* Use the system font for dialogs and tear-off menus. Remove this line to
* use DLG_FONT_NAME.
*/
# define USE_SYSMENU_FONT
#endif
#define USE_SYSMENU_FONT
#define VIM_NAME "vim"
#define VIM_CLASS "Vim"
@@ -1260,7 +1260,7 @@ gui_mch_prepare(int *argc, char **argv)
/* try and load the user32.dll library and get the entry points for
* multi-monitor-support. */
if ((user32_lib = LoadLibrary("User32.dll")) != NULL)
if ((user32_lib = vimLoadLib("User32.dll")) != NULL)
{
pMonitorFromWindow = (TMonitorFromWindow)GetProcAddress(user32_lib,
"MonitorFromWindow");
@@ -1573,6 +1573,11 @@ gui_mch_init(void)
# endif
#endif
#ifdef FEAT_EVAL
/* set the v:windowid variable */
set_vim_var_nr(VV_WINDOWID, (long)s_hwnd);
#endif
theend:
/* Display any pending error messages */
display_errors();
@@ -4188,7 +4193,7 @@ gui_mch_set_foreground(void)
static void
dyn_imm_load(void)
{
hLibImm = LoadLibrary("imm32.dll");
hLibImm = vimLoadLib("imm32.dll");
if (hLibImm == NULL)
return;

View File

@@ -2895,6 +2895,11 @@ gui_mch_wait_for_chars(wtime)
focus = gui.in_focus;
}
#if defined(FEAT_NETBEANS_INTG)
/* Process any queued netbeans messages. */
netbeans_parse_messages();
#endif
/*
* Don't use gui_mch_update() because then we will spin-lock until a
* char arrives, instead we use XtAppProcessEvent() to hang until an

View File

@@ -49,7 +49,7 @@ static const char LUAVIM_FREE[] = "luaV_free";
# define symbol_from_dll dlsym
# define close_dll dlclose
#else
# define load_dll LoadLibrary
# define load_dll vimLoadLib
# define symbol_from_dll GetProcAddress
# define close_dll FreeLibrary
#endif

View File

@@ -556,8 +556,8 @@ mzscheme_runtime_link_init(char *sch_dll, char *gc_dll, int verbose)
if (hMzGC && hMzSch)
return OK;
hMzSch = LoadLibrary(sch_dll);
hMzGC = LoadLibrary(gc_dll);
hMzSch = vimLoadLib(sch_dll);
hMzGC = vimLoadLib(gc_dll);
if (!hMzSch)
{
@@ -794,9 +794,16 @@ mzscheme_end(void)
#endif
}
#if MZSCHEME_VERSION_MAJOR >= 500 && defined(WIN32) && defined(USE_THREAD_LOCAL)
static __declspec(thread) void *tls_space;
#endif
void
mzscheme_main(void)
{
#if MZSCHEME_VERSION_MAJOR >= 500 && defined(WIN32) && defined(USE_THREAD_LOCAL)
scheme_register_tls_space(&tls_space, 0);
#endif
#if defined(MZ_PRECISE_GC) && MZSCHEME_VERSION_MAJOR >= 400
/* use trampoline for precise GC in MzScheme >= 4.x */
scheme_main_setup(TRUE, mzscheme_env_main, 0, NULL);

View File

@@ -106,7 +106,7 @@ typedef int perl_key;
#define close_dll dlclose
#else
#define PERL_PROC FARPROC
#define load_dll LoadLibrary
#define load_dll vimLoadLib
#define symbol_from_dll GetProcAddress
#define close_dll FreeLibrary
#endif

View File

@@ -154,7 +154,7 @@ writer(writefn fn, char_u *str, PyInt n)
{
PyInt len = ptr - str;
if (ga_grow(&io_ga, len + 1) == FAIL)
if (ga_grow(&io_ga, (int)(len + 1)) == FAIL)
break;
mch_memmove(((char *)io_ga.ga_data) + io_ga.ga_len, str, (size_t)len);
@@ -166,10 +166,10 @@ writer(writefn fn, char_u *str, PyInt n)
}
/* Put the remaining text into io_ga for later printing. */
if (n > 0 && ga_grow(&io_ga, n + 1) == OK)
if (n > 0 && ga_grow(&io_ga, (int)(n + 1)) == OK)
{
mch_memmove(((char *)io_ga.ga_data) + io_ga.ga_len, str, (size_t)n);
io_ga.ga_len += n;
io_ga.ga_len += (int)n;
}
}

View File

@@ -102,7 +102,7 @@ struct PyMethodDef { Py_ssize_t a; };
# include <dlfcn.h>
# define FARPROC void*
# define HINSTANCE void*
# ifdef PY_NO_RTLD_GLOBAL
# if defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)
# define load_dll(n) dlopen((n), RTLD_LAZY)
# else
# define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
@@ -110,7 +110,7 @@ struct PyMethodDef { Py_ssize_t a; };
# define close_dll dlclose
# define symbol_from_dll dlsym
# else
# define load_dll LoadLibrary
# define load_dll vimLoadLib
# define close_dll FreeLibrary
# define symbol_from_dll GetProcAddress
# endif
@@ -168,6 +168,7 @@ struct PyMethodDef { Py_ssize_t a; };
# define Py_BuildValue dll_Py_BuildValue
# define Py_FindMethod dll_Py_FindMethod
# define Py_InitModule4 dll_Py_InitModule4
# define Py_SetPythonHome dll_Py_SetPythonHome
# define Py_Initialize dll_Py_Initialize
# define Py_Finalize dll_Py_Finalize
# define Py_IsInitialized dll_Py_IsInitialized
@@ -226,6 +227,7 @@ static PyTypeObject* dll_PyType_Type;
static PyObject*(*dll_Py_BuildValue)(char *, ...);
static PyObject*(*dll_Py_FindMethod)(struct PyMethodDef[], PyObject *, char *);
static PyObject*(*dll_Py_InitModule4)(char *, struct PyMethodDef *, char *, PyObject *, int);
static void(*dll_Py_SetPythonHome)(char *home);
static void(*dll_Py_Initialize)(void);
static void(*dll_Py_Finalize)(void);
static int(*dll_Py_IsInitialized)(void);
@@ -310,6 +312,7 @@ static struct
# else
{"Py_InitModule4", (PYTHON_PROC*)&dll_Py_InitModule4},
# endif
{"Py_SetPythonHome", (PYTHON_PROC*)&dll_Py_SetPythonHome},
{"Py_Initialize", (PYTHON_PROC*)&dll_Py_Initialize},
{"Py_Finalize", (PYTHON_PROC*)&dll_Py_Finalize},
{"Py_IsInitialized", (PYTHON_PROC*)&dll_Py_IsInitialized},
@@ -349,7 +352,7 @@ python_runtime_link_init(char *libname, int verbose)
{
int i;
#if !defined(PY_NO_RTLD_GLOBAL) && defined(UNIX) && defined(FEAT_PYTHON3)
#if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON3)
/* Can't have Python and Python3 loaded at the same time.
* It cause a crash, because RTLD_GLOBAL is needed for
* standard C extension libraries of one or both python versions. */
@@ -543,6 +546,10 @@ Python_Init(void)
}
#endif
#ifdef PYTHON_HOME
Py_SetPythonHome(PYTHON_HOME);
#endif
init_structs();
#if !defined(MACOS) || defined(MACOS_X_UNIX)

View File

@@ -80,7 +80,7 @@ static void init_structs(void);
# include <dlfcn.h>
# define FARPROC void*
# define HINSTANCE void*
# ifdef PY_NO_RTLD_GLOBAL
# if defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)
# define load_dll(n) dlopen((n), RTLD_LAZY)
# else
# define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
@@ -88,7 +88,7 @@ static void init_structs(void);
# define close_dll dlclose
# define symbol_from_dll dlsym
# else
# define load_dll LoadLibrary
# define load_dll vimLoadLib
# define close_dll FreeLibrary
# define symbol_from_dll GetProcAddress
# endif
@@ -132,6 +132,7 @@ static void init_structs(void);
# define PyType_Ready py3_PyType_Ready
#undef Py_BuildValue
# define Py_BuildValue py3_Py_BuildValue
# define Py_SetPythonHome py3_Py_SetPythonHome
# define Py_Initialize py3_Py_Initialize
# define Py_Finalize py3_Py_Finalize
# define Py_IsInitialized py3_Py_IsInitialized
@@ -170,6 +171,7 @@ static void init_structs(void);
* Pointers for dynamic link
*/
static int (*py3_PySys_SetArgv)(int, wchar_t **);
static void (*py3_Py_SetPythonHome)(wchar_t *home);
static void (*py3_Py_Initialize)(void);
static PyObject* (*py3_PyList_New)(Py_ssize_t size);
static PyGILState_STATE (*py3_PyGILState_Ensure)(void);
@@ -254,6 +256,7 @@ static struct
} py3_funcname_table[] =
{
{"PySys_SetArgv", (PYTHON_PROC*)&py3_PySys_SetArgv},
{"Py_SetPythonHome", (PYTHON_PROC*)&py3_Py_SetPythonHome},
{"Py_Initialize", (PYTHON_PROC*)&py3_Py_Initialize},
{"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple},
{"PyList_New", (PYTHON_PROC*)&py3_PyList_New},
@@ -336,7 +339,7 @@ py3_runtime_link_init(char *libname, int verbose)
int i;
void *ucs_from_string, *ucs_from_string_and_size;
# if !defined(PY_NO_RTLD_GLOBAL) && defined(UNIX) && defined(FEAT_PYTHON)
# if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON)
/* Can't have Python and Python3 loaded at the same time.
* It cause a crash, because RTLD_GLOBAL is needed for
* standard C extension libraries of one or both python versions. */
@@ -539,6 +542,11 @@ Python3_Init(void)
init_structs();
#ifdef PYTHON3_HOME
Py_SetPythonHome(PYTHON3_HOME);
#endif
/* initialise threads */
PyEval_InitThreads();

View File

@@ -14,6 +14,10 @@
#include <stdio.h>
#include <string.h>
#ifdef HAVE_CONFIG_H
# include "auto/config.h"
#endif
#ifdef _WIN32
# if !defined(DYNAMIC_RUBY_VER) || (DYNAMIC_RUBY_VER < 18)
# define NT
@@ -50,12 +54,14 @@
#if !(defined(WIN32) || defined(_WIN64))
# include <dlfcn.h>
# define HANDLE void*
# define HINSTANCE void*
# define RUBY_PROC void*
# define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
# define symbol_from_dll dlsym
# define close_dll dlclose
#else
# define load_dll LoadLibrary
# define RUBY_PROC FARPROC
# define load_dll vimLoadLib
# define symbol_from_dll GetProcAddress
# define close_dll FreeLibrary
#endif
@@ -174,7 +180,9 @@ static void ruby_vim_init(void);
#define rb_lastline_get dll_rb_lastline_get
#define rb_lastline_set dll_rb_lastline_set
#define rb_load_protect dll_rb_load_protect
#ifndef RUBY19_OR_LATER
#define rb_num2long dll_rb_num2long
#endif
#define rb_num2ulong dll_rb_num2ulong
#define rb_obj_alloc dll_rb_obj_alloc
#define rb_obj_as_string dll_rb_obj_as_string
@@ -186,6 +194,9 @@ static void ruby_vim_init(void);
#ifdef rb_str_new2
/* Ruby may #define rb_str_new2 to use rb_str_new_cstr. */
# define need_rb_str_new_cstr 1
/* Ruby's headers #define rb_str_new_cstr to make use of GCC's
* __builtin_constant_p extension. */
# undef rb_str_new_cstr
# define rb_str_new_cstr dll_rb_str_new_cstr
#else
# define rb_str_new2 dll_rb_str_new2
@@ -206,9 +217,11 @@ static void ruby_vim_init(void);
#endif
#define ruby_init dll_ruby_init
#define ruby_init_loadpath dll_ruby_init_loadpath
#define NtInitialize dll_NtInitialize
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
# define rb_w32_snprintf dll_rb_w32_snprintf
#ifdef WIN3264
# define NtInitialize dll_NtInitialize
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
# define rb_w32_snprintf dll_rb_w32_snprintf
# endif
#endif
#ifdef RUBY19_OR_LATER
@@ -216,6 +229,8 @@ static void ruby_vim_init(void);
# define rb_enc_find_index dll_rb_enc_find_index
# define rb_enc_find dll_rb_enc_find
# define rb_enc_str_new dll_rb_enc_str_new
# define rb_intern2 dll_rb_intern2
# define rb_const_remove dll_rb_const_remove
# define rb_sprintf dll_rb_sprintf
# define ruby_init_stack dll_ruby_init_stack
#endif
@@ -283,7 +298,12 @@ static VALUE *dll_ruby_errinfo;
#endif
static void (*dll_ruby_init) (void);
static void (*dll_ruby_init_loadpath) (void);
#ifdef WIN3264
static void (*dll_NtInitialize) (int*, char***);
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
# endif
#endif
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
static char * (*dll_rb_string_value_ptr) (volatile VALUE*);
static VALUE (*dll_rb_float_new) (double);
@@ -293,15 +313,15 @@ static VALUE (*dll_rb_ary_push) (VALUE, VALUE);
#ifdef RUBY19_OR_LATER
static VALUE (*dll_rb_int2big)(SIGNED_VALUE);
#endif
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
#endif
#ifdef RUBY19_OR_LATER
static void (*dll_ruby_script) (const char*);
static int (*dll_rb_enc_find_index) (const char*);
static rb_encoding* (*dll_rb_enc_find) (const char*);
static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*);
static ID (*dll_rb_intern2) (const char*, long);
static void (*dll_Init_prelude) (void);
static VALUE (*dll_rb_const_remove) (VALUE, ID);
static VALUE (*dll_rb_sprintf) (const char*, ...);
static void (*ruby_init_stack)(VALUE*);
#endif
@@ -317,12 +337,11 @@ VALUE rb_int2big_stub(SIGNED_VALUE x)
}
#endif
static HINSTANCE hinstRuby = 0; /* Instance of ruby.dll */
static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */
/*
* Table of name to function pointer of ruby.
*/
#define RUBY_PROC FARPROC
static struct
{
char *name;
@@ -387,15 +406,17 @@ static struct
#endif
{"ruby_init", (RUBY_PROC*)&dll_ruby_init},
{"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
#ifdef WIN3264
{
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19
"NtInitialize",
#else
# else
"ruby_sysinit",
#endif
# endif
(RUBY_PROC*)&dll_NtInitialize},
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
{"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
# endif
#endif
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
{"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr},
@@ -409,6 +430,8 @@ static struct
{"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index},
{"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find},
{"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new},
{"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
{"rb_const_remove", (RUBY_PROC*)&dll_rb_const_remove},
{"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf},
{"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
#endif
@@ -424,7 +447,7 @@ end_dynamic_ruby()
if (hinstRuby)
{
close_dll(hinstRuby);
hinstRuby = 0;
hinstRuby = NULL;
}
}
@@ -454,7 +477,7 @@ ruby_runtime_link_init(char *libname, int verbose)
ruby_funcname_table[i].name)))
{
close_dll(hinstRuby);
hinstRuby = 0;
hinstRuby = NULL;
if (verbose)
EMSG2(_(e_loadfunc), ruby_funcname_table[i].name);
return FAIL;
@@ -646,6 +669,11 @@ static int ensure_ruby_initialized(void)
ruby_io_init();
#ifdef RUBY19_OR_LATER
rb_enc_find_index("encdb");
/* This avoids the error "Encoding::ConverterNotFoundError: code
* converter not found (UTF-16LE to ASCII-8BIT)". */
rb_define_module("Gem");
rb_const_remove(rb_cObject, rb_intern2("TMP_RUBY_PREFIX", 15));
#endif
ruby_vim_init();
ruby_initialized = 1;
@@ -930,15 +958,9 @@ static VALUE buffer_count(VALUE self)
static VALUE get_buffer_line(buf_T *buf, linenr_T n)
{
if (n > 0 && n <= buf->b_ml.ml_line_count)
{
char *line = (char *)ml_get_buf(buf, n, FALSE);
return line ? vim_str2rb_enc_str(line) : Qnil;
}
rb_raise(rb_eIndexError, "line number %ld out of range", (long)n);
#ifndef __GNUC__
return Qnil; /* For stop warning */
#endif
if (n <= 0 || n > buf->b_ml.ml_line_count)
rb_raise(rb_eIndexError, "line number %ld out of range", (long)n);
return vim_str2rb_enc_str((char *)ml_get_buf(buf, n, FALSE));
}
static VALUE buffer_aref(VALUE self, VALUE num)
@@ -977,9 +999,6 @@ static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str)
else
{
rb_raise(rb_eIndexError, "line number %ld out of range", (long)n);
#ifndef __GNUC__
return Qnil; /* For stop warning */
#endif
}
return str;
}
@@ -1034,7 +1053,8 @@ static VALUE buffer_append(VALUE self, VALUE num, VALUE str)
long n = NUM2LONG(num);
aco_save_T aco;
if (line == NULL) {
if (line == NULL)
{
rb_raise(rb_eIndexError, "NULL line");
}
else if (n >= 0 && n <= buf->b_ml.ml_line_count)
@@ -1058,7 +1078,8 @@ static VALUE buffer_append(VALUE self, VALUE num, VALUE str)
update_curbuf(NOT_VALID);
}
else {
else
{
rb_raise(rb_eIndexError, "line number %ld out of range", n);
}
return str;

View File

@@ -5,7 +5,7 @@
# libraries when they exist, but this doesn't mean they are needed for Vim.
#
# Author: Bram Moolenaar
# Last change: 2006 Sep 26
# Last change: 2010 Nov 03
# License: Public domain
#
# Warning: This fails miserably if the linker doesn't return an error code!
@@ -16,11 +16,23 @@
echo "$LINK " >link.cmd
exit_value=0
if test "$LINK_AS_NEEDED" = yes; then
echo "link.sh: \$LINK_AS_NEEDED set to 'yes': invoking linker directly."
cat link.cmd
if sh link.cmd; then
exit_value=0
echo "link.sh: Linked fine"
else
exit_value=$?
echo "link.sh: Linking failed"
fi
else
if test -f auto/link.sed; then
#
# If auto/link.sed already exists, use it. We assume a previous run of
# link.sh has found the correct set of libraries.
#
if test -f auto/link.sed; then
echo "link.sh: The file 'auto/link.sed' exists, which is going to be used now."
echo "link.sh: If linking fails, try deleting the auto/link.sed file."
echo "link.sh: If this fails too, try creating an empty auto/link.sed file."
@@ -124,6 +136,8 @@ if test -f auto/link.sed -a ! -s auto/link.sed -a ! -f link3.sed; then
fi
fi
fi
#
# cleanup
#

View File

@@ -3817,6 +3817,8 @@ build_drop_cmd(filec, filev, tabs, sendReply)
/* Check if we have at least one argument. */
if (filec <= 0)
mainerr_arg_missing((char_u *)filev[-1]);
/* Temporarily cd to the current directory to handle relative file names. */
if (mch_dirname(cwd, MAXPATHL) != OK)
return NULL;
if ((p = vim_strsave_escaped_ext(cwd,
@@ -3858,13 +3860,20 @@ build_drop_cmd(filec, filev, tabs, sendReply)
ga_concat(&ga, p);
vim_free(p);
}
ga_concat(&ga, (char_u *)"|if exists('*inputrestore')|call inputrestore()|endif<CR>");
/* The :drop commands goes to Insert mode when 'insertmode' is set, use
* CTRL-\ CTRL-N again. */
ga_concat(&ga, (char_u *)"|if exists('*inputrestore')|call inputrestore()|endif<CR>");
ga_concat(&ga, (char_u *)"<C-\\><C-N>:cd -");
ga_concat(&ga, (char_u *)"<C-\\><C-N>");
/* Switch back to the correct current directory (prior to temporary path
* switch) unless 'autochdir' is set, in which case it will already be
* correct after the :drop command. */
ga_concat(&ga, (char_u *)":if !exists('+acd')||!&acd|cd -|endif<CR>");
if (sendReply)
ga_concat(&ga, (char_u *)"<CR>:call SetupRemoteReplies()");
ga_concat(&ga, (char_u *)"<CR>:");
ga_concat(&ga, (char_u *)":call SetupRemoteReplies()<CR>");
ga_concat(&ga, (char_u *)":");
if (inicmd != NULL)
{
/* Can't use <CR> after "inicmd", because an "startinsert" would cause

View File

@@ -3124,6 +3124,9 @@ mb_strnicmp(s1, s2, nn)
/* If one of the two characters is incomplete return -1. */
if (incomplete || i + utf_byte2len(s2[i]) > n)
return -1;
/* Don't case-fold illegal bytes or truncated characters. */
if (utf_ptr2len(s1 + i) < l || utf_ptr2len(s2 + i) < l)
return -1;
cdiff = utf_fold(utf_ptr2char(s1 + i))
- utf_fold(utf_ptr2char(s2 + i));
if (cdiff != 0)
@@ -4159,11 +4162,11 @@ iconv_enabled(verbose)
{
if (hIconvDLL != 0 && hMsvcrtDLL != 0)
return TRUE;
hIconvDLL = LoadLibrary(DYNAMIC_ICONV_DLL);
hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL);
if (hIconvDLL == 0) /* sometimes it's called libiconv.dll */
hIconvDLL = LoadLibrary(DYNAMIC_ICONV_DLL_ALT);
hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL_ALT);
if (hIconvDLL != 0)
hMsvcrtDLL = LoadLibrary(DYNAMIC_MSVCRT_DLL);
hMsvcrtDLL = vimLoadLib(DYNAMIC_MSVCRT_DLL);
if (hIconvDLL == 0 || hMsvcrtDLL == 0)
{
/* Only give the message when 'verbose' is set, otherwise it might be

View File

@@ -135,14 +135,12 @@ static int dosetvisible = FALSE;
static int needupdate = 0;
static int inAtomic = 0;
/*
* Close the socket and remove the input handlers.
*/
static void
netbeans_close(void)
nb_close_socket(void)
{
if (!NETBEANS_OPEN)
return;
netbeans_send_disconnect();
#ifdef FEAT_GUI_X11
if (inputHandler != (XtInputId)NULL)
{
@@ -167,13 +165,27 @@ netbeans_close(void)
# endif
#endif
sock_close(nbsock);
nbsock = -1;
}
/*
* Close the connection and cleanup.
* May be called when nb_close_socket() was called earlier.
*/
static void
netbeans_close(void)
{
if (NETBEANS_OPEN)
{
netbeans_send_disconnect();
nb_close_socket();
}
#ifdef FEAT_BEVAL
bevalServers &= ~BEVAL_NETBEANS;
#endif
sock_close(nbsock);
nbsock = -1;
needupdate = 0;
inAtomic = 0;
nb_free();
@@ -632,9 +644,6 @@ netbeans_parse_messages(void)
char_u *p;
queue_T *node;
if (!NETBEANS_OPEN)
return;
while (head.next != NULL && head.next != &head)
{
node = head.next;
@@ -720,15 +729,14 @@ messageFromNetbeans(gpointer clientData UNUSED,
}
#endif
#define DETACH_MSG "DETACH\n"
void
netbeans_read()
{
static char_u *buf = NULL;
int len = 0;
int readlen = 0;
#if defined(NB_HAS_GUI) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)
static int level = 0;
#endif
#ifdef HAVE_SELECT
struct timeval tval;
fd_set rfds;
@@ -744,13 +752,6 @@ netbeans_read()
return;
}
#if defined(NB_HAS_GUI) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)
/* recursion guard; this will be called from the X event loop at unknown
* moments */
if (NB_HAS_GUI)
++level;
#endif
/* Allocate a buffer to read into. */
if (buf == NULL)
{
@@ -790,34 +791,32 @@ netbeans_read()
break; /* did read everything that's available */
}
/* Reading a socket disconnection (readlen == 0), or a socket error. */
if (readlen <= 0)
{
/* read error or didn't read anything */
netbeans_close();
nbdebug(("messageFromNetbeans: Error in read() from socket\n"));
/* Queue a "DETACH" netbeans message in the command queue in order to
* terminate the netbeans session later. Do not end the session here
* directly as we may be running in the context of a call to
* netbeans_parse_messages():
* netbeans_parse_messages
* -> autocmd triggered while processing the netbeans cmd
* -> ui_breakcheck
* -> gui event loop or select loop
* -> netbeans_read()
*/
save((char_u *)DETACH_MSG, strlen(DETACH_MSG));
nb_close_socket();
if (len < 0)
{
nbdebug(("read from Netbeans socket\n"));
PERROR(_("read from Netbeans socket"));
}
return; /* don't try to parse it */
}
#if defined(NB_HAS_GUI) && !defined(FEAT_GUI_W32)
/* Let the main loop handle messages. */
if (NB_HAS_GUI)
{
# ifdef FEAT_GUI_GTK
if (gtk_main_level() > 0)
gtk_main_quit();
# else
/* Parse the messages now, but avoid recursion. */
if (level == 1)
netbeans_parse_messages();
--level;
# endif
}
#if defined(NB_HAS_GUI) && defined(FEAT_GUI_GTK)
if (NB_HAS_GUI && gtk_main_level() > 0)
gtk_main_quit();
#endif
}
@@ -1186,6 +1185,10 @@ nb_reply_nil(int cmdno)
nbdebug(("REP %d: <none>\n", cmdno));
/* Avoid printing an annoying error message. */
if (!NETBEANS_OPEN)
return;
sprintf(reply, "%d\n", cmdno);
nb_send(reply, "nb_reply_nil");
}
@@ -2775,11 +2778,11 @@ ex_nbstart(eap)
{
#ifdef FEAT_GUI
# if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \
&& !defined(FEAT_GUI_W32)
&& !defined(FEAT_GUI_W32)
if (gui.in_use)
{
EMSG(_("E838: netbeans is not supported with this GUI"));
return;
EMSG(_("E838: netbeans is not supported with this GUI"));
return;
}
# endif
#endif

View File

@@ -3979,7 +3979,12 @@ ex_display(eap)
for (i = -1; i < NUM_REGISTERS && !got_int; ++i)
{
name = get_register_name(i);
if (arg != NULL && vim_strchr(arg, name) == NULL)
if (arg != NULL && vim_strchr(arg, name) == NULL
#ifdef ONE_CLIPBOARD
/* Star register and plus register contain the same thing. */
&& (name != '*' || vim_strchr(arg, '+') == NULL)
#endif
)
continue; /* did not ask for this register */
#ifdef FEAT_CLIPBOARD

View File

@@ -817,7 +817,11 @@ mch_libcall(
BOOL fRunTimeLinkSuccess = FALSE;
// Get a handle to the DLL module.
# ifdef WIN16
hinstLib = LoadLibrary(libname);
# else
hinstLib = vimLoadLib(libname);
# endif
// If the handle is valid, try to get the function address.
if (hinstLib != NULL)

View File

@@ -206,44 +206,75 @@ static char *vimrun_path = "vimrun ";
static int suppress_winsize = 1; /* don't fiddle with console */
#endif
static char_u *exe_path = NULL;
static void
get_exe_name(void)
{
char temp[256];
static int did_set_PATH = FALSE;
/* Maximum length of $PATH is more than MAXPATHL. 8191 is often mentioned
* as the maximum length that works (plus a NUL byte). */
#define MAX_ENV_PATH_LEN 8192
char temp[MAX_ENV_PATH_LEN];
char_u *p;
if (exe_name == NULL)
{
/* store the name of the executable, may be used for $VIM */
GetModuleFileName(NULL, temp, 255);
GetModuleFileName(NULL, temp, MAX_ENV_PATH_LEN - 1);
if (*temp != NUL)
exe_name = FullName_save((char_u *)temp, FALSE);
}
if (!did_set_PATH && exe_name != NULL)
if (exe_path == NULL && exe_name != NULL)
{
char_u *p;
char_u *newpath;
/* Append our starting directory to $PATH, so that when doing "!xxd"
* it's found in our starting directory. Needed because SearchPath()
* also looks there. */
p = mch_getenv("PATH");
newpath = alloc((unsigned)(STRLEN(p) + STRLEN(exe_name) + 2));
if (newpath != NULL)
exe_path = vim_strnsave(exe_name,
(int)(gettail_sep(exe_name) - exe_name));
if (exe_path != NULL)
{
STRCPY(newpath, p);
STRCAT(newpath, ";");
vim_strncpy(newpath + STRLEN(newpath), exe_name,
gettail_sep(exe_name) - exe_name);
vim_setenv((char_u *)"PATH", newpath);
vim_free(newpath);
/* Append our starting directory to $PATH, so that when doing
* "!xxd" it's found in our starting directory. Needed because
* SearchPath() also looks there. */
p = mch_getenv("PATH");
if (p == NULL
|| STRLEN(p) + STRLEN(exe_path) + 2 < MAX_ENV_PATH_LEN)
{
if (p == NULL || *p == NUL)
temp[0] = NUL;
else
{
STRCPY(temp, p);
STRCAT(temp, ";");
}
STRCAT(temp, exe_path);
vim_setenv((char_u *)"PATH", temp);
}
}
did_set_PATH = TRUE;
}
}
/*
* Load library "name".
*/
HINSTANCE
vimLoadLib(char *name)
{
HINSTANCE dll = NULL;
char old_dir[MAXPATHL];
if (exe_path == NULL)
get_exe_name();
if (exe_path != NULL && mch_dirname(old_dir, MAXPATHL) == OK)
{
/* Change directory to where the executable is, both to make sure we
* find a .dll there and to avoid looking for a .dll in the current
* directory. */
mch_chdir(exe_path);
dll = LoadLibrary(name);
mch_chdir(old_dir);
}
return dll;
}
#if defined(DYNAMIC_GETTEXT) || defined(PROTO)
# ifndef GETTEXT_DLL
# define GETTEXT_DLL "libintl.dll"
@@ -254,7 +285,7 @@ static char *null_libintl_textdomain(const char *);
static char *null_libintl_bindtextdomain(const char *, const char *);
static char *null_libintl_bind_textdomain_codeset(const char *, const char *);
static HINSTANCE hLibintlDLL = 0;
static HINSTANCE hLibintlDLL = NULL;
char *(*dyn_libintl_gettext)(const char *) = null_libintl_gettext;
char *(*dyn_libintl_textdomain)(const char *) = null_libintl_textdomain;
char *(*dyn_libintl_bindtextdomain)(const char *, const char *)
@@ -282,26 +313,16 @@ dyn_libintl_init(char *libname)
if (hLibintlDLL)
return 1;
/* Load gettext library (libintl.dll) */
hLibintlDLL = LoadLibrary(libname != NULL ? libname : GETTEXT_DLL);
hLibintlDLL = vimLoadLib(libname != NULL ? libname : GETTEXT_DLL);
if (!hLibintlDLL)
{
char_u dirname[_MAX_PATH];
/* Try using the path from gvim.exe to find the .dll there. */
get_exe_name();
STRCPY(dirname, exe_name);
STRCPY(gettail(dirname), GETTEXT_DLL);
hLibintlDLL = LoadLibrary((char *)dirname);
if (!hLibintlDLL)
if (p_verbose > 0)
{
if (p_verbose > 0)
{
verbose_enter();
EMSG2(_(e_loadlib), GETTEXT_DLL);
verbose_leave();
}
return 0;
verbose_enter();
EMSG2(_(e_loadlib), GETTEXT_DLL);
verbose_leave();
}
return 0;
}
for (i = 0; libintl_entry[i].name != NULL
&& libintl_entry[i].ptr != NULL; ++i)
@@ -430,7 +451,7 @@ PlatformId(void)
* Seems like a lot of overhead to load/unload ADVAPI32.DLL each
* time we verify security...
*/
advapi_lib = LoadLibrary("ADVAPI32.DLL");
advapi_lib = vimLoadLib("ADVAPI32.DLL");
if (advapi_lib != NULL)
{
pSetNamedSecurityInfo = (PSNSECINFO)GetProcAddress(advapi_lib,
@@ -2363,7 +2384,7 @@ fname_case(
/* To avoid a slow failure append "\*" when searching a directory,
* server or network share. */
STRCPY(szTrueNameTemp, szTrueName);
slen = strlen(szTrueNameTemp);
slen = (int)strlen(szTrueNameTemp);
if (*porig == psepc && slen + 2 < _MAX_PATH)
STRCPY(szTrueNameTemp + slen, "\\*");
@@ -3164,9 +3185,10 @@ mch_system(char *cmd, int options)
* It's nicer to run a filter command in a minimized window, but in
* Windows 95 this makes the command MUCH slower. We can't do it under
* Win32s either as it stops the synchronous spawn workaround working.
* Don't activate the window to keep focus on Vim.
*/
if ((options & SHELL_DOOUT) && !mch_windows95() && !gui_is_win32s())
si.wShowWindow = SW_SHOWMINIMIZED;
si.wShowWindow = SW_SHOWMINNOACTIVE;
else
si.wShowWindow = SW_SHOWNORMAL;
si.cbReserved2 = 0;

View File

@@ -23,8 +23,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Vim(Esperanto)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-08-06 21:08+0200\n"
"PO-Revision-Date: 2010-08-06 21:34+0200\n"
"POT-Creation-Date: 2010-10-23 21:37+0200\n"
"PO-Revision-Date: 2010-10-23 21:42+0200\n"
"Last-Translator: Dominique PELLÉ <dominique.pelle@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -186,7 +186,6 @@ msgstr "Subo"
msgid "Top"
msgstr "Supro"
#, c-format
msgid ""
"\n"
"# Buffer list:\n"
@@ -854,7 +853,6 @@ msgstr "Skribas dosieron viminfo \"%s\""
msgid "# This viminfo file was generated by Vim %s.\n"
msgstr "# Tiu dosiero viminfo estis kreita de Vim %s.\n"
#, c-format
msgid ""
"# You may edit it if you're careful!\n"
"\n"
@@ -862,7 +860,6 @@ msgstr ""
"# Vi povas redakti ĝin se vi estas singarda.\n"
"\n"
#, c-format
msgid "# Value of 'encoding' when this file was written\n"
msgstr "# Valoro de 'encoding' kiam tiu dosiero estis kreita\n"
@@ -974,7 +971,6 @@ msgstr "E148: Regulesprimo mankas el global"
msgid "Pattern found in every line: %s"
msgstr "Ŝablono trovita en ĉiuj linioj: %s"
#, c-format
msgid ""
"\n"
"# Last Substitute String:\n"
@@ -2609,10 +2605,7 @@ msgid "not allowed in the Vim sandbox"
msgstr "nepermesita en sabloludejo de Vim"
msgid "E836: This Vim cannot execute :python after using :py3"
msgstr "E836: Pitono: Ne eblas uzi :py kaj :py3 en la sama seanco"
msgid "E837: This Vim cannot execute :py3 after using :python"
msgstr "E837: Pitono: Ne eblas uzi :py kaj :py3 en la sama seanco"
msgstr "E836: Vim ne povas plenumi :python post uzo de :py3"
msgid ""
"E263: Sorry, this command is disabled, the Python library could not be "
@@ -2637,6 +2630,9 @@ msgstr "nevalida atributo"
msgid "<buffer object (deleted) at %p>"
msgstr "<bufra objekto (forviŝita) ĉe %p>"
msgid "E837: This Vim cannot execute :py3 after using :python"
msgstr "E837: Vim ne povas plenumi :py3 post uzo de :python"
msgid "E265: $_ must be an instance of String"
msgstr "E265: $_ devas esti apero de Ĉeno"
@@ -3190,12 +3186,6 @@ msgstr "-display <ekrano>\tLanĉi vim sur <ekrano>"
msgid "-iconic\t\tStart vim iconified"
msgstr "-iconic\t\tLanĉi vim piktograme"
msgid "-name <name>\t\tUse resource as if vim was <name>"
msgstr "-name <nomo>\t\tUzi rimedon kvazaŭ vim estus <nomo>"
msgid "\t\t\t (Unimplemented)\n"
msgstr "\t\t\t (Nerealigita)\n"
msgid "-background <color>\tUse <color> for the background (also: -bg)"
msgstr "-background <koloro>\tUzi <koloro>-n por la fona koloro (ankaŭ: -bg)"
@@ -3322,7 +3312,6 @@ msgstr ""
"\n"
"ŝanĝo linio kol teksto"
#, c-format
msgid ""
"\n"
"# File marks:\n"
@@ -3331,7 +3320,6 @@ msgstr ""
"# Markoj de dosiero:\n"
#. Write the jumplist with -'
#, c-format
msgid ""
"\n"
"# Jumplist (newest first):\n"
@@ -3339,7 +3327,6 @@ msgstr ""
"\n"
"# Saltlisto (plej novaj unue):\n"
#, c-format
msgid ""
"\n"
"# History of marks within files (newest to oldest):\n"
@@ -4008,7 +3995,6 @@ msgstr "Vim: konservo de dosieroj...\n"
msgid "Vim: Finished.\n"
msgstr "Vim: Finita.\n"
#, c-format
msgid "ERROR: "
msgstr "ERARO: "
@@ -4110,6 +4096,9 @@ msgstr "lego el kontaktoskatolo de Netbeans"
msgid "E658: NetBeans connection lost for buffer %ld"
msgstr "E658: Konekto de NetBeans perdita por bufro %ld"
msgid "E838: netbeans is not supported with this GUI"
msgstr "E838: netbeans ne estas subtenata kun tiu grafika interfaco"
msgid "E511: netbeans already connected"
msgstr "E511: nebeans jam konektata"
@@ -5379,9 +5368,6 @@ msgstr " liniavancoj"
msgid "E395: contains argument not accepted here"
msgstr "E395: La argumento \"contains\" ne akcepteblas tie"
msgid "E396: containedin argument not accepted here"
msgstr "E396: La argumento \"containedin\" ne akcepteblas tie"
msgid "E393: group[t]here not accepted here"
msgstr "E393: La argumento \"group[t]here\" ne akcepteblas tie"

View File

@@ -15,8 +15,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Vim(Fran<61>ais)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-08-06 21:08+0200\n"
"PO-Revision-Date: 2010-08-06 21:31+0200\n"
"POT-Creation-Date: 2010-10-23 21:37+0200\n"
"PO-Revision-Date: 2010-10-23 21:41+0200\n"
"Last-Translator: Dominique Pell<6C> <dominique.pelle@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -201,7 +201,6 @@ msgstr "Bas"
msgid "Top"
msgstr "Haut"
#, c-format
msgid ""
"\n"
"# Buffer list:\n"
@@ -979,7 +978,6 @@ msgid "# This viminfo file was generated by Vim %s.\n"
msgstr "# Ce fichier viminfo a <20>t<EFBFBD> g<>n<EFBFBD>r<EFBFBD> par Vim %s.\n"
# AB - Les deux versions, bien que diff<66>rentes, se valent.
#, c-format
msgid ""
"# You may edit it if you're careful!\n"
"\n"
@@ -987,7 +985,6 @@ msgstr ""
"# Vous pouvez l'<27>diter, mais soyez prudent.\n"
"\n"
#, c-format
msgid "# Value of 'encoding' when this file was written\n"
msgstr "# 'encoding' dans lequel ce fichier a <20>t<EFBFBD> <20>crit\n"
@@ -1135,7 +1132,6 @@ msgstr "Motif trouv
# <20> internationalisation. J'attends que les deux autres messages soient
# traduisibles pour traduire celui-ci.
# DB - TODO : Qu'en est-il <20> pr<70>sent ?
#, c-format
msgid ""
"\n"
"# Last Substitute String:\n"
@@ -2828,10 +2824,8 @@ msgid "not allowed in the Vim sandbox"
msgstr "non autoris<69> dans le bac <20> sable"
msgid "E836: This Vim cannot execute :python after using :py3"
msgstr "E836: Python : impossible d'utiliser :py et :py3 dans la m<>me session"
msgid "E837: This Vim cannot execute :py3 after using :python"
msgstr "E837: Python : impossible d'utiliser :py et :py3 dans la m<>me session"
msgstr ""
"E836: Vim ne peut pas ex<65>cuter :python apr<70>s avoir utilis<69> :py3"
msgid ""
"E263: Sorry, this command is disabled, the Python library could not be "
@@ -2856,6 +2850,10 @@ msgstr "attribut invalide"
msgid "<buffer object (deleted) at %p>"
msgstr "<objet tampon (effac<61>) <20> %p>"
msgid "E837: This Vim cannot execute :py3 after using :python"
msgstr ""
"E837: Vim ne peut pas ex<65>cuter :py3 apr<70>s avoir utilis<69> :python"
msgid "E265: $_ must be an instance of String"
msgstr "E265: $_ doit <20>tre une instance de cha<68>ne (String)"
@@ -3408,12 +3406,6 @@ msgstr "-display <
msgid "-iconic\t\tStart vim iconified"
msgstr "-iconic\t\tIconifier Vim au d<>marrage"
msgid "-name <name>\t\tUse resource as if vim was <name>"
msgstr "-name <nom>\t\tEmployer les ressources comme si Vim s'appelait <nom>"
msgid "\t\t\t (Unimplemented)\n"
msgstr "\t\t\t (non impl<70>ment<6E>)\n"
msgid "-background <color>\tUse <color> for the background (also: -bg)"
msgstr ""
"-background <coul>\tUtiliser <couleur> pour l'arri<72>re-plan\t (abrv : -bg)"
@@ -3542,7 +3534,6 @@ msgstr ""
"\n"
"modif ligne col fichier/texte"
#, c-format
msgid ""
"\n"
"# File marks:\n"
@@ -3551,7 +3542,6 @@ msgstr ""
"# Marques dans le fichier :\n"
#. Write the jumplist with -'
#, c-format
msgid ""
"\n"
"# Jumplist (newest first):\n"
@@ -3559,7 +3549,6 @@ msgstr ""
"\n"
"# Liste de sauts (le plus r<>cent en premier) :\n"
#, c-format
msgid ""
"\n"
"# History of marks within files (newest to oldest):\n"
@@ -4236,7 +4225,6 @@ msgstr "Vim : pr
msgid "Vim: Finished.\n"
msgstr "Vim : Fini.\n"
#, c-format
msgid "ERROR: "
msgstr "ERREUR : "
@@ -4339,6 +4327,9 @@ msgstr "read sur la socket Netbeans"
msgid "E658: NetBeans connection lost for buffer %ld"
msgstr "E658: Connexion NetBeans perdue pour le tampon %ld"
msgid "E838: netbeans is not supported with this GUI"
msgstr "E838: netbeans n'est pas support<72> avec cette interface graphique"
msgid "E511: netbeans already connected"
msgstr "E511: netbeans d<>j<EFBFBD> connect<63>"
@@ -5624,9 +5615,6 @@ msgstr " coupures de ligne"
msgid "E395: contains argument not accepted here"
msgstr "E395: L'argument <20> contains <20> n'est pas accept<70> ici"
msgid "E396: containedin argument not accepted here"
msgstr "E396: L'argument <20> containedin <20> n'est pas accept<70> ici"
msgid "E393: group[t]here not accepted here"
msgstr "E393: L'argument <20> group[t]here <20> n'est pas accept<70> ici"

View File

@@ -6142,7 +6142,7 @@ msgid "E485: Can't read file %s"
msgstr "E485: %s 파일을 읽을 수 없습니다"
msgid "E37: No write since last change (add ! to override)"
msgstr "E37: 마지막으로 고친 뒤 저장되지 않았습니다 (덮어쓰려면 ! 더하기)"
msgstr "E37: 마지막으로 고친 뒤 저장되지 않았습니다 (무시하려면 ! 더하기)"
msgid "E38: Null argument"
msgstr "E38: 널 인자"

View File

@@ -6142,7 +6142,7 @@ msgid "E485: Can't read file %s"
msgstr "E485: %s <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>"
msgid "E37: No write since last change (add ! to override)"
msgstr "E37: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ģ <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʾҽ<CABE><D2BD>ϴ<EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ! <20><><EFBFBD>ϱ<EFBFBD>)"
msgstr "E37: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ģ <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʾҽ<CABE><D2BD>ϴ<EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD> ! <20><><EFBFBD>ϱ<EFBFBD>)"
msgid "E38: Null argument"
msgstr "E38: <20><> <20><><EFBFBD><EFBFBD>"

View File

@@ -558,8 +558,11 @@ pum_set_selected(n, repeat)
win_T *curwin_save = curwin;
int res = OK;
/* Open a preview window. 3 lines by default. */
/* Open a preview window. 3 lines by default. Prefer
* 'previewheight' if set and smaller. */
g_do_tagpreview = 3;
if (p_pvh > 0 && p_pvh < g_do_tagpreview)
g_do_tagpreview = p_pvh;
resized = prepare_tagpreview(FALSE);
g_do_tagpreview = 0;

View File

@@ -1,4 +1,5 @@
/* os_win32.c */
HINSTANCE vimLoadLib __ARGS((char *name));
int dyn_libintl_init __ARGS((char *libname));
void dyn_libintl_end __ARGS((void));
void PlatformId __ARGS((void));

View File

@@ -3432,6 +3432,7 @@ load_dummy_buffer(fname)
char_u *fname;
{
buf_T *newbuf;
buf_T *newbuf_to_wipe = NULL;
int failed = TRUE;
aco_save_T aco;
@@ -3468,15 +3469,19 @@ load_dummy_buffer(fname)
failed = FALSE;
if (curbuf != newbuf)
{
/* Bloody autocommands changed the buffer! */
if (buf_valid(newbuf))
wipe_buffer(newbuf, FALSE);
/* Bloody autocommands changed the buffer! Can happen when
* using netrw and editing a remote file. Use the current
* buffer instead, delete the dummy one after restoring the
* window stuff. */
newbuf_to_wipe = newbuf;
newbuf = curbuf;
}
}
/* restore curwin/curbuf and a few other things */
aucmd_restbuf(&aco);
if (newbuf_to_wipe != NULL && buf_valid(newbuf_to_wipe))
wipe_buffer(newbuf_to_wipe, FALSE);
}
if (!buf_valid(newbuf))

View File

@@ -27,7 +27,8 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test56.out test57.out test58.out test59.out test60.out \
test61.out test62.out test63.out test64.out test65.out \
test66.out test67.out test68.out test69.out test70.out \
test71.out test72.out test73.out test74.out
test71.out test72.out test73.out test74.out test75.out \
test76.out
.SUFFIXES: .in .out
@@ -121,3 +122,5 @@ test71.out: test71.in
test72.out: test72.in
test73.out: test73.in
test74.out: test74.in
test75.out: test75.in
test76.out: test76.in

View File

@@ -28,7 +28,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test37.out test38.out test39.out test40.out test41.out \
test42.out test52.out test65.out test66.out test67.out \
test68.out test69.out test71.out test72.out test73.out \
test74.out
test74.out test75.out test76.out
SCRIPTS32 = test50.out test70.out

View File

@@ -48,7 +48,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test37.out test38.out test39.out test40.out test41.out \
test42.out test52.out test65.out test66.out test67.out \
test68.out test69.out test71.out test72.out test73.out \
test74.out
test74.out test75.out test76.out
SCRIPTS32 = test50.out test70.out

View File

@@ -27,7 +27,8 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test56.out test57.out test58.out test59.out test60.out \
test61.out test62.out test63.out test64.out test65.out \
test66.out test67.out test68.out test69.out test70.out \
test71.out test72.out test73.out test74.out
test71.out test72.out test73.out test74.out test75.out \
test76.out
.SUFFIXES: .in .out

View File

@@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
#
# Last change: 2010 Aug 04
# Last change: 2010 Nov 10
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
@@ -74,7 +74,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test56.out test57.out test60.out \
test61.out test62.out test63.out test64.out test65.out \
test66.out test67.out test68.out test69.out \
test71.out test72.out test74.out
test71.out test72.out test74.out test75.out test76.out
# Known problems:
# Test 30: a problem around mac format - unknown reason

View File

@@ -25,7 +25,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
test59.out test60.out test61.out test62.out test63.out \
test64.out test65.out test66.out test67.out test68.out \
test69.out test70.out test71.out test72.out test73.out \
test74.out
test74.out test75.out test76.out
SCRIPTS_GUI = test16.out

View File

@@ -342,7 +342,18 @@ let l = [0, 1, 2, 3]
:$put =(d == d)
:$put =(l != deepcopy(l))
:$put =(d != deepcopy(d))
:"
:" compare complex recursively linked list and dict
:let l = []
:call add(l, l)
:let dict4 = {"l": l}
:call add(dict4.l, dict4)
:let lcopy = deepcopy(l)
:let dict4copy = deepcopy(dict4)
:$put =(l == lcopy)
:$put =(dict4 == dict4copy)
:endfun
:"
:call Test(1, 2, [3, 4], {5: 6}) " This may take a while
:"
:delfunc Test

View File

@@ -109,3 +109,5 @@ caught a:000[3]
1
0
0
1
1

46
src/testdir/test76.in Normal file
View File

@@ -0,0 +1,46 @@
Tests for completefunc/omnifunc. vim: set ft=vim :
STARTTEST
:"Test that nothing happens if the 'completefunc' opens
:"a new window (no completion, no crash)
:so small.vim
:function! DummyCompleteOne(findstart, base)
: if a:findstart
: return 0
: else
: wincmd n
: return ['onedef', 'oneDEF']
: endif
:endfunction
:setlocal completefunc=DummyCompleteOne
/^one
A:q!
:function! DummyCompleteTwo(findstart, base)
: if a:findstart
: wincmd n
: return 0
: else
: return ['twodef', 'twoDEF']
: endif
:endfunction
:setlocal completefunc=DummyCompleteTwo
/^two
A:q!
:"Test that 'completefunc' works when it's OK.
:function! DummyCompleteThree(findstart, base)
: if a:findstart
: return 0
: else
: return ['threedef', 'threeDEF']
: endif
:endfunction
:setlocal completefunc=DummyCompleteThree
/^three
A:/^+++/,/^three/w! test.out
:qa!
ENDTEST
+++
one
two
three

4
src/testdir/test76.ok Normal file
View File

@@ -0,0 +1,4 @@
+++
two
threeDEF

View File

@@ -1861,6 +1861,7 @@ u_read_undo(name, hash, orig_name)
curbuf->b_u_seq_cur = seq_cur;
curbuf->b_u_time_cur = seq_time;
curbuf->b_u_save_nr_last = last_save_nr;
curbuf->b_u_save_nr_cur = last_save_nr;
curbuf->b_u_synced = TRUE;
vim_free(uhp_table);
@@ -2794,7 +2795,7 @@ ex_undolist(eap)
uhp->uh_time);
if (uhp->uh_save_nr > 0)
{
while (STRLEN(IObuff) < 32)
while (STRLEN(IObuff) < 33)
STRCAT(IObuff, " ");
vim_snprintf_add((char *)IObuff, IOSIZE,
" %3ld", uhp->uh_save_nr);
@@ -2849,7 +2850,7 @@ ex_undolist(eap)
sort_strings((char_u **)ga.ga_data, ga.ga_len);
msg_start();
msg_puts_attr((char_u *)_("number changes time saved"),
msg_puts_attr((char_u *)_("number changes when saved"),
hl_attr(HLF_T));
for (i = 0; i < ga.ga_len && !got_int; ++i)
{
@@ -2879,7 +2880,15 @@ u_add_time(buf, buflen, tt)
if (time(NULL) - tt >= 100)
{
curtime = localtime(&tt);
(void)strftime((char *)buf, buflen, "%H:%M:%S", curtime);
if (time(NULL) - tt < (60L * 60L * 12L))
/* within 12 hours */
(void)strftime((char *)buf, buflen, "%H:%M:%S", curtime);
else if (time(NULL) - tt < (60L * 60L * 24L * 180L))
/* within 6 months */
(void)strftime((char *)buf, buflen, "%m/%d %H:%M:%S", curtime);
else
/* long ago */
(void)strftime((char *)buf, buflen, "%y/%m/%d %H:%M:%S", curtime);
}
else
#endif

View File

@@ -714,6 +714,76 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
67,
/**/
66,
/**/
65,
/**/
64,
/**/
63,
/**/
62,
/**/
61,
/**/
60,
/**/
59,
/**/
58,
/**/
57,
/**/
56,
/**/
55,
/**/
54,
/**/
53,
/**/
52,
/**/
51,
/**/
50,
/**/
49,
/**/
48,
/**/
47,
/**/
46,
/**/
45,
/**/
44,
/**/
43,
/**/
42,
/**/
41,
/**/
40,
/**/
39,
/**/
38,
/**/
37,
/**/
36,
/**/
35,
/**/
34,
/**/
33,
/**/
32,
/**/
@@ -1326,9 +1396,9 @@ do_intro_line(row, mesg, add_version, attr)
if (highest_patch())
{
/* Check for 9.9x or 9.9xx, alpha/beta version */
if (isalpha((int)mediumVersion[3]))
if (isalpha((int)vers[3]))
{
if (isalpha((int)mediumVersion[4]))
if (isalpha((int)vers[4]))
sprintf((char *)vers + 5, ".%d%s", highest_patch(),
mediumVersion + 5);
else