svn commit: r329359 - head/stand/lua

Kyle Evans kevans at FreeBSD.org
Fri Feb 16 04:59:22 UTC 2018


Author: kevans
Date: Fri Feb 16 04:59:21 2018
New Revision: 329359
URL: https://svnweb.freebsd.org/changeset/base/329359

Log:
  stand/lua: Remove a magic number/string (not a trivial literal)
  
  We'll arbitrarily use KEYSTR_ for string representations of non-trivial
  characters.

Modified:
  head/stand/lua/core.lua
  head/stand/lua/menu.lua

Modified: head/stand/lua/core.lua
==============================================================================
--- head/stand/lua/core.lua	Fri Feb 16 04:50:14 2018	(r329358)
+++ head/stand/lua/core.lua	Fri Feb 16 04:59:21 2018	(r329359)
@@ -32,6 +32,8 @@ local core = {};
 core.KEY_ENTER = 13;
 core.KEY_BACKSPACE = 127;
 
+core.KEYSTR_ESCAPE = "\027";
+
 function core.setVerbose(b)
 	if (b == nil) then
 		b = not core.verbose;

Modified: head/stand/lua/menu.lua
==============================================================================
--- head/stand/lua/menu.lua	Fri Feb 16 04:50:14 2018	(r329358)
+++ head/stand/lua/menu.lua	Fri Feb 16 04:59:21 2018	(r329359)
@@ -161,7 +161,7 @@ menu.welcome = {
 		name = function()
 			return color.highlight("Esc").."ape to loader prompt";
 		end,
-		alias = {"\027"}
+		alias = {core.KEYSTR_ESCAPE}
 	},
 
 	-- reboot


More information about the svn-src-head mailing list