34 lines
638 B
C
34 lines
638 B
C
#ifndef UTILITIES_H
|
|
#define UTILITIES_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <errno.h>
|
|
#include <dirent.h>
|
|
#include <sys/stat.h>
|
|
#include <unistd.h>
|
|
#include <fcntl.h>
|
|
|
|
#include "file.h"
|
|
#include "action_list.h"
|
|
|
|
#define RESET "\033[0m"
|
|
#define RED_BG "\033[41m"
|
|
#define GREEN_BG "\033[42m"
|
|
#define BLACK_FG "\033[30m"
|
|
|
|
typedef enum {
|
|
PT_NOEXIST,
|
|
PT_FILE,
|
|
PT_DIR,
|
|
PT_OTHER,
|
|
PT_ERROR
|
|
} PathType;
|
|
|
|
PathType get_path_type(const char*);
|
|
void visualize_diff(File*, File*, ActionList*);
|
|
void cut_path(char* base, char* path);
|
|
void combine_path(char* base, char* path);
|
|
|
|
#endif // UTILITIES_H
|