PKUOS - Pintos
Pintos source browser for PKU Operating System course
stdlib.h
Go to the documentation of this file.
1#ifndef __LIB_STDLIB_H
2#define __LIB_STDLIB_H
3
4#include <stddef.h>
5
6/** Standard functions. */
7int atoi (const char *);
8void qsort (void *array, size_t cnt, size_t size,
9 int (*compare) (const void *, const void *));
10void *bsearch (const void *key, const void *array, size_t cnt,
11 size_t size, int (*compare) (const void *, const void *));
12
13/** Nonstandard functions. */
14void sort (void *array, size_t cnt, size_t size,
15 int (*compare) (const void *, const void *, void *aux),
16 void *aux);
17void *binary_search (const void *key, const void *array, size_t cnt,
18 size_t size,
19 int (*compare) (const void *, const void *, void *aux),
20 void *aux);
21
22#endif /**< lib/stdlib.h */
void * bsearch(const void *key, const void *array, size_t cnt, size_t size, int(*compare)(const void *, const void *))
Searches ARRAY, which contains CNT elements of SIZE bytes each, for the given KEY.
Definition: stdlib.c:166
int atoi(const char *)
Standard functions.
Definition: stdlib.c:10
void qsort(void *array, size_t cnt, size_t size, int(*compare)(const void *, const void *))
Sorts ARRAY, which contains CNT elements of SIZE bytes each, using COMPARE.
Definition: stdlib.c:58
void * binary_search(const void *key, const void *array, size_t cnt, size_t size, int(*compare)(const void *, const void *, void *aux), void *aux)
lib/stdlib.h
Definition: stdlib.c:185
void sort(void *array, size_t cnt, size_t size, int(*compare)(const void *, const void *, void *aux), void *aux)
Nonstandard functions.
Definition: stdlib.c:132