From: Norihiro Tanaka Date: Sun, 20 Sep 2020 07:00:04 +0000 (+0900) Subject: dfa: make dfasupported a global function X-Git-Tag: v1.0~3609 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=4a3aec702f994f3a16e4bc6c51f2c0ae3dd76a02;p=gnulib.git dfa: make dfasupported a global function * lib/dfa.c (dfasupported): Rename, and make it global. Update caller. * lib/dfa.h (dfasupported): Add prototype. --- diff --git a/ChangeLog b/ChangeLog index 4fdd1a778c..188bb8f2fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2020-09-20 Norihiro Tanaka + + dfa: make dfasupported a global function + * lib/dfa.c (dfasupported): Rename, and make it global. + Update caller. + * lib/dfa.h (dfasupported): Add prototype. + 2020-09-20 Bruno Haible canonicalize: Add support for UNC file names on native Windows. diff --git a/lib/dfa.c b/lib/dfa.c index c25a391727..4df5b009eb 100644 --- a/lib/dfa.c +++ b/lib/dfa.c @@ -3657,8 +3657,8 @@ free_mbdata (struct dfa *d) } /* Return true if every construct in D is supported by this DFA matcher. */ -static bool _GL_ATTRIBUTE_PURE -dfa_supported (struct dfa const *d) +bool +dfasupported (struct dfa const *d) { for (idx_t i = 0; i < d->tindex; i++) { @@ -3814,7 +3814,7 @@ dfacomp (char const *s, idx_t len, struct dfa *d, bool searchflag) dfassbuild (d); - if (dfa_supported (d)) + if (dfasupported (d)) { maybe_disable_superset_dfa (d); dfaanalyze (d, searchflag); diff --git a/lib/dfa.h b/lib/dfa.h index c5bff89818..2f77f2638a 100644 --- a/lib/dfa.h +++ b/lib/dfa.h @@ -113,6 +113,9 @@ extern struct dfa *dfasuperset (struct dfa const *d) _GL_ATTRIBUTE_PURE; /* The DFA is likely to be fast. */ extern bool dfaisfast (struct dfa const *) _GL_ATTRIBUTE_PURE; +/* Return true if every construct in D is supported by this DFA matcher. */ +extern bool dfasupported (struct dfa const *) _GL_ATTRIBUTE_PURE; + /* Free the storage held by the components of a struct dfa. */ extern void dfafree (struct dfa *);