diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-04-04 14:11:01 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-04-04 14:11:01 +0200 |
commit | 64f6e8fc0c6cb9254a6fe3db0b4ab31c51cf8524 (patch) | |
tree | 1b36a0b35f5b6d516d27fe817a27249d4c6d9c78 /tex/context/base/mkiv/util-sac.lua | |
parent | 70a938c4934f042face9805fc4c392c0676b11d5 (diff) | |
download | context-64f6e8fc0c6cb9254a6fe3db0b4ab31c51cf8524.tar.gz |
2019-04-04 13:38:00
Diffstat (limited to 'tex/context/base/mkiv/util-sac.lua')
-rw-r--r-- | tex/context/base/mkiv/util-sac.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/util-sac.lua b/tex/context/base/mkiv/util-sac.lua index dc8ba72f1..976989a77 100644 --- a/tex/context/base/mkiv/util-sac.lua +++ b/tex/context/base/mkiv/util-sac.lua @@ -29,6 +29,12 @@ function streams.openstring(f,zerobased) end end +function streams.getstring(f) + if f then + return f[1] + end +end + function streams.close() -- dummy end @@ -137,7 +143,7 @@ function streams.readcardinal2(f) return 0x100 * a + b end -function streams.readcardinal2LE(f) +function streams.readcardinal2le(f) local i = f[2] local j = i + 1 f[2] = j + 1 @@ -217,6 +223,14 @@ function streams.readcardinal4(f) return 0x1000000 * a + 0x10000 * b + 0x100 * c + d end +function streams.readcardinal4le(f) + local i = f[2] + local j = i + 3 + f[2] = j + 1 + local d, c, b, a = byte(f[1],i,j) + return 0x1000000 * a + 0x10000 * b + 0x100 * c + d +end + function streams.readinteger4(f) local i = f[2] local j = i + 3 |