added support for fgetc().