universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: ucx: /home/mike/workspace/c/ucx/src/ucx/utils.h File Reference universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
universe@390:
ucx universe@390:
universe@390:
UAP Common Extensions
universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390:
universe@390: universe@390:
universe@390: universe@390: universe@390:
universe@390:
universe@390:
universe@390: Macros | universe@390: Functions
universe@390:
universe@390:
utils.h File Reference
universe@390:
universe@390:
universe@390: universe@390:

Compare, copy and printf functions. universe@390: More...

universe@390:
#include "ucx.h"
universe@390: #include "string.h"
universe@390: #include "allocator.h"
universe@390: #include <inttypes.h>
universe@390: #include <stdarg.h>
universe@390:
universe@390:

Go to the source code of this file.

universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:

universe@390: Macros

universe@390: #define UCX_STREAM_COPY_BUFSIZE   4096
 Default buffer size for ucx_stream_copy() and ucx_stream_ncopy().
 
#define ucx_stream_copy(src, dest, rfnc, wfnc)
 Shorthand for an unbounded ucx_stream_bncopy call using a default buffer. More...
 
#define ucx_stream_ncopy(src, dest, rfnc, wfnc, n)
 Shorthand for ucx_stream_bncopy using a default copy buffer. More...
 
#define ucx_stream_bcopy(src, dest, rfnc, wfnc, buf, bufsize)
 Shorthand for an unbounded ucx_stream_bncopy call using the specified buffer. More...
 
#define ucx_sprintf(...)   ucx_asprintf(ucx_default_allocator(), __VA_ARGS__)
 Shortcut for ucx_asprintf() with default allocator. More...
 
#define ucx_bprintf(buffer, ...)
 A printf() like function which writes the output to a UcxBuffer. More...
 
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:

universe@390: Functions

void * ucx_strcpy (const void *s, void *data)
 Copies a string. More...
 
void * ucx_memcpy (const void *m, void *n)
 Copies a memory area. More...
 
size_t ucx_stream_bncopy (void *src, void *dest, read_func rfnc, write_func wfnc, char *buf, size_t bufsize, size_t n)
 Reads data from a stream and writes it to another stream. More...
 
int ucx_cmp_str (const void *s1, const void *s2, void *data)
 Wraps the strcmp function. More...
 
int ucx_cmp_strn (const void *s1, const void *s2, void *n)
 Wraps the strncmp function. More...
 
int ucx_cmp_sstr (const void *s1, const void *s2, void *data)
 Wraps the sstrcmp function. More...
 
int ucx_cmp_int (const void *i1, const void *i2, void *data)
 Compares two integers of type int. More...
 
int ucx_cmp_longint (const void *i1, const void *i2, void *data)
 Compares two integers of type long int. More...
 
int ucx_cmp_longlong (const void *i1, const void *i2, void *data)
 Compares two integers of type long long. More...
 
int ucx_cmp_int16 (const void *i1, const void *i2, void *data)
 Compares two integers of type int16_t. More...
 
int ucx_cmp_int32 (const void *i1, const void *i2, void *data)
 Compares two integers of type int32_t. More...
 
int ucx_cmp_int64 (const void *i1, const void *i2, void *data)
 Compares two integers of type int64_t. More...
 
int ucx_cmp_uint (const void *i1, const void *i2, void *data)
 Compares two integers of type unsigned int. More...
 
int ucx_cmp_ulongint (const void *i1, const void *i2, void *data)
 Compares two integers of type unsigned long int. More...
 
int ucx_cmp_ulonglong (const void *i1, const void *i2, void *data)
 Compares two integers of type unsigned long long. More...
 
int ucx_cmp_uint16 (const void *i1, const void *i2, void *data)
 Compares two integers of type uint16_t. More...
 
int ucx_cmp_uint32 (const void *i1, const void *i2, void *data)
 Compares two integers of type uint32_t. More...
 
int ucx_cmp_uint64 (const void *i1, const void *i2, void *data)
 Compares two integers of type uint64_t. More...
 
intmax_t ucx_dist_int (const void *i1, const void *i2, void *data)
 Distance function for integers of type int. More...
 
intmax_t ucx_dist_longint (const void *i1, const void *i2, void *data)
 Distance function for integers of type long int. More...
 
intmax_t ucx_dist_longlong (const void *i1, const void *i2, void *data)
 Distance function for integers of type long long. More...
 
intmax_t ucx_dist_int16 (const void *i1, const void *i2, void *data)
 Distance function for integers of type int16_t. More...
 
