Kernel/Userspace/LibC: Implement basic dprintln for userspace

This commit is contained in:
2024-02-05 01:24:09 +02:00
parent 79897e77dc
commit 692cec8458
11 changed files with 103 additions and 1 deletions

View File

@@ -53,6 +53,8 @@ extern FILE* __stdout;
#define stdout __stdout
extern FILE* __stderr;
#define stderr __stderr
extern FILE* __stddbg;
#define stddbg __stddbg
void clearerr(FILE* stream);
char* ctermid(char* s);

View File

@@ -120,6 +120,7 @@ __BEGIN_DECLS
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#define STDDBG_FILENO 3
#define _POSIX_VDISABLE 0

View File

@@ -22,11 +22,13 @@ static FILE s_files[FOPEN_MAX] {
{ .fd = STDIN_FILENO },
{ .fd = STDOUT_FILENO },
{ .fd = STDERR_FILENO },
{ .fd = STDDBG_FILENO },
};
FILE* stdin = &s_files[0];
FILE* stdout = &s_files[1];
FILE* stderr = &s_files[2];
FILE* stddbg = &s_files[3];
void clearerr(FILE* file)
{