2025-06-17 15:50:07 -05:00
|
|
|
#ifndef STDIO_H
|
|
|
|
|
#define STDIO_H
|
2025-05-28 14:41:02 -05:00
|
|
|
|
2025-06-17 15:50:07 -05:00
|
|
|
#include <types.h>
|
2025-05-28 14:41:02 -05:00
|
|
|
#include <printf.h>
|
2025-06-17 15:50:07 -05:00
|
|
|
|
2026-03-20 16:57:08 -05:00
|
|
|
#define STDIN 0
|
|
|
|
|
#define STDOUT 1
|
|
|
|
|
#define STDERR 2
|
|
|
|
|
|
|
|
|
|
int read(uint32_t fd, void* data, size_t max_len);
|
|
|
|
|
int write(uint32_t fd, void* data, size_t len);
|
|
|
|
|
|
2025-06-17 15:50:07 -05:00
|
|
|
char getchar(void);
|
|
|
|
|
char* getstring(void);
|
2025-10-20 21:57:30 -05:00
|
|
|
char* gets(void); /* Use this instead of getstring() */
|
|
|
|
|
|
2026-03-20 16:57:08 -05:00
|
|
|
int getstr(char* dest);
|
|
|
|
|
|
|
|
|
|
char* gets_new(int* num);
|
|
|
|
|
|
|
|
|
|
void putc(char c);
|
|
|
|
|
|
2025-10-20 21:57:30 -05:00
|
|
|
static inline void putchar(char c)
|
|
|
|
|
{
|
|
|
|
|
printf("%c", c);
|
|
|
|
|
}
|
2025-06-17 15:50:07 -05:00
|
|
|
|
|
|
|
|
#endif
|