From 27124aab29d54ba9f228dee18a48e903e222812a Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 5 Aug 2022 14:01:42 +0200 Subject: move path_simplify to shared code, move its tests to userland --- src/shared/include/camellia/path.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/shared/include') diff --git a/src/shared/include/camellia/path.h b/src/shared/include/camellia/path.h index ba6bccf..8efa0d4 100644 --- a/src/shared/include/camellia/path.h +++ b/src/shared/include/camellia/path.h @@ -1,3 +1,10 @@ #pragma once +#include #define PATH_MAX 512 + +/** Reduce a path to its simplest form. + * + * @return length of the string in *out, always less than len. Negative if the path was invalid. + */ +int path_simplify(const char *in, char *out, size_t len); -- cgit v1.2.3