feat(utilities): added functions to save, read and apply diffs

This commit is contained in:
lisk77 2025-09-15 03:25:45 +02:00
parent e2d026502f
commit cfb24bd3a2
2 changed files with 560 additions and 3 deletions

View file

@ -6,8 +6,7 @@
#include <unistd.h>
#include <fcntl.h>
#include "file.h"
#include "action_list.h"
#include "myers.h"
#define IS_ALPHA(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
#define IS_DIGIT(c) (c >= '0' && c <= '9')
@ -65,6 +64,10 @@ PathType get_path_type(const char*);
char* get_file_content(char*);
char* get_file_content_with_size(char*, size_t*);
int create_default_config_file(char*);
int save_diff(ActionList*, char*, char*, size_t, char*, File*, int, char*);
int read_diff(char*, char*, size_t, char*, ActionList*);
int save_file_diff(char*, char*, size_t, char*, char*);
File* apply_diff(File*, ActionList*);
void sort_action_list(ActionList*);
#endif // UTILITIES_H