PIPS
|
#include <inttypes.h>
Go to the source code of this file.
Macros | |
#define | string_undefined ((string)-15) |
#define | string_undefined_p(s) ((s)==string_undefined) |
#define | copy_string(s) strdup(s) |
#define | _intFMT PRIuPTR |
#define | _uintFMT "u" PRIuPTR |
#define | _int_undefined ((_int)-15) /**SG: this is dangerous: a valid value is used to state an invalid value */ |
#define | _int_undefined_p(i) ((i)==_int_undefined) |
#define | BOOLEAN_INCLUDED |
_int_undefined More... | |
#define | false 0 |
#define | true 1 |
#define | bool_undefined ((bool)-15) /**SG: this is a dangerous semantic: bool_undefined evaluates to true ... */ |
#define | bool_undefined_p(b) ((b)==bool_undefined) |
#define | tag_undefined (-3) |
#define | UU ((void*)0) |
#define | UUINT(i) ((void*)(i)) |
#define | array_undefined NULL |
ARRAY. More... | |
#define | array_undefined_p(a) ((a)==NULL) |
#define | NEWGEN_MACRO_NAME_1(prefix, x) prefix##x |
Some CPP magics to get a line-number-dependent "unique" identifier to have list iteration variable with unique names and avoid conflicts if we have multiple FOREACH in the same statement block: More... | |
#define | NEWGEN_MACRO_NAME_2(prefix, x) NEWGEN_MACRO_NAME_1 (prefix, x) |
#define | NGMID(f) NEWGEN_MACRO_NAME_2(_ ## f ## _, __LINE__) |
#define | GEN_PROTO(x) () |
Typedefs | |
typedef char * | string |
STRING. More... | |
typedef intptr_t | _int |
_INT More... | |
typedef uintptr_t | _uint |
typedef int | bool |
we cannot use an enum or stdbool because we need to be compatible with newgen, thus boolean need to handle 3 states : true, false, and undefined More... | |
typedef int | tag |
TAG. More... | |
typedef int | unit |
UNIT. More... | |
typedef struct cons * | list |
typedef bool(* | gen_filter_func_t) (const void *) |
typedef bool(* | gen_filter2_func_t) (const void *, const void *) |
typedef string(* | gen_string_func_t) (const void *) |
typedef int(* | gen_cmp_func_t) (const void *, const void *) |
typedef bool(* | gen_eq_func_t) (const void *, const void *) |
typedef void(* | gen_iter_func_t) (void *) |
#define _int_undefined ((_int)-15) /**SG: this is dangerous: a valid value is used to state an invalid value */ |
Definition at line 59 of file newgen_types.h.
#define _int_undefined_p | ( | i | ) | ((i)==_int_undefined) |
Definition at line 60 of file newgen_types.h.
#define _intFMT PRIuPTR |
Definition at line 57 of file newgen_types.h.
#define _uintFMT "u" PRIuPTR |
Definition at line 58 of file newgen_types.h.
#define array_undefined NULL |
ARRAY.
Definition at line 103 of file newgen_types.h.
#define array_undefined_p | ( | a | ) | ((a)==NULL) |
Definition at line 104 of file newgen_types.h.
#define bool_undefined ((bool)-15) /**SG: this is a dangerous semantic: bool_undefined evaluates to true ... */ |
Definition at line 84 of file newgen_types.h.
#define bool_undefined_p | ( | b | ) | ((b)==bool_undefined) |
Definition at line 85 of file newgen_types.h.
#define BOOLEAN_INCLUDED |
_int_undefined
BOOL SG: _Bool is not compatible with newgen because it does not permit the definition of an ‘undefined’ state we use the int type for compatible behavior similar to linear ...
Definition at line 70 of file newgen_types.h.
#define copy_string | ( | s | ) | strdup(s) |
Definition at line 42 of file newgen_types.h.
#define false 0 |
Definition at line 80 of file newgen_types.h.
#define GEN_PROTO | ( | x | ) | () |
Definition at line 135 of file newgen_types.h.
Some CPP magics to get a line-number-dependent "unique" identifier to have list iteration variable with unique names and avoid conflicts if we have multiple FOREACH in the same statement block:
Definition at line 123 of file newgen_types.h.
#define NEWGEN_MACRO_NAME_2 | ( | prefix, | |
x | |||
) | NEWGEN_MACRO_NAME_1 (prefix, x) |
Definition at line 124 of file newgen_types.h.
#define NGMID | ( | f | ) | NEWGEN_MACRO_NAME_2(_ ## f ## _, __LINE__) |
Definition at line 126 of file newgen_types.h.
#define string_undefined ((string)-15) |
Definition at line 40 of file newgen_types.h.
#define string_undefined_p | ( | s | ) | ((s)==string_undefined) |
Definition at line 41 of file newgen_types.h.
#define tag_undefined (-3) |
Definition at line 93 of file newgen_types.h.
#define true 1 |
Definition at line 81 of file newgen_types.h.
#define UU ((void*)0) |
Definition at line 98 of file newgen_types.h.
#define UUINT | ( | i | ) | ((void*)(i)) |
Definition at line 99 of file newgen_types.h.
_INT
RK wants an "int" which is the size of a "pointer". However, the use of the relevant "intptr_t" type in the code amounts to source file defacing, hence this definition. FC. The ifndef macro is to avoid a double definition if the type needs to be defined in the C3/linear library as well.
Definition at line 53 of file newgen_types.h.
Definition at line 54 of file newgen_types.h.
we cannot use an enum or stdbool because we need to be compatible with newgen, thus boolean need to handle 3 states : true, false, and undefined
Definition at line 78 of file newgen_types.h.
typedef int(* gen_cmp_func_t) (const void *, const void *) |
Definition at line 114 of file newgen_types.h.
typedef bool(* gen_eq_func_t) (const void *, const void *) |
Definition at line 115 of file newgen_types.h.
typedef bool(* gen_filter2_func_t) (const void *, const void *) |
Definition at line 110 of file newgen_types.h.
typedef bool(* gen_filter_func_t) (const void *) |
Definition at line 109 of file newgen_types.h.
typedef void(* gen_iter_func_t) (void *) |
Definition at line 116 of file newgen_types.h.
typedef string(* gen_string_func_t) (const void *) |
Definition at line 111 of file newgen_types.h.
Definition at line 106 of file newgen_types.h.
typedef char* string |
STRING.
Definition at line 39 of file newgen_types.h.
TAG.
Definition at line 92 of file newgen_types.h.
UNIT.
Definition at line 97 of file newgen_types.h.