Added fungetc as wrapper for ungetc