Small fixes in syscall.c

This commit is contained in:
vanten-s 2024-08-10 02:18:09 +02:00
parent e66040a0c3
commit 66b966d584
Signed by: vanten-s
GPG key ID: DE3060396884D3F2

View file

@ -7,18 +7,10 @@ static void print(char* buffer)
terminal_writestring(buffer);
}
static void* memcpy(void* restrict dstptr, const void* restrict srcptr, size_t size) {
unsigned char* dst = (unsigned char*) dstptr;
const unsigned char* src = (const unsigned char*) srcptr;
for (size_t i = 0; i < size; i++)
dst[i] = src[i];
return dstptr;
}
static void input(char* buffer)
{
while (true) {
for (int i = 0; i < keyboard_buffer_top; i++) {
for (size_t i = 0; i < keyboard_buffer_top; i++) {
buffer[i] = keyboard_buffer[i];
if (keyboard_buffer[i] == '\n') {
buffer[keyboard_buffer_top] = 0;