mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-16 12:21:18 +02:00
15250: still run setup even if pcre functions are unavailable
This commit is contained in:
parent
fe06b7a73d
commit
3dc88e102e
2 changed files with 21 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-07-06 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 15250: zsh/pcre module will load gracefully even
|
||||
when pcre functions are unavailable.
|
||||
|
||||
2001-07-06 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 15288: Doc/Zsh/contrib.yo,
|
||||
|
|
|
@ -83,7 +83,12 @@ bin_pcre_study(char *nam, char **args, char *ops, int func)
|
|||
}
|
||||
|
||||
/**/
|
||||
#endif /* HAVE_PCRE_STUDY */
|
||||
#else /* !HAVE_PCRE_STUDY */
|
||||
|
||||
# define bin_pcre_study bin_notavail
|
||||
|
||||
/**/
|
||||
#endif /* !HAVE_PCRE_STUDY */
|
||||
|
||||
/**/
|
||||
static int
|
||||
|
@ -134,11 +139,19 @@ bin_pcre_match(char *nam, char **args, char *ops, int func)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/**/
|
||||
#else /* !(HAVE_PCRE_COMPILE && HAVE_PCRE_EXEC) */
|
||||
|
||||
# define bin_pcre_compile bin_notavail
|
||||
# define bin_pcre_study bin_notavail
|
||||
# define bin_pcre_match bin_notavail
|
||||
|
||||
/**/
|
||||
#endif /* !(HAVE_PCRE_COMPILE && HAVE_PCRE_EXEC) */
|
||||
|
||||
static struct builtin bintab[] = {
|
||||
BUILTIN("pcre_compile", 0, bin_pcre_compile, 1, 1, 0, "aimx", NULL),
|
||||
#ifdef HAVE_PCRE_STUDY
|
||||
BUILTIN("pcre_study", 0, bin_pcre_study, 0, 0, 0, NULL, NULL),
|
||||
#endif
|
||||
BUILTIN("pcre_match", 0, bin_pcre_match, 1, 2, 0, "a", NULL)
|
||||
};
|
||||
|
||||
|
@ -170,6 +183,3 @@ finish_(Module m)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**/
|
||||
#endif /* HAVE_PCRE_COMPILE && HAVE_PCRE_EXEC */
|
||||
|
|
Loading…
Reference in a new issue