use the copyright statement provided by the Lua distribution in lua.h

This commit is contained in:
nhmall
2019-11-30 18:43:57 -05:00
parent 719ca3003e
commit 2a2021d5e4
5 changed files with 14 additions and 3 deletions

View File

@@ -304,6 +304,9 @@ static struct rt_opt {
} rt_opts[] = {
{ ":PATMATCH:", regex_id },
{ ":LUAVERSION:", (const char *) g.lua_ver + 3 }, /* +3 skip past "Lua" */
#ifdef LUA_COPYRIGHT
{ ":LUACOPYRIGHT:", (const char *) g.lua_copyright },
#endif
};
/*
@@ -320,10 +323,11 @@ char *buf;
if (!g.lua_ver[0])
get_lua_version();
for (i = 0; i < SIZE(rt_opts); ++i) {
if (strstri(buf, rt_opts[i].token) && *rt_opts[i].value)
if (strstri(buf, rt_opts[i].token) && *rt_opts[i].value) {
(void) strsubst(buf, rt_opts[i].token, rt_opts[i].value);
}
/* we don't break out of the loop after a match; there might be
other matches on the same line */
}