Fix minor C code style issues
This commit is contained in:
parent
f34cc24f3b
commit
aebea13385
@ -3,14 +3,14 @@
|
||||
|
||||
#include "stl_global.h"
|
||||
|
||||
typedef struct
|
||||
typedef struct foug_stl_coords
|
||||
{
|
||||
foug_real32_t x;
|
||||
foug_real32_t y;
|
||||
foug_real32_t z;
|
||||
} foug_stl_coords_t;
|
||||
|
||||
typedef struct
|
||||
typedef struct foug_stl_triangle
|
||||
{
|
||||
foug_stl_coords_t normal;
|
||||
foug_stl_coords_t v1;
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "stl_triangle.h"
|
||||
|
||||
typedef struct
|
||||
typedef struct foug_stlb_triangle
|
||||
{
|
||||
foug_stl_triangle_t data;
|
||||
uint16_t attribute_byte_count;
|
||||
|
@ -8,33 +8,39 @@
|
||||
typedef struct _internal_foug_stream foug_stream_t;
|
||||
|
||||
/* foug_stream_manip */
|
||||
typedef foug_bool_t (*foug_stream_at_end_func_t)(foug_stream_t*);
|
||||
typedef int32_t (*foug_stream_error_func_t)(foug_stream_t*);
|
||||
typedef size_t (*foug_stream_read_func_t)(foug_stream_t*, void*, size_t, size_t);
|
||||
typedef size_t (*foug_stream_write_func_t)(foug_stream_t*, const void*, size_t, size_t);
|
||||
typedef struct
|
||||
typedef struct foug_stream_manip
|
||||
{
|
||||
foug_stream_at_end_func_t at_end_func;
|
||||
foug_stream_error_func_t error_func;
|
||||
foug_stream_read_func_t read_func;
|
||||
foug_stream_write_func_t write_func;
|
||||
foug_bool_t (*at_end_func)(foug_stream_t*);
|
||||
int32_t (*error_func)(foug_stream_t*);
|
||||
size_t (*read_func)(foug_stream_t*, void*, size_t, size_t);
|
||||
size_t (*write_func)(foug_stream_t*, const void*, size_t, size_t);
|
||||
} foug_stream_manip_t;
|
||||
|
||||
FOUG_LIB_EXPORT foug_stream_manip_t foug_stream_manip_null();
|
||||
FOUG_LIB_EXPORT foug_stream_manip_t foug_stream_manip_stdio();
|
||||
|
||||
/* Services */
|
||||
|
||||
FOUG_LIB_EXPORT foug_stream_t* foug_stream_create(foug_malloc_func_t func,
|
||||
void* data,
|
||||
foug_stream_manip_t manip);
|
||||
|
||||
FOUG_LIB_EXPORT foug_bool_t foug_stream_at_end(foug_stream_t* stream);
|
||||
|
||||
FOUG_LIB_EXPORT int foug_stream_error(foug_stream_t* stream);
|
||||
|
||||
FOUG_LIB_EXPORT size_t foug_stream_read(foug_stream_t* stream,
|
||||
void* ptr, size_t item_size, size_t item_count);
|
||||
void* ptr,
|
||||
size_t item_size,
|
||||
size_t item_count);
|
||||
|
||||
FOUG_LIB_EXPORT size_t foug_stream_write(foug_stream_t* stream,
|
||||
const void* ptr, size_t item_size, size_t item_count);
|
||||
const void* ptr,
|
||||
size_t item_size,
|
||||
size_t item_count);
|
||||
|
||||
FOUG_LIB_EXPORT void* foug_stream_get_cookie(const foug_stream_t* stream);
|
||||
|
||||
FOUG_LIB_EXPORT void foug_stream_set_cookie(foug_stream_t* stream, void* data);
|
||||
|
||||
#endif /* FOUG_C_STREAM_H */
|
||||
|
@ -7,51 +7,66 @@
|
||||
/* foug_task_control : opaque structure */
|
||||
typedef struct _internal_foug_task_control foug_task_control_t;
|
||||
|
||||
|
||||
/* foug_task_control_manip */
|
||||
typedef void (*foug_task_control_handle_stop_func)(foug_task_control_t*);
|
||||
typedef void (*foug_task_control_handle_progress_update_func)(foug_task_control_t*);
|
||||
typedef struct
|
||||
typedef struct foug_task_control_manip
|
||||
{
|
||||
foug_task_control_handle_stop_func handle_stop_func;
|
||||
foug_task_control_handle_progress_update_func handle_progress_update_func;
|
||||
void (*handle_stop_func)(foug_task_control_t*);
|
||||
void (*handle_progress_update_func)(foug_task_control_t*);
|
||||
} foug_task_control_manip_t;
|
||||
|
||||
FOUG_LIB_EXPORT void foug_task_control_manip_init(foug_task_control_manip_t* manip);
|
||||
|
||||
/* Creation */
|
||||
|
||||
FOUG_LIB_EXPORT foug_task_control_t* foug_task_control_create(foug_malloc_func_t func,
|
||||
void* data,
|
||||
foug_task_control_manip_t manip);
|
||||
|
||||
/* Range */
|
||||
|
||||
FOUG_LIB_EXPORT foug_real32_t foug_task_control_get_range_min(const foug_task_control_t* ctrl);
|
||||
FOUG_LIB_EXPORT foug_real32_t foug_task_control_get_range_max(const foug_task_control_t* ctrl);
|
||||
|
||||
FOUG_LIB_EXPORT void foug_task_control_set_range(foug_task_control_t* ctrl,
|
||||
foug_real32_t min, foug_real32_t max);
|
||||
foug_real32_t min,
|
||||
foug_real32_t max);
|
||||
|
||||
/* Step id */
|
||||
|
||||
FOUG_LIB_EXPORT int32_t foug_task_control_get_step_id(const foug_task_control_t* ctrl);
|
||||
|
||||
FOUG_LIB_EXPORT void foug_task_control_set_step_id(foug_task_control_t* ctrl, int32_t step_id);
|
||||
|
||||
/* Progress */
|
||||
|
||||
FOUG_LIB_EXPORT foug_real32_t foug_task_control_get_progress_as_pc(const foug_task_control_t* ctrl);
|
||||
FOUG_LIB_EXPORT foug_real32_t foug_task_control_get_progress(const foug_task_control_t* ctrl);
|
||||
|
||||
FOUG_LIB_EXPORT void foug_task_control_set_progress(foug_task_control_t* ctrl, foug_real32_t v);
|
||||
|
||||
FOUG_LIB_EXPORT
|
||||
foug_real32_t foug_task_control_get_progress_update_threshold(const foug_task_control_t* ctrl);
|
||||
|
||||
FOUG_LIB_EXPORT void foug_task_control_set_progress_update_threshold(foug_task_control_t* ctrl,
|
||||
foug_real32_t v);
|
||||
|
||||
/* Reset */
|
||||
|
||||
FOUG_LIB_EXPORT void foug_task_control_reset(foug_task_control_t* ctrl);
|
||||
|
||||
/* Task stop */
|
||||
|
||||
FOUG_LIB_EXPORT void foug_task_control_async_stop(foug_task_control_t* ctrl);
|
||||
|
||||
FOUG_LIB_EXPORT void foug_task_control_handle_stop(foug_task_control_t* ctrl);
|
||||
|
||||
FOUG_LIB_EXPORT foug_bool_t foug_task_control_is_stop_requested(const foug_task_control_t* ctrl);
|
||||
|
||||
/* Cookie */
|
||||
|
||||
FOUG_LIB_EXPORT void* foug_task_control_get_cookie(const foug_task_control_t* ctrl);
|
||||
|
||||
FOUG_LIB_EXPORT void foug_task_control_set_cookie(foug_task_control_t* ctrl, void* data);
|
||||
|
||||
#endif /* FOUG_C_TASK_CONTROL_H */
|
||||
|
Loading…
Reference in New Issue
Block a user