summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-09-17 00:40:23 +0300
committerMarius <mariausol@gmail.com>2012-09-17 00:40:23 +0300
commitaef5e141d1336f02563e3ad2b54dfe414d4c8049 (patch)
tree0f5074f5819482cd81c13583a0e2aa694200f9b6 /scripts
parent0f82c3f6ef101a553b3f28d9f9d8cb905106eec2 (diff)
downloadcontext-aef5e141d1336f02563e3ad2b54dfe414d4c8049.tar.gz
beta 2012.09.16 23:18
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtxrun.lua13
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua13
-rw-r--r--scripts/context/stubs/unix/mtxrun13
3 files changed, 27 insertions, 12 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index ca9f2d348..dc8aa2615 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -5936,6 +5936,7 @@ function inspect(i) -- global function
else
print(tostring(i))
end
+ return i -- so that we can inline the inspect
end
-- from the lua book:
@@ -8417,10 +8418,14 @@ function xml.load(filename,settings)
elseif filename then -- filehandle
data = filename:read("*all")
end
- settings.currentresource = filename
- local result = xmlconvert(data,settings)
- settings.currentresource = nil
- return result
+ if settings then
+ settings.currentresource = filename
+ local result = xmlconvert(data,settings)
+ settings.currentresource = nil
+ return result
+ else
+ return xmlconvert(data,{ currentresource = filename })
+ end
end
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index ca9f2d348..dc8aa2615 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -5936,6 +5936,7 @@ function inspect(i) -- global function
else
print(tostring(i))
end
+ return i -- so that we can inline the inspect
end
-- from the lua book:
@@ -8417,10 +8418,14 @@ function xml.load(filename,settings)
elseif filename then -- filehandle
data = filename:read("*all")
end
- settings.currentresource = filename
- local result = xmlconvert(data,settings)
- settings.currentresource = nil
- return result
+ if settings then
+ settings.currentresource = filename
+ local result = xmlconvert(data,settings)
+ settings.currentresource = nil
+ return result
+ else
+ return xmlconvert(data,{ currentresource = filename })
+ end
end
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index ca9f2d348..dc8aa2615 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -5936,6 +5936,7 @@ function inspect(i) -- global function
else
print(tostring(i))
end
+ return i -- so that we can inline the inspect
end
-- from the lua book:
@@ -8417,10 +8418,14 @@ function xml.load(filename,settings)
elseif filename then -- filehandle
data = filename:read("*all")
end
- settings.currentresource = filename
- local result = xmlconvert(data,settings)
- settings.currentresource = nil
- return result
+ if settings then
+ settings.currentresource = filename
+ local result = xmlconvert(data,settings)
+ settings.currentresource = nil
+ return result
+ else
+ return xmlconvert(data,{ currentresource = filename })
+ end
end