int riscos_close(struct open_file *f) { struct riscosfile *rf; struct os_error *error; int err = 0; rf = f->f_fsdata; error = xosfind_close(rf->file); if (error) err = riscos_errno(error); dealloc(rf, sizeof(*rf)); return err; }
extern int close(int fd) { return ((int) xosfind_close((os_f) fd)); }