mirror of
https://github.com/Noratrieb/libuwuc.git
synced 2026-01-14 19:55:07 +01:00
reading env vars
This commit is contained in:
parent
ddba35d06b
commit
0c69d7db10
7 changed files with 121 additions and 16 deletions
|
|
@ -6,3 +6,13 @@ pub(crate) unsafe extern "C" fn memset(ptr: *mut u8, constant: u8, len: usize) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub(crate) unsafe extern "C" fn strlen(mut s: *const u8) -> usize {
|
||||
let mut len = 0;
|
||||
while s.read() != 0 {
|
||||
len += 1;
|
||||
s = s.add(1);
|
||||
}
|
||||
len
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue