fopen and tests

This commit is contained in:
nora 2023-10-04 21:35:18 +02:00
parent 862ef8dc22
commit b795ee80c9
14 changed files with 97 additions and 45 deletions

View file

@ -91,7 +91,9 @@ pub unsafe extern "C" fn fopen<'a>(
pathname: SharedThinCstr,
mode: SharedThinCstr,
) -> Option<&'a FileStream> {
todo!()
libuwuc::io::stream::fopen(pathname, mode)
.map_err(|err| libuwuc::error::set_errno(err.0))
.ok()
}
#[no_mangle]