site

A custom static site generator written in C.
git clone https://unitehenry.com/git/site.git
Log | Files | Refs | README

commit e6ef5d8b2be7958894e47fc61e48842c1779bab3
parent 8a356e33786720d34eeae60e39b70ec397bf0852
Author: Henry Unite <unitehenry@gmail.com>
Date:   Thu,  9 Apr 2026 04:28:19 +0000

chore: format

Diffstat:
Msrc/path_root.c | 20++++++++++----------
Msrc/path_root.h | 4++--
2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/path_root.c b/src/path_root.c @@ -1,15 +1,15 @@ #include "path_root.h" +#include <libgen.h> #include <stdlib.h> #include <string.h> -#include <libgen.h> -void path_root(char **root, char* path) { - char *path_copy = strdup(path); - if (!path_copy) { - *root = NULL; - return; - } - char *dir = dirname(path_copy); - *root = strdup(dir); - free(path_copy); +void path_root(char **root, char *path) { + char *path_copy = strdup(path); + if (!path_copy) { + *root = NULL; + return; + } + char *dir = dirname(path_copy); + *root = strdup(dir); + free(path_copy); } \ No newline at end of file diff --git a/src/path_root.h b/src/path_root.h @@ -1 +1 @@ -void path_root(char **root, char* path); -\ No newline at end of file +void path_root(char **root, char *path); +\ No newline at end of file