From d38d94fe9542984e38b9839eb2383656328b9da9 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 10 Jan 2013 02:20:15 +0200 Subject: beta 2013.01.10 01:04 --- scripts/context/lua/mtxrun.lua | 15 +++++++++------ scripts/context/ruby/base/kpse.rb | 2 +- scripts/context/ruby/base/system.rb | 2 +- scripts/context/ruby/base/tool.rb | 2 +- scripts/context/ruby/runtools.rb | 2 +- scripts/context/ruby/texmfstart.rb | 2 +- scripts/context/ruby/texsync.rb | 2 +- scripts/context/stubs/mswin/mtxrun.lua | 15 +++++++++------ scripts/context/stubs/unix/mtxrun | 15 +++++++++------ 9 files changed, 33 insertions(+), 24 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.3