4905 Commits

Author SHA1 Message Date
payonel
f4c18cc266 small fixes for term, cp, df, mv, rm, and init
make term resize event handler safer by adding it to each window. this will have the same memory cost, but is more reliable

fix cp path check for copying dirs into themselves. there was a bug where /path/a_dir looked like a parent of /path/a_dir_2

cleanup df format by not adding padding on the far right side of the table

make init event handler slightly more efficient by waiting specifically for the init signal, rather than a specified amount of time

mv had some weird problems with missing files or empty quoted args - fix and added unit tests

rm force should have no prompt and always return success
2016-07-24 08:14:18 -07:00
payonel
66d7337568 fix ^c for lua prompt
term.read() ^c now returns false broke lua prompt on ^c
any false return from a stream read should be indicative of a broken or ended stream to be more compliant with io.read behavior
2016-07-22 18:28:18 -07:00
payonel
05ded1a4bc match real bash behavior and limit user defined io fds to 3-9 2016-07-21 20:51:01 -07:00
payonel
35d93e2a93 fix piping of redirected stdout
e.g.
Assume you have a script that print to stdout as well as stderr:
[test.lua]
print("foo")
io.stderr:write("bar")

Then run this script, redirecting [2] to stdout, and [1] to dev null, then piping to grep

./test.lua 2>&1 >/dev/null | grep baz

This test should print NOTHING to the terminal, "foo" went to dev null, "bar" when to stdout, and grep matched on "baz", thus should not print. But the bug I found was that [2] was redirected to terminal tty stdout and then AFTER that the piping code added a pipe on [1], but [2] was already pointing to tty. The fix is to move the piping before redirections are created, so that when [2] redirects to stdout, stdout is already the pipe.
2016-07-21 09:38:16 -07:00
payonel
5be3dc5ad2 Merge pull request #1984 from payonel/soft-term-available
act like closed pipe when terminal becomes unavailable
2016-07-19 01:22:38 -07:00
payonel
5f8fd43586 oops, i shouldn't assert if the terminal becomes unavailable 2016-07-19 00:56:52 -07:00
Florian Nücke
74e88ee33c Fixes #1972. 2016-07-18 20:08:46 +02:00
Florian Nücke
4c80160f28 Merge branch 'move-programs' of https://github.com/Vexatos/OpenComputers into master-MC1.7.10 2016-07-18 19:54:58 +02:00
payonel
ecbce30f09 improved terminal interruptions with smart shell support
Also:

Fixed a bug with command substitution not concatenating strings
Split /bin/ls for ultra simple formatting for low mem systems
Remove all instances of absolute paths to lib/tools and use package searching
2016-07-17 20:38:26 -07:00
Florian Nücke
450924d6f2 Merge branch 'master-MC1.7.10' of github.com:MightyPirates/OpenComputers into master-MC1.7.10 2016-07-16 12:36:01 +02:00
Vexatos
5c306ea32e Allow properly launching OC in a dev env again. (#1965) 2016-07-16 12:35:54 +02:00
Florian Nücke
0fa7acc4c3 Merge branch 'master-MC1.7.10' of github.com:MightyPirates/OpenComputers into master-MC1.7.10 2016-07-16 12:35:15 +02:00
Vexatos
7295b36c11 Fixed Navigation Upgrade recipe. (#1964)
Kewl.
2016-07-16 12:07:15 +02:00
payonel
e2331b67ff improvements to guid, devfs, cat, cp, and system error clarity
renaming guid to uuid and removing useless method toHex
adding text read and writer, compare to c++ stdlib stringstream. needed for advanced devfs
fix globbing with relative paths and . and .. in path
moving install confirmation before calling .install
fix cp: cp -r . /another/path (should copy contents of current dir)
fix cat when stdin is missing or closed
improved devfs supporting custom dir handlers for dynamic file listing

other non functional changes to clean up code and improved error messages
2016-07-16 01:08:31 -07:00
Florian Nücke
6837c7e02f Should fix duplicate UUID in TCP signals. 2016-07-13 19:33:09 +02:00
Florian Nücke
2e122599af Should fix #1941. 2016-07-13 18:53:36 +02:00
Florian Nücke
400d3981e1 Should fix missing updates in high precision mode, closes #1947. 2016-07-13 18:48:20 +02:00
Florian Nücke
a29c048a84 Merge branch 'proper-mc-dependency' of https://github.com/Vexatos/OpenComputers into master-MC1.7.10 2016-07-13 18:30:48 +02:00
Florian Nücke
16e020adf0 Merge branch 'master-MC1.7.10' of github.com:MightyPirates/OpenComputers into master-MC1.7.10 2016-07-13 18:30:22 +02:00
tuckertwo
de9ab0906d Fix Typoes in application.conf (#1423)
* Fix Typoes in application.conf
2016-07-13 18:30:40 +02:00
Vexatos
7387a0aba8 Added a hard Minecraft version dependency to avoid the coremod not loading on incorrect versions. 2016-07-13 18:30:04 +02:00
Florian Nücke
2ee0c92530 Merge branch 'gametype-fix' of https://github.com/Vexatos/OpenComputers into master-MC1.7.10 2016-07-13 18:18:01 +02:00
Florian Nücke
62c6b14b82 Merge branch 'too-many-screens' of https://github.com/payonel/OpenComputers into master-MC1.7.10 2016-07-13 18:17:29 +02:00
Florian Nücke
8e64739db0 Merge branch 'scrench-size' of https://github.com/Vexatos/OpenComputers into master-MC1.7.10 2016-07-13 18:14:44 +02:00
Łukasz Magiera
4fbbb21f2e Fix internet TCP events 2016-07-13 17:38:53 +02:00
payonel
d46eed8a4a make reliable screen and keyboard selection for boot and terminals
closes #1933
2016-07-11 16:00:10 -07:00
Vexatos
a92b20ac4a Set the max stack size of the Scrench to 1. 2016-07-11 12:18:35 +02:00
Vexatos
c4fa6f157e Made wrenching an Adapter's side turn it off.
For #1851.
No texture changes yet, but client sync is in place.
2016-07-09 18:03:47 +02:00
Vexatos
882b23694b Fixed Debug Card's setGameType.
Closes #1939.
2016-07-09 18:02:41 +02:00
Vexatos
a9e670bad4 Moved most floppy software from /bin to /usr/bin.
Closes #1875.
2016-07-09 16:28:05 +02:00
Florian Nücke
1fdd30ae72 Ah, right. 2016-07-05 20:15:52 +02:00
Florian "Sangar" Nücke
3e49ca4d58 Merge pull request #1931 from hws689/master-MC1.7.10
pt_BR's Translation
2016-07-03 20:31:55 +02:00
Florian Nücke
a3c6c4c14b Making an exception. One. 2016-07-03 20:02:47 +02:00
Florian Nücke
32ab472370 Fix potential division by zero in loot disk cycling recipe. 2016-07-03 19:58:27 +02:00
hws689
9d30864478 pt_BR's Translation 2016-07-02 21:04:01 -03:00
Florian Nücke
650ee2c45d Merge branch 'openos-1.6-cleanup' of https://github.com/payonel/OpenComputers into master-MC1.7.10 2016-07-02 13:39:40 +02:00
Florian Nücke
7f55ceabe5 Merge branch 'install-and-shell' of https://github.com/payonel/OpenComputers into master-MC1.7.10 2016-07-02 13:38:23 +02:00
Florian Nücke
d3841d1c8e Another one of those "why the hell did it work in 1.7" cases... closes #1923. 2016-07-02 13:32:28 +02:00
Florian Nücke
7ae2d741d9 Fixed MCUs passing out messages other than network messages, closes #1926. 2016-07-02 09:49:41 +02:00
payonel
462b264f31 improve /mnt and PS1 conformity
filesystem: don't mount tmpfs in /mnt
shell: remove trailing slash for pwd
ps1: make the default prompt easier to interpret
2016-06-30 22:05:50 -07:00
payonel
031f9079c3 fixes for install, cp, ln, and shell parsing
fix install stdin read defaults
fix cp over links to update links
fixed ''| parse error (it isn't)
better os.exit for customer installer
2016-06-30 21:47:32 -07:00
Florian Nücke
1279537f8d Added custom intersect check for racks to take into account the mountables being inset by one.
Avoid floating point inaccuracies leading to incorrect local coordinates for mountable onActivate.
2016-06-26 11:21:59 +02:00
Florian Nücke
9a3fd0feb2 Explicit null checks to avoid it trickling down into code where it's harder to tell. 2016-06-25 14:26:28 +02:00
Łukasz Magiera
422592d84e Send internet events when ready to read. 2016-06-25 13:17:06 +02:00
Florian Nücke
a9f2c6d77b Readonly logger. 2016-06-25 12:50:44 +02:00
payonel
ecda757ee3 fixes for buffer, install, ls, package, profile, rc, sh
buffer: don't allow reading zero bytes from a stream, and fix libraries that should be allowed to set zero size buffer
install: report setting boot address, ^d should not accept prompts
ls: use shell to get working dir, not PWD
package: remove clutter for library keys and _G
rc: add unload to lib methods and fix typo in source
sh: remove clutter from _G and use zero sized buffer for piping
2016-06-23 07:09:30 -07:00
Florian Nücke
c9e6ddcbd3 Merge branch 'install-nil-check' of https://github.com/payonel/OpenComputers into master-MC1.7.10 2016-06-15 21:35:57 +02:00
Florian "Sangar" Nücke
0dfba9baf4 Merge pull request #1880 from payonel/plan9k-prop
plan9k .prop to guide openos install
2016-06-15 21:35:33 +02:00
payonel
76be38a710 plan9k .prop to guide openos install 2016-06-12 17:03:02 -07:00
payonel
203649a2dc install fix and cleanup, cp quality, network loot .prop
install was crashing if there were no options. Having no options is a perfectly valid case where install is trying to exit early (e.g. --help, or user cancelled) I forgot the check for nil.

During tests I found that cp was unnecessarily slow due to constant event pulling on every file. I introduced a 4 second gap between checking events. But his caused cp very hard (nearly impossible) to interrupt. Thus, it is preferrable to slow down copy so that the user could interrupt it.

Also, thanks to Inari, we have improved the text of the install prompts. Please review and comment if you feel the text still needs some revising. I'm not a technical writer, so I hope we are making this simple.

Also, if the user tries to run install with the network loot disk, the /data dir will be copied to /, and the user probably wants the data/. dir used. Using .prop's {fromDir="/data/"} fixes  this
2016-06-12 15:54:15 -07:00