From 9ebe5cbd8fc95ead7d7c3a3a7e3116285ba4a7b7 Mon Sep 17 00:00:00 2001 From: Peter Harris Date: Fri, 31 Mar 2023 16:42:12 +0100 Subject: [PATCH] Remove internal header from CLI veneer --- Source/astcenccli_entry.cpp | 23 ++++++++++++++++++++++- Source/astcenccli_internal.h | 12 ------------ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Source/astcenccli_entry.cpp b/Source/astcenccli_entry.cpp index 83e29bc26..19aed00a1 100644 --- a/Source/astcenccli_entry.cpp +++ b/Source/astcenccli_entry.cpp @@ -22,7 +22,19 @@ * validating the host extended ISA support meets the needs of the tools. */ -#include "astcenccli_internal.h" +#include + +/** + * @brief The main entry point. + * + * @param argc The number of arguments. + * @param argv The vector of arguments. + * + * @return 0 on success, non-zero otherwise. + */ +int astcenc_main( + int argc, + char **argv); #if (ASTCENC_SSE > 20) || (ASTCENC_AVX > 0) || \ (ASTCENC_POPCNT > 0) || (ASTCENC_F16C > 0) @@ -186,6 +198,15 @@ static bool cpu_supports_avx2() } #endif +/** + * @brief Print a string to stderr. + */ +static inline void print_error( + const char* format +) { + fprintf(stderr, "%s", format); +} + /** * @brief Validate CPU ISA support meets the requirements of this build of the library. * diff --git a/Source/astcenccli_internal.h b/Source/astcenccli_internal.h index 8a98aae7c..1c5f0ed5f 100644 --- a/Source/astcenccli_internal.h +++ b/Source/astcenccli_internal.h @@ -395,16 +395,4 @@ void launch_threads( void (*func)(int, int, void*), void *payload); -/** - * @brief The main entry point. - * - * @param argc The number of arguments. - * @param argv The vector of arguments. - * - * @return 0 on success, non-zero otherwise. - */ -int astcenc_main( - int argc, - char **argv); - #endif