Skip to content

Commit

Permalink
Add qsort and bsearch to stdlib (#1605)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekrich authored and densh committed May 24, 2019
1 parent 34453c0 commit 7d26a7e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions clib/src/main/scala/scala/scalanative/libc/stdlib.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ object stdlib {
def strtof(str: CString, str_end: Ptr[CString]): CFloat = extern
def strtod(str: CString, str_end: Ptr[CString]): CDouble = extern

// Searching and sorting

def bsearch(key: Ptr[Byte],
data: Ptr[Byte],
num: CSize,
size: CSize,
comparator: CFuncPtr2[Ptr[Byte], Ptr[Byte], CInt]): Unit = extern

def qsort(data: Ptr[Byte],
num: CSize,
size: CSize,
comparator: CFuncPtr2[Ptr[Byte], Ptr[Byte], CInt]): Unit = extern

// File management

def realpath(file_name: CString, resolved_name: CString): CString = extern
Expand Down

0 comments on commit 7d26a7e

Please sign in to comment.