diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2021-05-12 23:46:22 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2021-05-12 23:46:22 -0400 |
commit | 89511934b805999e0c12071750c52c1c45d35536 (patch) | |
tree | cddfae1f628181b67a6d1a965e6c7c1239f81aeb | |
parent | 054508b5edeaef602ee4251bb3828387cb26f582 (diff) | |
download | cleanpath-89511934b805999e0c12071750c52c1c45d35536.tar.gz |
Proper namespace for the header file. Bump version.
-rw-r--r-- | CMakeLists.txt | 10 | ||||
-rw-r--r-- | include/cleanpath/cleanpath.h (renamed from include/cleanpath.h) | 4 | ||||
-rw-r--r-- | lib/cleanpath.c | 2 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | tests/test_errors.c | 4 | ||||
-rw-r--r-- | tests/test_modes_filter_all.c | 4 | ||||
-rw-r--r-- | tests/test_modes_filter_general.c | 4 | ||||
-rw-r--r-- | tests/test_no_sep_ending.c | 4 |
8 files changed, 17 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cbeba46..562064d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ include(CTest) set(CMAKE_C_STANDARD 99) set(LIB_SOURCES lib/cleanpath.c) set(MAIN_SOURCES src/main.c) -set(INCLUDES include/cleanpath.h) +set(LIB_INCLUDES include/cleanpath/cleanpath.h) configure_file ("${PROJECT_SOURCE_DIR}/config.h.in" "${PROJECT_BINARY_DIR}/include/config.h") @@ -19,22 +19,22 @@ enable_testing() add_subdirectory(tests) add_library(cleanpath_static STATIC ${LIB_SOURCES}) -set_target_properties(cleanpath_static PROPERTIES PUBLIC_HEADER ${INCLUDES}) +set_target_properties(cleanpath_static PROPERTIES PUBLIC_HEADER ${LIB_INCLUDES}) set_target_properties(cleanpath_static PROPERTIES OUTPUT_NAME cleanpath) add_library(cleanpath_shared SHARED ${LIB_SOURCES}) -set_target_properties(cleanpath_shared PROPERTIES PUBLIC_HEADER ${INCLUDES}) +set_target_properties(cleanpath_shared PROPERTIES PUBLIC_HEADER ${LIB_INCLUDES}) set_target_properties(cleanpath_shared PROPERTIES OUTPUT_NAME cleanpath) add_executable(cleanpath ${MAIN_SOURCES}) target_link_libraries(cleanpath cleanpath_static) install(TARGETS cleanpath_static - PUBLIC_HEADER DESTINATION include + PUBLIC_HEADER DESTINATION include/cleanpath LIBRARY DESTINATION lib) install(TARGETS cleanpath_shared - PUBLIC_HEADER DESTINATION include + PUBLIC_HEADER DESTINATION include/cleanpath LIBRARY DESTINATION lib) install(TARGETS cleanpath diff --git a/include/cleanpath.h b/include/cleanpath/cleanpath.h index 9f38188..afee624 100644 --- a/include/cleanpath.h +++ b/include/cleanpath/cleanpath.h @@ -30,7 +30,7 @@ #include <stdlib.h> #include <string.h> -#define CLEANPATH_VERSION "0.1.0" +#define CLEANPATH_VERSION "1.0.0" #define CLEANPATH_FILTER_NONE -1 #define CLEANPATH_FILTER_EXACT 0 #define CLEANPATH_FILTER_LOOSE 1 @@ -61,4 +61,4 @@ void cleanpath_filter(struct CleanPath *path, unsigned mode, const char *pattern char *cleanpath_read(struct CleanPath *path); void cleanpath_free(struct CleanPath *path); -#endif //CLEANPATH_CLEANPATH_H
\ No newline at end of file +#endif //CLEANPATH_CLEANPATH_H diff --git a/lib/cleanpath.c b/lib/cleanpath.c index fde9e6d..91b399d 100644 --- a/lib/cleanpath.c +++ b/lib/cleanpath.c @@ -2,7 +2,7 @@ #include <stdlib.h> #include <string.h> #include "config.h" -#include "cleanpath.h" +#include "cleanpath/cleanpath.h" #if !OS_WINDOWS #include <regex.h> @@ -2,7 +2,7 @@ #include <stdlib.h> #include <string.h> #include <errno.h> -#include "cleanpath.h" +#include "cleanpath/cleanpath.h" // Make argument parsing less wordy #define ARGM(X) strcmp(argv[i], X) == 0 diff --git a/tests/test_errors.c b/tests/test_errors.c index f9d641f..82241ed 100644 --- a/tests/test_errors.c +++ b/tests/test_errors.c @@ -1,4 +1,4 @@ -#include "cleanpath.h" +#include "cleanpath/cleanpath.h" #include "framework.h" int main() { @@ -8,4 +8,4 @@ int main() { //intentionally bad myassert(cleanpath_init("good", NULL) == NULL, "cleanpath_init() returned non-NULL on NULL sep\n"); myassert(cleanpath_init(NULL, "good") == NULL, "cleanpath_init() returned non-NULL on NULL path\n"); -}
\ No newline at end of file +} diff --git a/tests/test_modes_filter_all.c b/tests/test_modes_filter_all.c index 7e19242..d57b418 100644 --- a/tests/test_modes_filter_all.c +++ b/tests/test_modes_filter_all.c @@ -1,5 +1,5 @@ #include <stdio.h> -#include "cleanpath.h" +#include "cleanpath/cleanpath.h" #include "framework.h" #define MAX_MODE 3 @@ -98,4 +98,4 @@ int main() { myassert(status == 0, "%d mode(s) failed", status); return 0; -}
\ No newline at end of file +} diff --git a/tests/test_modes_filter_general.c b/tests/test_modes_filter_general.c index 50dec68..45206a4 100644 --- a/tests/test_modes_filter_general.c +++ b/tests/test_modes_filter_general.c @@ -1,4 +1,4 @@ -#include "cleanpath.h" +#include "cleanpath/cleanpath.h" #include "framework.h" #define MAX_MODE 3 @@ -95,4 +95,4 @@ int main() { myassert(status == 0, "%d mode(s) failed", status); return 0; -}
\ No newline at end of file +} diff --git a/tests/test_no_sep_ending.c b/tests/test_no_sep_ending.c index 6b89c2b..2f86270 100644 --- a/tests/test_no_sep_ending.c +++ b/tests/test_no_sep_ending.c @@ -1,4 +1,4 @@ -#include "cleanpath.h" +#include "cleanpath/cleanpath.h" #include "framework.h" int main() { @@ -16,4 +16,4 @@ int main() { len = strlen(result); puts(result); myassert(len && *(result + (len - 1)) != TEST_SEP[0], "Result ends with a separator:\n'%s'", result); -}
\ No newline at end of file +} |