P99
Modules | Macros | Functions

Macros that help in the handling of different kinds of types, forward declaring struct or union, and in handling enum. More...

+ Collaboration diagram for Type facilities:

Modules

 Type Names
 A bunch of types that are derived from the standard types.
 

Macros

#define P99_CONSTANT(T, NAME, INIT)   register T const NAME = INIT
 define a compile time constant NAME of type T with value INIT More...
 
#define P99_DECLARE_ENUM(T, ...)
 Declare a simple enumeration type. More...
 
#define P99_DECLARE_ENUM_GETNAME(T, ...)
 Declare a simple inline function to return strings containing the names of enumeration constants. More...
 
#define P99_DECLARE_ENUM_PARSE(T, ...)
 Declare a simple inline function to return the longest enumeration constants of type T found in a string. More...
 
#define P99_DECLARE_STRUCT(NAME)   typedef struct NAME NAME
 forward declaration of a struct NAME More...
 
#define P99_DECLARE_UNION(NAME)   typedef union NAME NAME
 forward declaration of a union NAME More...
 
#define P99_DEFINE_ENUM(T)
 Define the necessary symbols for a simple enumeration type. More...
 
#define P99_DEFINE_STRUCT(NAME, ...)
 Declare a structure of name NAME composed of the field declarations that are given in the remaining arguments. More...
 
#define P99_DEFINE_UNION(NAME, ...)
 definition of a union NAME More...
 
#define P99_DERIVED_TYPES(T)
 Declare trivial init and destroy functions for type T and its pointer derivatives. More...
 
#define P99_ENC(OBJ)   ((OBJ).p00_val)
 Access an encapsulated object. More...
 
#define P99_ENC_DECLARE(T, NAME)
 Encapsulate an object of type T in a new type called NAME. More...
 
#define P99_ENC_INIT(V)   { .p00_val = (V), }
 Initialize an encapsulated object. More...
 
#define P99_ENCP(OBJP)   ((OBJP)->p00_val)
 Access an encapsulated object through a pointer. More...
 
#define P99_EXT_ARITHMETIC_TYPES   P99_STD_ARITHMETIC_TYPES
 
#define P99_EXT_INTEGER_TYPES
 
#define P99_EXT_REAL_TYPES   P99_STD_REAL_TYPES
 
#define P99_LITERAL(...)   P99_SEQ(P00_LITERAL, __VA_ARGS__)
 Copy local variables back to the fields of same name inside a literal. More...
 
#define P99_PLAIN_TYPE(T)
 Declare trivial init and destroy functions for type T. More...
 
#define P99_POINTER_TYPE(T)
 Declare derived pointer types with endings "_ptr" and "_cptr". More...
 
#define P99_STD_ARITHMETIC_EXTS
 
#define P99_STD_ARITHMETIC_TYPES
 
#define P99_STD_BASIC_EXTS
 
#define P99_STD_BASIC_TYPES
 
#define P99_STD_CHARACTER_EXTS   c, hh, uhh
 
#define P99_STD_CHARACTER_TYPES
 
#define P99_STD_COMPLEX_EXTS   fc, dc, ldc
 
#define P99_STD_COMPLEX_TYPES
 
#define P99_STD_FLOATING_EXTS   P99_STD_REAL_FLOATING_EXTS, P99_STD_COMPLEX_EXTS
 
#define P99_STD_FLOATING_TYPES   P99_STD_REAL_FLOATING_TYPES, P99_STD_COMPLEX_TYPES
 
#define P99_STD_INTEGER_EXTS
 
#define P99_STD_INTEGER_TYPES
 
#define P99_STD_REAL_EXTS
 
#define P99_STD_REAL_FLOATING_EXTS   f, d, ld
 
#define P99_STD_REAL_FLOATING_TYPES
 
#define P99_STD_REAL_TYPES
 
#define P99_STD_SIGNED_EXTS   hh, h, i, l, ll
 
