refactor(tree,utilities)!: moved the PathBuffer to utilities
This commit is contained in:
parent
326a33a3f4
commit
e63fb4a0fa
4 changed files with 103 additions and 97 deletions
|
|
@ -1,26 +1,13 @@
|
|||
#ifndef TREE_H
|
||||
#define TREE_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#include "utilities.h"
|
||||
#include "hash.h"
|
||||
#include "file.h"
|
||||
|
||||
typedef List PathBuffer;
|
||||
typedef List FileInfoBuffer;
|
||||
|
||||
PathBuffer* path_buffer_new();
|
||||
void path_buffer_push(PathBuffer*, char*);
|
||||
void path_buffer_sort(PathBuffer*);
|
||||
void path_buffer_free(PathBuffer*);
|
||||
void save_tree(PathBuffer*);
|
||||
|
||||
#endif // TREE_H
|
||||
|
|
|
|||
|
|
@ -35,11 +35,19 @@ typedef struct {
|
|||
size_t item_size;
|
||||
} List;
|
||||
|
||||
typedef List PathBuffer;
|
||||
|
||||
List* list_new(size_t);
|
||||
int list_push(List*, void*);
|
||||
PathType get_path_type(const char*);
|
||||
PathBuffer* path_buffer_new();
|
||||
void path_buffer_push(PathBuffer*, char*);
|
||||
void path_buffer_sort(PathBuffer*);
|
||||
void path_buffer_free(PathBuffer*);
|
||||
char* find_root(char*);
|
||||
void walk(char*, char*, char*, PathBuffer*, int, char*);
|
||||
char* get_repo_path(char*, char*);
|
||||
int is_in_repo(char*, char*);
|
||||
void visualize_diff(File*, File*, ActionList*);
|
||||
void cut_path(char* base, char* path);
|
||||
void combine_path(char* base, char* path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue