How to make ungetc() function

Hello!

FreeRTOS FAT has not ungetc function.
If I have to use the ungetc function like, how can I make it?
Anybody know that function code?

thank you in advance!

When you write “FreeRTOS FAT”, do you mean “FreeRTOS+FAT”, or do you mean “Fatfs” as for example here?

I think that none of the libraries has implemented a function ungetc(), and it would be surprisingly difficult to implement it.

If you are parsing a file using getc(), you could call in stead your own safe_getc(), which safes the last characters returned by getc().