Skip to content

Commit

Permalink
Changing mode to modeA in mode_select
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Feb 3, 2025
1 parent 27f79fc commit 2b2438a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions proj_mgmt/demoIrreversible.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function purgeFlg()
end

------------------------------------------------------------------------
-- Mode function check. It checks to see that argT.mode is a table
-- Mode function check. It checks to see that argT.modeA is a table
-- Does not return when error is found

local s_validModeT = {
Expand All @@ -48,7 +48,7 @@ local s_validModeT = {


local function l_modeCk(argT)
local modeA = argT.mode
local modeA = argT.modeA
if (type(modeA) ~= "table") then
print(argT.__cmdName.." has a bad mode \""..tostring(modeA).."\". It must be a table.")
os.exit(1)
Expand Down Expand Up @@ -257,16 +257,16 @@ end


------------------------------------------------------------------------
-- This function uses the argT.mode to return the correct mcp
-- Note that all argT must have a argT.mode array
-- This function uses the argT.modeA to return the correct mcp
-- Note that all argT must have a argT.modeA array

local function l_chose_mcp(argT)
local my_mode = mode()
if (my_mode == "show" or purgeFlg()) then
return mcp
end

local modeA = argT.mode
local modeA = argT.modeA
local action = false
local my_mcp
for i = 1, #modeA do
Expand Down Expand Up @@ -300,15 +300,15 @@ local function l_build_argTable(cmdName, first_elem, ... )
argT.__cmdName = cmdName
argT.kind = "Table"
argT.n = #argT
if (not argT.mode) then
if (not (argT.mode == "table" and next(argT.mode) ~= nil)) then
argT.mode = {"normal"}
if (not argT.modeA) then
if (not (type(argT.modeA) == "table" and next(argT.modeA) ~= nil)) then
argT.modeA = {"normal"}
end
end
else
argT = pack(first_elem, ...)
argT.__cmdName = cmdName
argT.mode = {"normal"}
argT.modeA = {"normal"}
argT.kind = "Array"
end
return argT
Expand Down Expand Up @@ -437,10 +437,10 @@ function main()
setenv{"A", "B"}
setenv("A", false)
setenv("A", "B", true)
setenv{"A", "B", mode = {"unload"}}
setenv{"A", "B", modeA = {"unload"}}

pushenv("A", "B")
pushenv{"A", "B", mode = {"unload"}}
pushenv{"A", "B", modeA = {"unload"}}

prepend_path("PATH", "/a/B")
prepend_path("PATH", "/a/B",":")
Expand All @@ -452,7 +452,7 @@ function main()

load_module("A", "B", "C")

setenv{"A", "B", mode = true}
setenv{"A", "B", modeA = true}

end

Expand Down

0 comments on commit 2b2438a

Please sign in to comment.