Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
archived/test/t_tree.c
2010-10-19 03:31:16 +02:00

36 lines
456 B
C

#include <stdio.h>
#include "../src/fs/tree.h"
int main(int argc, char *argv[]) {
struct entry *ent;
struct tree *tree;
unsigned int c_ent = 0;
if (argc < 2)
return 1;
tree = tree_new(argv[1]);
if (tree == NULL) {
printf("error\n");
return 1;
}
for(;;) {
ent = tree_next_ent(tree);
if (ent == NULL)
break;
printf("%s%s\n", ent->base, ent->name);
c_ent++;
}
printf("%i Entries\n", c_ent);
return 0;
}