summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-01-10 02:20:15 +0200
committerMarius <mariausol@gmail.com>2013-01-10 02:20:15 +0200
commitd38d94fe9542984e38b9839eb2383656328b9da9 (patch)
tree2b14bc228f545d31c35076e1e395113c3abdf393 /scripts
parent0f948daabca9dcfb92d6325b9a7a5edba22c5abb (diff)
downloadcontext-d38d94fe9542984e38b9839eb2383656328b9da9.tar.gz
beta 2013.01.10 01:04
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtxrun.lua15
-rw-r--r--scripts/context/ruby/base/kpse.rb2
-rw-r--r--scripts/context/ruby/base/system.rb2
-rw-r--r--scripts/context/ruby/base/tool.rb2
-rw-r--r--scripts/context/ruby/runtools.rb2
-rw-r--r--scripts/context/ruby/texmfstart.rb2
-rw-r--r--scripts/context/ruby/texsync.rb2
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua15
-rw-r--r--scripts/context/stubs/unix/mtxrun15
9 files changed, 33 insertions, 24 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index f704d63e4..731f8ca21 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -10701,16 +10701,19 @@ function xml.parent(root)
end
function xml.body(root)
- return (root.ri and root.dt[root.ri]) or root -- not ok yet
+ return root.ri and root.dt[root.ri] or root -- not ok yet
end
function xml.name(root)
if not root then
return ""
- elseif root.ns == "" then
- return root.tg
+ end
+ local ns = root.ns
+ local tg = root.tg
+ if ns == "" then
+ return tg
else
- return root.ns .. ":" .. root.tg
+ return ns .. ":" .. tg
end
end
@@ -10730,7 +10733,7 @@ end
function xml.assign(dt,k,root)
if dt and k then
- dt[k] = (type(root) == "table" and xml.body(root)) or root
+ dt[k] = type(root) == "table" and xml.body(root) or root
return dt[k]
else
return xml.body(root)
@@ -11952,7 +11955,7 @@ finalizers.tex["function"] = dofunction
expressions.text = function(e,n)
local rdt = e.__p__.dt
- return (rdt and rdt[n]) or ""
+ return rdt and rdt[n] or ""
end
expressions.name = function(e,n) -- ns + tg
diff --git a/scripts/context/ruby/base/kpse.rb b/scripts/context/ruby/base/kpse.rb
index 313ebbe62..ec0b8810b 100644
--- a/scripts/context/ruby/base/kpse.rb
+++ b/scripts/context/ruby/base/kpse.rb
@@ -61,7 +61,7 @@ module Kpse
@@tracing = false
@@distribution = 'web2c'
@@crossover = true
- @@mswindows = Config::CONFIG['host_os'] =~ /mswin/
+ @@mswindows = RbConfig::CONFIG['host_os'] =~ /mswin/
# @@distribution = 'miktex' if ENV['PATH'] =~ /miktex[\\\/]bin/o
diff --git a/scripts/context/ruby/base/system.rb b/scripts/context/ruby/base/system.rb
index c3fb08645..71c0af421 100644
--- a/scripts/context/ruby/base/system.rb
+++ b/scripts/context/ruby/base/system.rb
@@ -12,7 +12,7 @@ require "rbconfig"
module System
- @@mswindows = Config::CONFIG['host_os'] =~ /mswin/
+ @@mswindows = RbConfig::CONFIG['host_os'] =~ /mswin/
@@binpaths = ENV['PATH'].split(File::PATH_SEPARATOR)
@@binsuffixes = if $mswindows then ['.exe','.com','.bat'] else ['','.sh','.csh'] end
@@located = Hash.new
diff --git a/scripts/context/ruby/base/tool.rb b/scripts/context/ruby/base/tool.rb
index abf0d5ed0..1f10c9556 100644
--- a/scripts/context/ruby/base/tool.rb
+++ b/scripts/context/ruby/base/tool.rb
@@ -159,7 +159,7 @@ module Tool
end
- if Config::CONFIG['host_os'] =~ /mswin/ then
+ if RbConfig::CONFIG['host_os'] =~ /mswin/ then
require 'Win32API'
diff --git a/scripts/context/ruby/runtools.rb b/scripts/context/ruby/runtools.rb
index 5565748e2..77f805221 100644
--- a/scripts/context/ruby/runtools.rb
+++ b/scripts/context/ruby/runtools.rb
@@ -65,7 +65,7 @@ class Job
end
def platform
- case Config::CONFIG['host_os']
+ case RbConfig::CONFIG['host_os']
when /mswin/ then :windows
else :unix
end
diff --git a/scripts/context/ruby/texmfstart.rb b/scripts/context/ruby/texmfstart.rb
index be892c83c..6e508eeb9 100644
--- a/scripts/context/ruby/texmfstart.rb
+++ b/scripts/context/ruby/texmfstart.rb
@@ -135,7 +135,7 @@ end
# kpse_merge_stop
-$mswindows = Config::CONFIG['host_os'] =~ /mswin/
+$mswindows = RbConfig::CONFIG['host_os'] =~ /mswin/
$separator = File::PATH_SEPARATOR
$version = "2.1.0"
$ownpath = File.dirname($0)
diff --git a/scripts/context/ruby/texsync.rb b/scripts/context/ruby/texsync.rb
index 004610399..fd6593f05 100644
--- a/scripts/context/ruby/texsync.rb
+++ b/scripts/context/ruby/texsync.rb
@@ -140,7 +140,7 @@ class Commands
texpaths = ['texmf','texmf-local','texmf-fonts','texmf-mswin','texmf-linux','texmf-macos']
elsif option('terse') then
texpaths = ['texmf','texmf-local','texmf-fonts']
- case Config::CONFIG['host_os'] # or: Tool.ruby_platform
+ case RbConfig::CONFIG['host_os'] # or: Tool.ruby_platform
when /mswin/ then texpaths.push('texmf-mswin')
when /linux/ then texpaths.push('texmf-linux')
when /darwin/ then texpaths.push('texmf-macosx')
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index f704d63e4..731f8ca21 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -10701,16 +10701,19 @@ function xml.parent(root)
end
function xml.body(root)
- return (root.ri and root.dt[root.ri]) or root -- not ok yet
+ return root.ri and root.dt[root.ri] or root -- not ok yet
end
function xml.name(root)
if not root then
return ""
- elseif root.ns == "" then
- return root.tg
+ end
+ local ns = root.ns
+ local tg = root.tg
+ if ns == "" then
+ return tg
else
- return root.ns .. ":" .. root.tg
+ return ns .. ":" .. tg
end
end
@@ -10730,7 +10733,7 @@ end
function xml.assign(dt,k,root)
if dt and k then
- dt[k] = (type(root) == "table" and xml.body(root)) or root
+ dt[k] = type(root) == "table" and xml.body(root) or root
return dt[k]
else
return xml.body(root)
@@ -11952,7 +11955,7 @@ finalizers.tex["function"] = dofunction
expressions.text = function(e,n)
local rdt = e.__p__.dt
- return (rdt and rdt[n]) or ""
+ return rdt and rdt[n] or ""
end
expressions.name = function(e,n) -- ns + tg
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index f704d63e4..731f8ca21 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -10701,16 +10701,19 @@ function xml.parent(root)
end
function xml.body(root)
- return (root.ri and root.dt[root.ri]) or root -- not ok yet
+ return root.ri and root.dt[root.ri] or root -- not ok yet
end
function xml.name(root)
if not root then
return ""
- elseif root.ns == "" then
- return root.tg
+ end
+ local ns = root.ns
+ local tg = root.tg
+ if ns == "" then
+ return tg
else
- return root.ns .. ":" .. root.tg
+ return ns .. ":" .. tg
end
end
@@ -10730,7 +10733,7 @@ end
function xml.assign(dt,k,root)
if dt and k then
- dt[k] = (type(root) == "table" and xml.body(root)) or root
+ dt[k] = type(root) == "table" and xml.body(root) or root
return dt[k]
else
return xml.body(root)
@@ -11952,7 +11955,7 @@ finalizers.tex["function"] = dofunction
expressions.text = function(e,n)
local rdt = e.__p__.dt
- return (rdt and rdt[n]) or ""
+ return rdt and rdt[n] or ""
end
expressions.name = function(e,n) -- ns + tg