1
0
forked from aniani/vim

updated for version 7.0181

This commit is contained in:
Bram Moolenaar 2006-01-14 21:18:42 +00:00
parent ea8bd73212
commit 316059c019
4 changed files with 46 additions and 44 deletions

View File

@ -1602,7 +1602,6 @@ xxd/xxd$(EXEEXT): xxd/xxd.c
# Generate the converted .mo files separately, it's no problem if this fails. # Generate the converted .mo files separately, it's no problem if this fails.
languages: languages:
@if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \ @if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
$(MAKE) language-check; \
cd $(PODIR); \ cd $(PODIR); \
CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix); \ CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix); \
fi fi
@ -1610,11 +1609,6 @@ languages:
cd $(PODIR); CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix) converted; \ cd $(PODIR); CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix) converted; \
fi fi
# Separate target to check the po files for valitidy, because it depends on
# ./vim.
language-check: $(VIMTARGET)
cd $(PODIR); $(MAKE) check VIM=../$(VIMTARGET)
# Update the *.po files for changes in the sources. Only run manually. # Update the *.po files for changes in the sources. Only run manually.
update-po: update-po:
cd $(PODIR); CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix) update-po cd $(PODIR); CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix) update-po
@ -1706,9 +1700,15 @@ types.vim: $(TAGS_SRC) $(TAGS_INCL)
test check: test check:
$(MAKE) -f Makefile $(VIMTARGET) $(MAKE) -f Makefile $(VIMTARGET)
cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG)
@if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
cd $(PODIR); $(MAKE) -f Makefile check VIM=../$(VIMTARGET); \
fi
testclean: testclean:
cd testdir; $(MAKE) -f Makefile clean cd testdir; $(MAKE) -f Makefile clean
if test -d $(PODIR); then \
cd $(PODIR); $(MAKE) checkclean; \
fi
# #
# Avoid overwriting an existing executable, somebody might be running it and # Avoid overwriting an existing executable, somebody might be running it and

View File

@ -6158,7 +6158,8 @@ buf_check_timestamp(buf, focus)
{ {
retval = 1; retval = 1;
/* set b_mtime to stop further warnings */ /* set b_mtime to stop further warnings (e.g., when executing
* FileChangedShell autocmd) */
if (stat_res < 0) if (stat_res < 0)
{ {
buf->b_mtime = 0; buf->b_mtime = 0;
@ -6341,7 +6342,7 @@ buf_check_timestamp(buf, focus)
if (reload) if (reload)
/* Reload the buffer. */ /* Reload the buffer. */
buf_reload(buf); buf_reload(buf, orig_mode);
#ifdef FEAT_GUI #ifdef FEAT_GUI
/* restore this in case an autocommand has set it; it would break /* restore this in case an autocommand has set it; it would break
@ -6355,16 +6356,18 @@ buf_check_timestamp(buf, focus)
/* /*
* Reload a buffer that is already loaded. * Reload a buffer that is already loaded.
* Used when the file was changed outside of Vim. * Used when the file was changed outside of Vim.
* "orig_mode" is buf->b_orig_mode before the need for reloading was detected.
* buf->b_orig_mode may have been reset already.
*/ */
void void
buf_reload(buf) buf_reload(buf, orig_mode)
buf_T *buf; buf_T *buf;
int orig_mode;
{ {
exarg_T ea; exarg_T ea;
pos_T old_cursor; pos_T old_cursor;
linenr_T old_topline; linenr_T old_topline;
int old_ro = buf->b_p_ro; int old_ro = buf->b_p_ro;
int orig_mode = buf->b_orig_mode;
buf_T *savebuf; buf_T *savebuf;
int saved = OK; int saved = OK;
#ifdef FEAT_AUTOCMD #ifdef FEAT_AUTOCMD

View File

@ -4852,6 +4852,8 @@ mch_expandpath(gap, path, flags)
# define SEEK_END 2 # define SEEK_END 2
#endif #endif
#define SHELL_SPECIAL (char_u *)"\t \"&';<>[\\]|"
/* ARGSUSED */ /* ARGSUSED */
int int
mch_expand_wildcards(num_pat, pat, num_file, file, flags) mch_expand_wildcards(num_pat, pat, num_file, file, flags)
@ -5048,22 +5050,12 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
len += STRLEN(pat[i]) + 3; /* add space and two quotes */ len += STRLEN(pat[i]) + 3; /* add space and two quotes */
#else #else
++len; /* add space */ ++len; /* add space */
for (j = 0; pat[i][j] != NUL; ) for (j = 0; pat[i][j] != NUL; ++j)
if (vim_strchr((char_u *)" ';&<>", pat[i][j]) != NULL) {
{ if (vim_strchr(SHELL_SPECIAL, pat[i][j]) != NULL)
len += 2; /* add two quotes */ ++len; /* may add a backslash */
while (pat[i][j] != NUL ++len;
&& vim_strchr((char_u *)" ';&<>", pat[i][j]) != NULL) }
{
++len;
++j;
}
}
else
{
++len;
++j;
}
#endif #endif
} }
command = alloc(len); command = alloc(len);
@ -5084,9 +5076,11 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
*/ */
if (shell_style == STYLE_BT) if (shell_style == STYLE_BT)
{ {
STRCPY(command, pat[0] + 1); /* exclude first backtick */ /* change `command; command& ` to (command; command ) */
STRCPY(command, "(");
STRCAT(command, pat[0] + 1); /* exclude first backtick */
p = command + STRLEN(command) - 1; p = command + STRLEN(command) - 1;
*p = ' '; /* remove last backtick */ *p-- = ')'; /* remove last backtick */
while (p > command && vim_iswhite(*p)) while (p > command && vim_iswhite(*p))
--p; --p;
if (*p == '&') /* remove trailing '&' */ if (*p == '&') /* remove trailing '&' */
@ -5114,8 +5108,8 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
for (i = 0; i < num_pat; ++i) for (i = 0; i < num_pat; ++i)
{ {
/* When using system() always add extra quotes, because the shell /* When using system() always add extra quotes, because the shell
* is started twice. Otherwise only put quotes around spaces and * is started twice. Otherwise put a backslash before special
* single quotes. */ * characters, except insice ``. */
#ifdef USE_SYSTEM #ifdef USE_SYSTEM
STRCAT(command, " \""); STRCAT(command, " \"");
STRCAT(command, pat[i]); STRCAT(command, pat[i]);
@ -5125,30 +5119,32 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
p = command + STRLEN(command); p = command + STRLEN(command);
*p++ = ' '; *p++ = ' ';
for (j = 0; pat[i][j] != NUL; ) for (j = 0; pat[i][j] != NUL; ++j)
{ {
if (pat[i][j] == '`') if (pat[i][j] == '`')
{ {
intick = !intick; intick = !intick;
*p++ = pat[i][j++]; *p++ = pat[i][j];
} }
else if (!intick && vim_strchr((char_u *)" ';&<>", else if (pat[i][j] == '\\' && pat[i][j + 1] != NUL)
{
/* Remove a backslash, take char literally. */
*p++ = pat[i][++j];
}
else if (!intick && vim_strchr(SHELL_SPECIAL,
pat[i][j]) != NULL) pat[i][j]) != NULL)
{ {
/* Put quotes around special characters, but not when /* Put a backslash before a special character, but not
* inside ``. */ * when inside ``. */
*p++ = '"'; *p++ = '\\';
while (pat[i][j] != NUL && vim_strchr((char_u *)" ';&<>", *p++ = pat[i][j];
pat[i][j]) != NULL)
*p++ = pat[i][j++];
*p++ = '"';
} }
else else
{ {
/* For a backslash also copy the next character, don't /* For a backslash also copy the next character, don't
* want to put quotes around it. */ * want to put quotes around it. */
if ((*p++ = pat[i][j++]) == '\\' && pat[i][j] != NUL) if ((*p++ = pat[i][j]) == '\\' && pat[i][j + 1] != NUL)
*p++ = pat[i][j++]; *p++ = pat[i][++j];
} }
} }
*p = NUL; *p = NUL;

View File

@ -202,11 +202,14 @@ prefixcheck:
exit 1; \ exit 1; \
fi fi
clean: clean: checkclean
rm -f core core.* *.old.po *.mo *.ck *.pot sjiscorr rm -f core core.* *.old.po *.mo *.pot sjiscorr
distclean: clean distclean: clean
checkclean:
rm -f *.ck
# #
# NOTE: If you get an error for gvimext.cpp not found, you need to unpack the # NOTE: If you get an error for gvimext.cpp not found, you need to unpack the
# extra archive. # extra archive.