diff --git a/benchmarks/benchmark_gmio/main.c b/benchmarks/benchmark_gmio/main.c index 749da26..178343b 100644 --- a/benchmarks/benchmark_gmio/main.c +++ b/benchmarks/benchmark_gmio/main.c @@ -229,7 +229,7 @@ static void bmk_gmio_stl_readwrite_conv(const void* filepath) fclose(outfile); } -void bmk_gmio_stl_infos_get_all(const void* filepath) +void bmk_gmio_stl_infos_probe_all(const void* filepath) { static bool already_exec = false; FILE* file = fopen(filepath, "rb"); @@ -237,10 +237,10 @@ void bmk_gmio_stl_infos_get_all(const void* filepath) if (file != NULL) { struct gmio_stream stream = gmio_stream_stdio(file); struct gmio_stl_infos infos = {0}; - gmio_stl_infos_get(&infos, &stream, GMIO_STL_INFO_FLAG_ALL, NULL); + gmio_stl_infos_probe(&infos, &stream, GMIO_STL_INFO_FLAG_ALL, NULL); if (!already_exec) { - printf("stl_infos_get(ALL)\n" + printf("stl_infos_probe(ALL)\n" " File: %s\n" " Size: %uKo\n" " Facets: %u\n", @@ -258,7 +258,7 @@ void bmk_gmio_stl_infos_get_all(const void* filepath) fclose(file); } -void bmk_gmio_stl_infos_get_size(const void* filepath) +void bmk_gmio_stl_infos_probe_size(const void* filepath) { static bool already_exec = false; FILE* file = fopen(filepath, "rb"); @@ -266,10 +266,10 @@ void bmk_gmio_stl_infos_get_size(const void* filepath) if (file != NULL) { struct gmio_stream stream = gmio_stream_stdio(file); struct gmio_stl_infos infos = {0}; - gmio_stl_infos_get(&infos, &stream, GMIO_STL_INFO_FLAG_SIZE, NULL); + gmio_stl_infos_probe(&infos, &stream, GMIO_STL_INFO_FLAG_SIZE, NULL); if (!already_exec) { - printf("stl_infos_get(SIZE)\n" + printf("stl_infos_probe(SIZE)\n" " File: %s\n" " Size: %uKo\n", (const char*)filepath, @@ -294,11 +294,11 @@ int main(int argc, char** argv) { "readwrite_conv()", bmk_gmio_stl_readwrite_conv, NULL, NULL, NULL }, - { "stl_infos_get(ALL)", - bmk_gmio_stl_infos_get_all, NULL, + { "stl_infos_probe(ALL)", + bmk_gmio_stl_infos_probe_all, NULL, NULL, NULL }, - { "stl_infos_get(size)", - bmk_gmio_stl_infos_get_size, NULL, + { "stl_infos_probe(size)", + bmk_gmio_stl_infos_probe_size, NULL, NULL, NULL }, {0} }; diff --git a/examples/stl_get_infos.c b/examples/stl_get_infos.c index b3bf891..618caf8 100644 --- a/examples/stl_get_infos.c +++ b/examples/stl_get_infos.c @@ -2,7 +2,7 @@ * * Example: get informations about an STL file * - * Informations that can be retrieved by gmio_stl_infos_get() are: + * Informations that can be retrieved by gmio_stl_infos_probe() are: * - STL format of the input stream * - Count of facets(triangles) * - Size of the STL contents in bytes @@ -53,7 +53,7 @@ int main(int argc, char** argv) struct gmio_stream stream = gmio_stream_stdio(file); struct gmio_stl_infos infos = {0}; /* Retrieve STL informations, using default options(NULL) */ - error = gmio_stl_infos_get( + error = gmio_stl_infos_probe( &infos, &stream, GMIO_STL_INFO_FLAG_ALL, NULL); printf("File: %s\n", filepath); if (error == GMIO_ERROR_OK) diff --git a/examples/stl_read_file.c b/examples/stl_read_file.c index 652d80b..3fcdf17 100644 --- a/examples/stl_read_file.c +++ b/examples/stl_read_file.c @@ -51,7 +51,7 @@ static void my_3d_mesh__copy_triangle( * precisely known. * To overcome this: * - instead of just using general gmio_stl_read(), call - * call gmio_stl_infos_get(GMIO_STL_INFO_FLAG_FACET_COUNT) and then + * call gmio_stl_infos_probe(GMIO_STL_INFO_FLAG_FACET_COUNT) and then * gmio_stla_read() * - or just grow the capacity of your mesh, here the triangle array * is grown by 12.5% */ diff --git a/src/gmio_stl/internal/stla_infos_get.c b/src/gmio_stl/internal/stla_infos_probe.c similarity index 98% rename from src/gmio_stl/internal/stla_infos_get.c rename to src/gmio_stl/internal/stla_infos_probe.c index 316348d..e37fa43 100644 --- a/src/gmio_stl/internal/stla_infos_get.c +++ b/src/gmio_stl/internal/stla_infos_probe.c @@ -27,7 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#include "stla_infos_get.h" +#include "stla_infos_probe.h" #include "../../gmio_core/error.h" #include "../../gmio_core/internal/helper_memblock.h" @@ -73,11 +73,11 @@ static size_t gmio_stringstream_read__flagsize( return len_read; } -int gmio_stla_infos_get( +int gmio_stla_infos_probe( struct gmio_stl_infos* infos, struct gmio_stream* stream, unsigned flags, - const struct gmio_stl_infos_get_options* opts) + const struct gmio_stl_infos_probe_options* opts) { const bool flag_facet_count = (flags & GMIO_STL_INFO_FLAG_FACET_COUNT) != 0; diff --git a/src/gmio_stl/internal/stla_infos_get.h b/src/gmio_stl/internal/stla_infos_probe.h similarity index 89% rename from src/gmio_stl/internal/stla_infos_get.h rename to src/gmio_stl/internal/stla_infos_probe.h index e737983..169575a 100644 --- a/src/gmio_stl/internal/stla_infos_get.h +++ b/src/gmio_stl/internal/stla_infos_probe.h @@ -27,16 +27,16 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_STLA_INFOS_GET_H -#define GMIO_INTERNAL_STLA_INFOS_GET_H +#ifndef GMIO_INTERNAL_STLA_INFOS_PROBE_H +#define GMIO_INTERNAL_STLA_INFOS_PROBE_H #include "../stl_infos.h" /*! Find infos from a STL ASCII stream */ -int gmio_stla_infos_get( +int gmio_stla_infos_probe( struct gmio_stl_infos* infos, struct gmio_stream* stream, unsigned flags, - const struct gmio_stl_infos_get_options* opts); + const struct gmio_stl_infos_probe_options* opts); -#endif /* GMIO_INTERNAL_STLA_INFOS_GET_H */ +#endif /* GMIO_INTERNAL_STLA_INFOS_PROBE_H */ diff --git a/src/gmio_stl/internal/stlb_infos_get.c b/src/gmio_stl/internal/stlb_infos_probe.c similarity index 96% rename from src/gmio_stl/internal/stlb_infos_get.c rename to src/gmio_stl/internal/stlb_infos_probe.c index 3e0d880..ae10c07 100644 --- a/src/gmio_stl/internal/stlb_infos_get.c +++ b/src/gmio_stl/internal/stlb_infos_probe.c @@ -27,7 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#include "stlb_infos_get.h" +#include "stlb_infos_probe.h" #include "../../gmio_core/error.h" #include "../../gmio_core/internal/byte_swap.h" @@ -45,11 +45,11 @@ static enum gmio_endianness gmio_stl_format_to_endianness( return GMIO_ENDIANNESS_UNKNOWN; } -int gmio_stlb_infos_get( +int gmio_stlb_infos_probe( struct gmio_stl_infos* infos, struct gmio_stream* stream, unsigned flags, - const struct gmio_stl_infos_get_options* opts) + const struct gmio_stl_infos_probe_options* opts) { if (flags != 0) { const enum gmio_endianness byte_order = diff --git a/src/gmio_stl/internal/stlb_infos_get.h b/src/gmio_stl/internal/stlb_infos_probe.h similarity index 90% rename from src/gmio_stl/internal/stlb_infos_get.h rename to src/gmio_stl/internal/stlb_infos_probe.h index 5858b67..7d73a27 100644 --- a/src/gmio_stl/internal/stlb_infos_get.h +++ b/src/gmio_stl/internal/stlb_infos_probe.h @@ -27,21 +27,21 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_STLB_INFOS_GET_H -#define GMIO_INTERNAL_STLB_INFOS_GET_H +#ifndef GMIO_INTERNAL_STLB_INFOS_PROBE_H +#define GMIO_INTERNAL_STLB_INFOS_PROBE_H #include "../stl_infos.h" #include "../../gmio_core/endian.h" /*! Finds infos from a STL binary stream */ -int gmio_stlb_infos_get( +int gmio_stlb_infos_probe( struct gmio_stl_infos* infos, struct gmio_stream* stream, unsigned flags, - const struct gmio_stl_infos_get_options* opts); + const struct gmio_stl_infos_probe_options* opts); /*! Returns the size(in bytes) of the whole STL binary data given some facet * count */ gmio_streamsize_t gmio_stlb_infos_size(uint32_t facet_count); -#endif /* GMIO_INTERNAL_STLB_INFOS_GET_H */ +#endif /* GMIO_INTERNAL_STLB_INFOS_PROBE_H */ diff --git a/src/gmio_stl/stl_format.c b/src/gmio_stl/stl_format.c index 0928612..06b22f5 100644 --- a/src/gmio_stl/stl_format.c +++ b/src/gmio_stl/stl_format.c @@ -32,7 +32,7 @@ #include "stl_triangle.h" #include "stlb_header.h" #include "internal/stlb_byte_swap.h" -#include "internal/stlb_infos_get.h" +#include "internal/stlb_infos_probe.h" #include "../gmio_core/endian.h" #include "../gmio_core/internal/byte_codec.h" diff --git a/src/gmio_stl/stl_global.h b/src/gmio_stl/stl_global.h index 1ac319a..3b8bfd5 100644 --- a/src/gmio_stl/stl_global.h +++ b/src/gmio_stl/stl_global.h @@ -80,10 +80,10 @@ * *