update: refactor and rename

This commit is contained in:
ngn
2024-08-01 04:48:11 +03:00
parent 48d177965e
commit 4354fb8b89
30 changed files with 642 additions and 626 deletions

View File

@ -18,16 +18,6 @@ bool eq(char *s1, char *s2) {
return strcmp(s1, s2) == 0;
}
bool joinhome(char *res, char *path) {
char *homedir = getenv("HOME");
if (NULL == homedir)
return false;
snprintf(res, PATH_MAX, "%s/%s", homedir, path);
return true;
}
bool exists(char *path) {
return access(path, F_OK) == 0;
}