Andreas Kling
4f6438ec66
VirtualConsole: Support the 'A' and 'D' CSI sequences.
...
This makes backspace work correctly when line editing with bash-2.05b.
2018-12-07 01:19:02 +01:00
Andreas Kling
bbfae19238
Move DoubleBuffer to its own files.
2018-12-03 01:51:44 +01:00
Andreas Kling
f6e27c2abe
More coding style changes.
2018-12-03 00:39:25 +01:00
Andreas Kling
85b886c2e0
Make it possible to build the Kernel on a macOS host.
...
It still requires an ELF compiler and linker, but at least it builds.
I need to get rid of the "Unix" namespace. This does a lot of that.
2018-12-02 23:34:50 +01:00
Andreas Kling
ac7a60225e
Add TIOCGWINSZ ioctl so userland can determine terminal geometry.
...
(Don't) use this to implement short-form output in ls.
I'm too tired to make a nice column formatting algorithm.
I just wanted something concise when I type "ls".
2018-11-29 03:45:23 +01:00
Andreas Kling
a788e85c09
Refactor TTY signal generation a bit.
...
We now respect the VINTR and VQUIT control characters in the termios.
2018-11-16 20:18:58 +01:00
Andreas Kling
4e2c2b9748
Minor TTY tweak.
2018-11-16 18:12:22 +01:00
Andreas Kling
d2046e79cf
Add a DoubleBuffer thingy to allow TTY read/write to be interleaved.
...
I feel like this concept might be useful in more places. It's very naive
right now and uses dynamically growing buffers. It should really use static
size buffers and never kmalloc().
2018-11-16 17:57:00 +01:00
Andreas Kling
084287ca45
Reimplement tcsetattr/tcgetattr as ioctls.
2018-11-16 15:41:48 +01:00
Andreas Kling
c99f8af66d
Add ioctl() and reimplement tcsetpgrp/tcsetpgrp as ioctls.
2018-11-16 13:13:50 +01:00
Andreas Kling
1cf20a2fe2
Some minor termios debugging output.
2018-11-12 12:27:28 +01:00
Andreas Kling
18e3ddf605
Add a naive /bin/fgrep for testing pipes.
2018-11-11 20:42:41 +01:00
Andreas Kling
d5d45d1088
Rage hacking to get bash to run. It finally runs. So cool! :^)
2018-11-11 15:38:07 +01:00
Andreas Kling
47b7eeda44
Fix all current build warnings in the kernel.
2018-11-09 10:03:21 +01:00
Andreas Kling
da3857b0c2
Add some simple write buffering to LibC's stdio.
...
Plumb it all the way to the VirtualConsole. Also fix /bin/cat to write()
the whole chunks we get from read() directly to stdout.
2018-11-08 01:23:47 +01:00
Andreas Kling
6304c771dd
Some refactor and style tweaks.
2018-11-07 21:38:18 +01:00
Andreas Kling
7c3746592b
Add strsignal() and improve sharing signal numbers between LibC and kernel.
2018-11-06 15:45:16 +01:00
Andreas Kling
10b666f69a
Basic ^C interrupt implementation.
...
For testing, I made cat put itself into a new process group.
This should eventually be done by sh between fork() and exec().
2018-11-02 14:06:48 +01:00
Andreas Kling
7a7956a595
Virtual consoles kinda work!
...
We now make three VirtualConsoles at boot: tty0, tty1, and tty2.
We launch an instance of /bin/sh in each one.
You switch between them with Alt+1/2/3
How very very cool :^)
2018-10-30 15:33:37 +01:00
Andreas Kling
68739dc43e
Start working on virtual consoles/TTYs.
...
This is a mess right now, but I'd rather commit as I go.
2018-10-30 13:59:29 +01:00