Skip to content

Commit 8f41d7d

Browse files
committed
Rename files from json to core_json (#6)
This renames all source files such as json.c and json.h to core_json.c and core_json.h respectively.
1 parent 02250a7 commit 8f41d7d

File tree

6 files changed

+14
-1424
lines changed

6 files changed

+14
-1424
lines changed

CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
4646
include(jsonFilePaths.cmake)
4747

4848
# JSON library target.
49-
add_library( json
49+
add_library( core_json
5050
${JSON_SOURCES} )
5151

5252
# JSON public include path.
53-
target_include_directories( json PUBLIC ${JSON_INCLUDE_PUBLIC_DIRS} )
53+
target_include_directories( core_json PUBLIC ${JSON_INCLUDE_PUBLIC_DIRS} )
5454

5555
# Organization of JSON in IDE projects.
56-
set_target_properties( json PROPERTIES FOLDER libraries/standard )
57-
source_group( include FILES include/json.h )
56+
set_target_properties( core_json PROPERTIES FOLDER libraries/standard )
57+
source_group( include FILES source/include/core_json.h )
5858
source_group( src FILES ${JSON_SOURCES} )
5959

6060
# ============================ Test configurations =============================
@@ -92,7 +92,7 @@ if( EXISTS ${CMOCK_DIR}/src )
9292
# Add a target for running coverage on tests.
9393
add_custom_target(coverage
9494
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/tools/cmock/coverage.cmake
95-
DEPENDS cmock unity json_utest
95+
DEPENDS cmock unity core_json_utest
9696
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
9797
)
9898
endif()

jsonFilePaths.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# JSON library source files.
99
set( JSON_SOURCES
10-
${CMAKE_CURRENT_LIST_DIR}/source/json.c )
10+
${CMAKE_CURRENT_LIST_DIR}/source/core_json.c )
1111

1212
# JSON library Public Include directories.
1313
set( JSON_INCLUDE_PUBLIC_DIRS

source/json.c source/core_json.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <ctype.h>
2424
#include <stddef.h>
2525
#include <stdint.h>
26-
#include "json.h"
26+
#include "core_json.h"
2727

2828
typedef enum
2929
{
@@ -934,7 +934,7 @@ static JSONStatus_t skipCollection( const char * buf,
934934
}
935935

936936
/**
937-
* See json.h for docs.
937+
* See core_json.h for docs.
938938
*
939939
* Verify that the entire buffer contains exactly one scalar
940940
* or collection within optional whitespace.
@@ -1129,7 +1129,7 @@ static JSONStatus_t search( char * buf,
11291129
}
11301130

11311131
/**
1132-
* See json.h for docs.
1132+
* See core_json.h for docs.
11331133
*
11341134
* Handle a nested search by iterating over the parts of the queryKey.
11351135
*/

source/include/json.h source/include/core_json.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2020
*/
2121

22-
#ifndef JSON_H_
23-
#define JSON_H_
22+
#ifndef CORE_JSON_H_
23+
#define CORE_JSON_H_
2424

2525
#include <stddef.h>
2626

@@ -109,4 +109,4 @@ JSONStatus_t JSON_Search( char * buf,
109109
char ** outValue,
110110
size_t * outValueLength );
111111

112-
#endif /* ifndef JSON_H_ */
112+
#endif /* ifndef CORE_JSON_H_ */

test/unit-test/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
include("../../jsonFilePaths.cmake")
2-
project ("json unit test")
2+
project ("core_json unit test")
33

44
# ==================== Define your project name (edit) ========================
5-
set(project_name "json")
5+
set(project_name "core_json")
66

77
# ===================== Create your mock here (edit) ========================
88
# ================= Create the library under test here (edit) ==================

0 commit comments

Comments
 (0)