Commit Graph

38 Commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen db79994e64 Refactored all the sortix headers into a include directory.
Also got rid of trailing white space. That corrupted .git/.

Big ass-commit because of recovered .git directory.
2012-03-22 00:52:29 +01:00
Jonas 'Sortie' Termansen 8a9a0c58ea Added kernelinfo(2), which reads a kernel information string.
Currently it lets you query the name of the kernel, its version, and the
build timestamp of the kernelinfo.cpp file.
2012-03-07 18:04:59 +01:00
Jonas 'Sortie' Termansen 422d2fd579 Added qsort(3).
This is a rather slow implementation. Will be fixed soon.
2012-03-05 12:37:59 +01:00
Jonas 'Sortie' Termansen be98120b49 Added stubs for setjmp(3) and longjmp(3). 2012-03-04 23:15:32 +01:00
Jonas 'Sortie' Termansen 4804e60a8b Fixed race condition when building libmaxsi with -j.
The headers could end up being made before their dirs were ready.
2012-02-12 13:54:07 +01:00
Jonas 'Sortie' Termansen fec176fa15 Refactored the libmaxsi/ directory.
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.
2012-02-12 13:20:53 +01:00
Jonas 'Sortie' Termansen ed68db03fb Replaced SORTIX_EXTENSIONS macro with _SORTIX_SOURCE macro.
<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.
2012-02-11 18:51:55 +01:00
Jonas 'Sortie' Termansen 028867ab9d Removed the unused and deprecated old <libmaxsi/sortix-keyboard.h> API.
This has been entirely replaced by stdin and <sys/termmode.h>.
2012-02-10 13:46:26 +01:00
Jonas 'Sortie' Termansen ecc3114f2a Refactored the system to use the new Terminal interface.
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.
2012-01-22 16:48:57 +01:00
Jonas 'Sortie' Termansen ead0e1523f Refactored the kernel keyboard API, but kept system calls compatible.
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.
2012-01-22 15:53:50 +01:00
Jonas 'Sortie' Termansen d2c4b1d6ac Added readdir(3), closedir(3), rewinddir(3), dirfd(3), fdopendir(3),
opendir(3).

Also added non-standard dregister(3), dunregister(3), dclearerr(3),
derror(3), deof(3), dnewdir(3), dcloseall(3).
2012-01-15 00:51:27 +01:00
Jonas 'Sortie' Termansen 46e717e30f Revert ".so's are no longer installed into sysroot as there are no kernel support."
This reverts commit e6db1874e7ed16a6987d5a86d7f6c10cd8b0ffff.

These dummy .so's are actually OK.
2012-01-08 15:53:10 +01:00
Jonas 'Sortie' Termansen 7cd5363af8 Disabled shared libaries in libmaxsi by default. 2012-01-08 15:49:33 +01:00
Jonas 'Sortie' Termansen 145da20c04 Added a libg (symlink to libc) and symlinks are now copied to sysroot. 2012-01-08 15:45:13 +01:00
Jonas 'Sortie' Termansen d3c16470e3 .so's are no longer installed into sysroot as there are no kernel support. 2012-01-08 15:39:40 +01:00
Jonas 'Sortie' Termansen 954fd11703 Added isalnum(3), isalpha(3), isblank(3), iscntrl(3), isdigit(3),
isgraph(3), islower(3), isprint(3), ispunct(3), isspace(3), isupper(3),
isxdigit(3), tolower(3), and toupper(3).
2012-01-08 15:35:35 +01:00
Jonas 'Sortie' Termansen 25d8551b26 Moved _start into crtbegin.o as that's where the cross compiler wants it. 2012-01-08 14:30:50 +01:00
Jonas 'Sortie' Termansen fdbd4ca90d Implemented large parts of the stdio(3), including fprintf.
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.
2011-12-24 04:28:34 +01:00
Jonas 'Sortie' Termansen bf6a4c1861 Added strto{u,}{l,}l(3). 2011-12-16 16:49:27 +01:00
Jonas 'Sortie' Termansen 8c146f14c0 Added uptime(1). 2011-11-28 16:29:53 +01:00
Jonas 'Sortie' Termansen 6781308360 Rewrote the memory allocation functions.
free(3) can now unify unused neighbor blocks, reducing mem usage.
2011-11-27 22:53:05 +01:00
Jonas 'Sortie' Termansen d4231b2027 Added program_invocation_name(3), error(3), and perror(3) and used them. 2011-11-26 11:00:45 +01:00
Jonas 'Sortie' Termansen b6a0fd0374 Removed deprecated VGA API and moved it to /dev/vga. 2011-11-25 13:38:31 +01:00
Jonas 'Sortie' Termansen 2b032b0414 Initial signal support. Please squash improvements into this commit. 2011-11-23 00:19:09 +01:00
Jonas 'Sortie' Termansen 9f35df813e Implemented errno(3), added support in both kernel and utils. 2011-11-22 17:26:47 +01:00
Jonas 'Sortie' Termansen 23fde42249 Added readdirents(2), which ls(1) now uses, and added dir devices.
The initfs and ramfs are now able to list their contents.
2011-11-21 00:02:53 +01:00
Jonas 'Sortie' Termansen c5605b6693 Pong and snake now use rand(3). 2011-11-10 12:28:35 +01:00
Jonas 'Sortie' Termansen 024f1581ea Added the wait() and waitpid() system call. 2011-11-07 00:59:48 +01:00
Jonas 'Sortie' Termansen a087f4b91c Added a sortedlist template class to libmaxsi/sortedlist.h. 2011-10-25 18:21:06 +02:00
Jonas 'Sortie' Termansen ab2b14fc16 Moved start.s into the subdirs for x86 and x64. 2011-09-15 22:39:19 +02:00
Jonas 'Sortie' Termansen 739b296a95 libmaxsi now has a function called upon process creation. 2011-09-14 18:11:52 +02:00
Jonas 'Sortie' Termansen 2f9d08a800 Added a process execute API. 2011-08-28 12:38:01 +02:00
Jonas 'Sortie' Termansen 4c1cb806ba Added a sound api. 2011-08-22 00:25:28 +02:00
Jonas 'Sortie' Termansen 4db550c13b Added libmaxsi keyboard API, allowing user-space to use the keyboard. 2011-08-21 12:52:56 +02:00
Jonas 'Sortie' Termansen 15ce53919c Added VGA API allowing userspace to easily access 0xB8000. 2011-08-11 22:03:13 +02:00
Jonas 'Sortie' Termansen acd2ae58c6 And the c/h/sys dir too.. 2011-08-07 01:37:43 +02:00
Jonas 'Sortie' Termansen a4c2afedb7 libmaxsi now creates the c/h dir if missing. 2011-08-07 01:36:27 +02:00
Jonas 'Sortie' Termansen 9b79673dcb Initial version of Sortix. 2011-08-05 14:25:00 +02:00