diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf/scripts/texlive/lua/texlive/tlpdb.tlu | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Master/texmf/scripts/texlive/lua/texlive/tlpdb.tlu b/Master/texmf/scripts/texlive/lua/texlive/tlpdb.tlu index 39502a4007d..9722c078704 100644 --- a/Master/texmf/scripts/texlive/lua/texlive/tlpdb.tlu +++ b/Master/texmf/scripts/texlive/lua/texlive/tlpdb.tlu @@ -28,6 +28,7 @@ -- tlpobj.binfiles table indexed by archs giving table indexed by numbers -- tlpobj.binsize table indexed by archs giving strings -- tlpobj.docfiles = table indexed by numbers +-- tlpobj.docfiledata[docfile][tag] = value -- tlpobj.docsize string -- tlpobj.srcfiles = table indexed by numbers -- tlpobj.srcsize string @@ -173,11 +174,25 @@ function read_tlpdb(root) table.insert(tlpobj.runfiles,rest) lastcmd = "runfiles" elseif first == "docfilescontinued" then + local dfile,tags = string.match(rest,'^(%S+)%s*(.*)%s*$') if not(tlpobj.docfiles) then tlpobj.docfiles = {} end - -- TODO doc files can have tags!!!! - table.insert(tlpobj.docfiles,rest) + table.insert(tlpobj.docfiles,dfile) + for aaa,bbb in string.gmatch(tags,'(%S+)=(%b"")') do + if not(tlpobj.docfiledata) then + tlpobj.docfiledata = {} + end + if aaa == "details" or aaa == "language" then + if not(tlpobj.docfiledata[dfile]) then + tlpobj.docfiledata[dfile] = {} + end + tlpobj.docfiledata[dfile][aaa] = bbb + else + io.stderr:write('Error reading tlpdb: unknown docfile tag in line\n>>'..line.."<<\n") + os.exit(1) + end + end lastcmd = "docfiles" elseif first == "srcfilescontinued" then if not(tlpobj.srcfiles) then |