GCGlib
0.04.228
GCG Graphics Engine
|
Macros | |
#define | GCG_REPORT_CODE(t, d, m) (((((int) d) & (int) 0xff) << 3) | ((((int) m) & (int) 0x3ff) << 11) | ((((int) t) & (int) 0x07) << 0)) |
Composes an error/warning/information given a triple (TYPE, DOMAIN, MESSAGE) with 3, 8 and 10 bits respectively. More... | |
#define | GCG_REPORT_TYPE(c) ((((int) c) >> 0) & (int) 0x07) |
Extracts the TYPE from a report code. Uses 3 bits. More... | |
#define | GCG_REPORT_DOMAIN(c) ((((int) c) >> 3) & (int) 0xff) |
Extracts the DOMAIN from a report code. Uses 7 bits. More... | |
#define | GCG_REPORT_MESSAGE(c) ((((int) c) >> 11) & (int) 0x3ff) |
Extracts the MESSAGE from a report code. Uses 10 bits. More... | |
GCGlib has macros for report codes composition and decomposition from/into its components: type, domain, message.
#define GCG_REPORT_CODE | ( | t, | |
d, | |||
m | |||
) | (((((int) d) & (int) 0xff) << 3) | ((((int) m) & (int) 0x3ff) << 11) | ((((int) t) & (int) 0x07) << 0)) |
Composes an error/warning/information given a triple (TYPE, DOMAIN, MESSAGE) with 3, 8 and 10 bits respectively.
#define GCG_REPORT_DOMAIN | ( | c | ) | ((((int) c) >> 3) & (int) 0xff) |
Extracts the DOMAIN from a report code. Uses 7 bits.
#define GCG_REPORT_MESSAGE | ( | c | ) | ((((int) c) >> 11) & (int) 0x3ff) |
Extracts the MESSAGE from a report code. Uses 10 bits.
#define GCG_REPORT_TYPE | ( | c | ) | ((((int) c) >> 0) & (int) 0x07) |
Extracts the TYPE from a report code. Uses 3 bits.