summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-07-22 08:58:59 +0000
committerNorbert Preining <preining@logic.at>2008-07-22 08:58:59 +0000
commitaf9b6adea174feb643b34bbf11b795ba9185f4ef (patch)
tree29f87059ab1187d4189da032046c257fd82f029b
parentc9fd26c64a845283f252c5a31eaa087569b770fb (diff)
tlpdb.tlu: support reading docfile tags from tlpdb
git-svn-id: svn://tug.org/texlive/trunk@9699 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf/scripts/texlive/lua/texlive/tlpdb.tlu19
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