summaryrefslogtreecommitdiff
path: root/luaotfload-tool.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-07-28 14:48:20 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-07-28 14:49:38 +0200
commit5c0a95b933cc0bcff531a4725f8170b2aec1726b (patch)
treea297e3b6f8d0bc90380267d184b0538432bf3271 /luaotfload-tool.lua
parent669810faca6f3fc870b206fff143a716986604d7 (diff)
downloadluaotfload-5c0a95b933cc0bcff531a4725f8170b2aec1726b.tar.gz
[tool] work around ms compiler limitations
Diffstat (limited to 'luaotfload-tool.lua')
-rwxr-xr-xluaotfload-tool.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua
index 92483d6..3846700 100755
--- a/luaotfload-tool.lua
+++ b/luaotfload-tool.lua
@@ -46,6 +46,7 @@ local iowrite = io.write
local kpsefind_file = kpse.find_file
local next = next
local osdate = os.date
+local ostype = os.type
local stringexplode = string.explode
local stringformat = string.format
local stringlower = string.lower
@@ -507,7 +508,14 @@ local display_general = function (fullinfo)
val = #fullinfo[key]
end
elseif mode == "d" then
- val = osdate("%F %T", fullinfo[key])
+ if ostype == "unix" then
+ val = osdate("%F %T", fullinfo[key])
+ else
+ --- the MS compiler doesn’t support C99, so
+ --- strftime is missing some functionality;
+ --- see loslib.c for details.
+ val = osdate("%Y-%m-d %H:%M:%S", fullinfo[key])
+ end
end
if not val then
val = "<none>"
@@ -795,7 +803,8 @@ actions.query = function (job)
"Resolved file name %q", foundname)
end
if job.show_info then
- show_font_info(foundname, query, job.full_info, job.warnings)
+ show_font_info (foundname, query, job.full_info, job.warnings)
+ texiowrite_nl ""
end
else
logs.names_report(false, 0,