From 01c3b295ff181bc7a7bedc9cf7cfec8c93811653 Mon Sep 17 00:00:00 2001 From: Hugues Delorme Date: Tue, 29 Mar 2016 12:22:17 +0200 Subject: [PATCH] Indentation --- src/gmio_core/memblock.h | 4 +-- src/gmio_stl/stl_infos.h | 12 ++++---- src/gmio_stl/stl_io.h | 63 +++++++++++++++++++++----------------- src/gmio_stl/stlb_header.h | 4 ++- 4 files changed, 46 insertions(+), 37 deletions(-) diff --git a/src/gmio_core/memblock.h b/src/gmio_core/memblock.h index ef9b4df..71e19d4 100644 --- a/src/gmio_core/memblock.h +++ b/src/gmio_core/memblock.h @@ -51,7 +51,7 @@ GMIO_API bool gmio_memblock_isnull(const struct gmio_memblock* mblock); * If \p ptr is NULL then gmio_memblock::size is forced to \c 0 */ GMIO_API struct gmio_memblock gmio_memblock( - void* ptr, size_t size, void (*func_deallocate)(void*)); + void* ptr, size_t size, void (*func_deallocate)(void*)); /*! Returns a gmio_memblock object allocated with standard \c malloc() */ GMIO_API struct gmio_memblock gmio_memblock_malloc(size_t size); @@ -80,7 +80,7 @@ typedef struct gmio_memblock (*gmio_memblock_constructor_func_t)(); * This function is not thread-safe. */ GMIO_API void gmio_memblock_set_default_constructor( - gmio_memblock_constructor_func_t ctor); + gmio_memblock_constructor_func_t ctor); /*! Returns the currently installed function to construct gmio_memblock objects * diff --git a/src/gmio_stl/stl_infos.h b/src/gmio_stl/stl_infos.h index 75bcaf3..6dff983 100644 --- a/src/gmio_stl/stl_infos.h +++ b/src/gmio_stl/stl_infos.h @@ -116,10 +116,10 @@ GMIO_C_LINKAGE_BEGIN * \return Error code (see gmio_core/error.h and stl_error.h) */ GMIO_API int gmio_stl_infos_get( - struct gmio_stl_infos* infos, - struct gmio_stream* stream, - unsigned flags, - const struct gmio_stl_infos_get_options* options); + struct gmio_stl_infos* infos, + struct gmio_stream* stream, + unsigned flags, + const struct gmio_stl_infos_get_options* options); /*! Returns the size(in bytes) of the next STL ascii solid in \p stream * @@ -131,8 +131,8 @@ GMIO_API int gmio_stl_infos_get( * advanced solid by solid after each call to gmio_stl_read() */ GMIO_API gmio_streamsize_t gmio_stla_infos_get_streamsize( - struct gmio_stream* stream, - struct gmio_memblock* stream_memblock); + struct gmio_stream* stream, + struct gmio_memblock* stream_memblock); GMIO_C_LINKAGE_END diff --git a/src/gmio_stl/stl_io.h b/src/gmio_stl/stl_io.h index 94a6038..3ca23b4 100644 --- a/src/gmio_stl/stl_io.h +++ b/src/gmio_stl/stl_io.h @@ -35,35 +35,40 @@ GMIO_C_LINKAGE_BEGIN /*! Reads STL mesh from stream, format is automatically guessed + * + * It does nothing on the triangles read : no checking(eg. for Nan), normals + * are given as they are. * * \return Error code (see gmio_core/error.h and stl_error.h) */ GMIO_API int gmio_stl_read( - struct gmio_stream* stream, - struct gmio_stl_mesh_creator* mesh_creator, - const struct gmio_stl_read_options* options); + struct gmio_stream* stream, + struct gmio_stl_mesh_creator* mesh_creator, + const struct gmio_stl_read_options* options); /*! Reads STL mesh from a file, format is automatically guessed * * This is just a facility function over gmio_stl_read(). The internal stream - * object is created to read file at \p filepath (see gmio_stream_stdio(FILE*)) + * object is created to read file at \p filepath. * * The file is opened with \c fopen() so \p filepath shall follow the file name * specifications of the running environment + * + * \sa gmio_stream_stdio(FILE*) */ GMIO_API int gmio_stl_read_file( - const char* filepath, - struct gmio_stl_mesh_creator* mesh_creator, - const struct gmio_stl_read_options* options); + const char* filepath, + struct gmio_stl_mesh_creator* mesh_creator, + const struct gmio_stl_read_options* options); /*! Reads mesh from STL ascii stream * * \return Error code (see gmio_core/error.h and stl_error.h) */ GMIO_API int gmio_stla_read( - struct gmio_stream* stream, - struct gmio_stl_mesh_creator* mesh_creator, - const struct gmio_stl_read_options* options); + struct gmio_stream* stream, + struct gmio_stl_mesh_creator* mesh_creator, + const struct gmio_stl_read_options* options); /*! Reads mesh from STL binary stream * @@ -72,36 +77,38 @@ GMIO_API int gmio_stla_read( * if options->stream_memblock.size < GMIO_STLB_MIN_CONTENTS_SIZE */ GMIO_API int gmio_stlb_read( - struct gmio_stream* stream, - struct gmio_stl_mesh_creator* mesh_creator, - enum gmio_endianness byte_order, - const struct gmio_stl_read_options* options); + struct gmio_stream* stream, + struct gmio_stl_mesh_creator* mesh_creator, + enum gmio_endianness byte_order, + const struct gmio_stl_read_options* options); /*! Writes STL mesh to stream * * \return Error code (see gmio_core/error.h and stl_error.h) */ GMIO_API int gmio_stl_write( - enum gmio_stl_format format, - struct gmio_stream* stream, - const struct gmio_stl_mesh* mesh, - const struct gmio_stl_write_options* options); + enum gmio_stl_format format, + struct gmio_stream* stream, + const struct gmio_stl_mesh* mesh, + const struct gmio_stl_write_options* options); /*! Writes STL mesh to stream * * This is just a facility function over gmio_stl_write(). The internal stream - * object is created to read file at \p filepath (see gmio_stream_stdio(FILE*)) + * object is created to read file at \p filepath * * The file is opened with \c fopen() so \p filepath shall follow the file name * specifications of the running environment - + * * \return Error code (see gmio_core/error.h and stl_error.h) + * + * \sa gmio_stream_stdio(FILE*) */ GMIO_API int gmio_stl_write_file( - enum gmio_stl_format format, - const char* filepath, - const struct gmio_stl_mesh* mesh, - const struct gmio_stl_write_options* options); + enum gmio_stl_format format, + const char* filepath, + const struct gmio_stl_mesh* mesh, + const struct gmio_stl_write_options* options); /*! Writes STL binary header data to stream * @@ -113,10 +120,10 @@ GMIO_API int gmio_stl_write_file( * \return Error code (see error.h and stl_error.h) */ GMIO_API int gmio_stlb_header_write( - struct gmio_stream* stream, - enum gmio_endianness byte_order, - const struct gmio_stlb_header* header, - uint32_t facet_count + struct gmio_stream* stream, + enum gmio_endianness byte_order, + const struct gmio_stlb_header* header, + uint32_t facet_count ); GMIO_C_LINKAGE_END diff --git a/src/gmio_stl/stlb_header.h b/src/gmio_stl/stlb_header.h index 6f1737d..46918ad 100644 --- a/src/gmio_stl/stlb_header.h +++ b/src/gmio_stl/stlb_header.h @@ -50,7 +50,9 @@ GMIO_API struct gmio_stlb_header gmio_stlb_header_str(const char* str); * character ('\0') is copied at position \c GMIO_STLB_HEADER_SIZE */ GMIO_API void gmio_stlb_header_to_printable_str( - const struct gmio_stlb_header* header, char* str, char replacement); + const struct gmio_stlb_header* header, + char* str, + char replacement); GMIO_C_LINKAGE_END