Rewrite fgetc in asm

-82 bytes, -20% cycles
This commit is contained in:
Colin Leroy-Mira
2024-01-11 18:54:42 +01:00
parent f7388cfb79
commit 476591e8b7
3 changed files with 97 additions and 58 deletions

View File

@@ -45,6 +45,11 @@ int main(int argc,char **argv)
return 1;
}
/* Test ungetc while we're at it */
buf[0] = fgetc(in);
ungetc(buf[0], in);
while (fgets(buf, sizeof(buf), in) != NULL)
{
printf("%s",buf);