9 #ifndef luasandbox_util_output_buffer_h_ 10 #define luasandbox_util_output_buffer_h_ 16 #define LSB_OUTPUT_SIZE 1024 const char * lsb_err_value
LSB_UTIL_EXPORT lsb_err_value lsb_outputd(lsb_output_buffer *b, double d)
More efficient output of a double to a string.
LSB_UTIL_EXPORT lsb_err_value lsb_expand_output_buffer(lsb_output_buffer *b, size_t needed)
Resize the output buffer when more space is needed.
struct lsb_output_buffer lsb_output_buffer
LSB_UTIL_EXPORT void lsb_free_output_buffer(lsb_output_buffer *b)
Frees the memory internally allocated by the buffer and resets the state.
Shared types and structures.
LSB_UTIL_EXPORT lsb_err_value lsb_outputfd(lsb_output_buffer *b, double d)
More efficient output of a double to a string; no NaN or Inf outputs.
LSB_UTIL_EXPORT lsb_err_value lsb_outputc(lsb_output_buffer *b, char ch)
Append a character to the output buffer.
LSB_UTIL_EXPORT lsb_err_value lsb_init_output_buffer(lsb_output_buffer *b, size_t max_message_size)
Initialize the provided input buffer.
LSB_UTIL_EXPORT lsb_err_value lsb_outputs(lsb_output_buffer *b, const char *str, size_t len)
Append a fixed string to the output buffer.
LSB_UTIL_EXPORT lsb_err_value lsb_outputf(lsb_output_buffer *b, const char *fmt,...)
Append a formatted string to the output buffer.