summaryrefslogtreecommitdiff
path: root/tex/context/base/m-zint.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-09-12 22:49:00 +0200
committerHans Hagen <pragma@wxs.nl>2011-09-12 22:49:00 +0200
commit4cfc854a468fdfb00073bfad6067174da6b80b0d (patch)
treefb9d51c3c560b7f98b0ed8cc758fef1a4669b20c /tex/context/base/m-zint.mkiv
parent56ce2a8ba7ff7e971378ef62c519cddf86de26c8 (diff)
downloadcontext-4cfc854a468fdfb00073bfad6067174da6b80b0d.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