mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-30 00:07:59 +00:00
feat(userspace/libc): implement getchar() and getc()
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
parent
0238f62894
commit
b5fce27037
@ -115,7 +115,7 @@ extern "C"
|
|||||||
int ftrylockfile(FILE *);
|
int ftrylockfile(FILE *);
|
||||||
void funlockfile(FILE *);
|
void funlockfile(FILE *);
|
||||||
size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream);
|
size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream);
|
||||||
int getc(FILE *);
|
int getc(FILE *stream);
|
||||||
int getchar(void);
|
int getchar(void);
|
||||||
int getc_unlocked(FILE *);
|
int getc_unlocked(FILE *);
|
||||||
int getchar_unlocked(void);
|
int getchar_unlocked(void);
|
||||||
|
@ -347,8 +347,16 @@ export size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE
|
|||||||
return bytes_written / size;
|
return bytes_written / size;
|
||||||
}
|
}
|
||||||
|
|
||||||
export int getc(FILE *);
|
export int getc(FILE *stream)
|
||||||
export int getchar(void);
|
{
|
||||||
|
return fgetc(stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
export int getchar(void)
|
||||||
|
{
|
||||||
|
return getc(stdin);
|
||||||
|
}
|
||||||
|
|
||||||
export int getc_unlocked(FILE *);
|
export int getc_unlocked(FILE *);
|
||||||
export int getchar_unlocked(void);
|
export int getchar_unlocked(void);
|
||||||
export ssize_t getdelim(char **restrict, size_t *restrict, int, FILE *restrict);
|
export ssize_t getdelim(char **restrict, size_t *restrict, int, FILE *restrict);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user