intmax_t ucx_dist_int32 (const void *i1, const void *i2, void *data)
 Distance function for integers of type int32_t. More...
 
intmax_t ucx_dist_int64 (const void *i1, const void *i2, void *data)
 Distance function for integers of type int64_t. More...
 
intmax_t ucx_dist_uint (const void *i1, const void *i2, void *data)
 Distance function for integers of type unsigned int. More...
 
intmax_t ucx_dist_ulongint (const void *i1, const void *i2, void *data)
 Distance function for integers of type unsigned long int. More...
 
intmax_t ucx_dist_ulonglong (const void *i1, const void *i2, void *data)
 Distance function for integers of type unsigned long long. More...
 
intmax_t ucx_dist_uint16 (const void *i1, const void *i2, void *data)
 Distance function for integers of type uint16_t. More...
 
intmax_t ucx_dist_uint32 (const void *i1, const void *i2, void *data)
 Distance function for integers of type uint32_t. More...
 
intmax_t ucx_dist_uint64 (const void *i1, const void *i2, void *data)
 Distance function for integers of type uint64_t. More...
 
int ucx_cmp_float (const void *f1, const void *f2, void *data)
 Compares two real numbers of type float. More...
 
int ucx_cmp_double (const void *d1, const void *d2, void *data)
 Compares two real numbers of type double. More...
 
int ucx_cmp_ptr (const void *ptr1, const void *ptr2, void *data)
 Compares two pointers. More...
 
int ucx_cmp_mem (const void *ptr1, const void *ptr2, void *n)
 Compares two memory areas. More...
 
int ucx_fprintf (void *stream, write_func wfc, const char *fmt,...)
 A printf() like function which writes the output to a stream by using a write_func(). More...
 
int ucx_vfprintf (void *stream, write_func wfc, const char *fmt, va_list ap)
 va_list version of ucx_fprintf(). More...
 
sstr_t ucx_asprintf (UcxAllocator *allocator, const char *fmt,...)
 A printf() like function which allocates space for a sstr_t the result is written to. More...
 
sstr_t ucx_vasprintf (UcxAllocator *allocator, const char *fmt, va_list ap)
 va_list version of ucx_asprintf(). More...
 
universe@390:

Detailed Description

universe@390:

Compare, copy and printf functions.

universe@390:
Author
Mike Becker
universe@390:
universe@390: Olaf Wintermann
universe@390:

Macro Definition Documentation

universe@390: universe@390:

◆ ucx_bprintf

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
#define ucx_bprintf( buffer,
 ... 
)
universe@390:
universe@390: Value:
size_t ucx_buffer_write(const void *ptr, size_t size, size_t nitems, UcxBuffer *buffer)
Writes data to a UcxBuffer.
Definition: buffer.c:152
universe@390:
UCX Buffer.
Definition: buffer.h:73
universe@390:
int ucx_fprintf(void *stream, write_func wfc, const char *fmt,...)
A printf() like function which writes the output to a stream by using a write_func().
Definition: utils.c:343
universe@390:
size_t(* write_func)(const void *, size_t, size_t, void *)
Function pointer to a write function.
Definition: ucx.h:119
universe@390:
universe@390:

A printf() like function which writes the output to a UcxBuffer.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390:
bufferthe buffer the data is written to
...format string and additional arguments
universe@390:
universe@390:
universe@390:
Returns
the total number of bytes written
universe@390:
See also
ucx_fprintf()
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_sprintf

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
#define ucx_sprintf( ...)   ucx_asprintf(ucx_default_allocator(), __VA_ARGS__)
universe@390:
universe@390: universe@390:

Shortcut for ucx_asprintf() with default allocator.

universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_stream_bcopy

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
#define ucx_stream_bcopy( src,
 dest,
 rfnc,
 wfnc,
 buf,
 bufsize 
)
universe@390:
universe@390: Value:
src, dest, (read_func)rfnc, (write_func)wfnc, \
buf, bufsize, (size_t)-1)
size_t ucx_stream_bncopy(void *src, void *dest, read_func rfnc, write_func wfnc, char *buf, size_t bufsize, size_t n)
Reads data from a stream and writes it to another stream.
Definition: utils.c:52
universe@390:
size_t(* read_func)(void *, size_t, size_t, void *)
Function pointer to a read function.
Definition: ucx.h:132
universe@390:
size_t(* write_func)(const void *, size_t, size_t, void *)
Function pointer to a write function.
Definition: ucx.h:119
universe@390:
universe@390:

Shorthand for an unbounded ucx_stream_bncopy call using the specified buffer.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
srcthe source stream
destthe destination stream
rfncthe read function
wfncthe write function
bufa pointer to the copy buffer or NULL if a buffer shall be implicitly created on the heap
bufsizethe size of the copy buffer - if NULL was provided for buf, this is the size of the buffer that shall be implicitly created
universe@390:
universe@390:
universe@390:
Returns
total number of bytes copied
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_stream_copy

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
#define ucx_stream_copy( src,
 dest,
 rfnc,
 wfnc 
)
universe@390:
universe@390: Value:
src, dest, (read_func)rfnc, (write_func)wfnc, \
NULL, UCX_STREAM_COPY_BUFSIZE, (size_t)-1)
size_t ucx_stream_bncopy(void *src, void *dest, read_func rfnc, write_func wfnc, char *buf, size_t bufsize, size_t n)
Reads data from a stream and writes it to another stream.
Definition: utils.c:52
universe@390:
#define UCX_STREAM_COPY_BUFSIZE
Default buffer size for ucx_stream_copy() and ucx_stream_ncopy().
Definition: utils.h:55
universe@390:
size_t(* read_func)(void *, size_t, size_t, void *)
Function pointer to a read function.
Definition: ucx.h:132
universe@390:
size_t(* write_func)(const void *, size_t, size_t, void *)
Function pointer to a write function.
Definition: ucx.h:119
universe@390:
universe@390:

Shorthand for an unbounded ucx_stream_bncopy call using a default buffer.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
srcthe source stream
destthe destination stream
rfncthe read function
wfncthe write function
universe@390:
universe@390:
universe@390:
Returns
total number of bytes copied
universe@390:
See also
UCX_STREAM_COPY_BUFSIZE
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_stream_ncopy

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
#define ucx_stream_ncopy( src,
 dest,
 rfnc,
 wfnc,
 
)
universe@390:
universe@390: Value:
src, dest, (read_func)rfnc, (write_func)wfnc, \
size_t ucx_stream_bncopy(void *src, void *dest, read_func rfnc, write_func wfnc, char *buf, size_t bufsize, size_t n)
Reads data from a stream and writes it to another stream.
Definition: utils.c:52
universe@390:
#define UCX_STREAM_COPY_BUFSIZE
Default buffer size for ucx_stream_copy() and ucx_stream_ncopy().
Definition: utils.h:55
universe@390:
size_t(* read_func)(void *, size_t, size_t, void *)
Function pointer to a read function.
Definition: ucx.h:132
universe@390:
size_t(* write_func)(const void *, size_t, size_t, void *)
Function pointer to a write function.
Definition: ucx.h:119
universe@390:
universe@390:

Shorthand for ucx_stream_bncopy using a default copy buffer.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
srcthe source stream
destthe destination stream
rfncthe read function
wfncthe write function
nmaximum number of bytes that shall be copied
universe@390:
universe@390:
universe@390:
Returns
total number of bytes copied
universe@390: universe@390:
universe@390:
universe@390:

Function Documentation

universe@390: universe@390:

◆ ucx_asprintf()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
sstr_t ucx_asprintf (UcxAllocatorallocator,
const char * fmt,
 ... 
)
universe@390:
universe@390: universe@390:

A printf() like function which allocates space for a sstr_t the result is written to.

universe@390:

Attention: The sstr_t data is allocated with the allocators ucx_allocator_malloc() function. So it is implementation dependent, if the returned sstr_t.ptr pointer must be passed to the allocators ucx_allocator_free() function manually.

universe@390:

