commit 09e02edafad3fa3f43a02e8afdb1a552daccc99b
parent 4b6a1f6f071af9e64f1d313da158e8f67f445a6d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 23 Jan 2018 10:17:51 +0100
Merge branch 'release_0.3.1'
Diffstat:
5 files changed, 65 insertions(+), 65 deletions(-)
diff --git a/README.md b/README.md
@@ -23,7 +23,7 @@ as any CMake project.
## License
-Star-3DSTL is Copyright (C) |Meso|Star> 2015-2016 (<contact@meso-star.com>).
+Star-3DSTL is Copyright (C) |Meso|Star> 2015-2018 (<contact@meso-star.com>).
It is a free software released under the [OSI](http://opensource.org)-approved
CeCILL license. You are welcome to redistribute it under certain conditions;
refer to the COPYING files for details.
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (C) |Meso|Star> 2015-2016 (contact@meso-star.com)
+# Copyright (C) |Meso|Star> 2015-2018 (contact@meso-star.com)
#
# This software is governed by the CeCILL license under French law and
# abiding by the rules of distribution of free software. You can use,
@@ -65,7 +65,7 @@ target_link_libraries(s3dstl RSys Star3D StarSTL)
set(VERSION_MAJOR 0)
set(VERSION_MINOR 3)
-set(VERSION_PATCH 0)
+set(VERSION_PATCH 1)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
set_target_properties(s3dstl PROPERTIES
DEFINE_SYMBOL S3DSTL_SHARED_BUILD
diff --git a/src/s3dstl.c b/src/s3dstl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) |Meso|Star> 2015-2016 (contact@meso-star.com)
+/* Copyright (C) |Meso|Star> 2015-2018 (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s3dstl.h b/src/s3dstl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) |Meso|Star> 2015-2016 (contact@meso-star.com)
+/* Copyright (C) |Meso|Star> 2015-2018 (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s3dstl.c b/src/test_s3dstl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) |Meso|Star> 2015-2016 (contact@meso-star.com)
+/* Copyright (C) |Meso|Star> 2015-2018 (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
@@ -142,52 +142,52 @@ test_load(struct s3dstl* s3dstl)
size_t i;
file = fopen("test_empty.stl", "w");
- NCHECK(file, NULL);
+ CHK(file != NULL);
fwrite(test0, sizeof(char), strlen(test0), file);
fclose(file);
- CHECK(s3dstl_load(NULL, NULL), RES_BAD_ARG);
- CHECK(s3dstl_load(s3dstl, NULL), RES_BAD_ARG);
- CHECK(s3dstl_load(NULL, "test_empty.stl"), RES_BAD_ARG);
- CHECK(s3dstl_load(s3dstl, "test_none.stl"), RES_IO_ERR);
- CHECK(s3dstl_load(s3dstl, "test_empty.stl"), RES_OK);
+ CHK(s3dstl_load(NULL, NULL) == RES_BAD_ARG);
+ CHK(s3dstl_load(s3dstl, NULL) == RES_BAD_ARG);
+ CHK(s3dstl_load(NULL, "test_empty.stl") == RES_BAD_ARG);
+ CHK(s3dstl_load(s3dstl, "test_none.stl") == RES_IO_ERR);
+ CHK(s3dstl_load(s3dstl, "test_empty.stl") == RES_OK);
- CHECK(s3dstl_get_shape(NULL, NULL), RES_BAD_ARG);
- CHECK(s3dstl_get_shape(s3dstl, NULL), RES_BAD_ARG);
- CHECK(s3dstl_get_shape(NULL, &shape), RES_BAD_ARG);
- CHECK(s3dstl_get_shape(s3dstl, &shape), RES_OK);
- CHECK(shape, NULL);
+ CHK(s3dstl_get_shape(NULL, NULL) == RES_BAD_ARG);
+ CHK(s3dstl_get_shape(s3dstl, NULL) == RES_BAD_ARG);
+ CHK(s3dstl_get_shape(NULL, &shape) == RES_BAD_ARG);
+ CHK(s3dstl_get_shape(s3dstl, &shape) == RES_OK);
+ CHK(shape == NULL);
file = tmpfile();
FOR_EACH(i, 0, cube_nlines)
fwrite(cube[i], sizeof(char), strlen(cube[i]), file);
rewind(file);
- CHECK(s3dstl_load_stream(NULL, NULL), RES_BAD_ARG);
- CHECK(s3dstl_load_stream(s3dstl, NULL), RES_BAD_ARG);
- CHECK(s3dstl_load_stream(NULL, file), RES_BAD_ARG);
- CHECK(s3dstl_load_stream(s3dstl, file), RES_OK);
+ CHK(s3dstl_load_stream(NULL, NULL) == RES_BAD_ARG);
+ CHK(s3dstl_load_stream(s3dstl, NULL) == RES_BAD_ARG);
+ CHK(s3dstl_load_stream(NULL, file) == RES_BAD_ARG);
+ CHK(s3dstl_load_stream(s3dstl, file) == RES_OK);
- CHECK(s3dstl_get_shape(s3dstl, &shape), RES_OK);
- NCHECK(shape, NULL);
+ CHK(s3dstl_get_shape(s3dstl, &shape) == RES_OK);
+ CHK(shape != NULL);
file2 = tmpfile();
- NCHECK(file2, NULL);
+ CHK(file2 != NULL);
fwrite(bad, sizeof(char), strlen(bad), file2);
rewind(file2);
- CHECK(s3dstl_load_stream(s3dstl, file2), RES_BAD_ARG);
- CHECK(s3dstl_get_shape(s3dstl, &shape2), RES_OK);
- CHECK(shape, shape2);
+ CHK(s3dstl_load_stream(s3dstl, file2) == RES_BAD_ARG);
+ CHK(s3dstl_get_shape(s3dstl, &shape2) == RES_OK);
+ CHK(shape == shape2);
rewind(file);
- CHECK(s3dstl_load_stream(s3dstl, file), RES_OK);
- CHECK(s3dstl_get_shape(s3dstl, &shape), RES_OK);
- NCHECK(shape, NULL);
-
- CHECK(s3dstl_clear(NULL), RES_BAD_ARG);
- CHECK(s3dstl_clear(s3dstl), RES_OK);
- CHECK(s3dstl_get_shape(s3dstl, &shape), RES_OK);
- CHECK(shape, NULL);
+ CHK(s3dstl_load_stream(s3dstl, file) == RES_OK);
+ CHK(s3dstl_get_shape(s3dstl, &shape) == RES_OK);
+ CHK(shape != NULL);
+
+ CHK(s3dstl_clear(NULL) == RES_BAD_ARG);
+ CHK(s3dstl_clear(s3dstl) == RES_OK);
+ CHK(s3dstl_get_shape(s3dstl, &shape) == RES_OK);
+ CHK(shape == NULL);
}
int
@@ -202,45 +202,45 @@ main(int argc, char** argv)
mem_init_proxy_allocator(&allocator_proxy, &mem_default_allocator);
- CHECK(s3d_device_create(NULL, &allocator_proxy, 0, &s3d), RES_OK);
+ CHK(s3d_device_create(NULL, &allocator_proxy, 0, &s3d) == RES_OK);
- CHECK(s3dstl_create(NULL, NULL, NULL, NULL, 1, NULL), RES_BAD_ARG);
- CHECK(s3dstl_create(NULL, NULL, NULL, NULL, 1, &s3dstl), RES_BAD_ARG);
- CHECK(s3dstl_create(NULL, NULL, NULL, s3d, 1, NULL), RES_BAD_ARG);
- CHECK(s3dstl_create(NULL, NULL, NULL, s3d, 1, &s3dstl), RES_OK);
+ CHK(s3dstl_create(NULL, NULL, NULL, NULL, 1, NULL) == RES_BAD_ARG);
+ CHK(s3dstl_create(NULL, NULL, NULL, NULL, 1, &s3dstl) == RES_BAD_ARG);
+ CHK(s3dstl_create(NULL, NULL, NULL, s3d, 1, NULL) == RES_BAD_ARG);
+ CHK(s3dstl_create(NULL, NULL, NULL, s3d, 1, &s3dstl) == RES_OK);
- CHECK(s3dstl_ref_get(NULL), RES_BAD_ARG);
- CHECK(s3dstl_ref_get(s3dstl), RES_OK);
- CHECK(s3dstl_ref_put(NULL), RES_BAD_ARG);
- CHECK(s3dstl_ref_put(s3dstl), RES_OK);
- CHECK(s3dstl_ref_put(s3dstl), RES_OK);
+ CHK(s3dstl_ref_get(NULL) == RES_BAD_ARG);
+ CHK(s3dstl_ref_get(s3dstl) == RES_OK);
+ CHK(s3dstl_ref_put(NULL) == RES_BAD_ARG);
+ CHK(s3dstl_ref_put(s3dstl) == RES_OK);
+ CHK(s3dstl_ref_put(s3dstl) == RES_OK);
- CHECK(s3dstl_create(NULL, &allocator_proxy, NULL, NULL, 1, NULL), RES_BAD_ARG);
- CHECK(s3dstl_create(NULL, &allocator_proxy, NULL, NULL, 1, &s3dstl), RES_BAD_ARG);
- CHECK(s3dstl_create(NULL, &allocator_proxy, NULL, s3d, 1, NULL), RES_BAD_ARG);
- CHECK(s3dstl_create(NULL, &allocator_proxy, NULL, s3d, 1, &s3dstl), RES_OK);
- CHECK(s3dstl_ref_put(s3dstl), RES_OK);
+ CHK(s3dstl_create(NULL, &allocator_proxy, NULL, NULL, 1, NULL) == RES_BAD_ARG);
+ CHK(s3dstl_create(NULL, &allocator_proxy, NULL, NULL, 1, &s3dstl) == RES_BAD_ARG);
+ CHK(s3dstl_create(NULL, &allocator_proxy, NULL, s3d, 1, NULL) == RES_BAD_ARG);
+ CHK(s3dstl_create(NULL, &allocator_proxy, NULL, s3d, 1, &s3dstl) == RES_OK);
+ CHK(s3dstl_ref_put(s3dstl) == RES_OK);
- CHECK(s3dstl_create
- (LOGGER_DEFAULT, &allocator_proxy, NULL, s3d, 1, &s3dstl), RES_OK);
+ CHK(s3dstl_create
+ (LOGGER_DEFAULT, &allocator_proxy, NULL, s3d, 1, &s3dstl) == RES_OK);
- CHECK(s3dstl_get_sstl(NULL, NULL), RES_BAD_ARG);
- CHECK(s3dstl_get_sstl(s3dstl, NULL), RES_BAD_ARG);
- CHECK(s3dstl_get_sstl(NULL, &sstl), RES_BAD_ARG);
- CHECK(s3dstl_get_sstl(s3dstl, &sstl), RES_OK);
+ CHK(s3dstl_get_sstl(NULL, NULL) == RES_BAD_ARG);
+ CHK(s3dstl_get_sstl(s3dstl, NULL) == RES_BAD_ARG);
+ CHK(s3dstl_get_sstl(NULL, &sstl) == RES_BAD_ARG);
+ CHK(s3dstl_get_sstl(s3dstl, &sstl) == RES_OK);
- CHECK(s3dstl_ref_put(s3dstl), RES_OK);
+ CHK(s3dstl_ref_put(s3dstl) == RES_OK);
- CHECK(sstl_create(NULL, &allocator_proxy, 1, &sstl), RES_OK);
- CHECK(s3dstl_create(NULL, &allocator_proxy, sstl, s3d, 1, &s3dstl), RES_OK);
- CHECK(s3dstl_get_sstl(s3dstl, &sstl2), RES_OK);
- CHECK(sstl, sstl2);
+ CHK(sstl_create(NULL, &allocator_proxy, 1, &sstl) == RES_OK);
+ CHK(s3dstl_create(NULL, &allocator_proxy, sstl, s3d, 1, &s3dstl) == RES_OK);
+ CHK(s3dstl_get_sstl(s3dstl, &sstl2) == RES_OK);
+ CHK(sstl == sstl2);
test_load(s3dstl);
- CHECK(s3dstl_ref_put(s3dstl), RES_OK);
- CHECK(s3d_device_ref_put(s3d), RES_OK);
- CHECK(sstl_ref_put(sstl), RES_OK);
+ CHK(s3dstl_ref_put(s3dstl) == RES_OK);
+ CHK(s3d_device_ref_put(s3d) == RES_OK);
+ CHK(sstl_ref_put(sstl) == RES_OK);
if(MEM_ALLOCATED_SIZE(&allocator_proxy)) {
char dump[512];
@@ -249,7 +249,7 @@ main(int argc, char** argv)
FATAL("Memory leaks\n");
}
mem_shutdown_proxy_allocator(&allocator_proxy);
- CHECK(mem_allocated_size(), 0);
+ CHK(mem_allocated_size() == 0);
return 0;
}