Minor doc and indentation improvements

This commit is contained in:
Hugues Delorme 2015-01-28 22:39:03 +01:00
parent 550cccba79
commit 3350d8936f
3 changed files with 28 additions and 17 deletions

View File

@ -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); char* gmio_current_char(const gmio_ascii_stream_fwd_iterator_t* it);
void gmio_skip_spaces(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); 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); int gmio_get_real32(const char* str, gmio_real32_t* value_ptr);
char* gmio_next_char(gmio_ascii_stream_fwd_iterator_t* it); char* gmio_next_char(gmio_ascii_stream_fwd_iterator_t* it);

View File

@ -19,11 +19,12 @@ typedef enum gmio_stl_format gmio_stl_format_t;
/*! \brief Returns the format of the STL data in \p stream /*! \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 * It will try to read 512 bytes from \p stream into a buffer and then
* the format. * 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 * Parameter \p data_size must provide the total size (in bytes) of the
* size), it is required to guess endianness in case of binary format. * 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. * Returns GMIO_STL_UNKNOWN_FORMAT in case of error.
*/ */

View File

@ -20,7 +20,7 @@ GMIO_C_LINKAGE_BEGIN
*/ */
struct gmio_stla_read_options 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 ? */ /* Flag to force locale ? */
}; };
typedef struct gmio_stla_read_options gmio_stla_read_options_t; 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) * \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_LIBSTL_EXPORT
gmio_transfer_t* trsf, int gmio_stla_read(gmio_stl_mesh_creator_t* creator,
const gmio_stla_read_options_t* options); /* NULL */ gmio_transfer_t* trsf,
const gmio_stla_read_options_t* options); /* NULL */
/*! \brief Options for gmio_stla_write() /*! \brief Options for gmio_stla_write()
*/ */
@ -55,9 +56,10 @@ typedef struct gmio_stla_write_options gmio_stla_write_options_t;
* \return Error code * \return Error code
* \retval GMIO_NO_ERROR If operation successful * \retval GMIO_NO_ERROR If operation successful
*/ */
GMIO_LIBSTL_EXPORT int gmio_stla_write(const gmio_stl_mesh_t* mesh, GMIO_LIBSTL_EXPORT
gmio_transfer_t* trsf, int gmio_stla_write(const gmio_stl_mesh_t* mesh,
const gmio_stla_write_options_t* options); gmio_transfer_t* trsf,
const gmio_stla_write_options_t* options);
/* ============================================================================ /* ============================================================================
* STL binary * STL binary
@ -75,9 +77,10 @@ typedef struct gmio_stlb_read_options gmio_stlb_read_options_t;
/*! \brief Read geometry from STL binary stream /*! \brief Read geometry from STL binary stream
*/ */
GMIO_LIBSTL_EXPORT int gmio_stlb_read(gmio_stl_mesh_creator_t* creator, GMIO_LIBSTL_EXPORT
gmio_transfer_t* trsf, int gmio_stlb_read(gmio_stl_mesh_creator_t* creator,
const gmio_stlb_read_options_t* options); gmio_transfer_t* trsf,
const gmio_stlb_read_options_t* options);
/*! \brief Options for gmio_stlb_write() /*! \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 /*! \brief Write geometry in the STL binary format
*/ */
GMIO_LIBSTL_EXPORT int gmio_stlb_write(const gmio_stl_mesh_t* mesh, GMIO_LIBSTL_EXPORT
gmio_transfer_t* trsf, int gmio_stlb_write(const gmio_stl_mesh_t* mesh,
const gmio_stlb_write_options_t* options); gmio_transfer_t* trsf,
const gmio_stlb_write_options_t* options);
GMIO_C_LINKAGE_END GMIO_C_LINKAGE_END