]> Savannah Git Hosting - gnulib.git/commitdiff
dfa: make dfasupported a global function
authorNorihiro Tanaka <noritnk@kcn.ne.jp>
Sun, 20 Sep 2020 07:00:04 +0000 (16:00 +0900)
committerJim Meyering <meyering@fb.com>
Mon, 21 Sep 2020 00:01:03 +0000 (17:01 -0700)
* lib/dfa.c (dfasupported): Rename, and make it global.
Update caller.
* lib/dfa.h (dfasupported): Add prototype.

ChangeLog
lib/dfa.c
lib/dfa.h

index 4fdd1a778c659d5314c9fece3853395bb9be06aa..188bb8f2fe670a32c01aac253823f4cf43066588 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-09-20  Norihiro Tanaka  <noritnk@kcn.ne.jp>
+
+       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  <bruno@clisp.org>
 
        canonicalize: Add support for UNC file names on native Windows.
index c25a391727d6ba15fcc330740916127fa38aa37b..4df5b009eb96748743b719550beb8cf3e48fb910 100644 (file)
--- 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);
index c5bff89818cb059a2ae50a5e98fbdfcf27609ea3..2f77f2638ac4883cd78ff4da83d022bef9d4a746 100644 (file)
--- 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 *);