mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Added getchar(3) and putchar(3).
This commit is contained in:
parent
66999ff94a
commit
5d16b5c61e
2 changed files with 12 additions and 2 deletions
|
@ -89,9 +89,11 @@ extern int fseek(FILE* stream, long offset, int whence);
|
|||
extern long ftell(FILE* stream);
|
||||
extern size_t fwrite(const void* restrict ptr, size_t size, size_t nitems, FILE* restrict stream);
|
||||
extern int getc(FILE* stream);
|
||||
extern int getchar(void);
|
||||
extern void perror(const char* s);
|
||||
extern int printf(const char* restrict format, ...);
|
||||
extern int putc(int c, FILE* stream);
|
||||
extern int putchar(int c);
|
||||
extern void rewind(FILE* stream);
|
||||
extern int vfprintf(FILE* restrict stream, const char* restrict format, va_list ap);
|
||||
extern int vprintf(const char* restrict format, va_list ap);
|
||||
|
@ -115,10 +117,8 @@ extern int fseeko(FILE* stream, off_t offset, int whence);
|
|||
extern int fsetpos(FILE* stream, const fpos_t* pos);
|
||||
extern int ftrylockfile(FILE* file);
|
||||
extern int getchar_unlocked(void);
|
||||
extern int getchar(void);
|
||||
extern int getc_unlocked(FILE* stream);
|
||||
extern int pclose(FILE* steam);
|
||||
extern int putchar(int c);
|
||||
extern int putchar_unlocked(int c);
|
||||
extern int putc_unlocked(int c, FILE* steam);
|
||||
extern int puts(const char* s);
|
||||
|
|
|
@ -37,3 +37,13 @@ int init_stdio()
|
|||
stderr = fdio_newfile(2, "w");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int getchar(void)
|
||||
{
|
||||
return fgetc(stdin);
|
||||
}
|
||||
|
||||
int putchar(int c)
|
||||
{
|
||||
return fputc(c, stdout);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue