implemented tree view

This commit is contained in:
root committed 2026-07-25 23:57:38 +02:00
1 parent b81dcc10ac
commit 6fb01cfe29
7 files changed
+336 -177

No files matched your search

+1
View File
@@ -27,6 +27,7 @@ typedef struct {
bool show_all;
bool show_almost_all;
bool case_sensitive_sorting;
size_t depth;
bool no_colour;
bool group_directories;
bool long_view;
+1 -1
View File
@@ -6,7 +6,7 @@
#include "arguments.h"
int sort_entries(
arguments_t* args,
const arguments_t* const args,
directory_entry_t** const entry_table,
int num_entries
);
+16 -1
View File
@@ -1,14 +1,29 @@
#ifndef __TYPE_DEFINITIONS_H
#define __TYPE_DEFINITIONS_H
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 700
#endif
#include <linux/limits.h>
#include <sys/stat.h>
#include <sys/types.h>
// type definitions
typedef struct directory_entry {
typedef enum {
type_directory,
type_character,
type_block,
type_regular,
type_fifo,
type_link,
type_socket,
} entry_type_t;
typedef struct {
char name[ NAME_MAX ];
struct stat stats;
entry_type_t type;
} directory_entry_t;
#endif