summaryrefslogtreecommitdiff
path: root/c/tree/main.c
diff options
context:
space:
mode:
authorgarhve <git@garhve.com>2023-01-11 09:34:14 +0800
committergarhve <git@garhve.com>2023-01-11 09:34:14 +0800
commita5ef3263fbf5b02c69ed9f26225f1d424e355c9f (patch)
treef164c8bd57dac50f73da23d3baeed68f83a25805 /c/tree/main.c
parentbcc303880f7078d612207571e196697a0d0b35bf (diff)
tree program is usable now
Diffstat (limited to 'c/tree/main.c')
-rw-r--r--c/tree/main.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/c/tree/main.c b/c/tree/main.c
index 073167e..0926555 100644
--- a/c/tree/main.c
+++ b/c/tree/main.c
@@ -11,12 +11,7 @@ void printChild(const regfile * head)
regfile * scan = head->next;
while (scan != NULL) {
- printf("%s\tlevel: %d\tname length: %lu\tfile or dir: ",scan->node->text,
- scan->node->level, scan->node->len);
- if (scan->node->fod)
- printf("dir\n");
- else
- printf("file\n");
+ printf("%s\n",scan->node->text);
scan = scan->next;
}
}
@@ -25,7 +20,7 @@ int main()
{
regfile head;
- getfile(&head,".");
+ getfile(&head,"..");
printChild(&head);