maug
Quick and dirty C mini-augmentation library.
Loading...
Searching...
No Matches
uprintf.h File Reference
#include <mtypes.h>
#include <mlegacy.h>
Include dependency graph for uprintf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  MAUG_FMT_SPEC
 

Macros

#define UPRINTF_S16_FMT   "%d"
 
#define UPRINTF_U16_FMT   "%u"
 
#define UPRINTF_S16_DIGITS   5
 
#define UPRINTF_S32_FMT   "%ld"
 
#define UPRINTF_U32_FMT   "%lu"
 
#define UPRINTF_X32_FMT   "%lx"
 
#define NEWLINE_STR   "\n"
 
#define UPRINTF_BUFFER_SZ_MAX   1024
 
#define platform_file   FILE*
 
#define platform_fprintf   fprintf
 
#define platform_vfprintf   vfprintf
 
#define platform_fopen   fopen
 
#define platform_fflush   fflush
 
#define platform_fclose   fclose
 
#define LOG_ERR_TARGET   stderr
 
#define LOG_STD_TARGET   stdout
 
#define SIZE_T_FMT   "%u"
 
#define SSIZE_T_FMT   "%d"
 
#define OFF_T_FMT   "%lu"
 
#define UPRINTF_MS_FMT   UPRINTF_U32_FMT
 
#define DEBUG_THRESHOLD   1
 
#define debug_printf(...)
 
#define error_printf(...)
 
#define size_printf(...)
 
#define size_multi_printf(...)
 
#define logging_init()
 
#define logging_shutdown()
 
#define maug_bufcat(c, buf, buf_idx, buf_sz, cleanup)
 
#define maug_bufpad(pad_c, pad_sz, i, buf, buf_idx, buf_sz, cleanup)
 
#define maug_xtoa(num, base, rem, dest, dest_idx, digits, digits_done, pad)
 
#define maug_hctoi(c)
 Convert a single char hex digit to the int it represents.
 

Functions

int maug_digits (long int num, int base)
 
int maug_zdigits (size_t num, int base)
 
int maug_is_num (const char *str, size_t str_sz, uint8_t base, uint8_t sign)
 
int maug_is_float (const char *str, size_t str_sz)
 
int maug_itoa (long int num, char *dest, int dest_sz, int base)
 
int maug_utoa (uint32_t num, char *dest, int dest_sz, int base)
 
int maug_ztoa (size_t num, char *dest, int dest_sz, int base)
 
uint32_t maug_atou32 (const char *buffer, size_t buffer_sz, uint8_t base)
 
int32_t maug_atos32 (const char *buffer, size_t buffer_sz)
 
float maug_atof (const char *buffer, size_t buffer_sz)
 
void maug_str_upper (char *line, size_t line_sz)
 
void maug_str_lower (char *line, size_t line_sz)
 
MERROR_RETVAL maug_tok_str (size_t idx, const char *line, size_t line_sz, char *out, size_t out_sz)
 
MERROR_RETVAL maug_tok_int (size_t idx, const char *line, size_t line_sz, int16_t *out)
 
void maug_vsnprintf (char *buffer, int buffer_sz, const char *fmt, va_list vargs)
 
void maug_snprintf (char *buffer, int buffer_sz, const char *fmt,...)
 
void maug_printf (const char *fmt,...)
 

Variables

uint32_t g_maug_printf_line