58__attribute__((__nonnull__(1, 2, 3), __format__(printf, 3, 4)))
115#define cx_asprintf(fmt, ...) \
116 cx_asprintf_a(cxDefaultAllocator, fmt, __VA_ARGS__)
148#define cx_vasprintf(fmt, ap) cx_vasprintf_a(cxDefaultAllocator, fmt, ap)
159#define cx_bprintf(buffer, fmt, ...) cx_fprintf((CxBuffer*)buffer, \
160 (cx_write_func) cxBufferWrite, fmt, __VA_ARGS__)
Common definitions and feature checks.
#define __attribute__(x)
Removes GNU C attributes where they are not supported.
Definition: common.h:127
size_t(* cx_write_func)(void const *, size_t, size_t, void *)
Function pointer compatible with fwrite-like functions.
Definition: common.h:103
cxmutstr cx_asprintf_a(CxAllocator const *allocator, char const *fmt,...)
A asprintf like function which allocates space for a string the result is written to.
int cx_vfprintf(void *stream, cx_write_func wfc, char const *fmt, va_list ap)
A vfprintf like function which writes the output to a stream by using a write_func.
cxmutstr cx_vasprintf_a(CxAllocator const *allocator, char const *fmt, va_list ap)
A vasprintf like function which allocates space for a string the result is written to.
int cx_fprintf(void *stream, cx_write_func wfc, char const *fmt,...)
A fprintf like function which writes the output to a stream by using a write_func.
Strings that know their length.
Structure holding the data for an allocator.
Definition: allocator.h:86
The UCX string structure.
Definition: string.h:46