Indentation

This commit is contained in:
Hugues Delorme 2016-03-29 12:22:17 +02:00
parent 4228a40ae7
commit 01c3b295ff
4 changed files with 46 additions and 37 deletions

View File

@ -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
*

View File

@ -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

View File

@ -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 <tt>options->stream_memblock.size < GMIO_STLB_MIN_CONTENTS_SIZE</tt>
*/
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

View File

@ -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