From bc3013fc68746265db78bf92623f7e6e3e469264 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sun, 16 May 2021 21:06:48 -0400 Subject: Add default path (#6) * Add default path * Improve support/implementation logic * Fix braces in tests * Enable warnings * Emit more generalized form of windows path * Change initialization order * Add --default/-D to documentation * Fix platform detection --- include/cleanpath/cleanpath.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'include/cleanpath') diff --git a/include/cleanpath/cleanpath.h b/include/cleanpath/cleanpath.h index afee624..dfb0b5f 100644 --- a/include/cleanpath/cleanpath.h +++ b/include/cleanpath/cleanpath.h @@ -38,13 +38,21 @@ #define CLEANPATH_PART_MAX 1024 #define CLEANPATH_VAR "PATH" #define CLEANPATH_SEP ":" -#define CLEANPATH_MSG_NOAVAIL "" +#define CLEANPATH_MSG_NOT_IMPLEMENTED "[not implemented]" +#define CLEANPATH_MSG_NOT_SUPPORTED "[not supported]" +#define CLEANPATH_MSG_NO_REGEX "" +#define CLEANPATH_MSG_NO_DEFAULT_PATH "" #if OS_WINDOWS #undef CLEANPATH_SEP #define CLEANPATH_SEP ";" -#undef CLEANPATH_MSG_NOAVAIL -#define CLEANPATH_MSG_NOAVAIL " [not implemented] " +#undef CLEANPATH_MSG_NO_REGEX +#define CLEANPATH_MSG_NO_REGEX CLEANPATH_MSG_NOT_IMPLEMENTED +#endif + +#if !OS_SUPPORTED +#undef CLEANPATH_MSG_NO_DEFAULT_PATH +#define CLEANPATH_MSG_NO_DEFAULT_PATH CLEANPATH_MSG_NOT_SUPPORTED #endif struct CleanPath { -- cgit