19 Commits

Author SHA1 Message Date
720bc418a6 All: Clear lines with only whitspace in them 2023-09-10 00:31:42 +03:00
0ec4f970f7 LibC: fix fread implementation
fread() should read until either size*nitems bytes are read or eof
is reached.
2023-09-07 16:00:47 +03:00
dcd8374b89 LibC: add fileno() and fdopen()
fdopen() doesn't currently care about mode and will have same mode
as the underlying file descriptor.
2023-08-17 12:03:59 +03:00
51eb44bf40 Kernel/Userspace: Add basic init process
This process parses /etc/passwd and promps login screen.
When an username is entered, it will launch that users shell
2023-06-11 22:37:00 +03:00
f0b22c48b2 LibC: implement close 2023-06-11 03:29:22 +03:00
7151bb86a8 Kernel/LibC: opening standard files is done in libc 2023-05-29 20:21:19 +03:00
481c8406f3 LibC: fputs uses fputc instead of putc 2023-05-28 17:48:34 +03:00
f79250c4d4 LibC: Rewrite all the headers.
We now have more or less posix issue 2018 conforming libc headers.

This was a really time consuming and boring operation but it had to
be done.

Now we get to actually start implementing libc :)
2023-05-26 22:31:21 +03:00
4a4a3bf184 Kernel/LibC: move file offset back to kernel
This makes keeping track of offsets easier and more proper
2023-05-26 22:31:21 +03:00
d82c6c2337 LibC: fix bugs with printf 2023-05-15 22:47:08 +03:00
d5ce4c9d2c LibC: add probably functional *printf
I wrote a general printf function that takes an putc function
pointer. We can use this to implement all the printf family
functions. I haven't done thorough testing with this, but it seems
to be functional for the most part
2023-05-10 02:00:28 +03:00
1cf7ef3de6 Kernel: Remove offset from OpenFileDescriptor
This is now handled on the libc side. There might be reasons to
have it in kernel side, but for simplicity's sake I'm moving it
to libc for now :)
2023-05-09 20:31:22 +03:00
5248a3fe48 LibC: Fix bug in *printf 2023-05-09 20:30:12 +03:00
10d9b72da1 LibC: syscall() now returns -1 on error and updates errno 2023-05-07 01:51:39 +03:00
0718bea5a1 LibC: Fix some bugs 2023-04-25 13:27:01 +03:00
7b19d6e479 LibC: fread() now does a single syscall 2023-04-25 12:38:08 +03:00
b15deb420f LibC: Write mostly functioning stdio 2023-04-23 14:32:37 +03:00
c15f031c3f LibC: puts() now just calls syscall(SYS_WRITE, ...) 2023-04-22 15:29:38 +03:00
e760bafeeb LibC: add stubs for a lot of functions 2023-04-05 23:58:40 +03:00