20260829 Redesign
This commit is contained in:
+122
@@ -0,0 +1,122 @@
|
||||
#ifndef INCLUDED_C_TYPES_H
|
||||
#define INCLUDED_C_TYPES_H
|
||||
|
||||
#ifndef INCLUDED_C_CONFIG_H
|
||||
#include <c_Config.h>
|
||||
#endif /*INCLUDED_C_CONFIG_H*/
|
||||
|
||||
#ifndef INCLUDED_STDINT_H
|
||||
#define INCLUDED_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif /*INCLUDED_STDINT_H*/
|
||||
|
||||
#ifndef INCLUDED_STDBOOL_H
|
||||
#define INCLUDED_STDBOOL_H
|
||||
#include <stdbool.h>
|
||||
#endif /*INCLUDED_STDBOOL_H*/
|
||||
|
||||
#ifndef INCLUDED_STRING_H
|
||||
#define INCLUDED_STRING_H
|
||||
#include <string.h>
|
||||
#endif /*INCLUDED_STRING_H*/
|
||||
|
||||
#ifndef INCLUDED_TIME_H
|
||||
#define INCLUDED_TIME_H
|
||||
#include <time.h>
|
||||
#endif /*INCLUDED_TIME_H*/
|
||||
|
||||
#ifndef INCLUDED_INTTYPES_H
|
||||
#define INCLUDED_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#endif /*INCLUDED_INTTYPES_H*/
|
||||
|
||||
#ifndef INCLUDED_FLOAT_H
|
||||
#define INCLUDED_FLOAT_H
|
||||
#include <float.h>
|
||||
#endif /*INCLUDED_FLOAT_H*/
|
||||
|
||||
#ifndef INCLUDED_C_PLATFORM_H
|
||||
#include <c_Platform.h>
|
||||
#endif /*INCLUDED_C_PLATFORM_H*/
|
||||
|
||||
|
||||
#ifndef INCLUDED_C_COMPILER_H
|
||||
#include <c_Compiler.h>
|
||||
#endif /*INCLUDED_C_COMPILER_H*/
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------------------------ */
|
||||
/* TYPES */
|
||||
|
||||
#if (C_SIZEOF_VOID_P==8)
|
||||
typedef int64_t c_int_t;
|
||||
typedef uint64_t c_uint_t;
|
||||
typedef uint64_t c_size_t;
|
||||
typedef int64_t c_intptr_t;
|
||||
typedef uint64_t c_uintptr_t;
|
||||
#define C_INT_MIN INT64_MIN
|
||||
#define C_INT_MAX INT64_MAX
|
||||
#define C_UINT_MAX UINT64_MAX
|
||||
#define C_SIZE_MAX UINT64_MAX
|
||||
#define C_PRId PRId64
|
||||
#define C_PRIi PRIi64
|
||||
#define C_PRIo PRIo64
|
||||
#define C_PRIu PRIu64
|
||||
#define C_PRIx PRIx64
|
||||
#define C_PRIX PRIX64
|
||||
#define C_SCNd SCNd64
|
||||
#define C_SCNi SCNi64
|
||||
#define C_SCNo SCNo64
|
||||
#define C_SCNu SCNu64
|
||||
#define C_SCNx SCNx64
|
||||
#endif
|
||||
|
||||
#if (C_SIZEOF_VOID_P==4)
|
||||
typedef int32_t c_int_t;
|
||||
typedef uint32_t c_uint_t;
|
||||
typedef uint32_t c_size_t;
|
||||
typedef int32_t c_intptr_t;
|
||||
typedef uint32_t c_uintptr_t;
|
||||
#define C_INT_MIN INT32_MIN
|
||||
#define C_INT_MAX INT32_MAX
|
||||
#define C_UINT_MAX UINT32_MAX
|
||||
#define C_SIZE_MAX UINT32_MAX
|
||||
#define C_PRId PRId32
|
||||
#define C_PRIi PRIi32
|
||||
#define C_PRIo PRIo32
|
||||
#define C_PRIu PRIu32
|
||||
#define C_PRIx PRIx32
|
||||
#define C_PRIX PRIX32
|
||||
#define C_SCNd SCNd32
|
||||
#define C_SCNi SCNi32
|
||||
#define C_SCNo SCNo32
|
||||
#define C_SCNu SCNu32
|
||||
#define C_SCNx SCNx32
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------------------------ */
|
||||
/* ERRORS */
|
||||
|
||||
typedef int c_err_t;
|
||||
|
||||
#define C_ERR_OK 0
|
||||
#define C_ERR_FAIL (-1)
|
||||
#define C_ERR_NOTFOUND (-2)
|
||||
#define C_ERR_NOMEM (-3)
|
||||
#define C_ERR_NOTIMPLEMENTED (-4)
|
||||
#define C_ERR_PARAM (-5)
|
||||
#define C_ERR_OUTOFBOUND (-6)
|
||||
#define C_ERR_EMPTY (-7)
|
||||
#define C_ERR_FULL (-8)
|
||||
|
||||
#define C_SUCCESS C_ERR_OK
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------------------------ */
|
||||
/* */
|
||||
|
||||
#define c_bool_t bool
|
||||
#define C_TRUE true
|
||||
#define C_FALSE false
|
||||
|
||||
|
||||
#endif /*INCLUDED_C_TYPES_H*/
|
||||
Reference in New Issue
Block a user