summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--luaotfload-diagnostics.lua8
-rwxr-xr-xluaotfload-tool.lua13
2 files changed, 18 insertions, 3 deletions
diff --git a/luaotfload-diagnostics.lua b/luaotfload-diagnostics.lua
index db807de..46ae412 100644
--- a/luaotfload-diagnostics.lua
+++ b/luaotfload-diagnostics.lua
@@ -312,7 +312,12 @@ else
out ("%d of %d Github API requests left.", left, limit)
if left == 0 then
out ("Cannot make any more API requests.")
- out ("Try again later at %s.", osdate ("%F %T", reset))
+ if ostype == "unix" then
+ out ("Try again later at %s.", osdate ("%F %T", reset))
+ else --- windows doesn’t C99
+ out ("Try again later at %s.",
+ osdate ("%Y-%m-d %H:%M:%S", reset))
+ end
end
return true
end
@@ -620,3 +625,4 @@ end
return diagnose
+-- vim:tw=71:sw=4:ts=4:expandtab
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,