From 128584e0d91098f8a0d3c6bc48dc529e59d5d1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sun, 31 Mar 2019 13:14:49 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=AE=E5=BD=95=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/libs/lua/file.lni | 151 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 server/libs/lua/file.lni (limited to 'server/libs/lua/file.lni') diff --git a/server/libs/lua/file.lni b/server/libs/lua/file.lni new file mode 100644 index 00000000..889cbf2d --- /dev/null +++ b/server/libs/lua/file.lni @@ -0,0 +1,151 @@ + +type = 'function' +parent = { + 1 = { + type = 'object', + name = 'FILE*', + }, +} + +[close] +[[.args]] +type = 'FILE*' +[[.returns]] +name = 'suc' +type = 'boolean' +default = true +optional = 'after' +`````````` +name = 'type' +type = 'string' +`````````` +name = 'code' +[[.enums]] +type = 'type' +enum = 'exit' +`````````` +type = 'type' +enum = 'signal' + +[flush] +[[.args]] +type = 'FILE*' + +[lines] +[[.args]] +type = 'FILE*' +`````````` +name = 'mode' +type = '...' +[[.returns]] +type = 'function' +returns = { + 1 = { + name = 'c', + type = {'string', 'number'}, + } +} +[[.enums]] +name = 'mode' +enum = 'n' +`````````` +name = 'mode' +enum = 'a' +`````````` +name = 'mode' +enum = 'l' +default = true +`````````` +name = 'mode' +enum = 'L' +`````````` +name = 'mode' +code = 'number' + +[read] +[[.args]] +type = 'FILE*' +`````````` +name = 'mode' +type = '...' +[[.returns]] +type = {'string', 'number'} +`````````` +type = '...' +[[.enums]] +name = 'mode' +enum = 'n' +`````````` +name = 'mode' +enum = 'a' +`````````` +name = 'mode' +enum = 'l' +default = true +`````````` +name = 'mode' +enum = 'L' +`````````` +name = 'mode' +code = 'number' + +[seek] +[[.args]] +type = 'FILE*' +`````````` +name = 'whence' +type = 'string' +optional = 'after' +`````````` +name = 'offset' +type = 'integer' +default = 0 +optional = 'self' +[[.returns]] +name = 'offset' +type = 'integer' +`````````` +name = 'errmsg' +type = 'string' +optional = 'self' +[[.enums]] +name = 'whence' +enum = 'set' +`````````` +name = 'whence' +enum = 'cur' +default = true +`````````` +name = 'whence' +enum = 'end' + +[setvbuf] +[[.args]] +type = 'FILE*' +`````````` +name = 'mode' +type = 'string' +`````````` +name = 'size' +type = 'integer' +[[.enums]] +name = 'mode' +enum = 'no' +`````````` +name = 'mode' +enum = 'full' +`````````` +name = 'mode' +enum = 'line' + +[write] +[[.args]] +type = 'FILE*' +`````````` +type = '...' +[[.returns]] +type = 'FILE*' +`````````` +name = 'errmsg' +type = 'string' +optional = 'self' -- cgit v1.2.3