summaryrefslogtreecommitdiff
path: root/tex/context/base/m-zint.mkiv
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-09-13 00:00:18 +0300
committerMarius <mariausol@gmail.com>2011-09-13 00:00:18 +0300
commit79f4f6dcc36ebeec36914f7dbcbf35f0f7a8fcae (patch)
tree6a3a868eced8009fe71dc9432faa802ec2d55bcb /tex/context/base/m-zint.mkiv
parent2161e9a15e74493c44c105515a51ca691f0cd93c (diff)
downloadcontext-79f4f6dcc36ebeec36914f7dbcbf35f0f7a8fcae.tar.gz
beta 2011.09.12 22:49
Diffstat (limited to 'tex/context/base/m-zint.mkiv')
-rw-r--r--tex/context/base/m-zint.mkiv6
1 files changed, 5 insertions, 1 deletions
diff --git a/tex/context/base/m-zint.mkiv b/tex/context/base/m-zint.mkiv
index c439476c2..95b265c57 100644
--- a/tex/context/base/m-zint.mkiv
+++ b/tex/context/base/m-zint.mkiv
@@ -47,6 +47,9 @@ local function numberofcode(code)
if not reverse then
local types = os.resultof(format("%s --types",zint)) or ""
local formats = lpeg.match(pattern,types)
+ if not formats or not next(formats) then
+ return code
+ end
reverse = table.swapped(formats) or { }
end
code = cleancode(code)
@@ -65,7 +68,8 @@ function moduledata.zint.generate(code,data,suffix,options)
local code = numberofcode(code)
logs.simple("using 'zint' to generate '%s'",base)
io.savedata(temp,data)
- os.execute(format('%s --barcode=%s --output="%s" --input="%s"',zint,code,name,temp,options or ""))
+ os.execute(format('%s --barcode=%s --output="%s" --input="%s" %s',zint,code,name,temp,options or ""))
+ os.remove(temp)
end
return name
end