Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Commit

Permalink
support ./src/string/*.c
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Jul 16, 2022
1 parent a3c536a commit c51addc
Show file tree
Hide file tree
Showing 53 changed files with 2,121 additions and 224 deletions.
7 changes: 7 additions & 0 deletions bcmp.c.i.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package libc

import unsafe "unsafe"

func bcmp(s1 unsafe.Pointer, s2 unsafe.Pointer, n uint64) int32 {
return Memcmp(s1, s2, n)
}
7 changes: 7 additions & 0 deletions bcopy.c.i.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package libc

import unsafe "unsafe"

func bcopy(s1 unsafe.Pointer, s2 unsafe.Pointer, n uint64) {
memmove(s2, s1, n)
}
7 changes: 7 additions & 0 deletions bzero.c.i.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package libc

import unsafe "unsafe"

func bzero(s unsafe.Pointer, n uint64) {
Memset(s, int32(0), n)
}
30 changes: 4 additions & 26 deletions c2go.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@
"names": [
"abort",
"a_cas", "a_ll", "a_sc", "a_swap",
"__builtin_inf", "__builtin_inff", "__builtin_nan", "__builtin_nanf",
"__syscall0", "__syscall0_r1",
"__syscall1", "__syscall2", "__syscall3",
"__syscall4", "__syscall5", "__syscall6",
"__syscall1_r1", "__syscall2_r1", "__syscall3_r1",
"__syscall4_r1", "__syscall5_r1", "__syscall6_r1",
"__syscall_ret", "__syscall_cp",
"__libc_malloc",
"__libc_malloc", "Malloc",
"__pthread_self"
],
"paths": [
"syscall_ret.c"
]
},
"dirs": [
"./src/string"
],
"files": [
"./c2go/floatscan.c",
"./c2go/shgetc.c",
Expand Down Expand Up @@ -57,30 +59,6 @@
"./src/math/scalbnf.c",
"./src/math/scalbnl.c",
"./src/ctype/isdigit.c",
"./src/string/memchr.c",
"./src/string/memrchr.c",
"./src/string/memset.c",
"./src/string/memcpy.c",
"./src/string/memcmp.c",
"./src/string/strchrnul.c",
"./src/string/strnlen.c",
"./src/string/strlen.c",
"./src/string/strncmp.c",
"./src/string/strcmp.c",
"./src/string/strncpy.c",
"./src/string/strcpy.c",
"./src/string/stpncpy.c",
"./src/string/stpcpy.c",
"./src/string/strncat.c",
"./src/string/strcat.c",
"./src/string/strchr.c",
"./src/string/strrchr.c",
"./src/string/strspn.c",
"./src/string/strcspn.c",
"./src/string/strpbrk.c",
"./src/string/strtok.c",
"./src/string/strlcpy.c",
"./src/string/strlcat.c",
"./src/stdlib/strtod.c",
"./src/stdlib/qsort.c",
"./src/env/__environ.c",
Expand Down
9 changes: 6 additions & 3 deletions c2go_autogen.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ package libc

import unsafe "unsafe"

type struct_sigevent struct {
}

func __aio_close(int32) int32 {
panic("notimpl")
}
Expand All @@ -26,6 +23,12 @@ func __vm_wait() {
func __wake(addr unsafe.Pointer, cnt int32, priv int32) {
panic("notimpl")
}
func tolower(int32) int32 {
panic("notimpl")
}
func towlower(uint32) uint32 {
panic("notimpl")
}
func wctomb(*int8, uint32) int32 {
panic("notimpl")
}
Loading

0 comments on commit c51addc

Please sign in to comment.