C and C++ files are now kept together and so are the mxmpp declarations.
Header files are now stored in include/ and mxmpp'd into preproc/.
All other code now -I ../libmaxsi/preproc.
And other stuff to make this happen, including refactoring Makefile.
<features.h> declares _SORTIX_SOURCE if no conflicting macros are
declared, such as _GNU_SOURCE.
Fixed g++ automatically declaring _GNU_SOURCE, but Sortix isn't GNU.
Replaced SORTIX_UNIMPLEMENTED macro with __SORTIX_SHOW_UNIMPLEMENTED.
This will allow development of a better terminal providing stdin.
Added new system calls settermmode(2) and gettermmode(2) declared in
<sys/termmode.h>. They allow querying and changing the current mode of
terminals (enabling raw keyboard data, signal handling, line buffering,
UTF-8 encoding stdin, and more). However, all that is unsupported by the
current terminal device driver.
Added KBKEY_ENCODE and KBKEY_DECODE macros to <sys/keycodes.h> which allows
encoding the kbkey format in UTF-32 characters.
Caps lock now works as caps lock, not as shift lock.
This new design will allow implementing a working tty, such that stdin is
the only way to access the keyboard, instead of the current hacky way of
using a special system call to read from the keyboard.
Added a new system header file <sys/keycodes.h> defining the constants for
every key on the keyboard. This will be used in future APIs.
The main change is to split the keyboard driver into a class that reads
from the keyboard, while another class handles the translation into
printable characters (if possible). This allows a terminal driver based
on logical key presses and printable characters, instead of a terminal
driver based only on unicode-ish codes.
Made FILE an interface to various backends. This allows application writers
to override the standard FILE API functions with their own backends. This
is highly unportable - it'd be nice if a real standard existed for this.
glibc already does something like this internally, but AFAIK you can't hook
into it.
Added fdopen(3), fopen(3), fregister(3), funregister(3), fread(3),
fwrite(3), fseek(3), clearerr(3), ferror(3), feof(3), rewind(3), ftell(3),
fflush(3), fclose(3), fileno(3), fnewline(3), fcloseall(3), memset(3),
stdio(3), vfprintf(3), fprintf(3), and vprintf(3).
Added a file-descriptor backend to the FILE API.
fd's {0, 1, 2} are now initialized as stdin, stdout, and stderr when the
standard library initializes.
fcloseall(3) is now called on exit(3).
decl/intn_t_.h now @include(size_t.h) instead of declaring it itself.
Added <stdint.h>.
The following programs now flush stdout: cat(1), clear(1), editor(1),
init(1), mxsh(1).
printf(3) is now hooked up against vprintf(3), while Maxsi::PrintF
remains using the system call, for now.