Commit Graph

2653 Commits

Author SHA1 Message Date
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 16dd39e467 Added a nice Log::PrintData function to the kernel.
This allows writing binary data to the kernel log.
2012-01-22 02:12:52 +01:00
Jonas 'Sortie' Termansen 1f3f85b609 Added a simple utf8 encoder in the kernel. 2012-01-22 00:56:58 +01:00
Jonas 'Sortie' Termansen ac51e98cb8 Improved removal performance in Maxsi::SortedList. 2012-01-21 01:35:17 +01:00
Jonas 'Sortie' Termansen f29f6dd053 ValidateHeap is now only called when PARANOIA is at least 2.
This speeds up memory allocations from O(N) to O(1) by default.
2012-01-20 23:22:12 +01:00
Jonas 'Sortie' Termansen 83aeec2514 Multiple threads can now wait on the same pipe. 2012-01-18 17:19:08 +01:00
Jonas 'Sortie' Termansen f676cf75f4 Added ENOTSUP. 2012-01-18 15:40:31 +01:00
Jonas 'Sortie' Termansen 17d1b67a77 Fixed bug in fopen(3) where it didn't open correctly. 2012-01-18 12:40:31 +01:00
Jonas 'Sortie' Termansen ba2cb5103a Made Device::IsType 'const', because it is. 2012-01-18 01:11:17 +01:00
Jonas 'Sortie' Termansen 35fc0f6dfe Removed the old unused interrupt 177. 2012-01-15 19:00:05 +01:00
Jonas 'Sortie' Termansen 93fb66ff90 Refactored Interrupt handlers to provide a user pointer. 2012-01-15 18:32:42 +01:00
Jonas 'Sortie' Termansen ff9221de1a Updated ls(1) to use the DIR API. 2012-01-15 00:51:35 +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 c8c34d3cdd readdirents(2) now properly reports ERANGE. 2012-01-15 00:43:13 +01:00
Jonas 'Sortie' Termansen f476a82498 Fixed idention error in ramfs. 2012-01-14 23:19:31 +01:00
Jonas 'Sortie' Termansen c94f6b64c3 readdirents(2) now returns ERANGE if insufficient storage space
was provided, but that the needed size could be copied to d_namelen.
2012-01-14 23:06:18 +01:00
Jonas 'Sortie' Termansen 8ef439b328 Fixed NULL-pointer in SysReadDirEnts. 2012-01-14 22:57:17 +01:00
Jonas 'Sortie' Termansen 8d18993584 Added stpcpy(3). 2012-01-14 17:20:17 +01:00
Jonas 'Sortie' Termansen a06902baf6 Added strcoll(3). 2012-01-14 16:44:48 +01:00
Jonas 'Sortie' Termansen 56084556bb Added stubs for truncate(2) and ftruncate(3). 2012-01-14 16:37:21 +01:00
Jonas 'Sortie' Termansen 0519af33ee Added stubs for rmdir(2) and mkdir(2). 2012-01-14 16:25:28 +01:00
Jonas 'Sortie' Termansen c5ddc6923a Added ENOSYS. 2012-01-14 16:09:30 +01:00
Jonas 'Sortie' Termansen 1824dd6867 Added memchr(3). 2012-01-09 01:38:44 +01:00
Jonas 'Sortie' Termansen 10a37e1f98 Added {,v}s{,n}printf(3). 2012-01-09 00:31:42 +01:00
Jonas 'Sortie' Termansen 91015a2ea7 Made the size_t declaration compatible with GCC. 2012-01-09 00:31:14 +01:00
Jonas 'Sortie' Termansen 66c411b43a sys/types.h now declares pid_t. 2012-01-08 23:25:11 +01:00
Jonas 'Sortie' Termansen df728efb8c Added strchr(3), strchrnul(3), strrchr(3). 2012-01-08 22:26:32 +01:00
Jonas 'Sortie' Termansen 4806f25e50 Added strtok(3), strtok_r(3), strspn(3), strcspn(3). 2012-01-08 21:59:21 +01:00
Jonas 'Sortie' Termansen 9064185bd8 Added memcmp(3). 2012-01-08 20:17: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 ad200ffa91 Added getpagesize(2) with the new return type size_t.
This function is non-standard  and size_t is better than int here.
2012-01-08 14:58:57 +01:00
Jonas 'Sortie' Termansen 809bedd32b Just ignore the restrict keyword fully. 2012-01-08 14:30:50 +01:00
Jonas 'Sortie' Termansen 8eebe18922 Added an implementation of puts(3) because gcc needs it.
I still didn't add it to stdio.h since it's still stupid.
2012-01-08 14:30:50 +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 d3ad36b181 Made detected ATA devices available as /dev/ataN block devices. 2012-01-08 14:21:36 +01:00
Jonas 'Sortie' Termansen a3a2226bb5 Implemented a simple ATA PIO Mode driver that can read and write.
Read operations are enabled by default, but you must set DISKWRITE=1 in
makeflags before write operations are permitted. This protects against
accidentally corrupting the existing filesystems on the system.
2012-01-08 14:20:39 +01:00
Jonas 'Sortie' Termansen 4e0f57f4d7 DevFileWrapper now understands and respects O_TRUNC. 2012-01-08 14:15:51 +01:00
Jonas 'Sortie' Termansen 75282bdab7 Added -fno-rrti to the C++ compile flags in the cross-compiler. 2012-01-03 21:54:49 +01:00
Jonas 'Sortie' Termansen 9a77901883 Added missing prototypes to stdio.h. 2011-12-30 01:23:00 +01:00
Jonas 'Sortie' Termansen 73a7e8f53d Forgot to actually add remove(3) in the previous commit. 2011-12-30 01:13:41 +01:00
Jonas 'Sortie' Termansen deee5e4335 Added a partial implementation of remove(3), since rmdir(2) is missing. 2011-12-30 01:11:33 +01:00
Jonas 'Sortie' Termansen 5d16b5c61e Added getchar(3) and putchar(3). 2011-12-30 01:06:27 +01:00
Jonas 'Sortie' Termansen 66999ff94a Added putc(3) and getc(3). 2011-12-30 01:03:24 +01:00
Jonas 'Sortie' Termansen d39d4222b5 Added fputc(3) and fgetc(3). 2011-12-30 00:55:59 +01:00
Jonas 'Sortie' Termansen 76800553da Clarified comment about typedef struct _FILE FILE. 2011-12-30 00:42:36 +01:00
Jonas 'Sortie' Termansen 064b69d2b6 Added fseeko(3) and ftello(3). 2011-12-30 00:36:39 +01:00