|
|
#define | _XOPEN_SOURCE 700 |
|
#define | _DEFAULT_SOURCE |
|
#define | ANSI_COLOR_BLACK "\033[30m" |
|
#define | ANSI_COLOR_RED "\033[31m" |
|
#define | ANSI_COLOR_GREEN "\033[32m" |
|
#define | ANSI_COLOR_YELLOW "\033[33m" |
|
#define | ANSI_COLOR_BLUE "\033[34m" |
|
#define | ANSI_COLOR_MAGENTA "\033[35m" |
|
#define | ANSI_COLOR_CYAN "\033[36m" |
|
#define | ANSI_COLOR_WHITE "\033[37m" |
|
#define | ANSI_COLOR_BRIGHT_BLACK "\033[1;30m" |
|
#define | ANSI_COLOR_BRIGHT_RED "\033[1;31m" |
|
#define | ANSI_COLOR_BRIGHT_GREEN "\033[1;32m" |
|
#define | ANSI_COLOR_BRIGHT_YELLOW "\033[1;33m" |
|
#define | ANSI_COLOR_BRIGHT_BLUE "\033[1;34m" |
|
#define | ANSI_COLOR_BRIGHT_MAGENTA "\033[1;35m" |
|
#define | ANSI_COLOR_BRIGHT_CYAN "\033[1;36m" |
|
#define | ANSI_COLOR_BRIGHT_WHITE "\033[1;37m" |
|
#define | ANSI_COLOR_RESET "\033[0m" |
|
#define | COLOR_ADDRESS ANSI_COLOR_BRIGHT_CYAN |
|
#define | COLOR_TYPETAGS ANSI_COLOR_BRIGHT_CYAN |
|
#define | COLOR_RESET ANSI_COLOR_RESET |
|
#define | SEPARATOR ':' |
| #define | INCP(bufp, amt) |
| #define | INCL(bufp, bufl, amt) |
| #define | ose_snprintfi(bufp, bufl, n, total, fmt, ...) |
|
|
static int32_t | _ose_pprintBundle (ose_bundle bundle, int32_t offset, char *buf, int32_t buflen, int32_t indent) |
|
int32_t | ose_pprintMessageAddr (ose_bundle bundle, int32_t offset, int32_t ao, char *buf, int32_t buflen) |
|
int32_t | ose_pprintPayloadItem_impl (ose_bundle bundle, const char typetag, const int32_t msg_offset, const int32_t item_offset, char *buf, int32_t buflen) |
|
int32_t | ose_pprintPayloadItem_hook (ose_bundle bundle, const char typetag, const int32_t msg_offset, const int32_t item_offset) |
|
static int32_t | _pprintPayloadItem (ose_bundle bundle, const char typetag, const int32_t msg_offset, const int32_t item_offset, char *buf, int32_t buflen) |
|
int32_t | ose_pprintBundleElem_msg (ose_bundle bundle, int32_t offset, char *buf, int32_t buflen, int32_t indent) |
|
int32_t | ose_pprintBundleElem (ose_bundle bundle, int32_t offset, char *buf, int32_t buflen, int32_t indent) |
|
int32_t | ose_pprintBundle (ose_bundle bundle, char *buf, int32_t buflen) |
|
static int32_t | ose_pprintFullBundle_r (ose_bundle bundle, char *buf, int32_t buflen, int32_t o, int32_t s, int32_t to, int32_t indent) |
|
int32_t | ose_pprintFullBundle_impl (ose_bundle bundle, char *buf, int32_t buflen, const char *const name) |
|
void | ose_pprintFullBundle (ose_bundle src, ose_bundle dest, const char *const name) |
| int32_t | ose_pprintBytes (const char *const bytes, int32_t n, char *buf, int32_t buflen) |
| | A packet's bytes as text, a four-byte word to a line: its offset, the bytes in hex, as characters, and as a big-endian int32. Raw bytes, whether or not they are a well-formed packet.
|
Rendering a bundle for a human to read.
Split out of ose_print.c, which was doing three unrelated jobs. Nothing in libose calls anything here – every caller is a host wanting to show a bundle to someone. What remains in ose_print.c is the part libose itself uses: ose_stackops.c converts values to strings, and that is an operation on a bundle rather than a way of displaying one.
The point of the separation is that a build can leave this out. It is roughly 750 lines that a small embedded build has no use for, and until now there was no way to not have it.