mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-19 12:17:17 -04:00
Merge branch 'master-MC1.10' into master-MC1.12
# Conflicts: # gradle/wrapper/gradle-wrapper.properties # src/main/resources/assets/opencomputers/lang/ru_RU.lang
This commit is contained in:
commit
e9f92e0646
@ -2,6 +2,7 @@ sudo: false
|
|||||||
language: scala
|
language: scala
|
||||||
scala: 2.11.1
|
scala: 2.11.1
|
||||||
jdk: oraclejdk8
|
jdk: oraclejdk8
|
||||||
|
dist: trusty
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
@ -181,7 +181,7 @@ function text.internal.reader(txt, mode)
|
|||||||
}, {__index=text.internal.stream_base((mode or ""):match("b"))})
|
}, {__index=text.internal.stream_base((mode or ""):match("b"))})
|
||||||
process.closeOnExit(reader)
|
process.closeOnExit(reader)
|
||||||
|
|
||||||
return require("buffer").new("r", reader)
|
return require("buffer").new((mode or "r"):match("[rb]+"), reader)
|
||||||
end
|
end
|
||||||
|
|
||||||
function text.internal.writer(ostream, mode, append_txt)
|
function text.internal.writer(ostream, mode, append_txt)
|
||||||
@ -223,7 +223,7 @@ function text.internal.writer(ostream, mode, append_txt)
|
|||||||
}, {__index=text.internal.stream_base((mode or ""):match("b"))})
|
}, {__index=text.internal.stream_base((mode or ""):match("b"))})
|
||||||
process.closeOnExit(writer)
|
process.closeOnExit(writer)
|
||||||
|
|
||||||
return require("buffer").new("w", writer)
|
return require("buffer").new((mode or "w"):match("[awb]+"), writer)
|
||||||
end
|
end
|
||||||
|
|
||||||
function text.detab(value, tabWidth)
|
function text.detab(value, tabWidth)
|
||||||
|
@ -47,17 +47,12 @@ end
|
|||||||
|
|
||||||
function io.stream(fd,file,mode)
|
function io.stream(fd,file,mode)
|
||||||
checkArg(1,fd,'number')
|
checkArg(1,fd,'number')
|
||||||
|
checkArg(2, file, "table", "string", "nil")
|
||||||
assert(fd>=0,'fd must be >= 0. 0 is input, 1 is stdout, 2 is stderr')
|
assert(fd>=0,'fd must be >= 0. 0 is input, 1 is stdout, 2 is stderr')
|
||||||
local dio = require("process").info().data.io
|
local dio = require("process").info().data.io
|
||||||
if file then
|
if file then
|
||||||
if type(file) == "string" then
|
if type(file) == "string" then
|
||||||
local result, reason = io.open(file, mode)
|
file = assert(io.open(file, mode))
|
||||||
if not result then
|
|
||||||
error(reason, 2)
|
|
||||||
end
|
|
||||||
file = result
|
|
||||||
elseif not io.type(file) then
|
|
||||||
error("bad argument #1 (string or file expected, got " .. type(file) .. ")", 2)
|
|
||||||
end
|
end
|
||||||
dio[fd] = file
|
dio[fd] = file
|
||||||
end
|
end
|
||||||
|
@ -54,7 +54,7 @@ local function checkDeadline()
|
|||||||
end
|
end
|
||||||
local function pcallTimeoutCheck(...)
|
local function pcallTimeoutCheck(...)
|
||||||
local ok, timeout = ...
|
local ok, timeout = ...
|
||||||
if timeout == tooLongWithoutYielding then
|
if rawequal(timeout, tooLongWithoutYielding) then
|
||||||
return ok, tostring(tooLongWithoutYielding)
|
return ok, tostring(tooLongWithoutYielding)
|
||||||
end
|
end
|
||||||
return ...
|
return ...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user