opening files using mimetypes defined in config.h

This commit is contained in:
nova
2025-06-18 04:08:02 +02:00
parent 1485d69cad
commit f99035629a
10 changed files with 106 additions and 41 deletions

View File

@ -14,6 +14,14 @@ extern unsigned int file_modifiers;
extern unsigned int color_count;
extern color *colors;
char* concat(const char *s1, const char *s2){
const size_t len1 = strlen(s1);
const size_t len2 = strlen(s2);
char *result = malloc(len1 + len2 + 1);
memcpy(result, s1, len1);
memcpy(result + len1, s2, len2 + 1);
return result;
}
unsigned long get_dir_size(char *path){
DIR *dir = opendir(path);