#include <stdint.h>
#include "lbm_types.h"
Go to the source code of this file.
◆ lbm_print_init()
int lbm_print_init |
( |
lbm_uint |
print_stack_size | ) |
|
Initialize the print_value subsystem. print value depends on a stack and that stack is initialized here using a storage array provided by the user.
- Parameters
-
print_stack_size | The number of uint32_t elements in the array. |
- Returns
- 1 for success and 0 for failure.
◆ lbm_print_value()
int lbm_print_value |
( |
char * |
buf, |
|
|
unsigned int |
len, |
|
|
lbm_value |
t |
|
) |
| |
Print an lbm_value into a buffer provided by the user. If printing fails, the buffer may contain an error message.
- Parameters
-
buf | Buffer to print into. |
len | The size of the buffer in bytes. |
t | The value to print. |
- Returns
- negative number for failure and the number of printed characters on success.
◆ lbm_value_is_printable_string()
bool lbm_value_is_printable_string |
( |
lbm_value |
v, |
|
|
char ** |
str |
|
) |
| |
Check if an lbm_value (very likely) is a printable string
- Parameters
-
v | Value to check stringyness of. |
- Returns
- True if the value likely is a string, otherwise false.