Note: The sstr_t.ptr of the return value will always be NULL-terminated.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
allocatorthe UcxAllocator used for allocating the result sstr_t
fmtformat string
...additional arguments
universe@390:
universe@390:
universe@390:
Returns
a sstr_t containing the formatted string
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_double()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_double (const void * d1,
const void * d2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two real numbers of type double.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
d1pointer to double one
d2pointer to double two
dataif provided: a pointer to precision (default: 1e-14)
universe@390:
universe@390:
universe@390:
Returns
-1, if *d1 is less than *d2, 0 if both are equal, 1 if *d1 is greater than *d2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_float()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_float (const void * f1,
const void * f2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two real numbers of type float.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
f1pointer to float one
f2pointer to float two
dataif provided: a pointer to precision (default: 1e-6f)
universe@390:
universe@390:
universe@390:
Returns
-1, if *f1 is less than *f2, 0 if both are equal, 1 if *f1 is greater than *f2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_int()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_int (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two integers of type int.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to integer one
i2pointer to integer two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1, if *i1 is less than *i2, 0 if both are equal, 1 if *i1 is greater than *i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_int16()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_int16 (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two integers of type int16_t.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to int16_t one
i2pointer to int16_t two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1, if *i1 is less than *i2, 0 if both are equal, 1 if *i1 is greater than *i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_int32()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_int32 (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two integers of type int32_t.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to int32_t one
i2pointer to int32_t two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1, if *i1 is less than *i2, 0 if both are equal, 1 if *i1 is greater than *i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_int64()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_int64 (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two integers of type int64_t.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to int64_t one
i2pointer to int64_t two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1, if *i1 is less than *i2, 0 if both are equal, 1 if *i1 is greater than *i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_longint()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_longint (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two integers of type long int.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to long integer one
i2pointer to long integer two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1, if *i1 is less than *i2, 0 if both are equal, 1 if *i1 is greater than *i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_longlong()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_longlong (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two integers of type long long.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to long long one
i2pointer to long long two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1, if *i1 is less than *i2, 0 if both are equal, 1 if *i1 is greater than *i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_mem()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_mem (const void * ptr1,
const void * ptr2,
void * n 
)
universe@390:
universe@390: universe@390:

Compares two memory areas.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
ptr1pointer one
ptr2pointer two
na pointer to the size_t containing the third parameter for memcmp
universe@390:
universe@390:
universe@390:
Returns
the result of memcmp(ptr1, ptr2, *n)
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_ptr()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_ptr (const void * ptr1,
const void * ptr2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two pointers.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
ptr1pointer one
ptr2pointer two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1 if ptr1 is less than ptr2, 0 if both are equal, 1 if ptr1 is greater than ptr2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_sstr()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_sstr (const void * s1,
const void * s2,
void * data 
)
universe@390:
universe@390: universe@390:

Wraps the sstrcmp function.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
s1sstr one
s2sstr two
dataignored
universe@390:
universe@390:
universe@390:
Returns
the result of sstrcmp(s1, s2)
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_str()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_str (const void * s1,
const void * s2,
void * data 
)
universe@390:
universe@390: universe@390:

Wraps the strcmp function.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
s1string one
s2string two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
the result of strcmp(s1, s2)
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_strn()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_strn (const void * s1,
const void * s2,
void * n 
)
universe@390:
universe@390: universe@390:

Wraps the strncmp function.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
s1string one
s2string two
na pointer to the size_t containing the third strncmp parameter
universe@390:
universe@390:
universe@390:
Returns
the result of strncmp(s1, s2, *n)
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_uint()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_uint (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two integers of type unsigned int.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to unsigned integer one
i2pointer to unsigned integer two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1, if *i1 is less than *i2, 0 if both are equal, 1 if *i1 is greater than *i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_uint16()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_uint16 (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two integers of type uint16_t.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to uint16_t one
i2pointer to uint16_t two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1, if *i1 is less than *i2, 0 if both are equal, 1 if *i1 is greater than *i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_uint32()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_uint32 (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two integers of type uint32_t.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to uint32_t one
i2pointer to uint32_t two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1, if *i1 is less than *i2, 0 if both are equal, 1 if *i1 is greater than *i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_uint64()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_uint64 (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two integers of type uint64_t.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to uint64_t one
i2pointer to uint64_t two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1, if *i1 is less than *i2, 0 if both are equal, 1 if *i1 is greater than *i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_ulongint()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_ulongint (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two integers of type unsigned long int.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to unsigned long integer one
i2pointer to unsigned long integer two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1, if *i1 is less than *i2, 0 if both are equal, 1 if *i1 is greater than *i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_cmp_ulonglong()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_cmp_ulonglong (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Compares two integers of type unsigned long long.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to unsigned long long one
i2pointer to unsigned long long two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
-1, if *i1 is less than *i2, 0 if both are equal, 1 if *i1 is greater than *i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_dist_int()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
intmax_t ucx_dist_int (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Distance function for integers of type int.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to integer one
i2pointer to integer two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
i1 minus i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_dist_int16()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
intmax_t ucx_dist_int16 (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Distance function for integers of type int16_t.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to int16_t one
i2pointer to int16_t two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
i1 minus i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_dist_int32()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
intmax_t ucx_dist_int32 (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Distance function for integers of type int32_t.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to int32_t one
i2pointer to int32_t two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
i1 minus i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_dist_int64()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
intmax_t ucx_dist_int64 (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Distance function for integers of type int64_t.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to int64_t one
i2pointer to int64_t two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
i1 minus i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_dist_longint()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
intmax_t ucx_dist_longint (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Distance function for integers of type long int.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to long integer one
i2pointer to long integer two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
i1 minus i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_dist_longlong()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
intmax_t ucx_dist_longlong (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Distance function for integers of type long long.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to long long one
i2pointer to long long two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
i1 minus i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_dist_uint()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
intmax_t ucx_dist_uint (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Distance function for integers of type unsigned int.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to unsigned integer one
i2pointer to unsigned integer two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
i1 minus i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_dist_uint16()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
intmax_t ucx_dist_uint16 (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Distance function for integers of type uint16_t.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to uint16_t one
i2pointer to uint16_t two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
i1 minus i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_dist_uint32()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
intmax_t ucx_dist_uint32 (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Distance function for integers of type uint32_t.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to uint32_t one
i2pointer to uint32_t two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
i1 minus i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_dist_uint64()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
intmax_t ucx_dist_uint64 (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Distance function for integers of type uint64_t.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to uint64_t one
i2pointer to uint64_t two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
i1 minus i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_dist_ulongint()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
intmax_t ucx_dist_ulongint (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Distance function for integers of type unsigned long int.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to unsigned long integer one
i2pointer to unsigned long integer two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
i1 minus i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_dist_ulonglong()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
intmax_t ucx_dist_ulonglong (const void * i1,
const void * i2,
void * data 
)
universe@390:
universe@390: universe@390:

Distance function for integers of type unsigned long long.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
i1pointer to unsigned long long one
i2pointer to unsigned long long two
dataomitted
universe@390:
universe@390:
universe@390:
Returns
i1 minus i2
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_fprintf()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_fprintf (void * stream,
write_func wfc,
const char * fmt,
 ... 
)
universe@390:
universe@390: universe@390:

A printf() like function which writes the output to a stream by using a write_func().

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
streamthe stream the data is written to
wfcthe write function
fmtformat string
...additional arguments
universe@390:
universe@390:
universe@390:
Returns
the total number of bytes written
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_memcpy()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
void* ucx_memcpy (const void * m,
void * n 
)
universe@390:
universe@390: universe@390:

Copies a memory area.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390:
ma pointer to the memory area
na pointer to the size_t containing the size of the memory area
universe@390:
universe@390:
universe@390:
Returns
a pointer to a copy of the specified memory area that can be passed to free(void*)
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_strcpy()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
void* ucx_strcpy (const void * s,
void * data 
)
universe@390:
universe@390: universe@390:

Copies a string.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390:
sthe string to copy
dataomitted
universe@390:
universe@390:
universe@390:
Returns
a pointer to a copy of s1 that can be passed to free(void*)
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_stream_bncopy()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
size_t ucx_stream_bncopy (void * src,
void * dest,
read_func rfnc,
write_func wfnc,
char * buf,
size_t bufsize,
size_t n 
)
universe@390:
universe@390: universe@390:

Reads data from a stream and writes it to another stream.

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
srcthe source stream
destthe destination stream
rfncthe read function
wfncthe write function
bufa pointer to the copy buffer or NULL if a buffer shall be implicitly created on the heap
bufsizethe size of the copy buffer - if NULL was provided for buf, this is the size of the buffer that shall be implicitly created
nthe maximum number of bytes that shall be copied
universe@390:
universe@390:
universe@390:
Returns
the total number of bytes copied
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_vasprintf()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
sstr_t ucx_vasprintf (UcxAllocatorallocator,
const char * fmt,
va_list ap 
)
universe@390:
universe@390: universe@390:

va_list version of ucx_asprintf().

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390:
allocatorthe UcxAllocator used for allocating the result sstr_t
fmtformat string
apargument list
universe@390:
universe@390:
universe@390:
Returns
a sstr_t containing the formatted string
universe@390:
See also
ucx_asprintf()
universe@390: universe@390:
universe@390:
universe@390: universe@390:

◆ ucx_vfprintf()

universe@390: universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
int ucx_vfprintf (void * stream,
write_func wfc,
const char * fmt,
va_list ap 
)
universe@390:
universe@390: universe@390:

va_list version of ucx_fprintf().

universe@390:
Parameters
universe@390: universe@390: universe@390: universe@390: universe@390: universe@390:
streamthe stream the data is written to
wfcthe write function
fmtformat string
apargument list
universe@390:
universe@390:
universe@390:
Returns
the total number of bytes written
universe@390:
See also
ucx_fprintf()
universe@390: universe@390:
universe@390:
universe@390:
universe@390: universe@390: universe@390: universe@390: