Skip to content

Commit

Permalink
Removed: Numbers from comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdvideo1234 committed Nov 27, 2024
1 parent 09a90bb commit 4e0a222
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 26 deletions.
2 changes: 1 addition & 1 deletion lua/autorun/trackassembly_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present
------------ CONFIGURE ASMLIB ------------

asmlib.InitBase("track","assembly")
asmlib.SetOpVar("TOOL_VERSION","8.812")
asmlib.SetOpVar("TOOL_VERSION","8.813")

------------ CONFIGURE GLOBAL INIT OPVARS ------------

Expand Down
56 changes: 31 additions & 25 deletions lua/trackassembly/trackasmlib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3745,16 +3745,16 @@ function ExportDSV(sTable, sPref, sDelim, bExp)
local fName = GetLibraryPath(sSors, fPref, defTab.Name)
local F = fileOpen(fName, "wb", "DATA"); if(not F) then
LogInstance(sHew.." Open fail: "..fName,sTable); return false end
F:Write("#1 "..sFunc..":"..sHew.." "..GetDateTime().." [ "..sMoDB.." ]\n")
F:Write("#2 "..sTable..":("..makTab:GetColumnList(sDelim)..")\n")
F:Write("# "..sFunc..":"..sHew.." "..GetDateTime().." [ "..sMoDB.." ]\n")
F:Write("# "..sTable..":("..makTab:GetColumnList(sDelim)..")\n")
if(sMoDB == "SQL") then
local qsKey = GetOpVar("FORM_KEYSTMT")
local qIndx = qsKey:format(sFunc, sTable)
local Q = makTab:Get(qIndx); if(not IsHere(Q)) then local tQ = defTab.Query[sFunc]
Q = makTab:Select():Order(unpack(tQ.O)):Store(qIndx):Get(qIndx) end
if(not IsHere(Q)) then F:Flush(); F:Close()
LogInstance(sHew.." Build statement failed",sTable); return false end
F:Write("#3 Query:<"..Q..">\n")
F:Write("# Query:<"..Q..">\n")
local qData = sqlQuery(Q); if(not qData and isbool(qData)) then F:Flush(); F:Close()
LogInstance(sHew.." SQL exec error "..GetReport(sqlLastError(), Q), sTable); return nil end
if(not IsHere(qData) or IsEmpty(qData)) then F:Flush(); F:Close()
Expand Down Expand Up @@ -3787,23 +3787,29 @@ end
* bExp > Forces the input from the export folder.( defaults to DSV )
]]
function ImportDSV(sTable, bComm, sPref, sDelim, bExp)
if(not isstring(sTable)) then
local sTable = tostring(sTable or ""); if(IsBlank(sTable)) then
LogInstance("Table mismatch "..GetReport(sTable)); return false end
local sDelim, sLine, isEOF = tostring(sDelim or "\t"):sub(1,1), "", false
local fPref = tostring(sPref or GetInstPref()); if(IsBlank(fPref)) then
LogInstance("Prefix mismatch "..GetReport(fPref,sPref), sTable); return false end
local tHew, sMoDB = GetOpVar("PATTEM_EXDSVHED"), GetOpVar("MODE_DATABASE")
local sHew = tHew[2]:format(fPref, sTable, sDelim)
local makTab = GetBuilderNick(sTable); if(not IsHere(makTab)) then
LogInstance(sHew.." Missing table builder",sTable); return nil end
local defTab = makTab:GetDefinition(); if(not IsHere(defTab)) then
LogInstance(sHew.." Missing table definition",sTable); return false end
local cmdTab = makTab:GetCommand(); if(not IsHere(cmdTab)) then
LogInstance(sHew.." Missing table command",sTable); return false end
local sSors = (bExp and GetOpVar("DIRPATH_EXP") or GetOpVar("DIRPATH_DSV"))
local fName = GetLibraryPath(sSors, fPref, defTab.Name)
local F = fileOpen(fName, "rb", "DATA"); if(not F) then
LogInstance(sHew.." Open fail: "..fName,sTable); return false end
local bFile, sLine, isEOF, F = fileExists(sTable), "", false
local sMoDB, makTab, defTab, cmdTab, sHew = GetOpVar("MODE_DATABASE")
if(bFile) then
LogInstance("Reading configuration: "..sTable)
else
sDelim = tostring(sDelim or "\t"):sub(1,1)
local fPref = tostring(sPref or GetInstPref()); if(IsBlank(fPref)) then
LogInstance("Prefix mismatch "..GetReport(fPref,sPref), sTable); return false end
local tHew = GetOpVar("PATTEM_EXDSVHED")
sHew = tHew[2]:format(fPref, sTable, sDelim)
makTab = GetBuilderNick(sTable); if(not IsHere(makTab)) then
LogInstance(sHew.." Missing table builder",sTable); return nil end
defTab = makTab:GetDefinition(); if(not IsHere(defTab)) then
LogInstance(sHew.." Missing table definition",sTable); return false end
cmdTab = makTab:GetCommand(); if(not IsHere(cmdTab)) then
LogInstance(sHew.." Missing table command",sTable); return false end
local sSors = (bExp and GetOpVar("DIRPATH_EXP") or GetOpVar("DIRPATH_DSV"))
local fName = GetLibraryPath(sSors, fPref, defTab.Name)
F = fileOpen(fName, "rb", "DATA"); if(not F) then
LogInstance(sHew.." Open fail: "..fName,sTable); return false end
end
if(sMoDB == "SQL") then sqlQuery(cmdTab.BEGIN); LogInstance(sHew.." Begin",sTable) end
while(not isEOF) do sLine, isEOF = GetStringFile(F)
if((not IsBlank(sLine)) and (not IsDisable(sLine))) then
Expand Down Expand Up @@ -4332,10 +4338,10 @@ function ExportTypeDSV(sType, sDelim)
LogInstance("("..fPref..")("..fName..") Open fail"); return false end
local A = fileOpen(aNam, "wb", "DATA"); if(not A) then
LogInstance("("..fPref..")("..fName..") Open fail"); return false end
P:Write("#1 "..sFunc..":"..tHew[2]:format(fPref,defP.Nick,sDelim).." "..GetDateTime().." [ "..sMoDB.." ]\n")
P:Write("#2 "..defP.Nick..":("..makP:GetColumnList(sDelim)..")\n")
A:Write("#1 "..sFunc..":"..tHew[2]:format(fPref,defA.Nick,sDelim).." "..GetDateTime().." [ "..sMoDB.." ]\n")
A:Write("#2 "..defA.Nick..":("..makA:GetColumnList(sDelim)..")\n")
P:Write("# "..sFunc..":"..tHew[2]:format(fPref,defP.Nick,sDelim).." "..GetDateTime().." [ "..sMoDB.." ]\n")
P:Write("# "..defP.Nick..":("..makP:GetColumnList(sDelim)..")\n")
A:Write("# "..sFunc..":"..tHew[2]:format(fPref,defA.Nick,sDelim).." "..GetDateTime().." [ "..sMoDB.." ]\n")
A:Write("# "..defA.Nick..":("..makA:GetColumnList(sDelim)..")\n")
if(sMoDB == "SQL") then
local qsNov = GetOpVar("MISS_NOAV")
local qsKey = GetOpVar("FORM_KEYSTMT")
Expand All @@ -4346,7 +4352,7 @@ function ExportTypeDSV(sType, sDelim)
Q = makP:Select():Where(unpack(tQ.W)):Order(unpack(tQ.O)):Store(qInxP):Get(qInxP, qType) end
if(not IsHere(Q)) then P:Flush(); P:Close(); A:Flush(); A:Close()
LogInstance("("..fPref..") Build statement failed",defP.Nick); return false end
P:Write("#3 Query:<"..Q..">\n")
P:Write("# Query:<"..Q..">\n")
local qP = sqlQuery(Q); if(not qP and isbool(qP)) then P:Flush(); P:Close(); A:Flush(); A:Close()
LogInstance("("..fPref..") SQL exec error "..GetReport(sqlLastError(), Q), defP.Nick); return false end
if(not IsHere(qP) or IsEmpty(qP)) then P:Flush(); P:Close(); A:Flush(); A:Close()
Expand All @@ -4362,7 +4368,7 @@ function ExportTypeDSV(sType, sDelim)
Q = makA:Select():Where(unpack(tQ.W)):Order(unpack(tW.O)):Store(qInxA):Get(qInxA, qrMo) end
if(not IsHere(Q)) then P:Flush(); P:Close(); A:Flush(); A:Close()
LogInstance("("..fPref..") Build statement failed",defA.Nick); return qsNov end
if(iP == 1) then A:Write("#3 Query:<"..Q..">\n") end
if(iP == 1) then A:Write("# Query:<"..Q..">\n") end
local qA = sqlQuery(Q); if(not qA and isbool(qA)) then P:Flush(); P:Close(); A:Flush(); A:Close()
LogInstance("("..fPref..") SQL exec error "..GetReport(sqlLastError(), Q), defA.Nick); return qsNov end
if(not IsHere(qA) or IsEmpty(qA)) then
Expand Down

0 comments on commit 4e0a222

Please sign in to comment.