QueryResponses.cs, DumpIndex.cs, IQueryResult.cs, QueryExecutor.cs, QueryResult.cs...
[beagle.git] / glue / beagled-utils.c
blob39a8939826fb70787a380f2c873defd89713df4f
1 #include <unistd.h>
2 #include <dirent.h>
3 #include <string.h>
5 int
6 beagled_utils_readdir (void *dir, char *name, int max_len)
8 struct dirent* entry = readdir ((DIR*) dir);
10 if (entry == NULL) {
11 if (max_len > 0)
12 *name = '\0';
13 return -1;
16 strncpy (name, entry->d_name, max_len);
17 return 0;