From: John Ellson Date: Fri, 9 Dec 2016 04:47:13 +0000 (-0500) Subject: Lua-5.2 renamed string.gfind to string.gmatch X-Git-Tag: 2.42.0~228 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af9bdd210b6aef259c3e20a4caf14e1718a73f95;p=graphviz Lua-5.2 renamed string.gfind to string.gmatch --- diff --git a/tclpkg/gv/demo/modgraph.lua b/tclpkg/gv/demo/modgraph.lua index 719879af9..4cb83344d 100755 --- a/tclpkg/gv/demo/modgraph.lua +++ b/tclpkg/gv/demo/modgraph.lua @@ -22,9 +22,13 @@ gv.setv(N, 'fontname', 'helvetica') gv.setv(E, 'arrowsize', '.4') for rec in modules do - for mod, usedbylist in string.gfind(rec, "([_%w]+) %w+ %w+ ([-,_%w]+)") do + + -- note - Lua's "gfind" in 5.1 became "fmatch" in 5.2 + + + for mod, usedbylist in string.gmatch(rec, "([_%w]+) %w+ %w+ ([-,_%w]+)") do n = gv.node(G, mod) - for usedby in string.gfind(usedbylist, "([-_%w]+)") do + for usedby in string.gmatch(usedbylist, "([-_%w]+)") do if (usedby ~= '-') and (usedby ~= '') then gv.edge(n, gv.node(G, usedby)) end