diff options
author | Marius <mariausol@gmail.com> | 2011-07-13 23:40:25 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-07-13 23:40:25 +0300 |
commit | 3dd416f677074c27a248e3433695a6fe8c13ef69 (patch) | |
tree | 20c4a573a64f2079e2e3d3fe93b004af3caf7b2f /tex/context/base/syst-con.lua | |
parent | 1ea50dab7f30289214b661f2cbcf53e97e6af0b6 (diff) | |
download | context-3dd416f677074c27a248e3433695a6fe8c13ef69.tar.gz |
beta 2011.07.13 20:14
Diffstat (limited to 'tex/context/base/syst-con.lua')
-rw-r--r-- | tex/context/base/syst-con.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tex/context/base/syst-con.lua b/tex/context/base/syst-con.lua index f78d83011..2eaf98fd7 100644 --- a/tex/context/base/syst-con.lua +++ b/tex/context/base/syst-con.lua @@ -14,28 +14,28 @@ the top of <l n='luatex'/>'s char range but outside the unicode range.</p> --ldx]]-- local tonumber = tonumber -local char, texsprint = unicode.utf8.char, tex.sprint +local utfchar = unicode.utf8.char local gsub, format = string.gsub, string.format function converters.hexstringtonumber(n) tonumber(n,16) end function converters.octstringtonumber(n) tonumber(n, 8) end -function converters.rawcharacter (n) char(0x110000+n) end +function converters.rawcharacter (n) utfchar(0x110000+n) end function converters.lchexnumber (n) format("%x" ,n) end function converters.uchexnumber (n) format("%X" ,n) end function converters.lchexnumbers (n) format("%02x",n) end function converters.uchexnumbers (n) format("%02X",n) end function converters.octnumber (n) format("%03o",n) end -function commands.hexstringtonumber(n) context(tonumber(n,16)) end -function commands.octstringtonumber(n) context(tonumber(n, 8)) end -function commands.rawcharacter (n) context(char(0x110000+n)) end -function commands.lchexnumber (n) context(format("%x" ,n)) end -function commands.uchexnumber (n) context(format("%X" ,n)) end -function commands.lchexnumbers (n) context(format("%02x",n)) end -function commands.uchexnumbers (n) context(format("%02X",n)) end -function commands.octnumber (n) context(format("%03o",n)) end +function commands.hexstringtonumber(n) context(tonumber(n,16)) end +function commands.octstringtonumber(n) context(tonumber(n, 8)) end +function commands.rawcharacter (n) context(utfchar(0x110000+n)) end +function commands.lchexnumber (n) context("%x" ,n) end +function commands.uchexnumber (n) context("%X" ,n) end +function commands.lchexnumbers (n) context("%02x",n) end +function commands.uchexnumbers (n) context("%02X",n) end +function commands.octnumber (n) context("%03o",n) end -function commands.format(fmt,...) +function commands.format(fmt,...) -- used ? fmt = gsub(fmt,"@","%%") context(fmt,...) end |