From 586a9ace2182b55cd17fe3959871680e009c775e Mon Sep 17 00:00:00 2001 From: Mikhail Romanko Date: Sun, 2 Feb 2025 21:40:31 +0300 Subject: [PATCH] Change file naming This is a follow-up to previous commit. --- CMakeLists.txt | 28 +++++++++++------------ include/{bh/algo.h => BH/Algo.h} | 2 +- include/{bh/common.h => BH/Common.h} | 0 include/{bh/hashmap.h => BH/Hashmap.h} | 2 +- include/{bh/io.h => BH/IO.h} | 2 +- include/{bh/math.h => BH/Math.h} | 2 +- include/{bh/queue.h => BH/Queue.h} | 2 +- src/{algo.c => Algo.c} | 2 +- src/{hashmap.c => Hashmap.c} | 2 +- src/{io.c => IO.c} | 2 +- src/{math.c => Math.c} | 2 +- src/{queue.c => Queue.c} | 2 +- src/dummy/{file.c => File.c} | 2 +- src/posix/{file.c => File.c} | 3 ++- src/win32/{file.c => File.c} | 2 +- test/src/{testalgo.c => TestAlgo.c} | 4 ++-- test/src/{testfile.c => TestFile.c} | 4 ++-- test/src/{testhashmap.c => TestHashmap.c} | 4 ++-- test/src/{testmath.c => TestMath.c} | 4 ++-- test/src/{testqueue.c => TestQueue.c} | 4 ++-- unit/CMakeLists.txt | 4 ++-- unit/include/{bh/unit.h => BH/Unit.h} | 0 unit/src/{unit.c => Unit.c} | 2 +- 23 files changed, 41 insertions(+), 40 deletions(-) rename include/{bh/algo.h => BH/Algo.h} (99%) rename include/{bh/common.h => BH/Common.h} (100%) rename include/{bh/hashmap.h => BH/Hashmap.h} (99%) rename include/{bh/io.h => BH/IO.h} (99%) rename include/{bh/math.h => BH/Math.h} (99%) rename include/{bh/queue.h => BH/Queue.h} (99%) rename src/{algo.c => Algo.c} (99%) rename src/{hashmap.c => Hashmap.c} (99%) rename src/{io.c => IO.c} (99%) rename src/{math.c => Math.c} (99%) rename src/{queue.c => Queue.c} (99%) rename src/dummy/{file.c => File.c} (99%) rename src/posix/{file.c => File.c} (99%) rename src/win32/{file.c => File.c} (99%) rename test/src/{testalgo.c => TestAlgo.c} (99%) rename test/src/{testfile.c => TestFile.c} (99%) rename test/src/{testhashmap.c => TestHashmap.c} (99%) rename test/src/{testmath.c => TestMath.c} (99%) rename test/src/{testqueue.c => TestQueue.c} (98%) rename unit/include/{bh/unit.h => BH/Unit.h} (100%) rename unit/src/{unit.c => Unit.c} (97%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e2a50c..7af2e78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,20 +66,20 @@ endif(TESTING) # Set library code set(BH_SOURCE - src/algo.c - src/hashmap.c - src/io.c - src/math.c - src/queue.c + src/Algo.c + src/Hashmap.c + src/IO.c + src/Math.c + src/Queue.c ) set(BH_HEADER - include/bh/common.h - include/bh/algo.h - include/bh/hashmap.h - include/bh/io.h - include/bh/math.h - include/bh/queue.h + include/BH/Common.h + include/BH/Algo.h + include/BH/Hashmap.h + include/BH/IO.h + include/BH/Math.h + include/BH/Queue.h ) set(BH_INCLUDE_DIRS @@ -93,21 +93,21 @@ if(WIN32) # Add platform dependent files list(APPEND BH_SOURCE - src/win32/file.c + src/win32/File.c ) elseif(UNIX) message(STATUS "Platform: Unix (Linux/BSD/MacOS X)") # Add platform dependent files list(APPEND BH_SOURCE - src/posix/file.c + src/posix/File.c ) else() message(STATUS "Platform: Unknown") # Add platform dependent files list(APPEND BH_SOURCE - src/dummy/file.c + src/dummy/File.c ) endif() diff --git a/include/bh/algo.h b/include/BH/Algo.h similarity index 99% rename from include/bh/algo.h rename to include/BH/Algo.h index 5d9bb36..2e5320e 100755 --- a/include/bh/algo.h +++ b/include/BH/Algo.h @@ -2,7 +2,7 @@ #define BH_ALGO_H -#include "common.h" +#include "Common.h" /** diff --git a/include/bh/common.h b/include/BH/Common.h similarity index 100% rename from include/bh/common.h rename to include/BH/Common.h diff --git a/include/bh/hashmap.h b/include/BH/Hashmap.h similarity index 99% rename from include/bh/hashmap.h rename to include/BH/Hashmap.h index d3710e4..615e747 100755 --- a/include/bh/hashmap.h +++ b/include/BH/Hashmap.h @@ -2,7 +2,7 @@ #define BH_HASHMAP_H -#include "common.h" +#include "Common.h" typedef struct BH_Hashmap BH_Hashmap; diff --git a/include/bh/io.h b/include/BH/IO.h similarity index 99% rename from include/bh/io.h rename to include/BH/IO.h index ee2da95..e0a2fea 100644 --- a/include/bh/io.h +++ b/include/BH/IO.h @@ -2,7 +2,7 @@ #define BH_IO_H -#include "common.h" +#include "Common.h" #define BH_IO_INFO_CB 0x0000 diff --git a/include/bh/math.h b/include/BH/Math.h similarity index 99% rename from include/bh/math.h rename to include/BH/Math.h index 5471a4a..badc092 100644 --- a/include/bh/math.h +++ b/include/BH/Math.h @@ -2,7 +2,7 @@ #define BH_MATH_H -#include "common.h" +#include "Common.h" /** diff --git a/include/bh/queue.h b/include/BH/Queue.h similarity index 99% rename from include/bh/queue.h rename to include/BH/Queue.h index f7b8b12..5d6af58 100755 --- a/include/bh/queue.h +++ b/include/BH/Queue.h @@ -2,7 +2,7 @@ #define BH_QUEUE_H -#include "common.h" +#include "Common.h" typedef struct BH_Queue BH_Queue; diff --git a/src/algo.c b/src/Algo.c similarity index 99% rename from src/algo.c rename to src/Algo.c index 8a42c95..7d0abcd 100755 --- a/src/algo.c +++ b/src/Algo.c @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/hashmap.c b/src/Hashmap.c similarity index 99% rename from src/hashmap.c rename to src/Hashmap.c index 989f101..ad8e7bd 100755 --- a/src/hashmap.c +++ b/src/Hashmap.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/io.c b/src/IO.c similarity index 99% rename from src/io.c rename to src/IO.c index 8322707..d3c5673 100644 --- a/src/io.c +++ b/src/IO.c @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/math.c b/src/Math.c similarity index 99% rename from src/math.c rename to src/Math.c index bdb90be..58ebcd3 100644 --- a/src/math.c +++ b/src/Math.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/queue.c b/src/Queue.c similarity index 99% rename from src/queue.c rename to src/Queue.c index 656d27d..4b9d06e 100755 --- a/src/queue.c +++ b/src/Queue.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/dummy/file.c b/src/dummy/File.c similarity index 99% rename from src/dummy/file.c rename to src/dummy/File.c index eab4c72..2cb1cd6 100644 --- a/src/dummy/file.c +++ b/src/dummy/File.c @@ -1,4 +1,4 @@ -#include +#include typedef struct BH_File { diff --git a/src/posix/file.c b/src/posix/File.c similarity index 99% rename from src/posix/file.c rename to src/posix/File.c index 87a5a2b..f8ee089 100644 --- a/src/posix/file.c +++ b/src/posix/File.c @@ -1,4 +1,5 @@ -#include +#include + #include #include #include diff --git a/src/win32/file.c b/src/win32/File.c similarity index 99% rename from src/win32/file.c rename to src/win32/File.c index bed16ab..3cb1972 100644 --- a/src/win32/file.c +++ b/src/win32/File.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/test/src/testalgo.c b/test/src/TestAlgo.c similarity index 99% rename from test/src/testalgo.c rename to test/src/TestAlgo.c index 63c1879..b330ee7 100644 --- a/test/src/testalgo.c +++ b/test/src/TestAlgo.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/test/src/testfile.c b/test/src/TestFile.c similarity index 99% rename from test/src/testfile.c rename to test/src/TestFile.c index 194b52a..8fae14c 100644 --- a/test/src/testfile.c +++ b/test/src/TestFile.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include diff --git a/test/src/testhashmap.c b/test/src/TestHashmap.c similarity index 99% rename from test/src/testhashmap.c rename to test/src/TestHashmap.c index 88b7396..da73e4b 100644 --- a/test/src/testhashmap.c +++ b/test/src/TestHashmap.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include static size_t DBG_PtrIntHash(const void *ptr) diff --git a/test/src/testmath.c b/test/src/TestMath.c similarity index 99% rename from test/src/testmath.c rename to test/src/TestMath.c index e41f726..e03ca96 100644 --- a/test/src/testmath.c +++ b/test/src/TestMath.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #define ACCEPTABLE_DELTA 0.0001f diff --git a/test/src/testqueue.c b/test/src/TestQueue.c similarity index 98% rename from test/src/testqueue.c rename to test/src/TestQueue.c index edeb75c..8f1fc75 100644 --- a/test/src/testqueue.c +++ b/test/src/TestQueue.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include static int NewFree(void) diff --git a/unit/CMakeLists.txt b/unit/CMakeLists.txt index 28d7ce9..42e9ffb 100755 --- a/unit/CMakeLists.txt +++ b/unit/CMakeLists.txt @@ -10,11 +10,11 @@ set(CMAKE_C_EXTENSIONS OFF) # Library code set(BHUNIT_SOURCE - src/unit.c + src/Unit.c ) set(BHUNIT_HEADER - include/bh/unit.h + include/BH/Unit.h ) # Library diff --git a/unit/include/bh/unit.h b/unit/include/BH/Unit.h similarity index 100% rename from unit/include/bh/unit.h rename to unit/include/BH/Unit.h diff --git a/unit/src/unit.c b/unit/src/Unit.c similarity index 97% rename from unit/src/unit.c rename to unit/src/Unit.c index 6063a4f..ead5449 100755 --- a/unit/src/unit.c +++ b/unit/src/Unit.c @@ -1,4 +1,4 @@ -#include +#include #include typedef struct BH_Unit