mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.0116
This commit is contained in:
parent
c013cb66a6
commit
027436338b
@ -1,4 +1,4 @@
|
|||||||
*editing.txt* For Vim version 7.0aa. Last change: 2005 May 21
|
*editing.txt* For Vim version 7.0aa. Last change: 2005 Jul 25
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -354,14 +354,32 @@ file1 file2") embedded spaces must be escaped with a backslash.
|
|||||||
*wildcard*
|
*wildcard*
|
||||||
Wildcards in {file} are expanded. Which wildcards are supported depends on
|
Wildcards in {file} are expanded. Which wildcards are supported depends on
|
||||||
the system. These are the common ones:
|
the system. These are the common ones:
|
||||||
* matches anything, including nothing
|
|
||||||
? matches one character
|
? matches one character
|
||||||
|
* matches anything, including nothing
|
||||||
|
** matches anything, including nothing, recurses into directories
|
||||||
[abc] match 'a', 'b' or 'c'
|
[abc] match 'a', 'b' or 'c'
|
||||||
|
|
||||||
To avoid the special meaning of the wildcards prepend a backslash. However,
|
To avoid the special meaning of the wildcards prepend a backslash. However,
|
||||||
on MS-Windows the backslash is a path separator and "path\[abc]" is still seen
|
on MS-Windows the backslash is a path separator and "path\[abc]" is still seen
|
||||||
as a wildcard when "[" is in the 'isfname' option. A simple way to avoid this
|
as a wildcard when "[" is in the 'isfname' option. A simple way to avoid this
|
||||||
is to use "path\[[]abc]". Then the file "path[abc]" literally.
|
is to use "path\[[]abc]". Then the file "path[abc]" literally.
|
||||||
|
|
||||||
|
*starstar-wildcard*
|
||||||
|
Expanding "**" is possible on Unix, Win32, Mac OS/X and a few other systems.
|
||||||
|
This allows searching a directory tree. This goes up to 100 directories deep.
|
||||||
|
Example: >
|
||||||
|
:n **/*.txt
|
||||||
|
Finds files:
|
||||||
|
ttt.txt
|
||||||
|
subdir/ttt.txt
|
||||||
|
a/b/c/d/ttt.txt
|
||||||
|
When non-wildcard characters are used these are only matched in the first
|
||||||
|
directory. Example: >
|
||||||
|
:n /usr/inc**/*.h
|
||||||
|
Finds files:
|
||||||
|
/usr/include/types.h
|
||||||
|
/usr/include/sys/types.h
|
||||||
|
/usr/inc_old/types.h
|
||||||
*backtick-expansion* *`-expansion*
|
*backtick-expansion* *`-expansion*
|
||||||
On Unix and a few other systems you can also use backticks in the file name,
|
On Unix and a few other systems you can also use backticks in the file name,
|
||||||
for example: >
|
for example: >
|
||||||
@ -1406,7 +1424,7 @@ problem goes away the next day.
|
|||||||
The file searching is currently used for the 'path', 'cdpath' and 'tags'
|
The file searching is currently used for the 'path', 'cdpath' and 'tags'
|
||||||
options. There are three different types of searching:
|
options. There are three different types of searching:
|
||||||
|
|
||||||
1) Downward search:
|
1) Downward search: *starstar*
|
||||||
Downward search uses the wildcards '*', '**' and possibly others
|
Downward search uses the wildcards '*', '**' and possibly others
|
||||||
supported by your operating system. '*' and '**' are handled inside Vim, so
|
supported by your operating system. '*' and '**' are handled inside Vim, so
|
||||||
they work on all operating systems.
|
they work on all operating systems.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*eval.txt* For Vim version 7.0aa. Last change: 2005 Jul 22
|
*eval.txt* For Vim version 7.0aa. Last change: 2005 Jul 25
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -2221,8 +2221,11 @@ expand({expr} [, {flag}]) *expand()*
|
|||||||
expanded like a file name is expanded on the command line.
|
expanded like a file name is expanded on the command line.
|
||||||
'suffixes' and 'wildignore' are used, unless the optional
|
'suffixes' and 'wildignore' are used, unless the optional
|
||||||
{flag} argument is given and it is non-zero. Names for
|
{flag} argument is given and it is non-zero. Names for
|
||||||
non-existing files are included.
|
non-existing files are included. The "**" item can be used to
|
||||||
|
search in a directory tree. For example, to find all "README"
|
||||||
|
files in the current directory and below: >
|
||||||
|
:echo expand("**/README")
|
||||||
|
<
|
||||||
Expand() can also be used to expand variables and environment
|
Expand() can also be used to expand variables and environment
|
||||||
variables that are only known in a shell. But this can be
|
variables that are only known in a shell. But this can be
|
||||||
slow, because a shell must be started. See |expr-env-expand|.
|
slow, because a shell must be started. See |expr-env-expand|.
|
||||||
@ -2708,6 +2711,11 @@ globpath({path}, {expr}) *globpath()*
|
|||||||
The 'wildignore' option applies: Names matching one of the
|
The 'wildignore' option applies: Names matching one of the
|
||||||
patterns in 'wildignore' will be skipped.
|
patterns in 'wildignore' will be skipped.
|
||||||
|
|
||||||
|
The "**" item can be used to search in a directory tree.
|
||||||
|
For example, to find all "README.txt" files in the directories
|
||||||
|
in 'runtimepath' and below: >
|
||||||
|
:echo globpath(&rtp, "**/README.txt")
|
||||||
|
<
|
||||||
*has()*
|
*has()*
|
||||||
has({feature}) The result is a Number, which is 1 if the feature {feature} is
|
has({feature}) The result is a Number, which is 1 if the feature {feature} is
|
||||||
supported, zero otherwise. The {feature} argument is a
|
supported, zero otherwise. The {feature} argument is a
|
||||||
@ -3528,8 +3536,14 @@ search({pattern} [, {flags}]) *search()*
|
|||||||
'n' do Not move the cursor
|
'n' do Not move the cursor
|
||||||
'w' wrap around the end of the file
|
'w' wrap around the end of the file
|
||||||
'W' don't wrap around the end of the file
|
'W' don't wrap around the end of the file
|
||||||
|
's' set the ' mark at the previous location of the
|
||||||
|
cursor.
|
||||||
If neither 'w' or 'W' is given, the 'wrapscan' option applies.
|
If neither 'w' or 'W' is given, the 'wrapscan' option applies.
|
||||||
|
|
||||||
|
If the 's' flag is supplied, the ' mark is set, only if the
|
||||||
|
cursor is moved. The 's' flag cannot be combined with the 'n'
|
||||||
|
flag.
|
||||||
|
|
||||||
When a match has been found its line number is returned.
|
When a match has been found its line number is returned.
|
||||||
The cursor will be positioned at the match, unless the 'n'
|
The cursor will be positioned at the match, unless the 'n'
|
||||||
flag is used).
|
flag is used).
|
||||||
|
@ -5154,6 +5154,7 @@ hebrew hebrew.txt /*hebrew*
|
|||||||
hebrew.txt hebrew.txt /*hebrew.txt*
|
hebrew.txt hebrew.txt /*hebrew.txt*
|
||||||
help various.txt /*help*
|
help various.txt /*help*
|
||||||
help-context help.txt /*help-context*
|
help-context help.txt /*help-context*
|
||||||
|
help-tags tags 1
|
||||||
help-translated various.txt /*help-translated*
|
help-translated various.txt /*help-translated*
|
||||||
help-xterm-window various.txt /*help-xterm-window*
|
help-xterm-window various.txt /*help-xterm-window*
|
||||||
help.txt help.txt /*help.txt*
|
help.txt help.txt /*help.txt*
|
||||||
@ -6328,6 +6329,8 @@ standard-plugin usr_05.txt /*standard-plugin*
|
|||||||
standard-plugin-list help.txt /*standard-plugin-list*
|
standard-plugin-list help.txt /*standard-plugin-list*
|
||||||
standout syntax.txt /*standout*
|
standout syntax.txt /*standout*
|
||||||
star pattern.txt /*star*
|
star pattern.txt /*star*
|
||||||
|
starstar editing.txt /*starstar*
|
||||||
|
starstar-wildcard editing.txt /*starstar-wildcard*
|
||||||
start-of-file pattern.txt /*start-of-file*
|
start-of-file pattern.txt /*start-of-file*
|
||||||
starting starting.txt /*starting*
|
starting starting.txt /*starting*
|
||||||
starting-amiga starting.txt /*starting-amiga*
|
starting-amiga starting.txt /*starting-amiga*
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
" Language: Wget configuration file ( /etc/wgetrc ~/.wgetrc )
|
" Language: Wget configuration file ( /etc/wgetrc ~/.wgetrc )
|
||||||
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
|
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
|
||||||
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/wget.vim
|
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/wget.vim
|
||||||
" Last Change: 2004 Nov 27
|
" Last Change: 2005 Jul 24
|
||||||
|
|
||||||
" TODO: all commands are actually underscore and hyphen insensitive, though
|
" TODO: all commands are actually underscore and hyphen insensitive, though
|
||||||
" they are normally named as listed below
|
" they are normally named as listed below
|
||||||
@ -20,26 +20,29 @@ syn match wgetComment "^\s*#.*$" contains=wgetTodo
|
|||||||
|
|
||||||
syn keyword wgetTodo TODO NOTE FIXME XXX contained
|
syn keyword wgetTodo TODO NOTE FIXME XXX contained
|
||||||
|
|
||||||
syn match wgetAssignment "^\s*[A-Za-z_-]\+\s*=\s*.*$" contains=wgetCommand,wgetAssignmentOperator,wgetString,wgetBoolean,wgetNumber,wgetValue,wgetQuota
|
syn match wgetAssignment "^\s*[A-Za-z0-9_-]\+\s*=\s*.*$" contains=wgetCommand,wgetAssignmentOperator,wgetString,wgetBoolean,wgetNumber,wgetValue,wgetQuota,wgetRestriction,wgetTime
|
||||||
|
|
||||||
syn match wgetAssignmentOperator "=" contained
|
syn match wgetAssignmentOperator "=" contained
|
||||||
|
|
||||||
syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
|
syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
|
||||||
syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
|
syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
|
||||||
|
|
||||||
" Make this a match so that always_rest matches properly
|
" Note: make this a match so that always_rest matches properly
|
||||||
syn case ignore
|
syn case ignore
|
||||||
syn match wgetBoolean "\<on\|off\|always\|never\|1\|0\>" contained
|
syn match wgetBoolean "\<on\|off\|always\|never\|1\|0\>" contained
|
||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
syn match wgetNumber "\<\d\+\|inf\>" contained
|
syn match wgetNumber "\<\d\+\|inf\>" contained
|
||||||
|
|
||||||
syn match wgetQuota "\<\d\+[kKmM]\?\>" contained
|
syn match wgetQuota "\<\d\+[kKmM]\?\>" contained
|
||||||
|
syn match wgetTime "\<\d\+[smhdw]\>" contained
|
||||||
|
|
||||||
syn case ignore
|
syn case ignore
|
||||||
syn keyword wgetValue default binary mega giga micro contained
|
syn keyword wgetValue default binary mega giga micro contained
|
||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
|
syn match wgetRestriction "\<\%(windows\|unix\)\%(,nocontrol\)\=\>" contained
|
||||||
|
syn match wgetRestriction "\<nocontrol\>" contained
|
||||||
|
|
||||||
syn case ignore
|
syn case ignore
|
||||||
syn match wgetCommand "^\s*accept" contained
|
syn match wgetCommand "^\s*accept" contained
|
||||||
syn match wgetCommand "^\s*add[-_]\=hostdir" contained
|
syn match wgetCommand "^\s*add[-_]\=hostdir" contained
|
||||||
@ -49,13 +52,21 @@ syn match wgetCommand "^\s*backup[-_]\=converted" contained
|
|||||||
syn match wgetCommand "^\s*backups" contained
|
syn match wgetCommand "^\s*backups" contained
|
||||||
syn match wgetCommand "^\s*base" contained
|
syn match wgetCommand "^\s*base" contained
|
||||||
syn match wgetCommand "^\s*bind[-_]\=address" contained
|
syn match wgetCommand "^\s*bind[-_]\=address" contained
|
||||||
|
syn match wgetCommand "^\s*ca[-_]\=certificate" contained
|
||||||
|
syn match wgetCommand "^\s*ca[-_]\=directory" contained
|
||||||
syn match wgetCommand "^\s*cache" contained
|
syn match wgetCommand "^\s*cache" contained
|
||||||
|
syn match wgetCommand "^\s*certificate" contained
|
||||||
|
syn match wgetCommand "^\s*certificate[-_]\=type" contained
|
||||||
|
syn match wgetCommand "^\s*check[-_]\=certificate" contained
|
||||||
|
syn match wgetCommand "^\s*connect[-_]\=timeout" contained
|
||||||
syn match wgetCommand "^\s*continue" contained
|
syn match wgetCommand "^\s*continue" contained
|
||||||
syn match wgetCommand "^\s*convert[-_]\=links" contained
|
syn match wgetCommand "^\s*convert[-_]\=links" contained
|
||||||
syn match wgetCommand "^\s*cookies" contained
|
syn match wgetCommand "^\s*cookies" contained
|
||||||
syn match wgetCommand "^\s*cut[-_]\=dirs" contained
|
syn match wgetCommand "^\s*cut[-_]\=dirs" contained
|
||||||
syn match wgetCommand "^\s*debug" contained
|
syn match wgetCommand "^\s*debug" contained
|
||||||
syn match wgetCommand "^\s*delete[-_]\=after" contained
|
syn match wgetCommand "^\s*delete[-_]\=after" contained
|
||||||
|
syn match wgetCommand "^\s*dns[-_]\=cache" contained
|
||||||
|
syn match wgetCommand "^\s*dns[-_]\=timeout" contained
|
||||||
syn match wgetCommand "^\s*dir[-_]\=prefix" contained
|
syn match wgetCommand "^\s*dir[-_]\=prefix" contained
|
||||||
syn match wgetCommand "^\s*dir[-_]\=struct" contained
|
syn match wgetCommand "^\s*dir[-_]\=struct" contained
|
||||||
syn match wgetCommand "^\s*domains" contained
|
syn match wgetCommand "^\s*domains" contained
|
||||||
@ -69,6 +80,8 @@ syn match wgetCommand "^\s*exclude[-_]\=domains" contained
|
|||||||
syn match wgetCommand "^\s*follow[-_]\=ftp" contained
|
syn match wgetCommand "^\s*follow[-_]\=ftp" contained
|
||||||
syn match wgetCommand "^\s*follow[-_]\=tags" contained
|
syn match wgetCommand "^\s*follow[-_]\=tags" contained
|
||||||
syn match wgetCommand "^\s*force[-_]\=html" contained
|
syn match wgetCommand "^\s*force[-_]\=html" contained
|
||||||
|
syn match wgetCommand "^\s*ftp[-_]\=passw\(or\)\=d" contained
|
||||||
|
syn match wgetCommand "^\s*ftp[-_]\=user" contained
|
||||||
syn match wgetCommand "^\s*ftp[-_]\=proxy" contained
|
syn match wgetCommand "^\s*ftp[-_]\=proxy" contained
|
||||||
syn match wgetCommand "^\s*glob" contained
|
syn match wgetCommand "^\s*glob" contained
|
||||||
syn match wgetCommand "^\s*header" contained
|
syn match wgetCommand "^\s*header" contained
|
||||||
@ -76,13 +89,17 @@ syn match wgetCommand "^\s*html[-_]\=extension" contained
|
|||||||
syn match wgetCommand "^\s*htmlify" contained
|
syn match wgetCommand "^\s*htmlify" contained
|
||||||
syn match wgetCommand "^\s*http[-_]\=keep[-_]\=alive" contained
|
syn match wgetCommand "^\s*http[-_]\=keep[-_]\=alive" contained
|
||||||
syn match wgetCommand "^\s*http[-_]\=passwd" contained
|
syn match wgetCommand "^\s*http[-_]\=passwd" contained
|
||||||
|
syn match wgetCommand "^\s*http[-_]\=password" contained
|
||||||
syn match wgetCommand "^\s*http[-_]\=proxy" contained
|
syn match wgetCommand "^\s*http[-_]\=proxy" contained
|
||||||
syn match wgetCommand "^\s*https[-_]\=proxy" contained
|
syn match wgetCommand "^\s*https[-_]\=proxy" contained
|
||||||
syn match wgetCommand "^\s*http[-_]\=user" contained
|
syn match wgetCommand "^\s*http[-_]\=user" contained
|
||||||
syn match wgetCommand "^\s*ignore[-_]\=length" contained
|
syn match wgetCommand "^\s*ignore[-_]\=length" contained
|
||||||
syn match wgetCommand "^\s*ignore[-_]\=tags" contained
|
syn match wgetCommand "^\s*ignore[-_]\=tags" contained
|
||||||
syn match wgetCommand "^\s*include[-_]\=directories" contained
|
syn match wgetCommand "^\s*include[-_]\=directories" contained
|
||||||
|
syn match wgetCommand "^\s*inet4[-_]\=only" contained
|
||||||
|
syn match wgetCommand "^\s*inet6[-_]\=only" contained
|
||||||
syn match wgetCommand "^\s*input" contained
|
syn match wgetCommand "^\s*input" contained
|
||||||
|
syn match wgetCommand "^\s*keep[-_]\=session[-_]\=cookies" contained
|
||||||
syn match wgetCommand "^\s*kill[-_]\=longer" contained
|
syn match wgetCommand "^\s*kill[-_]\=longer" contained
|
||||||
syn match wgetCommand "^\s*limit[-_]\=rate" contained
|
syn match wgetCommand "^\s*limit[-_]\=rate" contained
|
||||||
syn match wgetCommand "^\s*load[-_]\=cookies" contained
|
syn match wgetCommand "^\s*load[-_]\=cookies" contained
|
||||||
@ -99,32 +116,48 @@ syn match wgetCommand "^\s*output[-_]\=document" contained
|
|||||||
syn match wgetCommand "^\s*page[-_]\=requisites" contained
|
syn match wgetCommand "^\s*page[-_]\=requisites" contained
|
||||||
syn match wgetCommand "^\s*passive[-_]\=ftp" contained
|
syn match wgetCommand "^\s*passive[-_]\=ftp" contained
|
||||||
syn match wgetCommand "^\s*passwd" contained
|
syn match wgetCommand "^\s*passwd" contained
|
||||||
|
syn match wgetCommand "^\s*password" contained
|
||||||
|
syn match wgetCommand "^\s*post[-_]\=data" contained
|
||||||
|
syn match wgetCommand "^\s*post[-_]\=file" contained
|
||||||
|
syn match wgetCommand "^\s*prefer[-_]\=family" contained
|
||||||
|
syn match wgetCommand "^\s*preserve[-_]\=permissions" contained
|
||||||
|
syn match wgetCommand "^\s*private[-_]\=key" contained
|
||||||
|
syn match wgetCommand "^\s*private[-_]\=key[-_]\=type" contained
|
||||||
syn match wgetCommand "^\s*progress" contained
|
syn match wgetCommand "^\s*progress" contained
|
||||||
|
syn match wgetCommand "^\s*protocol[-_]\=directories" contained
|
||||||
syn match wgetCommand "^\s*proxy[-_]\=passwd" contained
|
syn match wgetCommand "^\s*proxy[-_]\=passwd" contained
|
||||||
|
syn match wgetCommand "^\s*proxy[-_]\=password" contained
|
||||||
syn match wgetCommand "^\s*proxy[-_]\=user" contained
|
syn match wgetCommand "^\s*proxy[-_]\=user" contained
|
||||||
syn match wgetCommand "^\s*quiet" contained
|
syn match wgetCommand "^\s*quiet" contained
|
||||||
syn match wgetCommand "^\s*quota" contained
|
syn match wgetCommand "^\s*quota" contained
|
||||||
|
syn match wgetCommand "^\s*random[-_]\=file" contained
|
||||||
syn match wgetCommand "^\s*random[-_]\=wait" contained
|
syn match wgetCommand "^\s*random[-_]\=wait" contained
|
||||||
|
syn match wgetCommand "^\s*read[-_]\=timeout" contained
|
||||||
syn match wgetCommand "^\s*reclevel" contained
|
syn match wgetCommand "^\s*reclevel" contained
|
||||||
syn match wgetCommand "^\s*recursive" contained
|
syn match wgetCommand "^\s*recursive" contained
|
||||||
syn match wgetCommand "^\s*referer" contained
|
syn match wgetCommand "^\s*referer" contained
|
||||||
syn match wgetCommand "^\s*reject" contained
|
syn match wgetCommand "^\s*reject" contained
|
||||||
syn match wgetCommand "^\s*relative[-_]\=only" contained
|
syn match wgetCommand "^\s*relative[-_]\=only" contained
|
||||||
syn match wgetCommand "^\s*remove[-_]\=listing" contained
|
syn match wgetCommand "^\s*remove[-_]\=listing" contained
|
||||||
|
syn match wgetCommand "^\s*restrict[-_]\=file[-_]\=names" contained
|
||||||
syn match wgetCommand "^\s*retr[-_]\=symlinks" contained
|
syn match wgetCommand "^\s*retr[-_]\=symlinks" contained
|
||||||
|
syn match wgetCommand "^\s*retry[-_]\=connrefused" contained
|
||||||
syn match wgetCommand "^\s*robots" contained
|
syn match wgetCommand "^\s*robots" contained
|
||||||
syn match wgetCommand "^\s*save[-_]\=cookies" contained
|
syn match wgetCommand "^\s*save[-_]\=cookies" contained
|
||||||
syn match wgetCommand "^\s*save[-_]\=headers" contained
|
syn match wgetCommand "^\s*save[-_]\=headers" contained
|
||||||
|
syn match wgetCommand "^\s*secure[-_]\=protocol" contained
|
||||||
syn match wgetCommand "^\s*server[-_]\=response" contained
|
syn match wgetCommand "^\s*server[-_]\=response" contained
|
||||||
" Note: this option was removed in wget 1.8
|
" Note: this option was removed in wget 1.8
|
||||||
syn match wgetCommand "^\s*simple[-_]\=host[-_]\=check" contained
|
syn match wgetCommand "^\s*simple[-_]\=host[-_]\=check" contained
|
||||||
syn match wgetCommand "^\s*span[-_]\=hosts" contained
|
syn match wgetCommand "^\s*span[-_]\=hosts" contained
|
||||||
syn match wgetCommand "^\s*spider" contained
|
syn match wgetCommand "^\s*spider" contained
|
||||||
|
syn match wgetCommand "^\s*strict[-_]\=comments" contained
|
||||||
syn match wgetCommand "^\s*sslcertfile" contained
|
syn match wgetCommand "^\s*sslcertfile" contained
|
||||||
syn match wgetCommand "^\s*sslcertkey" contained
|
syn match wgetCommand "^\s*sslcertkey" contained
|
||||||
syn match wgetCommand "^\s*timeout" contained
|
syn match wgetCommand "^\s*timeout" contained
|
||||||
syn match wgetCommand "^\s*time[-_]\=stamping" contained
|
syn match wgetCommand "^\s*time[-_]\=stamping" contained
|
||||||
syn match wgetCommand "^\s*tries" contained
|
syn match wgetCommand "^\s*tries" contained
|
||||||
|
syn match wgetCommand "^\s*user" contained
|
||||||
syn match wgetCommand "^\s*use[-_]\=proxy" contained
|
syn match wgetCommand "^\s*use[-_]\=proxy" contained
|
||||||
syn match wgetCommand "^\s*user[-_]\=agent" contained
|
syn match wgetCommand "^\s*user[-_]\=agent" contained
|
||||||
syn match wgetCommand "^\s*verbose" contained
|
syn match wgetCommand "^\s*verbose" contained
|
||||||
@ -157,3 +190,5 @@ if version >= 508 || !exists("did_wget_syn_inits")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
let b:current_syntax = "wget"
|
let b:current_syntax = "wget"
|
||||||
|
|
||||||
|
" vim: ts=8
|
||||||
|
@ -734,7 +734,8 @@ notags:
|
|||||||
- if exist tags del tags
|
- if exist tags del tags
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
- $(DEL_TREE) $(OUTDIR) auto
|
- if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR)
|
||||||
|
- if exist auto/nul $(DEL_TREE) auto
|
||||||
- if exist *.obj del *.obj
|
- if exist *.obj del *.obj
|
||||||
- if exist $(VIM).exe del $(VIM).exe
|
- if exist $(VIM).exe del $(VIM).exe
|
||||||
- if exist $(VIM).ilk del $(VIM).ilk
|
- if exist $(VIM).ilk del $(VIM).ilk
|
||||||
|
@ -8937,6 +8937,8 @@ file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
|
|||||||
case '*':
|
case '*':
|
||||||
reg_pat[i++] = '.';
|
reg_pat[i++] = '.';
|
||||||
reg_pat[i++] = '*';
|
reg_pat[i++] = '*';
|
||||||
|
while (p[1] == '*') /* "**" matches like "*" */
|
||||||
|
++p;
|
||||||
break;
|
break;
|
||||||
case '.':
|
case '.':
|
||||||
#ifdef RISCOS
|
#ifdef RISCOS
|
||||||
|
@ -1175,6 +1175,9 @@ gui_position_components(total_width)
|
|||||||
--hold_gui_events;
|
--hold_gui_events;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get the width of the widgets and decorations to the side of the text area.
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
gui_get_base_width()
|
gui_get_base_width()
|
||||||
{
|
{
|
||||||
@ -1188,6 +1191,9 @@ gui_get_base_width()
|
|||||||
return base_width;
|
return base_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get the height of the widgets and decorations above and below the text area.
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
gui_get_base_height()
|
gui_get_base_height()
|
||||||
{
|
{
|
||||||
@ -1331,6 +1337,8 @@ gui_get_shellsize()
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the size of the Vim shell according to Rows and Columns.
|
* Set the size of the Vim shell according to Rows and Columns.
|
||||||
|
* If "fit_to_display" is TRUE then the size may be reduced to fit the window
|
||||||
|
* on the screen.
|
||||||
*/
|
*/
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
void
|
void
|
||||||
|
@ -318,8 +318,9 @@ typedef struct Gui
|
|||||||
scrollbar_T bottom_sbar; /* Bottom scrollbar */
|
scrollbar_T bottom_sbar; /* Bottom scrollbar */
|
||||||
int which_scrollbars[3];/* Which scrollbar boxes are active? */
|
int which_scrollbars[3];/* Which scrollbar boxes are active? */
|
||||||
int prev_wrap; /* For updating the horizontal scrollbar */
|
int prev_wrap; /* For updating the horizontal scrollbar */
|
||||||
int char_width; /* Width of char in pixels */
|
int char_width; /* Width of char cell in pixels */
|
||||||
int char_height; /* Height of char in pixels + 'linespace' */
|
int char_height; /* Height of char cell in pixels, includes
|
||||||
|
'linespace' */
|
||||||
int char_ascent; /* Ascent of char in pixels */
|
int char_ascent; /* Ascent of char in pixels */
|
||||||
int border_width; /* Width of our border around text area */
|
int border_width; /* Width of our border around text area */
|
||||||
int border_offset; /* Total pixel offset for all borders */
|
int border_offset; /* Total pixel offset for all borders */
|
||||||
|
@ -1412,8 +1412,11 @@ mch_set_mouse_shape (int shape)//{{{
|
|||||||
}//}}}
|
}//}}}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Adjust gui.char_height (after 'linespace' was changed).
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
gui_mch_adjust_charsize ()//{{{
|
gui_mch_adjust_charheight ()//{{{
|
||||||
{
|
{
|
||||||
QFont f(*(gui.current_font));
|
QFont f(*(gui.current_font));
|
||||||
QFontMetrics fm(f);
|
QFontMetrics fm(f);
|
||||||
|
@ -3936,8 +3936,11 @@ gui_mch_init_font(font_name, fontset)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Adjust gui.char_height (after 'linespace' was changed).
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
gui_mch_adjust_charsize()
|
gui_mch_adjust_charheight()
|
||||||
{
|
{
|
||||||
FontInfo font_info;
|
FontInfo font_info;
|
||||||
|
|
||||||
@ -4092,19 +4095,6 @@ gui_mch_set_font(font)
|
|||||||
TextFont(font & 0xFFFF);
|
TextFont(font & 0xFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* not used */
|
|
||||||
/*
|
|
||||||
* Return TRUE if the two fonts given are equivalent.
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
gui_mch_same_font(f1, f2)
|
|
||||||
GuiFont f1;
|
|
||||||
GuiFont f2;
|
|
||||||
{
|
|
||||||
return f1 == f2;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If a font is not going to be used, free its structure.
|
* If a font is not going to be used, free its structure.
|
||||||
*/
|
*/
|
||||||
@ -5107,10 +5097,7 @@ gui_mch_enable_menu(flag)
|
|||||||
int flag;
|
int flag;
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Menu is always active in itself
|
* Menu is always active.
|
||||||
* (maybe we should only disable a vim menu
|
|
||||||
* and keep standard menu)
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5122,9 +5109,7 @@ gui_mch_set_menu_pos(x, y, w, h)
|
|||||||
int h;
|
int h;
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* The menu is always at the top of the screen
|
* The menu is always at the top of the screen.
|
||||||
* Maybe a futur version will permit a menu in the window
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3004,8 +3004,11 @@ gui_mch_init_font(char_u *vim_font_name, int fontset)
|
|||||||
return( OK );
|
return( OK );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Adjust gui.char_height (after 'linespace' was changed).
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
gui_mch_adjust_charsize(void)
|
gui_mch_adjust_charheight(void)
|
||||||
{
|
{
|
||||||
FontQueryInfo info;
|
FontQueryInfo info;
|
||||||
|
|
||||||
|
@ -1022,8 +1022,11 @@ gui_mch_init_font(char_u *font_name, int fontset)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Adjust gui.char_height (after 'linespace' was changed).
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
gui_mch_adjust_charsize()
|
gui_mch_adjust_charheight()
|
||||||
{
|
{
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
@ -1083,17 +1086,6 @@ gui_mch_set_font(GuiFont font)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* not used */
|
|
||||||
/*
|
|
||||||
* Return TRUE if the two fonts given are equivalent.
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
gui_mch_same_font(GuiFont f1, GuiFont f2)
|
|
||||||
{
|
|
||||||
return f1 == f2;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If a font is not going to be used, free its structure.
|
* If a font is not going to be used, free its structure.
|
||||||
*/
|
*/
|
||||||
|
@ -1113,7 +1113,6 @@ gui_mch_set_text_area_pos(int x, int y, int w, int h)
|
|||||||
oldx = x;
|
oldx = x;
|
||||||
oldy = y;
|
oldy = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1141,7 +1140,8 @@ gui_mch_set_scrollbar_pos(
|
|||||||
int w,
|
int w,
|
||||||
int h)
|
int h)
|
||||||
{
|
{
|
||||||
SetWindowPos(sb->id, NULL, x, y, w, h, SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW);
|
SetWindowPos(sb->id, NULL, x, y, w, h,
|
||||||
|
SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1203,8 +1203,11 @@ GetFontSize(GuiFont font)
|
|||||||
ReleaseDC(hwnd, hdc);
|
ReleaseDC(hwnd, hdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Adjust gui.char_height (after 'linespace' was changed).
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
gui_mch_adjust_charsize(void)
|
gui_mch_adjust_charheight(void)
|
||||||
{
|
{
|
||||||
GetFontSize(gui.norm_font);
|
GetFontSize(gui.norm_font);
|
||||||
return OK;
|
return OK;
|
||||||
|
@ -7107,7 +7107,9 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags)
|
|||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
else if (pp == &p_linespace)
|
else if (pp == &p_linespace)
|
||||||
{
|
{
|
||||||
if (gui.in_use && gui_mch_adjust_charsize() == OK)
|
/* Recompute gui.char_height and resize the Vim window to keep the
|
||||||
|
* same number of lines. */
|
||||||
|
if (gui.in_use && gui_mch_adjust_charheight() == OK)
|
||||||
gui_set_shellsize(FALSE, FALSE);
|
gui_set_shellsize(FALSE, FALSE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
167
src/os_mac.c
167
src/os_mac.c
@ -55,7 +55,7 @@ mch_chdir(char *p_name)
|
|||||||
* in `path'. Called by mch_expandpath().
|
* in `path'. Called by mch_expandpath().
|
||||||
* "path" has backslashes before chars that are not to be expanded.
|
* "path" has backslashes before chars that are not to be expanded.
|
||||||
*/
|
*/
|
||||||
int
|
static int
|
||||||
mac_expandpath(
|
mac_expandpath(
|
||||||
garray_T *gap,
|
garray_T *gap,
|
||||||
char_u *path,
|
char_u *path,
|
||||||
@ -109,7 +109,6 @@ mac_expandpath(
|
|||||||
{
|
{
|
||||||
if (e)
|
if (e)
|
||||||
break;
|
break;
|
||||||
else
|
|
||||||
s = p + 1;
|
s = p + 1;
|
||||||
}
|
}
|
||||||
/* should use WILCARDLIST but what about ` */
|
/* should use WILCARDLIST but what about ` */
|
||||||
@ -134,12 +133,10 @@ mac_expandpath(
|
|||||||
/* now we have one wildcard component between s and e */
|
/* now we have one wildcard component between s and e */
|
||||||
*e = NUL;
|
*e = NUL;
|
||||||
|
|
||||||
#if 1
|
|
||||||
dany = *s;
|
dany = *s;
|
||||||
*s = NUL;
|
*s = NUL;
|
||||||
backslash_halve(buf);
|
backslash_halve(buf);
|
||||||
*s = dany;
|
*s = dany;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* convert the file pattern to a regexp pattern */
|
/* convert the file pattern to a regexp pattern */
|
||||||
pat = file_pat_to_reg_pat(s, e, NULL, FALSE);
|
pat = file_pat_to_reg_pat(s, e, NULL, FALSE);
|
||||||
@ -237,12 +234,14 @@ mac_expandpath(
|
|||||||
addfile(gap, buf, flags);
|
addfile(gap, buf, flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if 0 /* What is this supposed to do? */
|
||||||
if ((gMyCPB.hFileInfo.ioFlAttrib & ioDirMask) != 0)
|
if ((gMyCPB.hFileInfo.ioFlAttrib & ioDirMask) != 0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
@ -291,164 +290,6 @@ mac_expandpath(
|
|||||||
return gap->ga_len - start_len;
|
return gap->ga_len - start_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_UNIXFILENAME
|
|
||||||
static int
|
|
||||||
pstrcmp(a, b)
|
|
||||||
const void *a, *b;
|
|
||||||
{
|
|
||||||
return (pathcmp(*(char **)a, *(char **)b, -1));
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
unix_expandpath(gap, path, wildoff, flags)
|
|
||||||
garray_T *gap;
|
|
||||||
char_u *path;
|
|
||||||
int wildoff;
|
|
||||||
int flags; /* EW_* flags */
|
|
||||||
{
|
|
||||||
char_u *buf;
|
|
||||||
char_u *path_end;
|
|
||||||
char_u *p, *s, *e;
|
|
||||||
int start_len, c;
|
|
||||||
char_u *pat;
|
|
||||||
DIR *dirp;
|
|
||||||
regmatch_T regmatch;
|
|
||||||
struct dirent *dp;
|
|
||||||
int starts_with_dot;
|
|
||||||
int matches;
|
|
||||||
int len;
|
|
||||||
|
|
||||||
start_len = gap->ga_len;
|
|
||||||
buf = alloc(STRLEN(path) + BASENAMELEN + 5);/* make room for file name */
|
|
||||||
if (buf == NULL)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Find the first part in the path name that contains a wildcard.
|
|
||||||
* Copy it into buf, including the preceding characters.
|
|
||||||
*/
|
|
||||||
p = buf;
|
|
||||||
s = buf;
|
|
||||||
e = NULL;
|
|
||||||
path_end = path;
|
|
||||||
while (*path_end)
|
|
||||||
{
|
|
||||||
/* May ignore a wildcard that has a backslash before it */
|
|
||||||
if (path_end >= path + wildoff && rem_backslash(path_end))
|
|
||||||
*p++ = *path_end++;
|
|
||||||
else if (*path_end == '/')
|
|
||||||
{
|
|
||||||
if (e != NULL)
|
|
||||||
break;
|
|
||||||
else
|
|
||||||
s = p + 1;
|
|
||||||
}
|
|
||||||
else if (vim_strchr((char_u *)"*?[{~$", *path_end) != NULL)
|
|
||||||
e = p;
|
|
||||||
#ifdef FEAT_MBYTE
|
|
||||||
if (has_mbyte)
|
|
||||||
{
|
|
||||||
len = (*mb_ptr2len_check)(path_end);
|
|
||||||
STRNCPY(p, path_end, len);
|
|
||||||
p += len;
|
|
||||||
path_end += len;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
*p++ = *path_end++;
|
|
||||||
}
|
|
||||||
e = p;
|
|
||||||
*e = NUL;
|
|
||||||
|
|
||||||
/* now we have one wildcard component between s and e */
|
|
||||||
/* Remove backslashes between "wildoff" and the start of the wildcard
|
|
||||||
* component. */
|
|
||||||
for (p = buf + wildoff; p < s; ++p)
|
|
||||||
if (rem_backslash(p))
|
|
||||||
{
|
|
||||||
STRCPY(p, p + 1);
|
|
||||||
--e;
|
|
||||||
--s;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* convert the file pattern to a regexp pattern */
|
|
||||||
starts_with_dot = (*s == '.');
|
|
||||||
pat = file_pat_to_reg_pat(s, e, NULL, FALSE);
|
|
||||||
if (pat == NULL)
|
|
||||||
{
|
|
||||||
vim_free(buf);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* compile the regexp into a program */
|
|
||||||
#ifdef MACOS_X
|
|
||||||
/* We want to behave like Terminal.app */
|
|
||||||
regmatch.rm_ic = TRUE;
|
|
||||||
#else
|
|
||||||
regmatch.rm_ic = FALSE; /* Don't ever ignore case */
|
|
||||||
#endif
|
|
||||||
regmatch.regprog = vim_regcomp(pat, RE_MAGIC);
|
|
||||||
vim_free(pat);
|
|
||||||
|
|
||||||
if (regmatch.regprog == NULL)
|
|
||||||
{
|
|
||||||
vim_free(buf);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* open the directory for scanning */
|
|
||||||
c = *s;
|
|
||||||
*s = NUL;
|
|
||||||
dirp = opendir(*buf == NUL ? "." : (char *)buf);
|
|
||||||
*s = c;
|
|
||||||
|
|
||||||
/* Find all matching entries */
|
|
||||||
if (dirp != NULL)
|
|
||||||
{
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
dp = readdir(dirp);
|
|
||||||
if (dp == NULL)
|
|
||||||
break;
|
|
||||||
if ((dp->d_name[0] != '.' || starts_with_dot)
|
|
||||||
&& vim_regexec(®match, (char_u *)dp->d_name, (colnr_T)0))
|
|
||||||
{
|
|
||||||
STRCPY(s, dp->d_name);
|
|
||||||
len = STRLEN(buf);
|
|
||||||
STRCPY(buf + len, path_end);
|
|
||||||
if (mch_has_exp_wildcard(path_end)) /* handle more wildcards */
|
|
||||||
{
|
|
||||||
/* need to expand another component of the path */
|
|
||||||
/* remove backslashes for the remaining components only */
|
|
||||||
(void)unix_expandpath(gap, buf, len + 1, flags);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* no more wildcards, check if there is a match */
|
|
||||||
/* remove backslashes for the remaining components only */
|
|
||||||
if (*path_end)
|
|
||||||
backslash_halve(buf + len + 1);
|
|
||||||
if (mch_getperm(buf) >= 0) /* add existing file */
|
|
||||||
addfile(gap, buf, flags);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
closedir(dirp);
|
|
||||||
}
|
|
||||||
|
|
||||||
vim_free(buf);
|
|
||||||
vim_free(regmatch.regprog);
|
|
||||||
|
|
||||||
matches = gap->ga_len - start_len;
|
|
||||||
if (matches)
|
|
||||||
qsort(((char_u **)gap->ga_data) + start_len, matches,
|
|
||||||
sizeof(char_u *), pstrcmp);
|
|
||||||
return matches;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recursively build up a list of files in "gap" matching the first wildcard
|
* Recursively build up a list of files in "gap" matching the first wildcard
|
||||||
* in `path'. Called by expand_wildcards().
|
* in `path'. Called by expand_wildcards().
|
||||||
@ -461,7 +302,7 @@ mch_expandpath(
|
|||||||
int flags) /* EW_* flags */
|
int flags) /* EW_* flags */
|
||||||
{
|
{
|
||||||
#ifdef USE_UNIXFILENAME
|
#ifdef USE_UNIXFILENAME
|
||||||
return unix_expandpath(gap, path, 0, flags);
|
return unix_expandpath(gap, path, 0, flags, FALSE);
|
||||||
#else
|
#else
|
||||||
char_u first = *path;
|
char_u first = *path;
|
||||||
short scan_volume;
|
short scan_volume;
|
||||||
|
180
src/os_unix.c
180
src/os_unix.c
@ -174,8 +174,6 @@ static int have_dollars __ARGS((int, char_u **));
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_EXPANDPATH
|
#ifndef NO_EXPANDPATH
|
||||||
static int pstrcmp __ARGS((const void *, const void *));
|
|
||||||
static int unix_expandpath __ARGS((garray_T *gap, char_u *path, int wildoff, int flags));
|
|
||||||
# if defined(MACOS_X) && defined(FEAT_MBYTE)
|
# if defined(MACOS_X) && defined(FEAT_MBYTE)
|
||||||
extern char_u *mac_precompose_path __ARGS((char_u *decompPath, size_t decompLen, size_t *precompLen));
|
extern char_u *mac_precompose_path __ARGS((char_u *decompPath, size_t decompLen, size_t *precompLen));
|
||||||
# endif
|
# endif
|
||||||
@ -4735,19 +4733,11 @@ RealWaitForChar(fd, msec, check_for_gpm)
|
|||||||
#ifndef VMS
|
#ifndef VMS
|
||||||
|
|
||||||
#ifndef NO_EXPANDPATH
|
#ifndef NO_EXPANDPATH
|
||||||
static int
|
|
||||||
pstrcmp(a, b)
|
|
||||||
const void *a, *b;
|
|
||||||
{
|
|
||||||
return (pathcmp(*(char **)a, *(char **)b, -1));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recursively expand one path component into all matching files and/or
|
* Expand a path into all matching files and/or directories. Handles "*",
|
||||||
* directories.
|
* "?", "[a-z]", "**", etc.
|
||||||
* "path" has backslashes before chars that are not to be expanded, starting
|
* "path" has backslashes before chars that are not to be expanded.
|
||||||
* at "path + wildoff".
|
* Returns the number of matches found.
|
||||||
* Return the number of matches found.
|
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
mch_expandpath(gap, path, flags)
|
mch_expandpath(gap, path, flags)
|
||||||
@ -4755,167 +4745,7 @@ mch_expandpath(gap, path, flags)
|
|||||||
char_u *path;
|
char_u *path;
|
||||||
int flags; /* EW_* flags */
|
int flags; /* EW_* flags */
|
||||||
{
|
{
|
||||||
return unix_expandpath(gap, path, 0, flags);
|
return unix_expandpath(gap, path, 0, flags, FALSE);
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
unix_expandpath(gap, path, wildoff, flags)
|
|
||||||
garray_T *gap;
|
|
||||||
char_u *path;
|
|
||||||
int wildoff;
|
|
||||||
int flags; /* EW_* flags */
|
|
||||||
{
|
|
||||||
char_u *buf;
|
|
||||||
char_u *path_end;
|
|
||||||
char_u *p, *s, *e;
|
|
||||||
int start_len, c;
|
|
||||||
char_u *pat;
|
|
||||||
DIR *dirp;
|
|
||||||
regmatch_T regmatch;
|
|
||||||
struct dirent *dp;
|
|
||||||
int starts_with_dot;
|
|
||||||
int matches;
|
|
||||||
int len;
|
|
||||||
|
|
||||||
start_len = gap->ga_len;
|
|
||||||
buf = alloc(STRLEN(path) + BASENAMELEN + 5);/* make room for file name */
|
|
||||||
if (buf == NULL)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Find the first part in the path name that contains a wildcard.
|
|
||||||
* Copy it into buf, including the preceding characters.
|
|
||||||
*/
|
|
||||||
p = buf;
|
|
||||||
s = buf;
|
|
||||||
e = NULL;
|
|
||||||
path_end = path;
|
|
||||||
while (*path_end != NUL)
|
|
||||||
{
|
|
||||||
/* May ignore a wildcard that has a backslash before it; it will
|
|
||||||
* be removed by rem_backslash() or file_pat_to_reg_pat() below. */
|
|
||||||
if (path_end >= path + wildoff && rem_backslash(path_end))
|
|
||||||
*p++ = *path_end++;
|
|
||||||
else if (*path_end == '/')
|
|
||||||
{
|
|
||||||
if (e != NULL)
|
|
||||||
break;
|
|
||||||
s = p + 1;
|
|
||||||
}
|
|
||||||
else if (path_end >= path + wildoff
|
|
||||||
&& vim_strchr((char_u *)"*?[{~$", *path_end) != NULL)
|
|
||||||
e = p;
|
|
||||||
#ifdef FEAT_MBYTE
|
|
||||||
if (has_mbyte)
|
|
||||||
{
|
|
||||||
len = (*mb_ptr2len_check)(path_end);
|
|
||||||
STRNCPY(p, path_end, len);
|
|
||||||
p += len;
|
|
||||||
path_end += len;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
*p++ = *path_end++;
|
|
||||||
}
|
|
||||||
e = p;
|
|
||||||
*e = NUL;
|
|
||||||
|
|
||||||
/* now we have one wildcard component between s and e */
|
|
||||||
/* Remove backslashes between "wildoff" and the start of the wildcard
|
|
||||||
* component. */
|
|
||||||
for (p = buf + wildoff; p < s; ++p)
|
|
||||||
if (rem_backslash(p))
|
|
||||||
{
|
|
||||||
STRCPY(p, p + 1);
|
|
||||||
--e;
|
|
||||||
--s;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* convert the file pattern to a regexp pattern */
|
|
||||||
starts_with_dot = (*s == '.');
|
|
||||||
pat = file_pat_to_reg_pat(s, e, NULL, FALSE);
|
|
||||||
if (pat == NULL)
|
|
||||||
{
|
|
||||||
vim_free(buf);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* compile the regexp into a program */
|
|
||||||
#ifdef MACOS_X /* Can/Should we use CASE_INSENSITIVE_FILENAME instead ?*/
|
|
||||||
regmatch.rm_ic = TRUE; /* Behave like Terminal.app */
|
|
||||||
#else
|
|
||||||
regmatch.rm_ic = FALSE; /* Don't ever ignore case */
|
|
||||||
#endif
|
|
||||||
regmatch.regprog = vim_regcomp(pat, RE_MAGIC);
|
|
||||||
vim_free(pat);
|
|
||||||
|
|
||||||
if (regmatch.regprog == NULL)
|
|
||||||
{
|
|
||||||
vim_free(buf);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* open the directory for scanning */
|
|
||||||
c = *s;
|
|
||||||
*s = NUL;
|
|
||||||
dirp = opendir(*buf == NUL ? "." : (char *)buf);
|
|
||||||
*s = c;
|
|
||||||
|
|
||||||
/* Find all matching entries */
|
|
||||||
if (dirp != NULL)
|
|
||||||
{
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
dp = readdir(dirp);
|
|
||||||
if (dp == NULL)
|
|
||||||
break;
|
|
||||||
if ((dp->d_name[0] != '.' || starts_with_dot)
|
|
||||||
&& vim_regexec(®match, (char_u *)dp->d_name, (colnr_T)0))
|
|
||||||
{
|
|
||||||
STRCPY(s, dp->d_name);
|
|
||||||
len = STRLEN(buf);
|
|
||||||
STRCPY(buf + len, path_end);
|
|
||||||
if (mch_has_exp_wildcard(path_end)) /* handle more wildcards */
|
|
||||||
{
|
|
||||||
/* need to expand another component of the path */
|
|
||||||
/* remove backslashes for the remaining components only */
|
|
||||||
(void)unix_expandpath(gap, buf, len + 1, flags);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* no more wildcards, check if there is a match */
|
|
||||||
/* remove backslashes for the remaining components only */
|
|
||||||
if (*path_end != NUL)
|
|
||||||
backslash_halve(buf + len + 1);
|
|
||||||
if (mch_getperm(buf) >= 0) /* add existing file */
|
|
||||||
{
|
|
||||||
#if defined(MACOS_X) && defined(FEAT_MBYTE)
|
|
||||||
size_t precomp_len = STRLEN(buf)+1;
|
|
||||||
char_u *precomp_buf =
|
|
||||||
mac_precompose_path(buf, precomp_len, &precomp_len);
|
|
||||||
if (precomp_buf)
|
|
||||||
{
|
|
||||||
mch_memmove(buf, precomp_buf, precomp_len);
|
|
||||||
vim_free(precomp_buf);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
addfile(gap, buf, flags);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
closedir(dirp);
|
|
||||||
}
|
|
||||||
|
|
||||||
vim_free(buf);
|
|
||||||
vim_free(regmatch.regprog);
|
|
||||||
|
|
||||||
matches = gap->ga_len - start_len;
|
|
||||||
if (matches > 0)
|
|
||||||
qsort(((char_u **)gap->ga_data) + start_len, matches,
|
|
||||||
sizeof(char_u *), pstrcmp);
|
|
||||||
return matches;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h));
|
|||||||
void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
|
void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
|
||||||
void gui_mch_enable_menu __ARGS((int showit));
|
void gui_mch_enable_menu __ARGS((int showit));
|
||||||
void gui_mch_show_toolbar __ARGS((int showit));
|
void gui_mch_show_toolbar __ARGS((int showit));
|
||||||
int gui_mch_adjust_charsize __ARGS((void));
|
int gui_mch_adjust_charheight __ARGS((void));
|
||||||
GuiFontset gui_mch_get_fontset __ARGS((char_u *name, int report_error, int fixed_width));
|
GuiFontset gui_mch_get_fontset __ARGS((char_u *name, int report_error, int fixed_width));
|
||||||
char_u *gui_mch_font_dialog __ARGS((char_u *oldval));
|
char_u *gui_mch_font_dialog __ARGS((char_u *oldval));
|
||||||
int gui_mch_init_font __ARGS((char_u *font_name, int fontset));
|
int gui_mch_init_font __ARGS((char_u *font_name, int fontset));
|
||||||
|
@ -14,7 +14,7 @@ void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min
|
|||||||
void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h));
|
void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h));
|
||||||
void gui_mch_enable_menu __ARGS((int flag));
|
void gui_mch_enable_menu __ARGS((int flag));
|
||||||
void gui_mch_show_toolbar __ARGS((int showit));
|
void gui_mch_show_toolbar __ARGS((int showit));
|
||||||
int gui_mch_adjust_charsize __ARGS((void));
|
int gui_mch_adjust_charheight __ARGS((void));
|
||||||
GuiFontset gui_mch_get_fontset __ARGS((char_u *name, int report_error, int fixed_width));
|
GuiFontset gui_mch_get_fontset __ARGS((char_u *name, int report_error, int fixed_width));
|
||||||
int gui_mch_init_font __ARGS((char_u *font_name, int fontset));
|
int gui_mch_init_font __ARGS((char_u *font_name, int fontset));
|
||||||
GuiFont gui_mch_get_font __ARGS((char_u *name, int report_error));
|
GuiFont gui_mch_get_font __ARGS((char_u *name, int report_error));
|
||||||
|
@ -36,7 +36,7 @@ void gui_mch_set_scrollbar_thumb __ARGS((scrollbar_T *sb, long val, long size, l
|
|||||||
void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h));
|
void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h));
|
||||||
void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient));
|
void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient));
|
||||||
void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb));
|
void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb));
|
||||||
int gui_mch_adjust_charsize __ARGS((void));
|
int gui_mch_adjust_charheight __ARGS((void));
|
||||||
int gui_mch_init_font __ARGS((char_u *font_name, int fontset));
|
int gui_mch_init_font __ARGS((char_u *font_name, int fontset));
|
||||||
GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing));
|
GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing));
|
||||||
char_u *gui_mch_get_fontname __ARGS((GuiFont font, char_u *name));
|
char_u *gui_mch_get_fontname __ARGS((GuiFont font, char_u *name));
|
||||||
|
@ -59,7 +59,7 @@ void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu));
|
|||||||
void gui_mch_toggle_tearoffs __ARGS((int enable));
|
void gui_mch_toggle_tearoffs __ARGS((int enable));
|
||||||
void gui_mch_show_toolbar __ARGS((int showit));
|
void gui_mch_show_toolbar __ARGS((int showit));
|
||||||
int gui_mch_init_font __ARGS((char_u *vim_font_name, int fontset));
|
int gui_mch_init_font __ARGS((char_u *vim_font_name, int fontset));
|
||||||
int gui_mch_adjust_charsize __ARGS((void));
|
int gui_mch_adjust_charheight __ARGS((void));
|
||||||
GuiFont gui_mch_get_font __ARGS((char_u *vim_font_name, int report_error));
|
GuiFont gui_mch_get_font __ARGS((char_u *vim_font_name, int report_error));
|
||||||
char_u *gui_mch_get_fontname __ARGS((GuiFont font, char_u *name));
|
char_u *gui_mch_get_fontname __ARGS((GuiFont font, char_u *name));
|
||||||
void gui_mch_set_font __ARGS((GuiFont font));
|
void gui_mch_set_font __ARGS((GuiFont font));
|
||||||
|
@ -12,7 +12,7 @@ void gui_mch_set_text_area_pos __ARGS((int x, int y, int w, int h));
|
|||||||
void gui_mch_enable_scrollbar __ARGS((scrollbar_T *sb, int flag));
|
void gui_mch_enable_scrollbar __ARGS((scrollbar_T *sb, int flag));
|
||||||
void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h));
|
void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h));
|
||||||
void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient));
|
void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient));
|
||||||
int gui_mch_adjust_charsize __ARGS((void));
|
int gui_mch_adjust_charheight __ARGS((void));
|
||||||
GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing));
|
GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing));
|
||||||
char_u *gui_mch_get_fontname __ARGS((GuiFont font, char_u *name));
|
char_u *gui_mch_get_fontname __ARGS((GuiFont font, char_u *name));
|
||||||
void gui_mch_free_font __ARGS((GuiFont font));
|
void gui_mch_free_font __ARGS((GuiFont font));
|
||||||
|
@ -12,7 +12,7 @@ void gui_mch_set_text_area_pos __ARGS((int x, int y, int w, int h));
|
|||||||
void gui_mch_enable_scrollbar __ARGS((scrollbar_T *sb, int flag));
|
void gui_mch_enable_scrollbar __ARGS((scrollbar_T *sb, int flag));
|
||||||
void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h));
|
void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h));
|
||||||
void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient));
|
void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient));
|
||||||
int gui_mch_adjust_charsize __ARGS((void));
|
int gui_mch_adjust_charheight __ARGS((void));
|
||||||
GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing));
|
GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing));
|
||||||
char_u *gui_mch_get_fontname __ARGS((GuiFont font, char_u *name));
|
char_u *gui_mch_get_fontname __ARGS((GuiFont font, char_u *name));
|
||||||
void gui_mch_free_font __ARGS((GuiFont font));
|
void gui_mch_free_font __ARGS((GuiFont font));
|
||||||
|
@ -36,7 +36,6 @@ int stat __ARGS((char *p, struct stat *p_st));
|
|||||||
int mch_call_shell __ARGS((char_u *cmd, int options));
|
int mch_call_shell __ARGS((char_u *cmd, int options));
|
||||||
int mch_has_wildcard __ARGS((char_u *s));
|
int mch_has_wildcard __ARGS((char_u *s));
|
||||||
int mch_expandpath __ARGS((struct growarray *gap, char_u *path, int flags));
|
int mch_expandpath __ARGS((struct growarray *gap, char_u *path, int flags));
|
||||||
int mac_expandpath __ARGS((struct growarray *gap, char_u *path, int flags, short start_at, short as_full));
|
|
||||||
/*int vim_chdir __ARGS((char *path));*/
|
/*int vim_chdir __ARGS((char *path));*/
|
||||||
void mch_delay __ARGS((long msec, int ignoreinput));
|
void mch_delay __ARGS((long msec, int ignoreinput));
|
||||||
void mch_breakcheck __ARGS((void));
|
void mch_breakcheck __ARGS((void));
|
||||||
|
@ -36,5 +36,5 @@
|
|||||||
#define VIM_VERSION_NODOT "vim70aa"
|
#define VIM_VERSION_NODOT "vim70aa"
|
||||||
#define VIM_VERSION_SHORT "7.0aa"
|
#define VIM_VERSION_SHORT "7.0aa"
|
||||||
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
|
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
|
||||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jul 24)"
|
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jul 25)"
|
||||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jul 24, compiled "
|
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jul 25, compiled "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user