New repo setup

This commit is contained in:
2024-05-28 14:50:00 -05:00
commit f68c320396
51 changed files with 4612 additions and 0 deletions

21
src/stdio/fgetc.c Normal file
View File

@@ -0,0 +1,21 @@
#include "stdio.h"
#include <sys/syscall.h>
int fgetc(FILE *stream)
{
char c;
int check;
check = read(*stream, &c, 1);
if (check < 0)
{
return -1; // eof
}
return c;
}
int fputc(int ch, FILE *stream)
{
char c = ch;
write(*stream, &c, 1);
return 0;
}