|
|
22c937 |
To: vim_dev@googlegroups.com
|
|
|
22c937 |
Subject: Patch 7.4.235
|
|
|
22c937 |
Fcc: outbox
|
|
|
22c937 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
22c937 |
Mime-Version: 1.0
|
|
|
22c937 |
Content-Type: text/plain; charset=UTF-8
|
|
|
22c937 |
Content-Transfer-Encoding: 8bit
|
|
|
22c937 |
------------
|
|
|
22c937 |
|
|
|
22c937 |
Patch 7.4.235
|
|
|
22c937 |
Problem: It is not easy to get the full path of a command.
|
|
|
22c937 |
Solution: Add the exepath() function.
|
|
|
22c937 |
Files: src/eval.c, src/misc1.c, src/os_amiga.c, src/os_msdos.c,
|
|
|
22c937 |
src/os_unix.c, src/os_vms.c, src/os_win32.c,
|
|
|
22c937 |
src/proto/os_amiga.pro, src/proto/os_msdos.pro,
|
|
|
22c937 |
src/proto/os_unix.pro, src/proto/os_win32.pro,
|
|
|
22c937 |
runtime/doc/eval.txt
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.234/src/eval.c 2014-04-01 19:55:46.252787300 +0200
|
|
|
22c937 |
--- src/eval.c 2014-04-01 20:18:39.212768414 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 514,519 ****
|
|
|
22c937 |
--- 514,520 ----
|
|
|
22c937 |
static void f_eval __ARGS((typval_T *argvars, typval_T *rettv));
|
|
|
22c937 |
static void f_eventhandler __ARGS((typval_T *argvars, typval_T *rettv));
|
|
|
22c937 |
static void f_executable __ARGS((typval_T *argvars, typval_T *rettv));
|
|
|
22c937 |
+ static void f_exepath __ARGS((typval_T *argvars, typval_T *rettv));
|
|
|
22c937 |
static void f_exists __ARGS((typval_T *argvars, typval_T *rettv));
|
|
|
22c937 |
#ifdef FEAT_FLOAT
|
|
|
22c937 |
static void f_exp __ARGS((typval_T *argvars, typval_T *rettv));
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 7920,7925 ****
|
|
|
22c937 |
--- 7921,7927 ----
|
|
|
22c937 |
{"eval", 1, 1, f_eval},
|
|
|
22c937 |
{"eventhandler", 0, 0, f_eventhandler},
|
|
|
22c937 |
{"executable", 1, 1, f_executable},
|
|
|
22c937 |
+ {"exepath", 1, 1, f_exepath},
|
|
|
22c937 |
{"exists", 1, 1, f_exists},
|
|
|
22c937 |
#ifdef FEAT_FLOAT
|
|
|
22c937 |
{"exp", 1, 1, f_exp},
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 10046,10052 ****
|
|
|
22c937 |
typval_T *argvars;
|
|
|
22c937 |
typval_T *rettv;
|
|
|
22c937 |
{
|
|
|
22c937 |
! rettv->vval.v_number = mch_can_exe(get_tv_string(&argvars[0]));
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
/*
|
|
|
22c937 |
--- 10048,10069 ----
|
|
|
22c937 |
typval_T *argvars;
|
|
|
22c937 |
typval_T *rettv;
|
|
|
22c937 |
{
|
|
|
22c937 |
! rettv->vval.v_number = mch_can_exe(get_tv_string(&argvars[0]), NULL);
|
|
|
22c937 |
! }
|
|
|
22c937 |
!
|
|
|
22c937 |
! /*
|
|
|
22c937 |
! * "exepath()" function
|
|
|
22c937 |
! */
|
|
|
22c937 |
! static void
|
|
|
22c937 |
! f_exepath(argvars, rettv)
|
|
|
22c937 |
! typval_T *argvars;
|
|
|
22c937 |
! typval_T *rettv;
|
|
|
22c937 |
! {
|
|
|
22c937 |
! char_u *p = NULL;
|
|
|
22c937 |
!
|
|
|
22c937 |
! (void)mch_can_exe(get_tv_string(&argvars[0]), &p);
|
|
|
22c937 |
! rettv->v_type = VAR_STRING;
|
|
|
22c937 |
! rettv->vval.v_string = p;
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
/*
|
|
|
22c937 |
*** ../vim-7.4.234/src/misc1.c 2014-03-12 18:55:52.100906804 +0100
|
|
|
22c937 |
--- src/misc1.c 2014-04-01 20:01:08.752782864 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 10728,10734 ****
|
|
|
22c937 |
return;
|
|
|
22c937 |
|
|
|
22c937 |
/* If the file isn't executable, may not add it. Do accept directories. */
|
|
|
22c937 |
! if (!isdir && (flags & EW_EXEC) && !mch_can_exe(f))
|
|
|
22c937 |
return;
|
|
|
22c937 |
|
|
|
22c937 |
/* Make room for another item in the file list. */
|
|
|
22c937 |
--- 10728,10734 ----
|
|
|
22c937 |
return;
|
|
|
22c937 |
|
|
|
22c937 |
/* If the file isn't executable, may not add it. Do accept directories. */
|
|
|
22c937 |
! if (!isdir && (flags & EW_EXEC) && !mch_can_exe(f, NULL))
|
|
|
22c937 |
return;
|
|
|
22c937 |
|
|
|
22c937 |
/* Make room for another item in the file list. */
|
|
|
22c937 |
*** ../vim-7.4.234/src/os_amiga.c 2013-05-06 04:06:04.000000000 +0200
|
|
|
22c937 |
--- src/os_amiga.c 2014-04-01 20:19:50.804767429 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 884,891 ****
|
|
|
22c937 |
* Return -1 if unknown.
|
|
|
22c937 |
*/
|
|
|
22c937 |
int
|
|
|
22c937 |
! mch_can_exe(name)
|
|
|
22c937 |
char_u *name;
|
|
|
22c937 |
{
|
|
|
22c937 |
/* TODO */
|
|
|
22c937 |
return -1;
|
|
|
22c937 |
--- 884,892 ----
|
|
|
22c937 |
* Return -1 if unknown.
|
|
|
22c937 |
*/
|
|
|
22c937 |
int
|
|
|
22c937 |
! mch_can_exe(name, path)
|
|
|
22c937 |
char_u *name;
|
|
|
22c937 |
+ char_u **path;
|
|
|
22c937 |
{
|
|
|
22c937 |
/* TODO */
|
|
|
22c937 |
return -1;
|
|
|
22c937 |
*** ../vim-7.4.234/src/os_msdos.c 2014-03-23 15:12:29.931264336 +0100
|
|
|
22c937 |
--- src/os_msdos.c 2014-04-01 20:02:39.996781608 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 2945,2958 ****
|
|
|
22c937 |
* Return -1 if unknown.
|
|
|
22c937 |
*/
|
|
|
22c937 |
int
|
|
|
22c937 |
! mch_can_exe(name)
|
|
|
22c937 |
char_u *name;
|
|
|
22c937 |
{
|
|
|
22c937 |
char *p;
|
|
|
22c937 |
|
|
|
22c937 |
p = searchpath(name);
|
|
|
22c937 |
if (p == NULL || mch_isdir(p))
|
|
|
22c937 |
return FALSE;
|
|
|
22c937 |
return TRUE;
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
--- 2945,2961 ----
|
|
|
22c937 |
* Return -1 if unknown.
|
|
|
22c937 |
*/
|
|
|
22c937 |
int
|
|
|
22c937 |
! mch_can_exe(name, path)
|
|
|
22c937 |
char_u *name;
|
|
|
22c937 |
+ char_u **path;
|
|
|
22c937 |
{
|
|
|
22c937 |
char *p;
|
|
|
22c937 |
|
|
|
22c937 |
p = searchpath(name);
|
|
|
22c937 |
if (p == NULL || mch_isdir(p))
|
|
|
22c937 |
return FALSE;
|
|
|
22c937 |
+ if (path != NULL)
|
|
|
22c937 |
+ *path = vim_strsave(p);
|
|
|
22c937 |
return TRUE;
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.234/src/os_unix.c 2014-03-12 16:51:35.060792541 +0100
|
|
|
22c937 |
--- src/os_unix.c 2014-04-01 20:46:21.304745550 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 2992,2999 ****
|
|
|
22c937 |
* Return -1 if unknown.
|
|
|
22c937 |
*/
|
|
|
22c937 |
int
|
|
|
22c937 |
! mch_can_exe(name)
|
|
|
22c937 |
char_u *name;
|
|
|
22c937 |
{
|
|
|
22c937 |
char_u *buf;
|
|
|
22c937 |
char_u *p, *e;
|
|
|
22c937 |
--- 2992,3000 ----
|
|
|
22c937 |
* Return -1 if unknown.
|
|
|
22c937 |
*/
|
|
|
22c937 |
int
|
|
|
22c937 |
! mch_can_exe(name, path)
|
|
|
22c937 |
char_u *name;
|
|
|
22c937 |
+ char_u **path;
|
|
|
22c937 |
{
|
|
|
22c937 |
char_u *buf;
|
|
|
22c937 |
char_u *p, *e;
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 3003,3009 ****
|
|
|
22c937 |
if (mch_isFullName(name) || (name[0] == '.' && (name[1] == '/'
|
|
|
22c937 |
|| (name[1] == '.' && name[2] == '/'))))
|
|
|
22c937 |
{
|
|
|
22c937 |
! return executable_file(name);
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
p = (char_u *)getenv("PATH");
|
|
|
22c937 |
--- 3004,3021 ----
|
|
|
22c937 |
if (mch_isFullName(name) || (name[0] == '.' && (name[1] == '/'
|
|
|
22c937 |
|| (name[1] == '.' && name[2] == '/'))))
|
|
|
22c937 |
{
|
|
|
22c937 |
! if (executable_file(name))
|
|
|
22c937 |
! {
|
|
|
22c937 |
! if (path != NULL)
|
|
|
22c937 |
! {
|
|
|
22c937 |
! if (name[0] == '.')
|
|
|
22c937 |
! *path = FullName_save(name, TRUE);
|
|
|
22c937 |
! else
|
|
|
22c937 |
! *path = vim_strsave(name);
|
|
|
22c937 |
! }
|
|
|
22c937 |
! return TRUE;
|
|
|
22c937 |
! }
|
|
|
22c937 |
! return FALSE;
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
p = (char_u *)getenv("PATH");
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 3032,3038 ****
|
|
|
22c937 |
--- 3044,3059 ----
|
|
|
22c937 |
STRCAT(buf, name);
|
|
|
22c937 |
retval = executable_file(buf);
|
|
|
22c937 |
if (retval == 1)
|
|
|
22c937 |
+ {
|
|
|
22c937 |
+ if (path != NULL)
|
|
|
22c937 |
+ {
|
|
|
22c937 |
+ if (buf[0] == '.')
|
|
|
22c937 |
+ *path = FullName_save(buf, TRUE);
|
|
|
22c937 |
+ else
|
|
|
22c937 |
+ *path = vim_strsave(buf);
|
|
|
22c937 |
+ }
|
|
|
22c937 |
break;
|
|
|
22c937 |
+ }
|
|
|
22c937 |
|
|
|
22c937 |
if (*e != ':')
|
|
|
22c937 |
break;
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 5592,5598 ****
|
|
|
22c937 |
continue;
|
|
|
22c937 |
|
|
|
22c937 |
/* Skip files that are not executable if we check for that. */
|
|
|
22c937 |
! if (!dir && (flags & EW_EXEC) && !mch_can_exe(p))
|
|
|
22c937 |
continue;
|
|
|
22c937 |
|
|
|
22c937 |
if (--files_free == 0)
|
|
|
22c937 |
--- 5613,5619 ----
|
|
|
22c937 |
continue;
|
|
|
22c937 |
|
|
|
22c937 |
/* Skip files that are not executable if we check for that. */
|
|
|
22c937 |
! if (!dir && (flags & EW_EXEC) && !mch_can_exe(p, NULL))
|
|
|
22c937 |
continue;
|
|
|
22c937 |
|
|
|
22c937 |
if (--files_free == 0)
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 6090,6096 ****
|
|
|
22c937 |
continue;
|
|
|
22c937 |
|
|
|
22c937 |
/* Skip files that are not executable if we check for that. */
|
|
|
22c937 |
! if (!dir && (flags & EW_EXEC) && !mch_can_exe((*file)[i]))
|
|
|
22c937 |
continue;
|
|
|
22c937 |
|
|
|
22c937 |
p = alloc((unsigned)(STRLEN((*file)[i]) + 1 + dir));
|
|
|
22c937 |
--- 6111,6117 ----
|
|
|
22c937 |
continue;
|
|
|
22c937 |
|
|
|
22c937 |
/* Skip files that are not executable if we check for that. */
|
|
|
22c937 |
! if (!dir && (flags & EW_EXEC) && !mch_can_exe((*file)[i], NULL))
|
|
|
22c937 |
continue;
|
|
|
22c937 |
|
|
|
22c937 |
p = alloc((unsigned)(STRLEN((*file)[i]) + 1 + dir));
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 6317,6323 ****
|
|
|
22c937 |
|
|
|
22c937 |
/* Reads gpm event and adds special keys to input buf. Returns length of
|
|
|
22c937 |
* generated key sequence.
|
|
|
22c937 |
! * This function is made after gui_send_mouse_event
|
|
|
22c937 |
*/
|
|
|
22c937 |
static int
|
|
|
22c937 |
mch_gpm_process()
|
|
|
22c937 |
--- 6338,6344 ----
|
|
|
22c937 |
|
|
|
22c937 |
/* Reads gpm event and adds special keys to input buf. Returns length of
|
|
|
22c937 |
* generated key sequence.
|
|
|
22c937 |
! * This function is styled after gui_send_mouse_event().
|
|
|
22c937 |
*/
|
|
|
22c937 |
static int
|
|
|
22c937 |
mch_gpm_process()
|
|
|
22c937 |
*** ../vim-7.4.234/src/os_vms.c 2014-03-12 16:51:35.060792541 +0100
|
|
|
22c937 |
--- src/os_vms.c 2014-04-01 20:05:52.960778954 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 483,489 ****
|
|
|
22c937 |
continue;
|
|
|
22c937 |
|
|
|
22c937 |
/* Skip files that are not executable if we check for that. */
|
|
|
22c937 |
! if (!dir && (flags & EW_EXEC) && !mch_can_exe(vms_fmatch[i]))
|
|
|
22c937 |
continue;
|
|
|
22c937 |
|
|
|
22c937 |
/* allocate memory for pointers */
|
|
|
22c937 |
--- 483,489 ----
|
|
|
22c937 |
continue;
|
|
|
22c937 |
|
|
|
22c937 |
/* Skip files that are not executable if we check for that. */
|
|
|
22c937 |
! if (!dir && (flags & EW_EXEC) && !mch_can_exe(vms_fmatch[i], NULL))
|
|
|
22c937 |
continue;
|
|
|
22c937 |
|
|
|
22c937 |
/* allocate memory for pointers */
|
|
|
22c937 |
*** ../vim-7.4.234/src/os_win32.c 2014-02-11 17:05:57.282217857 +0100
|
|
|
22c937 |
--- src/os_win32.c 2014-04-01 20:26:07.432762248 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1882,1888 ****
|
|
|
22c937 |
* TODO: Should somehow check if it's really executable.
|
|
|
22c937 |
*/
|
|
|
22c937 |
static int
|
|
|
22c937 |
! executable_exists(char *name)
|
|
|
22c937 |
{
|
|
|
22c937 |
char *dum;
|
|
|
22c937 |
char fname[_MAX_PATH];
|
|
|
22c937 |
--- 1882,1888 ----
|
|
|
22c937 |
* TODO: Should somehow check if it's really executable.
|
|
|
22c937 |
*/
|
|
|
22c937 |
static int
|
|
|
22c937 |
! executable_exists(char *name, char_u **path)
|
|
|
22c937 |
{
|
|
|
22c937 |
char *dum;
|
|
|
22c937 |
char fname[_MAX_PATH];
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1905,1910 ****
|
|
|
22c937 |
--- 1905,1912 ----
|
|
|
22c937 |
return FALSE;
|
|
|
22c937 |
if (GetFileAttributesW(fnamew) & FILE_ATTRIBUTE_DIRECTORY)
|
|
|
22c937 |
return FALSE;
|
|
|
22c937 |
+ if (path != NULL)
|
|
|
22c937 |
+ *path = utf16_to_enc(fnamew, NULL);
|
|
|
22c937 |
return TRUE;
|
|
|
22c937 |
}
|
|
|
22c937 |
/* Retry with non-wide function (for Windows 98). */
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1915,1920 ****
|
|
|
22c937 |
--- 1917,1924 ----
|
|
|
22c937 |
return FALSE;
|
|
|
22c937 |
if (mch_isdir(fname))
|
|
|
22c937 |
return FALSE;
|
|
|
22c937 |
+ if (path != NULL)
|
|
|
22c937 |
+ *path = vim_strsave(fname);
|
|
|
22c937 |
return TRUE;
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1996,2002 ****
|
|
|
22c937 |
vimrun_path = (char *)vim_strsave(vimrun_location);
|
|
|
22c937 |
s_dont_use_vimrun = FALSE;
|
|
|
22c937 |
}
|
|
|
22c937 |
! else if (executable_exists("vimrun.exe"))
|
|
|
22c937 |
s_dont_use_vimrun = FALSE;
|
|
|
22c937 |
|
|
|
22c937 |
/* Don't give the warning for a missing vimrun.exe right now, but only
|
|
|
22c937 |
--- 2000,2006 ----
|
|
|
22c937 |
vimrun_path = (char *)vim_strsave(vimrun_location);
|
|
|
22c937 |
s_dont_use_vimrun = FALSE;
|
|
|
22c937 |
}
|
|
|
22c937 |
! else if (executable_exists("vimrun.exe", NULL))
|
|
|
22c937 |
s_dont_use_vimrun = FALSE;
|
|
|
22c937 |
|
|
|
22c937 |
/* Don't give the warning for a missing vimrun.exe right now, but only
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 2010,2016 ****
|
|
|
22c937 |
* If "finstr.exe" doesn't exist, use "grep -n" for 'grepprg'.
|
|
|
22c937 |
* Otherwise the default "findstr /n" is used.
|
|
|
22c937 |
*/
|
|
|
22c937 |
! if (!executable_exists("findstr.exe"))
|
|
|
22c937 |
set_option_value((char_u *)"grepprg", 0, (char_u *)"grep -n", 0);
|
|
|
22c937 |
|
|
|
22c937 |
#ifdef FEAT_CLIPBOARD
|
|
|
22c937 |
--- 2014,2020 ----
|
|
|
22c937 |
* If "finstr.exe" doesn't exist, use "grep -n" for 'grepprg'.
|
|
|
22c937 |
* Otherwise the default "findstr /n" is used.
|
|
|
22c937 |
*/
|
|
|
22c937 |
! if (!executable_exists("findstr.exe", NULL))
|
|
|
22c937 |
set_option_value((char_u *)"grepprg", 0, (char_u *)"grep -n", 0);
|
|
|
22c937 |
|
|
|
22c937 |
#ifdef FEAT_CLIPBOARD
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 3330,3336 ****
|
|
|
22c937 |
* Return -1 if unknown.
|
|
|
22c937 |
*/
|
|
|
22c937 |
int
|
|
|
22c937 |
! mch_can_exe(char_u *name)
|
|
|
22c937 |
{
|
|
|
22c937 |
char_u buf[_MAX_PATH];
|
|
|
22c937 |
int len = (int)STRLEN(name);
|
|
|
22c937 |
--- 3334,3340 ----
|
|
|
22c937 |
* Return -1 if unknown.
|
|
|
22c937 |
*/
|
|
|
22c937 |
int
|
|
|
22c937 |
! mch_can_exe(char_u *name, char_u **path)
|
|
|
22c937 |
{
|
|
|
22c937 |
char_u buf[_MAX_PATH];
|
|
|
22c937 |
int len = (int)STRLEN(name);
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 3343,3349 ****
|
|
|
22c937 |
* this with a Unix-shell like 'shell'. */
|
|
|
22c937 |
if (vim_strchr(gettail(name), '.') != NULL
|
|
|
22c937 |
|| strstr((char *)gettail(p_sh), "sh") != NULL)
|
|
|
22c937 |
! if (executable_exists((char *)name))
|
|
|
22c937 |
return TRUE;
|
|
|
22c937 |
|
|
|
22c937 |
/*
|
|
|
22c937 |
--- 3347,3353 ----
|
|
|
22c937 |
* this with a Unix-shell like 'shell'. */
|
|
|
22c937 |
if (vim_strchr(gettail(name), '.') != NULL
|
|
|
22c937 |
|| strstr((char *)gettail(p_sh), "sh") != NULL)
|
|
|
22c937 |
! if (executable_exists((char *)name, path))
|
|
|
22c937 |
return TRUE;
|
|
|
22c937 |
|
|
|
22c937 |
/*
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 3365,3371 ****
|
|
|
22c937 |
}
|
|
|
22c937 |
else
|
|
|
22c937 |
copy_option_part(&p, buf + len, _MAX_PATH - len, ";");
|
|
|
22c937 |
! if (executable_exists((char *)buf))
|
|
|
22c937 |
return TRUE;
|
|
|
22c937 |
}
|
|
|
22c937 |
return FALSE;
|
|
|
22c937 |
--- 3369,3375 ----
|
|
|
22c937 |
}
|
|
|
22c937 |
else
|
|
|
22c937 |
copy_option_part(&p, buf + len, _MAX_PATH - len, ";");
|
|
|
22c937 |
! if (executable_exists((char *)buf, path))
|
|
|
22c937 |
return TRUE;
|
|
|
22c937 |
}
|
|
|
22c937 |
return FALSE;
|
|
|
22c937 |
*** ../vim-7.4.234/src/proto/os_amiga.pro 2013-08-10 13:37:37.000000000 +0200
|
|
|
22c937 |
--- src/proto/os_amiga.pro 2014-04-01 20:41:23.672749644 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 26,32 ****
|
|
|
22c937 |
void mch_hide __ARGS((char_u *name));
|
|
|
22c937 |
int mch_isdir __ARGS((char_u *name));
|
|
|
22c937 |
int mch_mkdir __ARGS((char_u *name));
|
|
|
22c937 |
! int mch_can_exe __ARGS((char_u *name));
|
|
|
22c937 |
int mch_nodetype __ARGS((char_u *name));
|
|
|
22c937 |
void mch_early_init __ARGS((void));
|
|
|
22c937 |
void mch_exit __ARGS((int r));
|
|
|
22c937 |
--- 26,32 ----
|
|
|
22c937 |
void mch_hide __ARGS((char_u *name));
|
|
|
22c937 |
int mch_isdir __ARGS((char_u *name));
|
|
|
22c937 |
int mch_mkdir __ARGS((char_u *name));
|
|
|
22c937 |
! int mch_can_exe __ARGS((char_u *name, char_u **path));
|
|
|
22c937 |
int mch_nodetype __ARGS((char_u *name));
|
|
|
22c937 |
void mch_early_init __ARGS((void));
|
|
|
22c937 |
void mch_exit __ARGS((int r));
|
|
|
22c937 |
*** ../vim-7.4.234/src/proto/os_msdos.pro 2013-08-10 13:37:37.000000000 +0200
|
|
|
22c937 |
--- src/proto/os_msdos.pro 2014-04-01 20:41:32.432749524 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 38,44 ****
|
|
|
22c937 |
int mch_setperm __ARGS((char_u *name, long perm));
|
|
|
22c937 |
void mch_hide __ARGS((char_u *name));
|
|
|
22c937 |
int mch_isdir __ARGS((char_u *name));
|
|
|
22c937 |
! int mch_can_exe __ARGS((char_u *name));
|
|
|
22c937 |
int mch_nodetype __ARGS((char_u *name));
|
|
|
22c937 |
int mch_dirname __ARGS((char_u *buf, int len));
|
|
|
22c937 |
int mch_remove __ARGS((char_u *name));
|
|
|
22c937 |
--- 38,44 ----
|
|
|
22c937 |
int mch_setperm __ARGS((char_u *name, long perm));
|
|
|
22c937 |
void mch_hide __ARGS((char_u *name));
|
|
|
22c937 |
int mch_isdir __ARGS((char_u *name));
|
|
|
22c937 |
! int mch_can_exe __ARGS((char_u *name, char_u **path));
|
|
|
22c937 |
int mch_nodetype __ARGS((char_u *name));
|
|
|
22c937 |
int mch_dirname __ARGS((char_u *buf, int len));
|
|
|
22c937 |
int mch_remove __ARGS((char_u *name));
|
|
|
22c937 |
*** ../vim-7.4.234/src/proto/os_unix.pro 2013-08-10 13:37:23.000000000 +0200
|
|
|
22c937 |
--- src/proto/os_unix.pro 2014-04-01 20:41:58.712749162 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 42,48 ****
|
|
|
22c937 |
void mch_free_acl __ARGS((vim_acl_T aclent));
|
|
|
22c937 |
void mch_hide __ARGS((char_u *name));
|
|
|
22c937 |
int mch_isdir __ARGS((char_u *name));
|
|
|
22c937 |
! int mch_can_exe __ARGS((char_u *name));
|
|
|
22c937 |
int mch_nodetype __ARGS((char_u *name));
|
|
|
22c937 |
void mch_early_init __ARGS((void));
|
|
|
22c937 |
void mch_free_mem __ARGS((void));
|
|
|
22c937 |
--- 42,48 ----
|
|
|
22c937 |
void mch_free_acl __ARGS((vim_acl_T aclent));
|
|
|
22c937 |
void mch_hide __ARGS((char_u *name));
|
|
|
22c937 |
int mch_isdir __ARGS((char_u *name));
|
|
|
22c937 |
! int mch_can_exe __ARGS((char_u *name, char_u **path));
|
|
|
22c937 |
int mch_nodetype __ARGS((char_u *name));
|
|
|
22c937 |
void mch_early_init __ARGS((void));
|
|
|
22c937 |
void mch_free_mem __ARGS((void));
|
|
|
22c937 |
*** ../vim-7.4.234/src/proto/os_win32.pro 2013-08-10 13:37:38.000000000 +0200
|
|
|
22c937 |
--- src/proto/os_win32.pro 2014-04-01 20:42:16.992748911 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 26,32 ****
|
|
|
22c937 |
int mch_is_linked __ARGS((char_u *fname));
|
|
|
22c937 |
int win32_fileinfo __ARGS((char_u *fname, BY_HANDLE_FILE_INFORMATION *info));
|
|
|
22c937 |
int mch_writable __ARGS((char_u *name));
|
|
|
22c937 |
! int mch_can_exe __ARGS((char_u *name));
|
|
|
22c937 |
int mch_nodetype __ARGS((char_u *name));
|
|
|
22c937 |
vim_acl_T mch_get_acl __ARGS((char_u *fname));
|
|
|
22c937 |
void mch_set_acl __ARGS((char_u *fname, vim_acl_T acl));
|
|
|
22c937 |
--- 26,32 ----
|
|
|
22c937 |
int mch_is_linked __ARGS((char_u *fname));
|
|
|
22c937 |
int win32_fileinfo __ARGS((char_u *fname, BY_HANDLE_FILE_INFORMATION *info));
|
|
|
22c937 |
int mch_writable __ARGS((char_u *name));
|
|
|
22c937 |
! int mch_can_exe __ARGS((char_u *name, char_u **path));
|
|
|
22c937 |
int mch_nodetype __ARGS((char_u *name));
|
|
|
22c937 |
vim_acl_T mch_get_acl __ARGS((char_u *fname));
|
|
|
22c937 |
void mch_set_acl __ARGS((char_u *fname, vim_acl_T acl));
|
|
|
22c937 |
*** ../vim-7.4.234/runtime/doc/eval.txt 2014-04-01 19:55:46.244787300 +0200
|
|
|
22c937 |
--- runtime/doc/eval.txt 2014-04-01 20:54:37.832738720 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1561,1566 ****
|
|
|
22c937 |
--- 1562,1571 ----
|
|
|
22c937 |
v:progpath Contains the command with which Vim was invoked, including the
|
|
|
22c937 |
path. Useful if you want to message a Vim server using a
|
|
|
22c937 |
|--remote-expr|.
|
|
|
22c937 |
+ To get the full path use: >
|
|
|
22c937 |
+ echo exepath(v:progpath)
|
|
|
22c937 |
+ < NOTE: This does not work when the command is a relative path
|
|
|
22c937 |
+ and the current directory has changed.
|
|
|
22c937 |
Read-only.
|
|
|
22c937 |
|
|
|
22c937 |
*v:register* *register-variable*
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1761,1766 ****
|
|
|
22c937 |
--- 1766,1772 ----
|
|
|
22c937 |
eval( {string}) any evaluate {string} into its value
|
|
|
22c937 |
eventhandler( ) Number TRUE if inside an event handler
|
|
|
22c937 |
executable( {expr}) Number 1 if executable {expr} exists
|
|
|
22c937 |
+ exepath( {expr}) String full path of the command {expr}
|
|
|
22c937 |
exists( {expr}) Number TRUE if {expr} exists
|
|
|
22c937 |
extend( {expr1}, {expr2} [, {expr3}])
|
|
|
22c937 |
List/Dict insert items of {expr2} into {expr1}
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 2705,2710 ****
|
|
|
22c937 |
--- 2711,2725 ----
|
|
|
22c937 |
0 does not exist
|
|
|
22c937 |
-1 not implemented on this system
|
|
|
22c937 |
|
|
|
22c937 |
+ exepath({expr}) *exepath()*
|
|
|
22c937 |
+ If {expr} is an executable and is either an absolute path, a
|
|
|
22c937 |
+ relative path or found in $PATH, return the full path.
|
|
|
22c937 |
+ Note that the current directory is used when {expr} starts
|
|
|
22c937 |
+ with "./", which may be a problem for Vim: >
|
|
|
22c937 |
+ echo exepath(v:progpath)
|
|
|
22c937 |
+ < If {expr} cannot be found in $PATH or is not executable then
|
|
|
22c937 |
+ an empty string is returned.
|
|
|
22c937 |
+
|
|
|
22c937 |
*exists()*
|
|
|
22c937 |
exists({expr}) The result is a Number, which is non-zero if {expr} is
|
|
|
22c937 |
defined, zero otherwise. The {expr} argument is a string,
|
|
|
22c937 |
*** ../vim-7.4.234/src/version.c 2014-04-01 19:55:46.252787300 +0200
|
|
|
22c937 |
--- src/version.c 2014-04-01 20:00:44.108783203 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 736,737 ****
|
|
|
22c937 |
--- 736,739 ----
|
|
|
22c937 |
{ /* Add new patch number below this line */
|
|
|
22c937 |
+ /**/
|
|
|
22c937 |
+ 235,
|
|
|
22c937 |
/**/
|
|
|
22c937 |
|
|
|
22c937 |
--
|
|
|
22c937 |
hundred-and-one symptoms of being an internet addict:
|
|
|
22c937 |
19. All of your friends have an @ in their names.
|
|
|
22c937 |
|
|
|
22c937 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
22c937 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
22c937 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
22c937 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|