From 31e8daca93319d3d5bc0f0d1be5c84cd2d2f2b23 Mon Sep 17 00:00:00 2001 From: Hugues Delorme Date: Tue, 3 Mar 2015 11:35:15 +0100 Subject: [PATCH] Removed needless comment lines and doxygen tags --- CMakeLists.txt | 2 - src/gmio_core/config.h.cmake | 2 - src/gmio_core/endian.c | 2 - src/gmio_core/endian.h | 2 - src/gmio_core/error.c | 2 - src/gmio_core/error.h | 7 +- src/gmio_core/global.h | 11 +-- src/gmio_core/internal/byte_codec.h | 28 +++---- src/gmio_core/internal/byte_swap.h | 15 ++-- src/gmio_core/internal/convert.c | 2 - src/gmio_core/internal/convert.h | 2 - src/gmio_core/internal/min_max.h | 2 - src/gmio_core/internal/safe_cast.h | 9 +-- src/gmio_core/internal/string_parse.c | 2 - src/gmio_core/internal/string_parse.h | 4 +- src/gmio_core/memory.h | 2 - src/gmio_core/stream.c | 2 - src/gmio_core/stream.h | 101 ++++++++++++------------- src/gmio_core/task_control.c | 2 - src/gmio_core/task_control.h | 15 ++-- src/gmio_core/transfer.h | 2 - src/gmio_stl/internal/stl_rw_common.c | 2 - src/gmio_stl/internal/stl_rw_common.h | 2 - src/gmio_stl/internal/stlb_byte_swap.c | 2 - src/gmio_stl/internal/stlb_byte_swap.h | 2 - src/gmio_stl/stl_error.h | 18 +++-- src/gmio_stl/stl_format.c | 2 - src/gmio_stl/stl_format.h | 6 +- src/gmio_stl/stl_global.h | 2 - src/gmio_stl/stl_io.h | 33 +++----- src/gmio_stl/stl_mesh.h | 12 +-- src/gmio_stl/stl_mesh_creator.h | 68 ++++++++--------- src/gmio_stl/stl_triangle.h | 12 +-- 33 files changed, 164 insertions(+), 213 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ecfe9da..7b90333 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,4 @@ ############################################################################# -## ## GeomIO Library ## Copyright FougSys (2 Mar. 2015) ## contact@fougsys.fr @@ -12,7 +11,6 @@ ## modify and/ or redistribute the software under the terms of the CeCILL-B ## license as circulated by CEA, CNRS and INRIA at the following URL ## "http://www.cecill.info". -## ############################################################################# cmake_minimum_required(VERSION 2.6) diff --git a/src/gmio_core/config.h.cmake b/src/gmio_core/config.h.cmake index 24645ca..d269156 100644 --- a/src/gmio_core/config.h.cmake +++ b/src/gmio_core/config.h.cmake @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ /* Generated by CMake */ diff --git a/src/gmio_core/endian.c b/src/gmio_core/endian.c index 4c22553..a2e65e1 100644 --- a/src/gmio_core/endian.c +++ b/src/gmio_core/endian.c @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #include "endian.h" diff --git a/src/gmio_core/endian.h b/src/gmio_core/endian.h index 1debaaf..82cb958 100644 --- a/src/gmio_core/endian.h +++ b/src/gmio_core/endian.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_ENDIAN_H diff --git a/src/gmio_core/error.c b/src/gmio_core/error.c index 1425b5f..dde1c31 100644 --- a/src/gmio_core/error.c +++ b/src/gmio_core/error.c @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #include "error.h" diff --git a/src/gmio_core/error.h b/src/gmio_core/error.h index 49c0883..39dd3fe 100644 --- a/src/gmio_core/error.h +++ b/src/gmio_core/error.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_ERROR_H @@ -37,10 +35,11 @@ enum gmio_error /*! Argument buffer's size is too small */ GMIO_INVALID_BUFFER_SIZE_ERROR = -3, - /*! An error occurred with the argument gmio_stream_t (check gmio_stream_error()) */ + /*! An error occurred with the argument gmio_stream_t */ GMIO_STREAM_ERROR = -4, - /*! Operation was stopped by user (gmio_task_control::handle_progress_func() returned GMIO_FALSE) */ + /*! Operation was stopped by user, that is to say + * gmio_task_control::is_stop_requested_func() returned GMIO_FALSE */ GMIO_TASK_STOPPED_ERROR = -5 }; diff --git a/src/gmio_core/global.h b/src/gmio_core/global.h index 0d1c086..8ea417c 100644 --- a/src/gmio_core/global.h +++ b/src/gmio_core/global.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,14 +11,14 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_GLOBAL_H #define GMIO_GLOBAL_H #if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) \ - || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) + || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) \ + || defined(__NT__) # define GMIO_DECL_EXPORT __declspec(dllexport) # define GMIO_DECL_IMPORT __declspec(dllimport) #else @@ -37,8 +36,10 @@ # define GMIO_LIB_EXPORT #endif /* GMIO_LIB_DLL */ -/* "config.h" is generated by cmake, it should reside in the out-of-source build dir. - * In CMakeFiles.txt, the directory where resides "config.h" is added to the include path list +/* "config.h" is generated by cmake, it should reside in the out-of-source + * build dir. + * In CMakeFiles.txt, the directory where resides "config.h" is added to the + * include path list */ #include "config.h" diff --git a/src/gmio_core/internal/byte_codec.h b/src/gmio_core/internal/byte_codec.h index 2ba40ef..8630b73 100644 --- a/src/gmio_core/internal/byte_codec.h +++ b/src/gmio_core/internal/byte_codec.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,17 +11,17 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ -/* Warning : this header has no multi-inclusion guard. It must be included only once in the - * translation unit of use. The reason is that all functions defined here are meant to - * be inlined for performance purpose +/* WARNING : + * this header has no multi-inclusion guard. It must be included only once + * in the translation unit of use. The reason is that all functions + * defined here are meant to be inlined for performance purpose */ #include "../global.h" -/*! Read a 16bit integer from memory-location \p bytes (little-endian byte order) */ +/*! Reads a 16bit integer from memory-location \p bytes (little-endian) */ GMIO_INLINE static uint16_t gmio_decode_uint16_le(const uint8_t* bytes) { /* |0 |1 | */ @@ -30,7 +29,7 @@ GMIO_INLINE static uint16_t gmio_decode_uint16_le(const uint8_t* bytes) return (bytes[1] << 8) | bytes[0]; } -/*! Read a 16bit integer from memory-location \p bytes (big-endian byte order) */ +/*! Reads a 16bit integer from memory-location \p bytes (big-endian) */ GMIO_INLINE static uint16_t gmio_decode_uint16_be(const uint8_t* bytes) { /* |0 |1 | */ @@ -38,35 +37,37 @@ GMIO_INLINE static uint16_t gmio_decode_uint16_be(const uint8_t* bytes) return (bytes[0] << 8) | bytes[1]; } -/*! Write 16bit integer \p val to the memory location at \p bytes in little-endian byte order */ +/*! Writes 16bit integer \p val to the memory location at \p bytes in + * little-endian */ GMIO_INLINE static void gmio_encode_uint16_le(uint16_t val, uint8_t* bytes) { bytes[0] = val & 0xFF; bytes[1] = (val >> 8) & 0xFF; } -/*! Read a 32bit integer from memory-location \p bytes (little-endian byte order) */ +/*! Reads a 32bit integer from memory-location \p bytes (little-endian) */ GMIO_INLINE static uint32_t gmio_decode_uint32_le(const uint8_t* bytes) { /* |DD|CC|BB|AA| -> 0xAABBCCDD */ return bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24); } -/*! Read a 32bit integer from memory-location \p bytes (mixed-endian byte order) */ +/*! Reads a 32bit integer from memory-location \p bytes (mixed-endian) */ GMIO_INLINE static uint32_t gmio_decode_uint32_me(const uint8_t* bytes) { /* |DD|CC|BB|AA| -> 0xCCDDAABB */ return (bytes[0] << 16) | (bytes[1] << 24) | (bytes[3] << 8) | bytes[2]; } -/*! Read a 32bit integer from memory-location \p bytes (big-endian byte order) */ +/*! Reads a 32bit integer from memory-location \p bytes (big-endian) */ GMIO_INLINE static uint32_t gmio_decode_uint32_be(const uint8_t* bytes) { /* |DD|CC|BB|AA| -> 0xDDCCBBAA */ return bytes[3] | (bytes[2] << 8) | (bytes[1] << 16) | (bytes[0] << 24); } -/*! Write 32bit integer \p val to the memory location at \p bytes in little-endian byte order */ +/*! Writes 32bit integer \p val to the memory location at \p bytes in + * little-endian */ GMIO_INLINE static void gmio_encode_uint32_le(uint32_t val, uint8_t* bytes) { bytes[0] = val & 0xFF; @@ -75,7 +76,8 @@ GMIO_INLINE static void gmio_encode_uint32_le(uint32_t val, uint8_t* bytes) bytes[3] = (val >> 24) & 0xFF; } -/*! Write 32bit integer \p val to the memory location at \p bytes in big-endian byte order */ +/*! Writes 32bit integer \p val to the memory location at \p bytes in + * big-endian */ GMIO_INLINE static void gmio_encode_uint32_be(uint32_t val, uint8_t* bytes) { bytes[0] = (val >> 24) & 0xFF; diff --git a/src/gmio_core/internal/byte_swap.h b/src/gmio_core/internal/byte_swap.h index 975ea53..35d35c7 100644 --- a/src/gmio_core/internal/byte_swap.h +++ b/src/gmio_core/internal/byte_swap.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,12 +11,12 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ -/* Warning : this header has no multi-inclusion guard. It must be included only once in the - * translation unit of use. The reason is that all functions defined here are meant to - * be inlined for performance purpose +/* WARNING : + * this header has no multi-inclusion guard. It must be included only once + * in the translation unit of use. The reason is that all functions + * defined here are meant to be inlined for performance purpose */ #include "../global.h" @@ -26,7 +25,8 @@ # include #endif -/*! Returns \p val with the order of bytes reversed, uses compiler builtin functions if available */ +/*! Returns \p val with the order of bytes reversed, uses compiler builtin + * functions if available */ GMIO_INLINE static uint16_t gmio_uint16_bswap(uint16_t val) { #ifdef GMIO_HAVE_GCC_BUILTIN_BSWAP16_FUNC @@ -38,7 +38,8 @@ GMIO_INLINE static uint16_t gmio_uint16_bswap(uint16_t val) #endif } -/*! Returns \p val with the order of bytes reversed, uses compiler builtin functions if available */ +/*! Returns \p val with the order of bytes reversed, uses compiler builtin + * functions if available */ GMIO_INLINE static uint32_t gmio_uint32_bswap(uint32_t val) { #ifdef GMIO_HAVE_GCC_BUILTIN_BSWAP32_FUNC diff --git a/src/gmio_core/internal/convert.c b/src/gmio_core/internal/convert.c index f5f1abb..182e8ba 100644 --- a/src/gmio_core/internal/convert.c +++ b/src/gmio_core/internal/convert.c @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #include "convert.h" diff --git a/src/gmio_core/internal/convert.h b/src/gmio_core/internal/convert.h index 638ec17..ddd7814 100644 --- a/src/gmio_core/internal/convert.h +++ b/src/gmio_core/internal/convert.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_INTERNAL_CONVERT_H diff --git a/src/gmio_core/internal/min_max.h b/src/gmio_core/internal/min_max.h index d9986ee..cfe3b41 100644 --- a/src/gmio_core/internal/min_max.h +++ b/src/gmio_core/internal/min_max.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_INTERNAL_MIN_MAX_H diff --git a/src/gmio_core/internal/safe_cast.h b/src/gmio_core/internal/safe_cast.h index b088d57..753a727 100644 --- a/src/gmio_core/internal/safe_cast.h +++ b/src/gmio_core/internal/safe_cast.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,12 +11,12 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ -/* Warning : this header has no multi-inclusion guard. It must be included only once in the - * translation unit of use. The reason is that all functions defined here are meant to - * be inlined for performance purpose +/* WARNING : + * this header has no multi-inclusion guard. It must be included only once + * in the translation unit of use. The reason is that all functions + * defined here are meant to be inlined for performance purpose */ #include "../global.h" diff --git a/src/gmio_core/internal/string_parse.c b/src/gmio_core/internal/string_parse.c index 1710855..917716e 100644 --- a/src/gmio_core/internal/string_parse.c +++ b/src/gmio_core/internal/string_parse.c @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #include "string_parse.h" diff --git a/src/gmio_core/internal/string_parse.h b/src/gmio_core/internal/string_parse.h index df4344b..8112a98 100644 --- a/src/gmio_core/internal/string_parse.h +++ b/src/gmio_core/internal/string_parse.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_INTERNAL_STRING_PARSE_H @@ -47,7 +45,7 @@ char* gmio_current_char(const gmio_string_stream_fwd_iterator_t* it); void gmio_skip_spaces(gmio_string_stream_fwd_iterator_t* it); int gmio_eat_word(gmio_string_stream_fwd_iterator_t* it, gmio_string_buffer_t* buffer); -/*! \brief Converts the string pointed to by \p str to gmio_float32_t representation +/*! Converts the string pointed to by \p str to gmio_float32_t representation * * \retval 0 On success * \retval -1 On error(check \c errno to see what happened) diff --git a/src/gmio_core/memory.h b/src/gmio_core/memory.h index b8b3a9f..a8da3d1 100644 --- a/src/gmio_core/memory.h +++ b/src/gmio_core/memory.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_MEMORY_H diff --git a/src/gmio_core/stream.c b/src/gmio_core/stream.c index ceb5766..24922ff 100644 --- a/src/gmio_core/stream.c +++ b/src/gmio_core/stream.c @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #include "stream.h" diff --git a/src/gmio_core/stream.h b/src/gmio_core/stream.h index 17f4d2c..7c73854 100644 --- a/src/gmio_core/stream.h +++ b/src/gmio_core/stream.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_STREAM_H @@ -23,68 +21,69 @@ GMIO_C_LINKAGE_BEGIN -/*! \brief Stream that can get input from an arbitrary data source or can write - * output to an arbitrary data sink. +/*! Stream that can get input from an arbitrary data source or can write + * output to an arbitrary data sink. * * It can be seen as generalization of the standard \c FILE*, and is pretty * much the same as [custom streams] * (http://www.gnu.org/software/libc/manual/html_mono/libc.html#Custom-Streams) * in the GNU C Library * - * It uses a cookie being basically an opaque pointer on a hidden data type.\n + * It uses a cookie being basically an opaque pointer on a hidden data type. + * * The custom stream is implemented by defining hook functions that know how * to read/write the data. */ struct gmio_stream { - /*! \brief Opaque pointer on the user stream, passed as first argument to - * hook functions */ + /*! Opaque pointer on the user stream, passed as first argument to + * hook functions */ void* cookie; - /*! \brief Pointer on a function that checks end-of-stream indicator - * - * Checks whether the end-of-stream indicator associated with stream - * pointed by \p cookie is set, returning GMIO_TRUE if is. - * - * The function should behaves like C standard [feof()] - * (http://pubs.opengroup.org/onlinepubs/007904975/functions/feof.html) - */ + /*! Pointer on a function that checks end-of-stream indicator + * + * Checks whether the end-of-stream indicator associated with stream + * pointed by \p cookie is set, returning GMIO_TRUE if is. + * + * The function should behaves like C standard [feof()] + * (http://pubs.opengroup.org/onlinepubs/007904975/functions/feof.html) + */ gmio_bool_t (*at_end_func)(void* cookie); - /*! \brief Pointer on a function that checks error indicator - * - * Checks if the error indicator associated with stream pointed by \p cookie - * is set, returning a value different from zero if it is. - * - * The function should behaves like C standard [ferror()] - * (http://pubs.opengroup.org/onlinepubs/007904975/functions/ferror.html) - */ + /*! Pointer on a function that checks error indicator + * + * Checks if the error indicator associated with stream pointed by + * \p cookie is set, returning a value different from zero if it is. + * + * The function should behaves like C standard [ferror()] + * (http://pubs.opengroup.org/onlinepubs/007904975/functions/ferror.html) + */ int (*error_func)(void* cookie); - /*! \brief Pointer on a function that reads block of data from stream - * - * \details Reads an array of \p count elements, each one with a size of \p size - * bytes, from the stream pointed by \p cookie and stores them in the block - * of memory specified by \p ptr - * - * The function should behaves like C standard [fread()] - * (http://pubs.opengroup.org/onlinepubs/007904975/functions/fread.html) - * - * \returns The total number of elements successfully read - */ + /*! Pointer on a function that reads block of data from stream + * + * Reads an array of \p count elements, each one with a size of + * \p size bytes, from the stream pointed by \p cookie and stores them in + * the block of memory specified by \p ptr + * + * The function should behaves like C standard [fread()] + * (http://pubs.opengroup.org/onlinepubs/007904975/functions/fread.html) + * + * \returns The total number of elements successfully read + */ size_t (*read_func)(void* cookie, void* ptr, size_t size, size_t count); - /*! \brief Pointer on a function that writes block of data to stream - * - * \details Writes an array of \p count elements, each one with a size of \p size - * bytes, from the block of memory pointed by \p ptr to the current position - * in the stream pointed by \p cookie - * - * The function should behaves like C standard [fwrite()] - * (http://pubs.opengroup.org/onlinepubs/007904975/functions/fwrite.html) - * - * \returns The total number of elements successfully written - */ + /*! Pointer on a function that writes block of data to stream + * + * Writes an array of \p count elements, each one with a size of + * \p size bytes, from the block of memory pointed by \p ptr to the current + * position in the stream pointed by \p cookie + * + * The function should behaves like C standard [fwrite()] + * (http://pubs.opengroup.org/onlinepubs/007904975/functions/fwrite.html) + * + * \returns The total number of elements successfully written + */ size_t (*write_func)(void* cookie, const void* ptr, size_t size, size_t count); }; @@ -92,27 +91,27 @@ typedef struct gmio_stream gmio_stream_t; /* Initialization */ -/*! \brief Installs a null stream */ +/*! Installs a null stream */ GMIO_LIB_EXPORT void gmio_stream_set_null(gmio_stream_t* stream); -/*! \brief Configures \p stream for standard FILE* (cookie will hold \p file) */ +/*! Configures \p stream for standard FILE* (cookie will hold \p file) */ GMIO_LIB_EXPORT void gmio_stream_set_stdio(gmio_stream_t* stream, FILE* file); /* Services */ -/*! \brief Safe and convenient function for gmio_stream::at_end_func() +/*! Safe and convenient function for gmio_stream::at_end_func() * * Same as: \code stream->at_end_func(stream->cookie) \endcode */ GMIO_LIB_EXPORT gmio_bool_t gmio_stream_at_end(gmio_stream_t* stream); -/*! \brief Safe and convenient function for gmio_stream::error_func() +/*! Safe and convenient function for gmio_stream::error_func() * * Same as: \code stream->error_func(stream->cookie) \endcode */ GMIO_LIB_EXPORT int gmio_stream_error(gmio_stream_t* stream); -/*! \brief Safe and convenient function for gmio_stream::read_func() +/*! Safe and convenient function for gmio_stream::read_func() * * Same as: \code stream->read_func(stream->cookie) \endcode */ @@ -121,7 +120,7 @@ GMIO_LIB_EXPORT size_t gmio_stream_read(gmio_stream_t* stream, size_t size, size_t count); -/*! \brief Safe and convenient function for gmio_stream::write_func() +/*! Safe and convenient function for gmio_stream::write_func() * * Same as: \code stream->write_func(stream->cookie) \endcode */ diff --git a/src/gmio_core/task_control.c b/src/gmio_core/task_control.c index 3fc067c..00789ad 100644 --- a/src/gmio_core/task_control.c +++ b/src/gmio_core/task_control.c @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #include "task_control.h" diff --git a/src/gmio_core/task_control.h b/src/gmio_core/task_control.h index b9e6300..669cb7f 100644 --- a/src/gmio_core/task_control.h +++ b/src/gmio_core/task_control.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_TASK_CONTROL_H @@ -28,14 +26,15 @@ GMIO_C_LINKAGE_BEGIN */ struct gmio_task_control { - /*! Opaque pointer on a user task object, passed as first argument to hook functions */ + /*! Opaque pointer on a user task object, passed as first argument to hook + * functions */ void* cookie; - /*! \brief Pointer on a function that says if the current task must stop - * - * If GMIO_TRUE is returned then the current task should abort as soon as possible, otherwise it - * can continue execution. - */ + /*! Pointer on a function that says if the current task must stop + * + * If GMIO_TRUE is returned then the current task should abort as soon as + * possible, otherwise it can continue execution. + */ gmio_bool_t (*is_stop_requested_func)(void* cookie); }; diff --git a/src/gmio_core/transfer.h b/src/gmio_core/transfer.h index 0256d2a..6766746 100644 --- a/src/gmio_core/transfer.h +++ b/src/gmio_core/transfer.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_TRANSFER_H diff --git a/src/gmio_stl/internal/stl_rw_common.c b/src/gmio_stl/internal/stl_rw_common.c index 3255f0d..def0982 100644 --- a/src/gmio_stl/internal/stl_rw_common.c +++ b/src/gmio_stl/internal/stl_rw_common.c @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #include "stl_rw_common.h" diff --git a/src/gmio_stl/internal/stl_rw_common.h b/src/gmio_stl/internal/stl_rw_common.h index 8b16f35..af196a7 100644 --- a/src/gmio_stl/internal/stl_rw_common.h +++ b/src/gmio_stl/internal/stl_rw_common.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_INTERNAL_STL_RW_COMMON_H diff --git a/src/gmio_stl/internal/stlb_byte_swap.c b/src/gmio_stl/internal/stlb_byte_swap.c index 3f75de7..bd2d6e2 100644 --- a/src/gmio_stl/internal/stlb_byte_swap.c +++ b/src/gmio_stl/internal/stlb_byte_swap.c @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #include "stlb_byte_swap.h" diff --git a/src/gmio_stl/internal/stlb_byte_swap.h b/src/gmio_stl/internal/stlb_byte_swap.h index 1d3f394..a59df27 100644 --- a/src/gmio_stl/internal/stlb_byte_swap.h +++ b/src/gmio_stl/internal/stlb_byte_swap.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_INTERNAL_STLB_BYTE_SWAP_H diff --git a/src/gmio_stl/stl_error.h b/src/gmio_stl/stl_error.h index f7d97bb..9137b92 100644 --- a/src/gmio_stl/stl_error.h +++ b/src/gmio_stl/stl_error.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_LIBSTL_STL_ERROR_H @@ -21,23 +19,29 @@ /*! A byte-mask to tag(identify) STL-specific error codes */ enum { GMIO_STL_ERROR_TAG = 0x11000000 }; -/*! This enum defines the various error codes reported by STL read/write functions */ +/*! This enum defines the various error codes reported by STL read/write + * functions */ enum gmio_stl_error { - /*! Common STL write error indicating gmio_stl_mesh::get_triangle_func() pointer is NULL */ + /*! Common STL write error indicating gmio_stl_mesh::get_triangle_func() + * pointer is NULL + */ GMIO_STL_WRITE_NULL_GET_TRIANGLE_FUNC_ERROR = GMIO_STL_ERROR_TAG + 1, /* Specific error codes returned by STL_ascii read function */ - /*! Parsing error occured in gmio_stla_read() due to malformed STL ascii input */ + /*! Parsing error occured in gmio_stla_read() due to malformed STL ascii + * input */ GMIO_STLA_READ_PARSE_ERROR = GMIO_STL_ERROR_TAG + 100, - /*! Invalid max number of decimal significants digits for gmio_stla_write(), must be in [1..9] */ + /*! Invalid max number of decimal significants digits for + * gmio_stla_write(), must be in [1..9] */ GMIO_STLA_WRITE_INVALID_REAL32_PREC_ERROR = GMIO_STL_ERROR_TAG + 101, /* Specific error codes returned by STL_binary read/write functions */ - /*! The byte order argument supplied is not supported, must be little or big endian */ + /*! The byte order argument supplied is not supported, must be little or + * big endian */ GMIO_STLB_UNSUPPORTED_BYTE_ORDER_ERROR = GMIO_STL_ERROR_TAG + 300, /*! Error occured when reading header data in gmio_stlb_read() */ diff --git a/src/gmio_stl/stl_format.c b/src/gmio_stl/stl_format.c index 936afa0..87ffa50 100644 --- a/src/gmio_stl/stl_format.c +++ b/src/gmio_stl/stl_format.c @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #include "stl_format.h" diff --git a/src/gmio_stl/stl_format.h b/src/gmio_stl/stl_format.h index d5f5642..fe76d0c 100644 --- a/src/gmio_stl/stl_format.h +++ b/src/gmio_stl/stl_format.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_LIBSTL_FORMAT_H @@ -34,7 +32,7 @@ enum gmio_stl_format typedef enum gmio_stl_format gmio_stl_format_t; -/*! \brief Returns the format of the STL data in \p stream +/*! Returns the format of the STL data in \p stream * * It will try to read 512 bytes from \p stream into a buffer and then * analyses this data to guess the format. @@ -43,7 +41,7 @@ typedef enum gmio_stl_format gmio_stl_format_t; * stream data (e.g. file size), it is required to guess endianness in case * of binary format. * - * Returns GMIO_STL_UNKNOWN_FORMAT in case of error. + * \retval GMIO_STL_UNKNOWN_FORMAT in case of error. */ GMIO_LIBSTL_EXPORT gmio_stl_format_t gmio_stl_get_format(gmio_stream_t* stream, size_t data_size); diff --git a/src/gmio_stl/stl_global.h b/src/gmio_stl/stl_global.h index 60616ab..58a87b9 100644 --- a/src/gmio_stl/stl_global.h +++ b/src/gmio_stl/stl_global.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_LIBSTL_GLOBAL_H diff --git a/src/gmio_stl/stl_io.h b/src/gmio_stl/stl_io.h index 022e318..26d8670 100644 --- a/src/gmio_stl/stl_io.h +++ b/src/gmio_stl/stl_io.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_LIBSTL_STL_IO_H @@ -26,12 +24,11 @@ GMIO_C_LINKAGE_BEGIN -/* ============================================================================ +/* ======================================================================== * STL ascii - * ============================================================================ - */ + * ======================================================================== */ -/*! \brief Options for gmio_stla_read() +/*! Options for gmio_stla_read() * * No options yet, it just exists for future needs, which could possibly be: * - flag to force locale ? @@ -43,7 +40,7 @@ struct gmio_stla_read_options }; typedef struct gmio_stla_read_options gmio_stla_read_options_t; -/*! \brief Read geometry from STL ascii stream +/*! Reads geometry from STL ascii stream * * \p options should be always set to NULL (not used for the moment) */ @@ -52,8 +49,7 @@ int gmio_stla_read(gmio_stl_mesh_creator_t* creator, gmio_transfer_t* trsf, const gmio_stla_read_options_t* options /* NULL */); -/*! \brief Options for gmio_stla_write() - */ +/*! Options for gmio_stla_write() */ struct gmio_stla_write_options { /*! May be NULL to generate default name */ @@ -64,7 +60,7 @@ struct gmio_stla_write_options }; typedef struct gmio_stla_write_options gmio_stla_write_options_t; -/*! \brief Write geometry in the STL ascii format +/*! Writes geometry in the STL ascii format * * \param mesh Defines the mesh to write * \param trsf Defines needed objects (stream, buffer, ...) for the writing @@ -80,13 +76,11 @@ int gmio_stla_write(const gmio_stl_mesh_t* mesh, gmio_transfer_t* trsf, const gmio_stla_write_options_t* options); -/* ============================================================================ +/* ======================================================================== * STL binary - * ============================================================================ - */ + * ======================================================================== */ -/*! \brief Options for gmio_stlb_read() - */ +/*! Options for gmio_stlb_read() */ struct gmio_stlb_read_options { /*! Set to host byte order if not specified (ie. options == NULL) */ @@ -94,16 +88,14 @@ struct gmio_stlb_read_options }; typedef struct gmio_stlb_read_options gmio_stlb_read_options_t; -/*! \brief Read geometry from STL binary stream - */ +/*! Reads geometry from STL binary stream */ GMIO_LIBSTL_EXPORT int gmio_stlb_read(gmio_stl_mesh_creator_t* creator, gmio_transfer_t* trsf, const gmio_stlb_read_options_t* options); -/*! \brief Options for gmio_stlb_write() - */ +/*! Options for gmio_stlb_write() */ struct gmio_stlb_write_options { /*! Header data consisting of 80 bytes */ @@ -114,8 +106,7 @@ struct gmio_stlb_write_options }; typedef struct gmio_stlb_write_options gmio_stlb_write_options_t; -/*! \brief Write geometry in the STL binary format - */ +/*! Writes geometry in the STL binary format */ GMIO_LIBSTL_EXPORT int gmio_stlb_write(const gmio_stl_mesh_t* mesh, gmio_transfer_t* trsf, diff --git a/src/gmio_stl/stl_mesh.h b/src/gmio_stl/stl_mesh.h index 8864a08..943ca30 100644 --- a/src/gmio_stl/stl_mesh.h +++ b/src/gmio_stl/stl_mesh.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_LIBSTL_STL_MESH_H @@ -24,14 +22,18 @@ /*! Provides an interface for accessing the underlying(hidden) user mesh */ struct gmio_stl_mesh { - /*! Opaque pointer on the user mesh, passed as first argument to hook functions */ + /*! Opaque pointer on the user mesh, passed as first argument to hook + * functions */ const void* cookie; /*! Number of triangles in the mesh */ uint32_t triangle_count; - /*! Pointer on a function that stores the mesh triangle of index \p tri_id into \p triangle */ - void (*get_triangle_func)(const void* cookie, uint32_t tri_id, gmio_stl_triangle_t* triangle); + /*! Pointer on a function that stores the mesh triangle of index \p tri_id + * into \p triangle */ + void (*get_triangle_func)(const void* cookie, + uint32_t tri_id, + gmio_stl_triangle_t* triangle); }; typedef struct gmio_stl_mesh gmio_stl_mesh_t; diff --git a/src/gmio_stl/stl_mesh_creator.h b/src/gmio_stl/stl_mesh_creator.h index c9ce9ff..33af504 100644 --- a/src/gmio_stl/stl_mesh_creator.h +++ b/src/gmio_stl/stl_mesh_creator.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_LIBSTL_STL_MESH_CREATOR_H @@ -21,48 +19,50 @@ #include "stl_global.h" #include "stl_triangle.h" -/*! \brief Provides an interface for the creation of the underlying(hidden) - * user mesh - */ +/*! Provides an interface for the creation of the underlying(hidden) + * user mesh */ struct gmio_stl_mesh_creator { - /*! \brief Opaque pointer on the user mesh, passed as first argument to hook - * functions - */ + /*! Opaque pointer on the user mesh, passed as first argument to hook + * functions */ void* cookie; /* All function pointers are optional (ie can be set to NULL) */ - /*! \brief Pointer on a function that handles declaration of a solid of name - * \p solid_name - * - * Optional function useful only with STL ascii (ie. gmio_stla_read()) - */ + /*! Pointer on a function that handles declaration of a solid of + * name \p solid_name + * + * Optional function useful only with STL ascii (ie. gmio_stla_read()) + */ void (*ascii_begin_solid_func)(void* cookie, const char* solid_name); - /*! \brief Pointer on a function that handles declaration of a mesh with - * \p tri_count number of triangles - * - * Optional function useful only with STL binary (ie. gmio_stlb_read()). - * - * The argument \p header contains the header data(80 bytes) - */ - void (*binary_begin_solid_func)(void* cookie, uint32_t tri_count, const uint8_t* header); + /*! Pointer on a function that handles declaration of a mesh with + * \p tri_count number of triangles + * + * Optional function useful only with STL binary (ie. gmio_stlb_read()). + * + * The argument \p header contains the header data(80 bytes) + */ + void (*binary_begin_solid_func)(void* cookie, + uint32_t tri_count, + const uint8_t* header); - /*! \brief Pointer on a function that adds a triangle to the user mesh - * - * The argument \p triangle is the triangle to be added, note that - * gmio_stl_triangle_t::attribute_byte_count is meaningless for STL ascii. - * - * The argument \p tri_id is the index of the mesh triangle - */ - void (*add_triangle_func)(void* cookie, uint32_t tri_id, const gmio_stl_triangle_t* triangle); + /*! Pointer on a function that adds a triangle to the user mesh + * + * The argument \p triangle is the triangle to be added, note that + * gmio_stl_triangle_t::attribute_byte_count is meaningless for STL ascii. + * + * The argument \p tri_id is the index of the mesh triangle + */ + void (*add_triangle_func)(void* cookie, + uint32_t tri_id, + const gmio_stl_triangle_t* triangle); - /*! \brief Pointer on a function that finalizes creation of the user mesh - * - * Optional function called at the end of the read process, ie. after all - * triangles have been added - */ + /*! Pointer on a function that finalizes creation of the user mesh + * + * Optional function called at the end of the read process, ie. after all + * triangles have been added + */ void (*end_solid_func)(void* cookie); }; diff --git a/src/gmio_stl/stl_triangle.h b/src/gmio_stl/stl_triangle.h index c0c97fd..9c1f59f 100644 --- a/src/gmio_stl/stl_triangle.h +++ b/src/gmio_stl/stl_triangle.h @@ -1,5 +1,4 @@ /**************************************************************************** -** ** GeomIO Library ** Copyright FougSys (2 Mar. 2015) ** contact@fougsys.fr @@ -12,7 +11,6 @@ ** modify and/ or redistribute the software under the terms of the CeCILL-B ** license as circulated by CEA, CNRS and INRIA at the following URL ** "http://www.cecill.info". -** ****************************************************************************/ #ifndef GMIO_LIBSTL_TRIANGLE_H @@ -20,9 +18,8 @@ #include "stl_global.h" -/*! \brief Cartesian coordinate entity in 3D space, specifically tailored for - * STL needs (single-float) - */ +/*! Cartesian coordinate entity in 3D space, specifically tailored for + * STL needs (single-float) */ struct gmio_stl_coords { gmio_float32_t x; @@ -32,9 +29,8 @@ struct gmio_stl_coords typedef struct gmio_stl_coords gmio_stl_coords_t; -/*! \brief STL mesh triangle defined three geometric vertices and an - * orientation(normal) - */ +/*! STL mesh triangle defined three geometric vertices and an + * orientation(normal) */ struct gmio_stl_triangle { gmio_stl_coords_t normal;