libstl: put all error codes in stl_error.h
This commit is contained in:
parent
83553795d5
commit
c11804fcea
23
src/libstl/stl_error.h
Normal file
23
src/libstl/stl_error.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef FOUG_LIBSTL_STL_ERROR_H
|
||||
#define FOUG_LIBSTL_STL_ERROR_H
|
||||
|
||||
#define FOUG_STL_ERROR_TAG 0x11000000
|
||||
/* Specific error codes returned by foug_stla_read() */
|
||||
#define FOUG_STLA_READ_PARSE_ERROR (FOUG_STL_ERROR_TAG + 1)
|
||||
|
||||
/* Specific error codes returned by foug_stla_write() */
|
||||
#define FOUG_STLA_WRITE_NULL_GET_TRIANGLE_FUNC (FOUG_STL_ERROR_TAG + 100)
|
||||
#define FOUG_STLA_WRITE_INVALID_REAL32_PRECISION (FOUG_STL_ERROR_TAG + 101)
|
||||
|
||||
/* Specific error code common to foug_stlb_read() and foug_stlb_write() */
|
||||
#define FOUG_STLB_READWRITE_UNSUPPORTED_BYTE_ORDER (FOUG_STL_ERROR_TAG + 200)
|
||||
|
||||
/* Specific error codes returned by foug_stlb_read() */
|
||||
#define FOUG_STLB_READ_HEADER_WRONG_SIZE_ERROR (FOUG_STL_ERROR_TAG + 300)
|
||||
#define FOUG_STLB_READ_FACET_COUNT_ERROR (FOUG_STL_ERROR_TAG + 301)
|
||||
#define FOUG_STLB_READ_UNSUPPORTED_BYTE_ORDER (FOUG_STL_ERROR_TAG + 302)
|
||||
|
||||
/* Specific error codes returned by foug_stlb_write() */
|
||||
#define FOUG_STLB_WRITE_NULL_GET_TRIANGLE_FUNC (FOUG_STL_ERROR_TAG + 400)
|
||||
|
||||
#endif /* FOUG_LIBSTL_STL_ERROR_H */
|
@ -21,7 +21,4 @@ FOUG_DATAX_LIBSTL_EXPORT int foug_stla_read(foug_stla_geom_input_t* geom,
|
||||
foug_transfer_t* trsf,
|
||||
size_t data_size_hint);
|
||||
|
||||
/* Specific error codes returned by foug_stla_read() */
|
||||
#define FOUG_STLA_READ_PARSE_ERROR 1
|
||||
|
||||
#endif /* FOUG_DATAX_C_LIBSTL_STLA_READ_H */
|
||||
|
@ -19,8 +19,4 @@ FOUG_DATAX_LIBSTL_EXPORT int foug_stla_write(foug_stla_geom_output_t* geom,
|
||||
foug_transfer_t* trsf,
|
||||
uint8_t real32_prec);
|
||||
|
||||
/* Specific error codes returned by foug_stla_write() */
|
||||
#define FOUG_STLA_WRITE_NULL_GET_TRIANGLE_FUNC 1 /*!< get_triangle_func is null */
|
||||
#define FOUG_STLA_WRITE_INVALID_REAL32_PRECISION 2 /*!< real32_prec is not in [1..9] */
|
||||
|
||||
#endif /* FOUG_DATAX_C_LIBSTL_STLA_WRITE_H */
|
||||
|
@ -24,9 +24,4 @@ FOUG_DATAX_LIBSTL_EXPORT int foug_stlb_read(foug_stlb_geom_input_t* geom,
|
||||
foug_transfer_t* trsf,
|
||||
foug_endianness_t byte_order);
|
||||
|
||||
/* Specific error codes returned by foug_stlb_read() */
|
||||
#define FOUG_STLB_READ_HEADER_WRONG_SIZE_ERROR 1
|
||||
#define FOUG_STLB_READ_FACET_COUNT_ERROR 2
|
||||
#define FOUG_STLB_READ_UNSUPPORTED_BYTE_ORDER 3
|
||||
|
||||
#endif /* FOUG_DATAX_C_LIBSTL_STLB_READ_H */
|
||||
|
@ -12,7 +12,7 @@ typedef struct
|
||||
uint32_t triangle_count;
|
||||
const void* cookie;
|
||||
void (*get_triangle_func)(const void*, uint32_t, foug_stl_triangle_t*);
|
||||
void (*get_attr_byte_count_func)(const void*, uint16_t*); /* Optional : may be NULL */
|
||||
void (*get_attr_byte_count_func)(const void*, uint32_t, uint16_t*); /* Optional : may be NULL */
|
||||
} foug_stlb_geom_output_t;
|
||||
|
||||
/* foug_stlb_write() */
|
||||
@ -20,8 +20,4 @@ FOUG_DATAX_LIBSTL_EXPORT int foug_stlb_write(const foug_stlb_geom_output_t* geom
|
||||
foug_transfer_t* trsf,
|
||||
foug_endianness_t byte_order);
|
||||
|
||||
/* Specific error codes returned by foug_stlb_write() */
|
||||
#define FOUG_STLB_WRITE_NULL_GET_TRIANGLE_FUNC 1
|
||||
#define FOUG_STLB_WRITE_UNSUPPORTED_BYTE_ORDER 2
|
||||
|
||||
#endif /* FOUG_DATAX_C_LIBSTL_STLB_WRITE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user