summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dirent.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/dirent.c b/src/dirent.c
index 52e8f84..7783120 100644
--- a/src/dirent.c
+++ b/src/dirent.c
@@ -116,37 +116,3 @@ opkg_opk_dirent_full_name(struct opkg_opk_dirent *dirent)
*cur = '\0';
return name;
}
-
-int
-main()
-{
- struct opkg_opk_dirent foo = {
- .name = "foo",
- .parent = NULL,
- };
- struct opkg_opk_dirent bar = {
- .name = "bar",
- .parent = &foo,
- };
- char *full_name;
- char name[5];
- char pref[5];
-
- full_name = opkg_opk_dirent_full_name(&bar);
- if (full_name == NULL) {
- puts("Error building full name");
- return EXIT_FAILURE;
- }
- puts(full_name);
- free(full_name);
-
- if (opkg_opk_dirent_name_prefix(&bar, name, 5, pref, 5) != OPKG_OPK_OK)
- {
- puts("Error building name parts");
- return EXIT_FAILURE;
- }
- puts(name);
- puts(pref);
-
- return EXIT_SUCCESS;
-}