Mostly implemented cngetc()