/* dfa.h - declarations for GNU deterministic regexp compiler
- Copyright (C) 1988, 1998, 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1998, 2007, 2009-2014 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Written June, 1988 by Mike Haertel */
-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__
-# define __attribute__(x)
-#endif
-
-/* The __pure__ attribute was added in gcc 2.96. */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE /* empty */
-#endif
+#include <regex.h>
+#include <stddef.h>
/* Element of a list of strings, at least one of which is known to
appear in any R.E. matching the DFA. */
encountered a back-reference (1) or not (0). The caller may use this
to decide whether to fall back on a backtracking matcher. */
extern char *dfaexec (struct dfa *d, char const *begin, char *end,
- int newline, int *count, int *backref);
+ int newline, size_t *count, int *backref);
/* Free the storage held by the components of a struct dfa. */
extern void dfafree (struct dfa *);
/* Compute, for each possible character, the transitions out of a given
state, storing them in an array of integers. */
-extern void dfastate (int, struct dfa *, int []);
+extern void dfastate (ptrdiff_t, struct dfa *, ptrdiff_t []);
/* Error handling. */
/* dfaerror() is called by the regexp routines whenever an error occurs. It
takes a single argument, a NUL-terminated string describing the error.
The user must supply a dfaerror. */
-extern void dfaerror (const char *) __attribute__ ((noreturn));
+extern _Noreturn void dfaerror (const char *);
+
+extern int using_utf8 (void);
+
+/* Maximum number of characters that can be the case-folded
+ counterparts of a single character, not counting the character
+ itself. This is 1 for towupper, 1 for towlower, and 1 for each
+ entry in LONESOME_LOWER; see dfa.c. */
+enum { CASE_FOLDED_BUFSIZE = 1 + 1 + 19 };
+
+extern int case_folded_counterparts (wchar_t, wchar_t[CASE_FOLDED_BUFSIZE]);