#define P99_STD_SIGNED_TYPES
 
#define P99_STD_UNSIGNED_EXTS   b, c, uhh, uh, u, ul, ull
 
#define P99_STD_UNSIGNED_TYPES
 
#define P99_STRUCT_LITERAL(TYPE, ...)   (TYPE){ P99_SEQ(P00_LITERAL, __VA_ARGS__) }
 Copy local variables back to the fields of same name inside a compound literal of type TYPE. More...
 
#define P99_STRUCT_TYPE0(TYPE, ...)   P99_FOR(TYPE, P99_NARG(__VA_ARGS__), P00_SEQ, P00_STRUCT_TYPE0, __VA_ARGS__)
 Transform the argument list into a list of lvalue for the fields of type TYPE. More...
 
#define P99_STRUCT_TYPES(TYPE, ...)   P99_FOR(TYPE, P99_NARG(__VA_ARGS__), P00_SEQ, P00_STRUCT_TYPES, __VA_ARGS__)
 Transform the argument list into a list of field types for type TYPE. More...
 
#define P99_STRUCT_UNUSE(TYPE, VAR, ...)   P99_FOR((TYPE, VAR), P99_NARG(__VA_ARGS__), P00_SEP, P00_STRUCT_UNUSE, __VA_ARGS__)
 Copy local variables back to the fields of variable VAR. More...
 
#define P99_STRUCT_USE(TYPE, VAR, ...)   P99_FOR((TYPE, VAR), P99_NARG(__VA_ARGS__), P00_SEP, P00_STRUCT_USE, __VA_ARGS__)
 Use the fields of variable VAR of type TYPE. More...
 
#define P99_UNUSED(...)   P99_SEP(P00_UNUSED, __VA_ARGS__)
 check if the list of expressions is syntactically valid but don't evaluate it More...
 

Functions

char const * bool_getname (bool p00_x)
 

Detailed Description

Macros that help in the handling of different kinds of types, forward declaring struct or union, and in handling enum.

void
void void
Definition: p99_bitset.h:84
P99_CONSTANT
#define P99_CONSTANT(T, NAME, INIT)
define a compile time constant NAME of type T with value INIT
Definition: p99_enum.h:258
P99_STD_INTEGER_TYPES
#define P99_STD_INTEGER_TYPES
Definition: p99_type.h:282
schar
signed char schar
a ‘one token’ abreviation for signed char
Definition: p99_typenames.h:45
P99_PASTE2
#define P99_PASTE2(_1, _2)
Paste two token sequences at their junction.
Definition: p99_paste.h:82
P99_DEFINE_ENUM
#define P99_DEFINE_ENUM(T)
Define the necessary symbols for a simple enumeration type.
Definition: p99_enum.h:178
cfloat
float _Complex cfloat
a ‘one token’ abreviation for float _Complex
Definition: p99_typenames.h:51
P99_UNUSED
#define P99_UNUSED(...)
check if the list of expressions is syntactically valid but don't evaluate it
Definition: p99_enum.h:215
P99_DECLARE_ENUM
#define P99_DECLARE_ENUM(T,...)
Declare a simple enumeration type.
Definition: p99_enum.h:139
P99_STD_SIGNED_EXTS
#define P99_STD_SIGNED_EXTS
Definition: p99_type.h:224
P99_INSTANTIATE
#define P99_INSTANTIATE(RT, NAME,...)
Instantiate an inline function.
Definition: p99_defarg.h:241
P99_STD_INTEGER_EXTS
#define P99_STD_INTEGER_EXTS
Definition: p99_type.h:286
P99_PLAIN_TYPE
#define P99_PLAIN_TYPE(T)
Declare trivial init and destroy functions for type T.
Definition: p99_type.h:142
P99_STD_SIGNED_TYPES
#define P99_STD_SIGNED_TYPES
Definition: p99_type.h:218
float
struct atomic_float float
Definition: p99_atomic.h:62