summaryrefslogtreecommitdiff
path: root/lib/dfa.h
Commit message (Collapse)AuthorAgeFilesLines
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* dfa: port to non-gnulibPaul Eggert2021-08-291-0/+1
| | | | | | | Suggested by Arnold Robbins in: https://lists.gnu.org/r/bug-gnulib/2021-08/msg00181.html * lib/dfa.h (_GL_ATTRIBUTE_DEALLOC) [!_GL_ATTRIBUTE_MALLOC]: Add missing definition.
* dfa: prefer idx_t to ptrdiff_t for nonnegativePaul Eggert2021-08-241-3/+4
| | | | | | | | * lib/dfa.c (struct dfa, dfaexec_main, dfaexec_mb, dfaexec_sb) (dfaexec_noop, dfaexec): * lib/dfa.h (dfaparse, dfacomp, dfaexec): Prefer idx_t to ptrdiff_t for counts, which should be nonnegative. * lib/dfa.h: Include idx.h.
* dfa: Improve GCC 11 allocation-deallocation checking.Bruno Haible2021-08-071-3/+6
| | | | | * lib/dfa.h (dfamust): Declare that deallocation must happen through dfamustfree.
* dfa: improve -fanalyzer malloc checkingPaul Eggert2021-08-011-2/+7
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* dfa.h: support inclusion from C++Paul Eggert2020-11-021-0/+13
| | | | | * lib/dfa.h: Allow multiple inclusion, and inclusion from C++ code. The latter was suggested by Arnold Robbins.
* dfa: make dfasupported a global functionNorihiro Tanaka2020-09-201-0/+3
| | | | | | * lib/dfa.c (dfasupported): Rename, and make it global. Update caller. * lib/dfa.h (dfasupported): Add prototype.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* dfa: struct dfamust now uses flexible arrayPaul Eggert2019-12-191-1/+1
| | | | | | | | | * lib/dfa.c: Include flexmember.h. (dfamust, dfamustfree): Adjust to struct dfamust change. This saves a call to malloc+free. * lib/dfa.h (struct dfamust): Make the final member a flexible array member. * modules/dfa (Depends-on): Add flexmember.
* dfa: new function dfacopysyntaxPaul Eggert2019-12-171-2/+5
| | | | | | * lib/dfa.c (struct dfa): Move syntax member later so that dfacopysyntax can easily clear earlier members. (dfacopysyntax): New function, used by Gawk.
* dfa: port _GL_ATTRIBUTE_MALLOC to GawkPaul Eggert2019-12-171-0/+5
| | | | | | Gawk does not use Gnulib, and does not define _GL_ATTRIBUTE_MALLOC. * lib/dfa.h (_GL_ATTRIBUTE_MALLOC): Define to empty if not already defined.
* dfa: prefer ptrdiff_t for API, tooPaul Eggert2019-12-121-3/+3
| | | | | | | | | | | | | Also, use ‘idx_t’ for ptrdiff_t values that must be nonnegative, but do this only for internal use for now. * NEWS: Mention the API change. * lib/dfa.c (idx_t, IDX_MAX): New type and max value, for internal use for now. Use them instead of ptrdiff_t and PTRDIFF_MAX for values known to be nonnegative. (dfaparse, dfaexec_mb, dfaexec_sb, dfaexec_noop, dfaexec): Prefer idx_t or ptrdiff_t to size_t for API. * lib/dfa.h (dfaparse, dfacomp, dfaexec): Prefer ptrdiff_t to size_t for API.
* dfa: update commentary for previous changePaul Eggert2019-12-111-6/+8
| | | | | * NEWS: Mention the change. * lib/dfa.c, lib/dfa.h (dfaparse, dfamust, dfacomp): Update comments.
* dfa: separate parse and compile phaseNorihiro Tanaka2019-12-111-0/+3
| | | | | | | | | | | ‘dfamust’ must be called after parsing and before tokens are reordered, but both are executed in the compilation phase. Token reordering was introduced in Gnulib commit 2018-10-22T15:01:08Z!noritnk@kcn.ne.jp (5c7a0371823876cca7a1347fa09ca26bbbff0c98). * lib/dfa.c (dfaparse): Change it to global function. (dfacomp): If first argument is NULL, skip parse. * lib/dfa.h: (dfaparse): Add a prototype.
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: port more modules to GCC 8Paul Eggert2018-05-031-6/+0
| | | | | | | | | | | | * lib/dirname.h (base_name): * lib/exclude.h (new_exclude): * lib/xstrndup.h (xstrndup): Add malloc attribute. * lib/readutmp.c: Pacify GCC 8 about safe use of strncpy. * lib/sig-handler.h (get_handler) [SA_SIGINFO]: Simplify. This pacifies GCC 8. * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_ATTRIBUTE_MALLOC here. All other definitions removed.
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* dfa: remove DFA_CASE_FOLD flag in favor of RE_ICASEArnold D. Robbins2016-12-131-4/+1
| | | | | * dfa.h (DFA_CASE_FOLD): Remove. * dfa.c (dfasyntax): Set dfa->syntax.case_fold based on RE_ICASE.
* dfa: new module, importing grep's DFA matcherJim Meyering2016-09-091-0/+126
Since grep's DFA matcher is now being used by two gnulib-enabled projects, grep and sed, it makes sense to version-control its sources and unit tests in one place: here. * modules/dfa: New module. * modules/dfa-tests: New file. * lib/dfa.c: New file, from grep. * lib/dfa.h: Likewise. * lib/localeinfo.c: Likewise. * lib/localeinfo.h: Likewise. * tests/dfa-match-aux.c: Likewise. * tests/dfa-invalid-char-class.sh: Likewise. * tests/dfa-match.sh: Likewise, with minor changes. * MODULES.html.sh (Misc): Add "dfa" to this list.