Merge string

This commit is contained in:
Jeremy Soller
2018-03-03 20:17:08 -07:00
parent 800a3a7a47
commit 9a423140bc
3 changed files with 173 additions and 178 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
sys_includes = ["stddef.h"]
sys_includes = ["stddef.h", "stdint.h"]
include_guard = "_STRING_H"
language = "C"
-177
View File
@@ -1,177 +0,0 @@
/* automatically generated by rust-bindgen */
#[no_mangle]
pub extern "C" fn memccpy(
s1: *mut libc::c_void,
s2: *const libc::c_void,
c: libc::c_int,
n: usize,
) -> *mut libc::c_void {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn memchr(
s: *const libc::c_void,
c: libc::c_int,
n: usize,
) -> *mut libc::c_void {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn memcmp(
s1: *const libc::c_void,
s2: *const libc::c_void,
n: usize,
) -> libc::c_int {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn memcpy(
s1: *mut libc::c_void,
s2: *const libc::c_void,
n: usize,
) -> *mut libc::c_void {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn memmove(
s1: *mut libc::c_void,
s2: *const libc::c_void,
n: usize,
) -> *mut libc::c_void {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn memset(
s: *mut libc::c_void,
c: libc::c_int,
n: usize,
) -> *mut libc::c_void {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strcat(s1: *mut libc::c_char, s2: *const libc::c_char) -> *mut libc::c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strchr(s: *const libc::c_char, c: libc::c_int) -> *mut libc::c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strcmp(s1: *const libc::c_char, s2: *const libc::c_char) -> libc::c_int {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strcoll(s1: *const libc::c_char, s2: *const libc::c_char) -> libc::c_int {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strcpy(s1: *mut libc::c_char, s2: *const libc::c_char) -> *mut libc::c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strcspn(s1: *const libc::c_char, s2: *const libc::c_char) -> libc::c_ulong {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strdup(s1: *const libc::c_char) -> *mut libc::c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strerror(errnum: libc::c_int) -> *mut libc::c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strlen(s: *const libc::c_char) -> libc::c_ulong {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strncat(
s1: *mut libc::c_char,
s2: *const libc::c_char,
n: usize,
) -> *mut libc::c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strncmp(
s1: *const libc::c_char,
s2: *const libc::c_char,
n: usize,
) -> libc::c_int {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strncpy(
s1: *mut libc::c_char,
s2: *const libc::c_char,
n: usize,
) -> *mut libc::c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strpbrk(
s1: *const libc::c_char,
s2: *const libc::c_char,
) -> *mut libc::c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strrchr(s: *const libc::c_char, c: libc::c_int) -> *mut libc::c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strspn(s1: *const libc::c_char, s2: *const libc::c_char) -> libc::c_ulong {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strstr(
s1: *const libc::c_char,
s2: *const libc::c_char,
) -> *mut libc::c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strtok(s1: *mut libc::c_char, s2: *const libc::c_char) -> *mut libc::c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strtok_r(
s: *mut libc::c_char,
sep: *const libc::c_char,
lasts: *mut *mut libc::c_char,
) -> *mut libc::c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strxfrm(
s1: *mut libc::c_char,
s2: *const libc::c_char,
n: usize,
) -> libc::c_ulong {
unimplemented!();
}
+172
View File
@@ -6,6 +6,102 @@ extern crate platform;
use platform::types::*;
#[no_mangle]
pub extern "C" fn memccpy(
s1: *mut c_void,
s2: *const c_void,
c: c_int,
n: usize,
) -> *mut c_void {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn memchr(
s: *const c_void,
c: c_int,
n: usize,
) -> *mut c_void {
unimplemented!();
}
// #[no_mangle]
// pub extern "C" fn memcmp(
// s1: *const c_void,
// s2: *const c_void,
// n: usize,
// ) -> c_int {
// unimplemented!();
// }
// #[no_mangle]
// pub extern "C" fn memcpy(
// s1: *mut c_void,
// s2: *const c_void,
// n: usize,
// ) -> *mut c_void {
// unimplemented!();
// }
// #[no_mangle]
// pub extern "C" fn memmove(
// s1: *mut c_void,
// s2: *const c_void,
// n: usize,
// ) -> *mut c_void {
// unimplemented!();
// }
// #[no_mangle]
// pub extern "C" fn memset(
// s: *mut c_void,
// c: c_int,
// n: usize,
// ) -> *mut c_void {
// unimplemented!();
// }
#[no_mangle]
pub extern "C" fn strcat(s1: *mut c_char, s2: *const c_char) -> *mut c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strchr(s: *const c_char, c: c_int) -> *mut c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strcmp(s1: *const c_char, s2: *const c_char) -> c_int {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strcoll(s1: *const c_char, s2: *const c_char) -> c_int {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strcpy(s1: *mut c_char, s2: *const c_char) -> *mut c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strcspn(s1: *const c_char, s2: *const c_char) -> c_ulong {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strdup(s1: *const c_char) -> *mut c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strerror(errnum: c_int) -> *mut c_char {
unimplemented!();
}
#[no_mangle]
pub unsafe extern "C" fn strlen(s: *const c_char) -> size_t {
let mut size = 0;
@@ -20,6 +116,82 @@ pub unsafe extern "C" fn strlen(s: *const c_char) -> size_t {
size as size_t
}
#[no_mangle]
pub extern "C" fn strncat(
s1: *mut c_char,
s2: *const c_char,
n: usize,
) -> *mut c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strncmp(
s1: *const c_char,
s2: *const c_char,
n: usize,
) -> c_int {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strncpy(
s1: *mut c_char,
s2: *const c_char,
n: usize,
) -> *mut c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strpbrk(
s1: *const c_char,
s2: *const c_char,
) -> *mut c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strrchr(s: *const c_char, c: c_int) -> *mut c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strspn(s1: *const c_char, s2: *const c_char) -> c_ulong {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strstr(
s1: *const c_char,
s2: *const c_char,
) -> *mut c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strtok(s1: *mut c_char, s2: *const c_char) -> *mut c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strtok_r(
s: *mut c_char,
sep: *const c_char,
lasts: *mut *mut c_char,
) -> *mut c_char {
unimplemented!();
}
#[no_mangle]
pub extern "C" fn strxfrm(
s1: *mut c_char,
s2: *const c_char,
n: usize,
) -> c_ulong {
unimplemented!();
}
/*
#[no_mangle]
pub extern "C" fn func(args) -> c_int {