SquidDev
86569533e9
The big massive reformat
...
- Normalise all line endings to be LF rather than CLRF
- Trim all trailing whitespace
- Remove any tabs
2018-12-17 18:09:31 +00:00
SquidDev
7e334bd4a5
Fix a couple of other bugs with the fs rewrite
...
- Fix stdin not being considered a "readable" input
- Return an unsigned byte rather than a signed one for no-args .read()
2018-10-28 08:39:44 +00:00
SquidDev
e555f9f7f0
Merge pull request #575 from SquidDev-CC/ComputerCraft/feature/file-seeking
...
Rewrite file systems to use ByteChannels
2018-10-24 12:20:53 +01:00
SquidDev
33fad2da15
Merge pull request #577 from SquidDev-CC/ComputerCraft/feature/get-blink
...
Add .getCursorBlink to monitors and terminals
2018-09-28 16:23:00 +01:00
SquidDev
518eefbe10
Rewrite file systems to use ByteChannels
...
This replaces the existing IMount openFor* method with openChannelFor*
ones, which return an appropriate byte channel instead.
As channels are not correctly closed when GCed, we introduce a
FileSystemWrapper. We store a weak reference to this, and when it is
GCed or the file closed, we will remove it from our "open file" set and
ensure any underlying buffers are closed.
While this change may seem a little odd, it does introduce some
benefits:
- We can replace JarMount with a more general FileSystemMount. This
does assume a read-only file system, but could technically be used
for other sources.
- Add support for seekable (binary) handles. We can now look for
instances of SeekableByteChannel and dynamically add it. This works
for all binary filesystem and HTTP streams.
- Rewrite the io library to more accurately emulate PUC Lua's
implementation. We do not correctly implement some elements (most
noticably "*n", but it's a definite improvement.
2018-09-26 10:00:17 +01:00
SquidDev
1ba73454c1
Add .getCursorBlink to monitors and terminals
...
Closes #576
2018-09-23 09:34:28 +01:00
SquidDev
ee4735c17c
Merge pull request #573 from osmarks/ComputerCraft/patch-1
...
Fix a crash in rednet `repeat`
2018-09-09 17:49:24 +01:00
Oliver Marks
b008edae90
Fix a crash in rednet repeat
...
This crash can be triggered remotely by specially constructed rednet messages, making this a bit of a problem, as any repeaters can be remotely crashed.
2018-09-08 21:55:36 +01:00
SquidDev
1774f1a079
Merge pull request #566 from SquidDev-CC/ComputerCraft/feature/tiny-lua-wins
...
A couple of small improvements to CraftOS
2018-08-12 15:49:19 +01:00
SquidDev
de1307913b
A couple of small improvements to CraftOS
...
- Make window.reposition's argument validation a little more strict.
Previously it would accept `window.reposition(x, y, width)` (no
height argument), just not act upon it.
- Use select instead of table.unpack within `pastebin run`.
- Use `parallel.waitForAny` instead of `waitForAll` within the dance
program.
- Pipe the entire help file into `textutils.pagedPrint`, rather than
doing it line by line.
- Remove bytecode loading disabling from bios.lua. This never worked
correctly, and serves little purpose as LuaJ is not vulnerable to
such exploits.
2018-08-12 08:23:17 +01:00
SquidDev
5f0addbc3e
Fix variable being declared too late
2018-06-18 19:01:36 +01:00
SquidDev
5bf9f9e3c5
Allow multiple HTTP request methods
...
This implements an argument format similar to LuaReqeust, as described
in dan200/ComputerCraft#515. The Lua argument checking code is a little
verbose and repetitive, but I'm not sure how to avoid that - we should
look into improving it in the future.
Closes #21
2018-05-15 10:11:08 +01:00
hugeblank
e4164ee9a1
amend additional typo in keys.lua
...
- fixed circumflex typo: you can now cîrcûmflêx on all your friends
- added comment making it clearer that the following lines are intended for backwards compatibility.
2018-05-14 15:54:06 +01:00
SquidDev
8775052dee
Merge pull request #543 from hugeblank/ComputerCraft/patch-1
...
amend typo in keys.lua
2018-05-08 09:46:14 +01:00
hugeblank
c0c5d57e10
amend typo in keys.lua
...
The most important commit that CC has ever seen.
2018-05-08 01:10:45 -07:00
SquidDev
a1d77ab8e7
Merge pull request #536 from Luca0208/ComputerCraft/master
...
Make wget automatically determine the file name.
2018-04-06 21:08:54 +01:00
Daniel Ratcliffe
3e265c27ff
Merge pull request #455 from Wilma456/fileread
...
Add read() to Filehandle
2018-01-13 00:58:19 +00:00
Daniel Ratcliffe
8d356f50c4
Merge pull request #440 from Wilma456/iomulti
...
Make io.write() accept multiple args
2018-01-13 00:48:07 +00:00
Daniel Ratcliffe
f30c4f16c0
Merge pull request #411 from Wilma456/copyfixup
...
Fix Bug in copy.lua, mkdir.lua and rename.lua (updated)
2018-01-13 00:32:55 +00:00
Daniel Ratcliffe
8bb8caa315
Merge pull request #448 from Wilma456/writecheck
...
Fix check of write()
2018-01-13 00:28:08 +00:00
SquidDev
0f17a3d72e
Merge branch 'master' of https://github.com/dan200/ComputerCraft
2018-01-12 14:15:22 +00:00
Daniel Ratcliffe
7647369e2d
Merge pull request #446 from Wilma456/moduledir
...
Add folder /rom/modules
2018-01-12 14:10:50 +00:00
Daniel Ratcliffe
2a16a1df85
Merge pull request #486 from Wilma456/extensionfix
...
Fix Bug in Paint and Edit
2018-01-12 13:59:15 +00:00
Daniel Ratcliffe
c3db91f11f
Merge pull request #485 from Luca0208/patch-1
...
Removed the "the" that was too much(In /rom/help/cd.txt)
2018-01-12 13:56:48 +00:00
SquidDev
4e9034f910
Make http.websocket call synchronous in bios.lua
...
I thought I'd done this already, but it's possible it got lost during a
rebase.
2017-12-06 09:28:38 +00:00
SquidDev
d7301ff15e
Merge pull request #412 from Wilma456/ComputerCraft-1/textfix
...
Add Check to textutils.tabulate/pagedTabulate
2017-11-15 16:58:13 +00:00
SquidDev
1cf10c5c47
Merge pull request #490 from zardyh/ComputerCraft/master
...
Propagate errors arising from API loading
2017-11-15 16:51:26 +00:00
SquidDev
6691ec8e3a
Merge pull request #390 from Wilma456/ComputerCraft-1/errormsg
...
Show fs error in paint and edit
2017-11-15 16:39:37 +00:00
hydraz
d766f8b34e
Propagate errors arising from API loading
2017-11-15 14:22:36 -02:00
SquidDev
6c29b44c3c
Merge pull request #440 from Wilma456/ComputerCraft-1/iomulti
...
Make io.write() accept multiple args
2017-11-15 11:47:33 +00:00
SquidDev
2155fce036
Merge pull request #486 from Wilma456/ComputerCraft-1/extensionfix
...
Fix Bug in Paint and Edit
2017-11-14 23:55:14 +00:00
SquidDev
27602ec8fc
Merge pull request #485 from Luca0208/ComputerCraft/patch-1
...
Removed the "the" that was too much(In /rom/help/cd.txt)
2017-11-14 23:54:54 +00:00
SquidDev
66f683d9c9
Merge pull request #475 from Wilma456/ComputerCraft-1/ioline
...
Fix io.lines()
2017-11-14 23:53:50 +00:00
SquidDev
fe0f998c27
Merge pull request #448 from Wilma456/ComputerCraft-1/writecheck
...
Fix check of write()
2017-11-14 23:50:12 +00:00
Wilma456
bcf79165f9
Merge pull request #455 from Wilma456/ComputerCraft-1/fileread
...
Add read() to Filehandle
2017-11-14 23:48:38 +00:00
Wilma456
c5d99db654
Merge pull request #411 from Wilma456/ComputerCraft-1/copyfixup
...
Fix Bug in copy.lua, mkdir.lua and rename.lua (updated)
2017-11-14 23:24:11 +00:00
SquidDev
540e2e25aa
Merge pull request #163 from SquidDev-CC/ComputerCraft/feature/cobalt
...
Replace LuaJ with Cobalt
2017-11-14 21:48:47 +00:00
SquidDev
060fb21bdb
Merge pull request #298 from SquidDev-CC/ComputerCraft/feature/luaj-bit32
...
Replace BitAPI with a LuaJ implementation of bit32
2017-11-14 21:32:19 +00:00
SquidDev
ef008709c7
Merge pull request #402 from SquidDev-CC/ComputerCraft/feature/shell-resolution
...
Tweak shell program resolution slightly
2017-11-14 21:31:10 +00:00
SquidDev
0bd0f4d313
Prefix all loaded strings with "="
...
Whilst this is not consistent with normal Lua, this is required in order
to remain compatible with LuaJ.
2017-11-14 18:41:01 +00:00
SquidDev
0420b6c831
Remove string metatable protection
...
The string metatable and environment are no longer shared, so this
sandboxing is no longer required.
2017-11-14 18:41:00 +00:00
Wilma456
9e19dd7070
Fix Bug in Paint and Edit
2017-11-02 20:14:34 +01:00
Luca S
aba0e3d2d4
Removed the "the" that was too much
2017-10-29 19:06:34 +01:00
Wilma456 (Jakob0815)
999351e667
Fix io.lines()
2017-10-04 18:51:48 +02:00
Wilma456
4fb0240a36
Changes suggested by SquidDev and update help file
2017-09-24 17:36:20 +02:00
Wilma456 (Jakob0815)
f8193a4d23
Set errorlevel for "Unsupported format" to 2
2017-09-16 16:11:36 +02:00
Wilma456
5be2202b2e
Add read() to Filehandle
2017-09-16 16:06:27 +02:00
Wilma456 (Jakob0815)
b8630f739a
Add Check requested by dan200
2017-09-13 19:21:17 +02:00
Daniel Ratcliffe
1c8480a329
Merge pull request #441 from SquidDev-CC/hotfix/paintutils-read
...
Fix a non-existent method being used in paintutils
2017-09-13 17:10:07 +01:00
Wilma456
1415dd0dae
Changes requested by dan200
2017-09-12 20:43:07 +02:00