|
EPICS Base
7.0.5.1
|
Miscellaneous macro definitions. More...
#include <stddef.h>

Go to the source code of this file.
Macros | |
| #define | TRUE 1 |
| #define | FALSE 0 |
| #define | LOCAL static |
Deprecated synonym for static. | |
| #define | NELEMENTS(array) (sizeof (array) / sizeof ((array) [0])) |
| Number of elements in array. | |
| #define | OFFSET(structure, member) offsetof(structure, member) |
Deprecated synonym for offsetof. | |
| #define | CONTAINER(ptr, structure, member) ((structure*)((char*)(ptr) - offsetof(structure, member))) |
| Find parent object from a member pointer. More... | |
| #define | PVNAME_STRINGSZ 61 |
| Size of a record name including the nil terminator. | |
| #define | PVNAME_SZ (PVNAME_STRINGSZ - 1) |
| Size of a record name without the nil terminator. | |
| #define | PVLINK_STRINGSZ 1024 |
| Buffer size for the string representation of a DBF_*LINK field. | |
| #define | DB_MAX_CHOICES 30 |
| dbAccess enums/menus can have up to this many choices | |
This file defines several miscellaneous macros.
Definition in file dbDefs.h.
| #define CONTAINER | ( | ptr, | |
| structure, | |||
| member | |||
| ) | ((structure*)((char*)(ptr) - offsetof(structure, member))) |
Subtracts the byte offset of the member in the structure from the pointer to the member itself, giving a pointer to parent strucure.
| ptr | Pointer to a member data field of a structure |
| structure | Type name of the parent structure |
| member | Field name of the data member |
1.8.13