Data stream output buffer.  
More...
#include <stdbool.h>
#include "util.h"
 
Go to the source code of this file.
Data stream output buffer. 
Definition in file output_buffer.h.
 
      
        
          | #define LSB_OUTPUT_SIZE   1024 | 
        
      
 
 
Resize the output buffer when more space is needed. 
- Parameters
 - 
  
    | b | Output buffer to resize.  | 
    | needed | Number of additional bytes needed. | 
  
   
- Returns
 - lsb_err_value NULL on success error message on failure 
 
 
 
Frees the memory internally allocated by the buffer and resets the state. 
- Parameters
 - 
  
  
 
 
 
Initialize the provided input buffer. 
- Parameters
 - 
  
    | b | Output buffer  | 
    | max_message_size | The maximum message size the buffer will handle before erroring | 
  
   
- Returns
 - lsb_err_value NULL on success error message on failure 
 
 
 
Append a character to the output buffer. 
- Parameters
 - 
  
    | b | Pointer the b buffer.  | 
    | ch | Character to append to the b. | 
  
   
- Returns
 - lsb_err_value NULL on success error message on failure 
 
 
 
More efficient output of a double to a string. 
NaN/Inf check and then calls lsb_outputfd.
- Parameters
 - 
  
    | b | Pointer the output buffer.  | 
    | d | Double value to convert to a string. | 
  
   
- Returns
 - lsb_err_value NULL on success error message on failure 
 
 
 
Append a formatted string to the output buffer. 
- Parameters
 - 
  
    | b | Pointer the b buffer.  | 
    | fmt | Printf format specifier. | 
  
   
- Returns
 - lsb_err_value NULL on success error message on failure 
 
 
 
More efficient output of a double to a string; no NaN or Inf outputs. 
- Parameters
 - 
  
    | b | Pointer the output buffer.  | 
    | d | Double value to convert to a string. | 
  
   
- Returns
 - lsb_err_value NULL on success error message on failure 
 
 
 
Append a fixed string to the output buffer. 
- Parameters
 - 
  
    | b | Pointer the b buffer.  | 
    | str | String to append to the b.  | 
    | len | Length of the string to append | 
  
   
- Returns
 - lsb_err_value NULL on success error message on failure