Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
include
tenok
stdlib.h
Go to the documentation of this file.
1
4
#ifndef __STDLIB_H__
5
#define __STDLIB_H__
6
12
void
exit
(
int
status);
13
20
void
*
malloc
(
size_t
size);
21
27
void
free
(
void
*ptr);
28
36
void
*
calloc
(
size_t
nmemb,
size_t
size);
37
38
/*
39
* Currently not implemented:
40
*/
41
42
#if 0
43
int
atexit(
void
(*
function
)(
void
));
44
void
abort(
void
);
45
int
system(
const
char
*command);
46
int
setenv(
const
char
*name,
const
char
*value,
int
overwrite);
47
int
unsetenv(
const
char
*name);
48
int
putenv(
char
*
string
);
49
char
*getenv(
const
char
*name);
50
#endif
51
52
/*
53
* Non-standard extensions:
54
*/
55
56
char
*itoa(
int
value,
char
*buffer,
int
radix);
57
char
*utoa(
unsigned
int
value,
char
*buffer,
int
radix);
58
char
*ltoa(
long
value,
char
*buffer,
int
radix);
59
char
*ultoa(
unsigned
long
value,
char
*buffer,
int
radix);
60
61
/*
62
* Functions provided by the compiler:
63
*/
64
65
typedef
struct
{
66
int
quot;
67
int
rem;
68
}
div_t
;
69
70
typedef
struct
{
71
long
quot;
72
long
rem;
73
}
ldiv_t
;
74
75
typedef
struct
{
76
long
long
int
quot;
77
long
long
int
rem;
78
}
lldiv_t
;
79
80
int
atoi(
const
char
*nptr);
81
long
atol(
const
char
*nptr);
82
long
long
atoll(
const
char
*nptr);
83
long
a64l(
const
char
*str64);
84
int
abs(
int
j);
85
double
atof(
const
char
*nptr);
86
void
*bsearch(
const
void
*key,
87
const
void
*base,
88
size_t
nmemb,
89
size_t
size,
90
int
(*compar)(
const
void
*,
const
void
*));
91
div_t
div(
int
numerator,
int
denominator);
92
int
getsubopt(
char
**optionp,
char
*
const
*tokens,
char
**valuep);
93
char
*l64a(
long
value);
94
long
labs(
long
j);
95
ldiv_t
ldiv(
long
numerator,
long
denominator);
96
long
long
llabs(
long
long
j);
97
lldiv_t
lldiv(
long
long
numerator,
long
long
denominator);
98
int
mblen(
const
char
*s,
size_t
n);
99
size_t
mbstowcs(
wchar_t
*dest,
const
char
*src,
size_t
n);
100
int
mbtowc(
wchar_t
*pwc,
const
char
*s,
size_t
n);
101
void
qsort(
void
*base,
102
size_t
nmemb,
103
size_t
size,
104
int
(*compar)(
const
void
*,
const
void
*));
105
char
*realpath(
const
char
*path,
char
*resolved_path);
106
double
strtod(
const
char
*nptr,
char
**endptr);
107
float
strtof(
const
char
*nptr,
char
**endptr);
108
long
strtol(
const
char
*nptr,
char
**endptr,
int
base);
109
long
double
strtold(
const
char
*nptr,
char
**endptr);
110
long
long
strtoll(
const
char
*nptr,
char
**endptr,
int
base);
111
unsigned
long
strtoul(
const
char
*nptr,
char
**endptr,
int
base);
112
unsigned
long
long
strtoull(
const
char
*nptr,
char
**endptr,
int
base);
113
size_t
wcstombs(
char
*dest,
const
wchar_t
*src,
size_t
n);
114
int
wctomb(
char
*s,
wchar_t
wc);
115
116
#endif
exit
void exit(int status)
To cause task termination.
calloc
void * calloc(size_t nmemb, size_t size)
Allocate and reset a memory space of an array.
Definition:
mm.c:188
malloc
void * malloc(size_t size)
Allocate a memory space.
Definition:
mm.c:142
free
void free(void *ptr)
Free a memory space.
Definition:
mm.c:183
div_t
Definition:
stdlib.h:65
ldiv_t
Definition:
stdlib.h:70
lldiv_t
Definition:
stdlib.h:75
Generated by
1.9.1