Sign in
nest-open-source
/
nest-cam
/
v366
/
glibc
/
a1be76f4778f5115901e067c04353d3fd4561883
/
.
/
manual
/
examples
/
strdupa.c
blob: 7d6ef39947ce304ee822c1a158d1d928647f76e9 [
file
] [
log
] [
blame
]
#include
<paths.h>
#include
<string.h>
#include
<stdio.h>
const
char
path
[]
=
_PATH_STDPATH
;
int
main
(
void
)
{
char
*
wr_path
=
strdupa
(
path
);
char
*
cp
=
strtok
(
wr_path
,
":"
);
while
(
cp
!=
NULL
)
{
puts
(
cp
);
cp
=
strtok
(
NULL
,
":"
);
}
return
0
;
}