Progress..

This commit is contained in:
2025-04-03 02:18:41 +02:00
parent d5204b6705
commit d1bb1ae129
4 changed files with 46 additions and 21 deletions
+13
View File
@@ -90,6 +90,19 @@ unsigned long hash(const char *str) {
return hash;
}
char * joinpath(const char *base_url, const char *path) {
static char result[1024];
result[0] = '\0';
strcat(result, base_url);
if(base_url[strlen(base_url) - 1] != '/') {
strcat(result, "/");
}
if(path[0] == '/') {
path++;
}
strcat(result, path);
return result;
}
char *read_file(const char *path) {
char *expanded_path = expand_home_directory(path);