diff --git a/src/gmio_core/internal/ascii_parse.h b/src/gmio_core/internal/ascii_parse.h index 730bcf3..fbcb257 100644 --- a/src/gmio_core/internal/ascii_parse.h +++ b/src/gmio_core/internal/ascii_parse.h @@ -29,6 +29,12 @@ void gmio_ascii_stream_fwd_iterator_init(gmio_ascii_stream_fwd_iterator_t* it); char* gmio_current_char(const gmio_ascii_stream_fwd_iterator_t* it); void gmio_skip_spaces(gmio_ascii_stream_fwd_iterator_t* it); int gmio_eat_word(gmio_ascii_stream_fwd_iterator_t* it, gmio_ascii_string_buffer_t* buffer); + +/*! \brief Converts the string pointed to by \p str to gmio_real32_t representation + * + * \retval 0 On success + * \retval -1 On error(check \c errno to see what happened) + */ int gmio_get_real32(const char* str, gmio_real32_t* value_ptr); char* gmio_next_char(gmio_ascii_stream_fwd_iterator_t* it); diff --git a/src/gmio_stl/stl_format.h b/src/gmio_stl/stl_format.h index fb7ffac..4c8a61e 100644 --- a/src/gmio_stl/stl_format.h +++ b/src/gmio_stl/stl_format.h @@ -19,11 +19,12 @@ typedef enum gmio_stl_format gmio_stl_format_t; /*! \brief 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. + * It will try to read 512 bytes from \p stream into a buffer and then + * analyses this data to guess the format. * - * Parameter \p data_size must provide the total size (in bytes) of the stream data (e.g. file - * size), it is required to guess endianness in case of binary format. + * Parameter \p data_size must provide the total size (in bytes) of the + * 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. */ diff --git a/src/gmio_stl/stl_io.h b/src/gmio_stl/stl_io.h index 1c64fe5..c7d7621 100644 --- a/src/gmio_stl/stl_io.h +++ b/src/gmio_stl/stl_io.h @@ -20,7 +20,7 @@ GMIO_C_LINKAGE_BEGIN */ struct gmio_stla_read_options { - void* dummy; /*!< Structs must have at least one member ... */ + void* dummy; /*!< Structs must have at least one member in strict ISO-C90 */ /* Flag to force locale ? */ }; typedef struct gmio_stla_read_options gmio_stla_read_options_t; @@ -29,9 +29,10 @@ typedef struct gmio_stla_read_options gmio_stla_read_options_t; * * \p options should be always set to NULL (not used for the moment) */ -GMIO_LIBSTL_EXPORT int gmio_stla_read(gmio_stl_mesh_creator_t* creator, - gmio_transfer_t* trsf, - const gmio_stla_read_options_t* options); /* NULL */ +GMIO_LIBSTL_EXPORT +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() */ @@ -55,9 +56,10 @@ typedef struct gmio_stla_write_options gmio_stla_write_options_t; * \return Error code * \retval GMIO_NO_ERROR If operation successful */ -GMIO_LIBSTL_EXPORT int gmio_stla_write(const gmio_stl_mesh_t* mesh, - gmio_transfer_t* trsf, - const gmio_stla_write_options_t* options); +GMIO_LIBSTL_EXPORT +int gmio_stla_write(const gmio_stl_mesh_t* mesh, + gmio_transfer_t* trsf, + const gmio_stla_write_options_t* options); /* ============================================================================ * STL binary @@ -75,9 +77,10 @@ typedef struct gmio_stlb_read_options gmio_stlb_read_options_t; /*! \brief Read 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); +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() @@ -94,9 +97,10 @@ typedef struct gmio_stlb_write_options gmio_stlb_write_options_t; /*! \brief Write geometry in the STL binary format */ -GMIO_LIBSTL_EXPORT int gmio_stlb_write(const gmio_stl_mesh_t* mesh, - gmio_transfer_t* trsf, - const gmio_stlb_write_options_t* options); +GMIO_LIBSTL_EXPORT +int gmio_stlb_write(const gmio_stl_mesh_t* mesh, + gmio_transfer_t* trsf, + const gmio_stlb_write_options_t* options); GMIO_C_LINKAGE_END