1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

Enough compatibility work to make figlet build and run!

I ran out of steam writing library routines and imported two
BSD-licensed libc routines: sscanf() and getopt().

I will most likely rewrite them sooner or later. For now
I just wanted to see figlet running.
This commit is contained in:
Andreas Kling 2018-10-31 17:50:43 +01:00
parent 69c7a59e6f
commit 819ce91395
22 changed files with 714 additions and 36 deletions

View file

@ -77,10 +77,8 @@ DWORD handle(DWORD function, DWORD arg1, DWORD arg2, DWORD arg3)
case Syscall::PosixRead:
//kprintf("syscall: read(%d, %p, %u)\n", arg1, arg2, arg3);
return current->sys$read((int)arg1, (void*)arg2, (size_t)arg3);
case Syscall::PosixSeek:
// FIXME: This has the wrong signature, should be like lseek()
kprintf("syscall: seek(%d, %d)\n", arg1, arg2);
return current->sys$seek((int)arg1, (int)arg2);
case Syscall::PosixLseek:
return current->sys$lseek((int)arg1, (off_t)arg2, (int)arg3);
case Syscall::PosixKill:
return current->sys$kill((pid_t)arg1, (int)arg2);
case Syscall::PosixGetuid:
@ -104,6 +102,8 @@ DWORD handle(DWORD function, DWORD arg1, DWORD arg2, DWORD arg3)
return 0;
case Syscall::GetArguments:
return current->sys$get_arguments((int*)arg1, (char***)arg2);
case Syscall::GetEnvironment:
return current->sys$get_environment((char***)arg1);
case Syscall::PosixChdir:
return current->sys$chdir((const char*)arg1);
case Syscall::PosixUname: