From owner-svn-src-all@freebsd.org Sun Feb 25 03:30:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82D37F38B2B; Sun, 25 Feb 2018 03:30:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34FAD8650B; Sun, 25 Feb 2018 03:30:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 13DDB2F03E; Sun, 25 Feb 2018 03:30:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1P3UOhV097590; Sun, 25 Feb 2018 03:30:24 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1P3UOLP097589; Sun, 25 Feb 2018 03:30:24 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201802250330.w1P3UOLP097589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 25 Feb 2018 03:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329944 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 329944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Feb 2018 03:30:25 -0000 Author: kevans Date: Sun Feb 25 03:30:24 2018 New Revision: 329944 URL: https://svnweb.freebsd.org/changeset/base/329944 Log: lualoader: Don't explicitly index tables without reason These indices were assigned the same values as they would've been implicitly assigned anyways. While here, throw terminating commas after the last value of tables. Modified: head/stand/lua/config.lua Modified: head/stand/lua/config.lua ============================================================================== --- head/stand/lua/config.lua Sun Feb 25 00:35:21 2018 (r329943) +++ head/stand/lua/config.lua Sun Feb 25 03:30:24 2018 (r329944) @@ -33,95 +33,94 @@ local config = {} local modules = {} -local pattern_table local carousel_choices = {} -pattern_table = { - [1] = { +local pattern_table = { + { str = "^%s*(#.*)", - process = function(_, _) end + process = function(_, _) end, }, -- module_load="value" - [2] = { + { str = "^%s*([%w_]+)_load%s*=%s*\"([%w%s%p]-)\"%s*(.*)", process = function(k, v) if modules[k] == nil then modules[k] = {} end modules[k].load = v:upper() - end + end, }, -- module_name="value" - [3] = { + { str = "^%s*([%w_]+)_name%s*=%s*\"([%w%s%p]-)\"%s*(.*)", process = function(k, v) config.setKey(k, "name", v) - end + end, }, -- module_type="value" - [4] = { + { str = "^%s*([%w_]+)_type%s*=%s*\"([%w%s%p]-)\"%s*(.*)", process = function(k, v) config.setKey(k, "type", v) - end + end, }, -- module_flags="value" - [5] = { + { str = "^%s*([%w_]+)_flags%s*=%s*\"([%w%s%p]-)\"%s*(.*)", process = function(k, v) config.setKey(k, "flags", v) - end + end, }, -- module_before="value" - [6] = { + { str = "^%s*([%w_]+)_before%s*=%s*\"([%w%s%p]-)\"%s*(.*)", process = function(k, v) config.setKey(k, "before", v) - end + end, }, -- module_after="value" - [7] = { + { str = "^%s*([%w_]+)_after%s*=%s*\"([%w%s%p]-)\"%s*(.*)", process = function(k, v) config.setKey(k, "after", v) - end + end, }, -- module_error="value" - [8] = { + { str = "^%s*([%w_]+)_error%s*=%s*\"([%w%s%p]-)\"%s*(.*)", process = function(k, v) config.setKey(k, "error", v) - end + end, }, -- exec="command" - [9] = { + { str = "^%s*exec%s*=%s*\"([%w%s%p]-)\"%s*(.*)", process = function(k, _) if loader.perform(k) ~= 0 then print("Failed to exec '" .. k .. "'") end - end + end, }, -- env_var="value" - [10] = { + { str = "^%s*([%w%p]+)%s*=%s*\"([%w%s%p]-)\"%s*(.*)", process = function(k, v) if config.setenv(k, v) ~= 0 then print("Failed to set '" .. k .. "' with value: " .. v .. "") end - end + end, }, -- env_var=num - [11] = { + { str = "^%s*([%w%p]+)%s*=%s*(%d+)%s*(.*)", process = function(k, v) if config.setenv(k, v) ~= 0 then print("Failed to set '" .. k .. "' with value: " .. v .. "") end - end - } + end, + }, } local function readFile(name, silent)