mirror of
https://github.com/Noratrieb/libuwuc.git
synced 2026-01-14 19:55:07 +01:00
c test program
This commit is contained in:
parent
54e0e7604e
commit
1baf8df4a8
18 changed files with 150 additions and 68 deletions
25
rawc/src/string.rs
Normal file
25
rawc/src/string.rs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#[no_mangle]
|
||||
pub unsafe extern "C" fn memset(ptr: *mut u8, constant: u8, len: usize) {
|
||||
libuwuc::mem::memset(ptr, constant, len)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn memcpy(dest: *mut u8, src: *const u8, size: usize) -> *mut u8 {
|
||||
libuwuc::mem::memcpy(dest, src, size)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe fn memcmp(s1: *const u8, s2: *const u8, size: usize) -> i32 {
|
||||
libuwuc::mem::memcmp(s1, s2, size)
|
||||
}
|
||||
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe fn bcmp(s1: *const u8, s2: *const u8, size: usize) -> i32 {
|
||||
libuwuc::mem::memcmp(s1, s2, size)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn strlen(s: *const u8) -> usize {
|
||||
libuwuc::mem::strlen(s)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue