mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-12-29 16:25:35 +01:00
unposted: internal: Add some comments and fix indentation. No functional change.
This commit is contained in:
parent
5e843a3721
commit
3511169731
2 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2020-01-26 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* unposted: Src/init.c: internal: Add some comments and fix
|
||||
indentation. No functional change.
|
||||
|
||||
2020-01-23 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* 45340: Src/params.c: internal: Document the difference between
|
||||
|
|
15
Src/init.c
15
Src/init.c
|
@ -882,7 +882,7 @@ setupvals(char *cmd, char *runscript, char *zsh_name)
|
|||
char *ptr;
|
||||
int i, j;
|
||||
#if defined(SITEFPATH_DIR) || defined(FPATH_DIR) || defined (ADDITIONAL_FPATH) || defined(FIXED_FPATH_DIR)
|
||||
#define FPATH_NEEDS_INIT 1
|
||||
# define FPATH_NEEDS_INIT 1
|
||||
char **fpathptr;
|
||||
# if defined(FPATH_DIR) && defined(FPATH_SUBDIRS)
|
||||
char *fpath_subdirs[] = FPATH_SUBDIRS;
|
||||
|
@ -994,18 +994,29 @@ setupvals(char *cmd, char *runscript, char *zsh_name)
|
|||
# endif /* ADDITONAL_FPATH */
|
||||
fpath = fpathptr = (char **)zalloc((fpathlen+1)*sizeof(char *));
|
||||
# ifdef FIXED_FPATH_DIR
|
||||
/* Zeroth: /usr/local/share/zsh/site-functions */
|
||||
*fpathptr++ = ztrdup(FIXED_FPATH_DIR);
|
||||
fpathlen--;
|
||||
# endif
|
||||
# ifdef SITEFPATH_DIR
|
||||
/* First: the directory from --enable-site-fndir
|
||||
*
|
||||
* default: /usr/local/share/zsh/site-functions
|
||||
* (but changeable by passing --prefix or --datadir to configure) */
|
||||
*fpathptr++ = ztrdup(SITEFPATH_DIR);
|
||||
fpathlen--;
|
||||
# endif /* SITEFPATH_DIR */
|
||||
# if defined(ADDITIONAL_FPATH)
|
||||
/* Second: the directories from --enable-additional-fpath
|
||||
*
|
||||
* default: empty list */
|
||||
for (j = 0; j < more_fndirs_len; j++)
|
||||
*fpathptr++ = ztrdup(more_fndirs[j]);
|
||||
# endif
|
||||
# ifdef FPATH_DIR
|
||||
/* Third: The directory from --enable-fndir
|
||||
*
|
||||
* default: /usr/local/share/zsh/${ZSH_VERSION}/functions */
|
||||
# ifdef FPATH_SUBDIRS
|
||||
# ifdef ADDITIONAL_FPATH
|
||||
for (j = more_fndirs_len; j < fpathlen; j++)
|
||||
|
@ -1013,7 +1024,7 @@ setupvals(char *cmd, char *runscript, char *zsh_name)
|
|||
# else
|
||||
for (j = 0; j < fpathlen; j++)
|
||||
*fpathptr++ = tricat(FPATH_DIR, "/", fpath_subdirs[j]);
|
||||
#endif
|
||||
# endif
|
||||
# else
|
||||
*fpathptr++ = ztrdup(FPATH_DIR);
|
||||
# endif
|
||||
|
|
Loading…
Reference in a new issue