diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-08-22 23:28:25 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-08-22 23:28:25 +0900 |
| commit | 9c202a496e75903fe37e5c19cb97c98eba6e35f2 (patch) | |
| tree | 52de494a4717a3c30c4bacb9dd9b91980be2a575 /sys.c | |
| parent | 0ac6ac95283735dd70ebf55b26ef78a4c32c31de (diff) | |
| download | ducc-9c202a496e75903fe37e5c19cb97c98eba6e35f2.tar.gz ducc-9c202a496e75903fe37e5c19cb97c98eba6e35f2.tar.zst ducc-9c202a496e75903fe37e5c19cb97c98eba6e35f2.zip | |
chore: move *.c and *.h files to src/
Diffstat (limited to 'sys.c')
| -rw-r--r-- | sys.c | 15 |
1 files changed, 0 insertions, 15 deletions
@@ -1,15 +0,0 @@ -char* get_self_path() { - char* buf = calloc(PATH_MAX, sizeof(char)); - ssize_t len = readlink("/proc/self/exe", buf, PATH_MAX - 1); - if (len == -1 || len == PATH_MAX - 1) { - return NULL; - } - buf[len] = '\0'; - return buf; -} - -// It returns a path not including final / except for root directory. -char* get_self_dir() { - char* path = get_self_path(); - return dirname(path); -} |
