Macro cleanup: USE_EXE_NAME

This commit is contained in:
Michael Reed 2015-02-03 21:15:45 -05:00 committed by Justin M. Keyes
parent 0925870d0c
commit cf663588d9
2 changed files with 0 additions and 24 deletions

View File

@ -837,10 +837,6 @@ EXTERN int ctrl_x_mode INIT(= 0); /* Which Ctrl-X mode are we in? */
EXTERN int no_abbr INIT(= TRUE); /* TRUE when no abbreviations loaded */ EXTERN int no_abbr INIT(= TRUE); /* TRUE when no abbreviations loaded */
#ifdef USE_EXE_NAME
EXTERN char_u *exe_name; /* the name of the executable */
#endif
#ifdef USE_ON_FLY_SCROLL #ifdef USE_ON_FLY_SCROLL
EXTERN int dont_scroll INIT(= FALSE); /* don't use scrollbars when TRUE */ EXTERN int dont_scroll INIT(= FALSE); /* don't use scrollbars when TRUE */
#endif #endif

View File

@ -2955,13 +2955,6 @@ char_u *vim_getenv(char_u *name, int *mustfree)
if (p == NULL) { if (p == NULL) {
if (p_hf != NULL && vim_strchr(p_hf, '$') == NULL) if (p_hf != NULL && vim_strchr(p_hf, '$') == NULL)
p = p_hf; p = p_hf;
#ifdef USE_EXE_NAME
/*
* Use the name of the executable, obtained from argv[0].
*/
else
p = exe_name;
#endif
if (p != NULL) { if (p != NULL) {
/* remove the file name */ /* remove the file name */
pend = path_tail(p); pend = path_tail(p);
@ -2970,12 +2963,6 @@ char_u *vim_getenv(char_u *name, int *mustfree)
if (p == p_hf) if (p == p_hf)
pend = remove_tail(p, pend, (char_u *)"doc"); pend = remove_tail(p, pend, (char_u *)"doc");
#ifdef USE_EXE_NAME
/* remove "src/" from exe_name, if present */
if (p == exe_name)
pend = remove_tail(p, pend, (char_u *)"src");
#endif
/* for $VIM, remove "runtime/" or "vim54/", if present */ /* for $VIM, remove "runtime/" or "vim54/", if present */
if (!vimruntime) { if (!vimruntime) {
pend = remove_tail(p, pend, (char_u *)RUNTIME_DIRNAME); pend = remove_tail(p, pend, (char_u *)RUNTIME_DIRNAME);
@ -2995,13 +2982,6 @@ char_u *vim_getenv(char_u *name, int *mustfree)
free(p); free(p);
p = NULL; p = NULL;
} else { } else {
#ifdef USE_EXE_NAME
/* may add "/vim54" or "/runtime" if it exists */
if (vimruntime && (pend = vim_version_dir(p)) != NULL) {
free(p);
p = pend;
}
#endif
*mustfree = TRUE; *mustfree = TRUE;
} }
} }