Lhogho
0.0.028
|
Go to the source code of this file.
Data Structures | |
struct | typeid_rec |
Macros | |
#define | C_TYPE_UNKNOWN 0 |
unknown C-type More... | |
#define | C_TYPE_STRUCT 1 |
struct C-type More... | |
#define | C_TYPE_SIGNED 2 |
signed integer C-type More... | |
#define | C_TYPE_UNSIGNED 3 |
unsigned integer C-type More... | |
#define | C_TYPE_FLOAT 4 |
float or double C-type More... | |
#define | C_TYPE_VOID 5 |
void C-type More... | |
#define | C_TYPE_POINTER 6 |
pointer C-type More... | |
#define | C_TYPE_STRING 7 |
string C-type More... | |
#define | C_TYPE_ATOM 8 |
Lhogho atom. More... | |
Typedefs | |
typedef struct typeid_rec | typeid_t |
description structure of a C-type identifiers More... | |
Functions | |
int | get_c_type (int static_link, atom_t parent, atom_t type) |
gets the C-type of a type More... | |
atom_t | traverse_pack (int static_link, atom_t parent, atom_t prototype, atom_t protodata, char *ptr, int mode) |
traverses packed data More... | |
Variables | |
typeid_t | c_types [] |
#define C_TYPE_UNKNOWN 0 |
Definition at line 37 of file external.h.
#define C_TYPE_STRUCT 1 |
Definition at line 38 of file external.h.
#define C_TYPE_SIGNED 2 |
Definition at line 39 of file external.h.
#define C_TYPE_UNSIGNED 3 |
Definition at line 40 of file external.h.
#define C_TYPE_FLOAT 4 |
Definition at line 41 of file external.h.
#define C_TYPE_VOID 5 |
Definition at line 42 of file external.h.
#define C_TYPE_POINTER 6 |
Definition at line 43 of file external.h.
#define C_TYPE_STRING 7 |
Definition at line 44 of file external.h.
#define C_TYPE_ATOM 8 |
Definition at line 45 of file external.h.
typedef struct typeid_rec typeid_t |
static_link | static link from the current frame |
parent | current parent |
type | word containing type name |
This function finds the C-type index of a type. This index can be used with c_types
[] array to get additional information about the C-type.
This function does not recurse into struct types.
Definition at line 296 of file external.c.
atom_t traverse_pack | ( | int | static_link, |
atom_t | parent, | ||
atom_t | prototype, | ||
atom_t | protodata, | ||
char * | ptr, | ||
int | mode | ||
) |
static_link | static link from the current frame |
parent | current parent |
prototype | list describing the c-type in the pack |
protodata | list containing the Logo data |
ptr | pointer to memory with C data |
mode | mode of traversal |
This function traverses a structure defined by c-type prototype and performs an action determined by mode
.
If mode
is MEM_STRUCT_SIZE
then only the size of the packed data is calculated. Parameters protodata
and ptr
are not used. The returned value is an integer atom containing the size.
If mode
is MEM_STRUCT_PACK
then Logo data from protodata
is packed into the memory pointed to by ptr
using the structure described in prototype
. The result is unbound atom.
If mode
is MEM_STRUCT_UNPACK
then packed data from ptr
is unpacked into a list of Logo data using the structure described in prototype
. The result of traverse_pack
is the list of Logo data.
Definition at line 347 of file external.c.
typeid_t c_types[] |
Definition at line 181 of file external.c.