From: Matthew Fernandez Date: Sat, 6 Jun 2020 00:10:09 +0000 (-0700) Subject: remove unused strsubmatch function X-Git-Tag: 2.44.1~5^2^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c64e9485f701b8b0cb9ed4edf3edacfb739ca4d;p=graphviz remove unused strsubmatch function This also removes two compiler warnings. --- diff --git a/lib/ast/strmatch.c b/lib/ast/strmatch.c index 3e374a9c9..b91f3b41e 100644 --- a/lib/ast/strmatch.c +++ b/lib/ast/strmatch.c @@ -777,20 +777,3 @@ int strmatch(const char *s, const char *p) { return strgrpmatch(s, p, NiL, 0, STR_MAXIMAL | STR_LEFT | STR_RIGHT); } - -/* - * leading substring match - * first char after end of substring returned - * 0 returned if no match - * - * OBSOLETE: use strgrpmatch() - */ - -char *strsubmatch(const char *s, const char *p, int flags) -{ - int match[2]; - - return strgrpmatch(s, p, match, 1, - (flags ? STR_MAXIMAL : 0) | STR_LEFT) ? (char *) s + - match[1] : (char *) 0; -}