repo.or.cz
/
glibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Update.
[glibc.git]
/
manual
/
examples
/
strdupa.c
blob
7d6ef39947ce304ee822c1a158d1d928647f76e9
1
#include <paths.h>
2
#include <string.h>
3
#include <stdio.h>
4
5
const char
path
[] =
_PATH_STDPATH
;
6
7
int
8
main
(
void
)
9
{
10
char
*
wr_path
=
strdupa
(
path
);
11
char
*
cp
=
strtok
(
wr_path
,
":"
);
12
13
while
(
cp
!=
NULL
)
14
{
15
puts
(
cp
);
16
cp
=
strtok
(
NULL
,
":"
);
17
}
18
return
0
;
19
}