Espresso 0.0.1c

This commit is contained in:
2025-07-01 20:39:38 -05:00
parent f9f3faca4f
commit 8648637b51
23 changed files with 384 additions and 419 deletions

View File

@ -25,7 +25,7 @@ char* getstring(void)
return "HELLO\0";
}
char* fgets(char* buf, int n, FILE file)
/*char* fgets(char* buf, int n, FILE file)
{
if (!buf || n <= 1 || file < 1)
{
@ -37,26 +37,26 @@ char* fgets(char* buf, int n, FILE file)
while (total_read < n - 1)
{
int bytes = 0/*read_file(file, &c, 1)*/;
int bytes = 0*//*read_file(file, &c, 1)*/;
if (bytes <= 0)
/*if (bytes <= 0)
{
break; /* EOF or error */
}
break; *//* EOF or error */
/*}
buf[total_read++] = c;
if (c == '\n')
{
break; /* Stop at newline */
}
break; *//* Stop at newline */
/*}
}
if (total_read == 0)
{
return NULL; /* Nothing read (e.g. EOF) */
}
return NULL; *//* Nothing read (e.g. EOF) */
/*}
buf[total_read] = '\0';
return buf;
}
}*/