refactor: split up the utilities file into smaller modules
This commit is contained in:
parent
abaa6e12fc
commit
ff71a92249
13 changed files with 572 additions and 488 deletions
|
|
@ -22,6 +22,7 @@
|
|||
#endif
|
||||
|
||||
#include "hash.h"
|
||||
#include "list.h"
|
||||
|
||||
typedef struct {
|
||||
char** content;
|
||||
|
|
@ -34,6 +35,8 @@ typedef struct {
|
|||
char* hash;
|
||||
} FileInfo;
|
||||
|
||||
typedef List FileInfoBuffer;
|
||||
|
||||
File* new_empty_file();
|
||||
File* new_file(const char*);
|
||||
File* from_string(char*);
|
||||
|
|
@ -43,5 +46,10 @@ int insert_line(File*, char*, size_t);
|
|||
int delete_line(File*, size_t);
|
||||
int snapshot_file(char*, char*, size_t, char*);
|
||||
void free_file(File*);
|
||||
FileInfoBuffer* file_info_buffer_new();
|
||||
int file_info_buffer_push(FileInfoBuffer*, FileInfo);
|
||||
void file_info_buffer_free(FileInfoBuffer*);
|
||||
void file_info_buffer_sort(FileInfoBuffer*);
|
||||
FileInfo* file_info_buffer_search(FileInfoBuffer*, const char*);
|
||||
|
||||
#endif // FILE_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue