From af9bdd210b6aef259c3e20a4caf14e1718a73f95 Mon Sep 17 00:00:00 2001 From: John Ellson Date: Thu, 8 Dec 2016 23:47:13 -0500 Subject: [PATCH] Lua-5.2 renamed string.gfind to string.gmatch --- tclpkg/gv/demo/modgraph.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 2.40.0