From 1fdfbf9e96f638e60bf4d34aa30327e35d001a0e Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Wed, 20 Jan 2021 18:22:07 -0500 Subject: Generate tags for sh files in mtags Only matches functions declared at the beginnings of lines, but I'm fine with that. --- bin/mtags.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bin/mtags.c') diff --git a/bin/mtags.c b/bin/mtags.c index 55257088..1ebfbac5 100644 --- a/bin/mtags.c +++ b/bin/mtags.c @@ -49,6 +49,7 @@ int main(int argc, char *argv[]) { regex_t makeFile, makeLine; regex_t mdocFile, mdocLine; + regex_t shFile, shLine; int error = 0 || regcomp(&makeFile, "(^|/)Makefile|[.]mk$", REG_EXTENDED | REG_NOSUB) || regcomp( @@ -57,7 +58,11 @@ int main(int argc, char *argv[]) { REG_EXTENDED ) || regcomp(&mdocFile, "[.][1-9]$", REG_EXTENDED | REG_NOSUB) - || regcomp(&mdocLine, "^[.]S[hs] ([^\t\n]+)", REG_EXTENDED); + || regcomp(&mdocLine, "^[.]S[hs] ([^\t\n]+)", REG_EXTENDED) + || regcomp( + &shFile, "(^|/)[.](profile|shrc)|[.]sh$", REG_EXTENDED | REG_NOSUB + ) + || regcomp(&shLine, "^([_[:alnum:]]+)[[:blank:]]*[(][)]", REG_EXTENDED); assert(!error); size_t cap = 0; @@ -68,6 +73,8 @@ int main(int argc, char *argv[]) { regex = &makeLine; } else if (!regexec(&mdocFile, argv[i], 0, NULL, 0)) { regex = &mdocLine; + } else if (!regexec(&shFile, argv[i], 0, NULL, 0)) { + regex = &shLine; } else { warnx("skipping unknown file type %s", argv[i]); continue; -- cgit 1.4.1 51&follow=1'>commit diff
path: root/compat/strlcpy.c (unfollow)
Commit message (Collapse)Author
2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe
Some compat sources (getentropy_linux.c for example) require OpenSSL. Reported by Robert Scheck.
2020-12-15Import LibreSSL 3.3.1June McEnroe
2020-11-24Import LibreSSL 3.3.0June McEnroe
2020-10-22Import LibreSSL 3.2.2June McEnroe
2020-09-29Import LibreSSL 3.2.1June McEnroe
2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe
2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe
2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe