repo.or.cz
/
beagle.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Thumbnail file hits. Based on a patch from D Bera
[beagle.git]
/
glue
/
beagled-utils.c
blob
3feec1d60f39effc5fda97dc3e0740c547b8cc3f
1
#include <unistd.h>
2
#include <dirent.h>
3
#include <string.h>
4
5
int
6
beagled_utils_readdir
(
void
*
dir
,
char
*
name
)
7
{
8
struct
dirent
*
entry
=
readdir
((
DIR
*)
dir
);
9
10
if
(
entry
==
NULL
) {
11
name
=
NULL
;
12
return
-
1
;
13
}
14
15
strcpy
(
name
,
entry
->
d_name
);
16
return
0
;
17
}