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: #define | UCX_STREAM_COPY_BUFSIZE 4096 |
universe@390: | Default buffer size for ucx_stream_copy() and ucx_stream_ncopy().
|
universe@390: |
universe@390: #define | ucx_stream_copy(src, dest, rfnc, wfnc) |
universe@390: | Shorthand for an unbounded ucx_stream_bncopy call using a default buffer. More...
|
universe@390: |
universe@390: #define | ucx_stream_ncopy(src, dest, rfnc, wfnc, n) |
universe@390: | Shorthand for ucx_stream_bncopy using a default copy buffer. More...
|
universe@390: |
universe@390: #define | ucx_stream_bcopy(src, dest, rfnc, wfnc, buf, bufsize) |
universe@390: | Shorthand for an unbounded ucx_stream_bncopy call using the specified buffer. More...
|
universe@390: |
universe@390: #define | ucx_sprintf(...) ucx_asprintf(ucx_default_allocator(), __VA_ARGS__) |
universe@390: | Shortcut for ucx_asprintf() with default allocator. More...
|
universe@390: |
universe@390: #define | ucx_bprintf(buffer, ...) |
universe@390: | A printf() like function which writes the output to a UcxBuffer. More...
|
universe@390: |
universe@390:
universe@390: |
universe@390: void * | ucx_strcpy (const void *s, void *data) |
universe@390: | Copies a string. More...
|
universe@390: |
universe@390: void * | ucx_memcpy (const void *m, void *n) |
universe@390: | Copies a memory area. More...
|
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: | Reads data from a stream and writes it to another stream. More...
|
universe@390: |
universe@390: int | ucx_cmp_str (const void *s1, const void *s2, void *data) |
universe@390: | Wraps the strcmp function. More...
|
universe@390: |
universe@390: int | ucx_cmp_strn (const void *s1, const void *s2, void *n) |
universe@390: | Wraps the strncmp function. More...
|
universe@390: |
universe@390: int | ucx_cmp_sstr (const void *s1, const void *s2, void *data) |
universe@390: | Wraps the sstrcmp function. More...
|
universe@390: |
universe@390: int | ucx_cmp_int (const void *i1, const void *i2, void *data) |
universe@390: | Compares two integers of type int. More...
|
universe@390: |
universe@390: int | ucx_cmp_longint (const void *i1, const void *i2, void *data) |
universe@390: | Compares two integers of type long int. More...
|
universe@390: |
universe@390: int | ucx_cmp_longlong (const void *i1, const void *i2, void *data) |
universe@390: | Compares two integers of type long long. More...
|
universe@390: |
universe@390: int | ucx_cmp_int16 (const void *i1, const void *i2, void *data) |
universe@390: | Compares two integers of type int16_t. More...
|
universe@390: |
universe@390: int | ucx_cmp_int32 (const void *i1, const void *i2, void *data) |
universe@390: | Compares two integers of type int32_t. More...
|
universe@390: |
universe@390: int | ucx_cmp_int64 (const void *i1, const void *i2, void *data) |
universe@390: | Compares two integers of type int64_t. More...
|
universe@390: |
universe@390: int | ucx_cmp_uint (const void *i1, const void *i2, void *data) |
universe@390: | Compares two integers of type unsigned int. More...
|
universe@390: |
universe@390: int | ucx_cmp_ulongint (const void *i1, const void *i2, void *data) |
universe@390: | Compares two integers of type unsigned long int. More...
|
universe@390: |
universe@390: int | ucx_cmp_ulonglong (const void *i1, const void *i2, void *data) |
universe@390: | Compares two integers of type unsigned long long. More...
|
universe@390: |
universe@390: int | ucx_cmp_uint16 (const void *i1, const void *i2, void *data) |
universe@390: | Compares two integers of type uint16_t. More...
|
universe@390: |
universe@390: int | ucx_cmp_uint32 (const void *i1, const void *i2, void *data) |
universe@390: | Compares two integers of type uint32_t. More...
|
universe@390: |
universe@390: int | ucx_cmp_uint64 (const void *i1, const void *i2, void *data) |
universe@390: | Compares two integers of type uint64_t. More...
|
universe@390: |
universe@390: intmax_t | ucx_dist_int (const void *i1, const void *i2, void *data) |
universe@390: | Distance function for integers of type int. More...
|
universe@390: |
universe@390: intmax_t | ucx_dist_longint (const void *i1, const void *i2, void *data) |
universe@390: | Distance function for integers of type long int. More...
|
universe@390: |
universe@390: intmax_t | ucx_dist_longlong (const void *i1, const void *i2, void *data) |
universe@390: | Distance function for integers of type long long. More...
|
universe@390: |
universe@390: intmax_t | ucx_dist_int16 (const void *i1, const void *i2, void *data) |
universe@390: | Distance function for integers of type int16_t. More...
|
universe@390: |
universe@390: intmax_t | ucx_dist_int32 (const void *i1, const void *i2, void *data) |
universe@390: | Distance function for integers of type int32_t. More...
|
universe@390: |
universe@390: intmax_t | ucx_dist_int64 (const void *i1, const void *i2, void *data) |
universe@390: | Distance function for integers of type int64_t. More...
|
universe@390: |
universe@390: intmax_t | ucx_dist_uint (const void *i1, const void *i2, void *data) |
universe@390: | Distance function for integers of type unsigned int. More...
|
universe@390: |
universe@390: intmax_t | ucx_dist_ulongint (const void *i1, const void *i2, void *data) |
universe@390: | Distance function for integers of type unsigned long int. More...
|
universe@390: |
universe@390: intmax_t | ucx_dist_ulonglong (const void *i1, const void *i2, void *data) |
universe@390: | Distance function for integers of type unsigned long long. More...
|
universe@390: |
universe@390: intmax_t | ucx_dist_uint16 (const void *i1, const void *i2, void *data) |
universe@390: | Distance function for integers of type uint16_t. More...
|
universe@390: |
universe@390: intmax_t | ucx_dist_uint32 (const void *i1, const void *i2, void *data) |
universe@390: | Distance function for integers of type uint32_t. More...
|
universe@390: |
universe@390: intmax_t | ucx_dist_uint64 (const void *i1, const void *i2, void *data) |
universe@390: | Distance function for integers of type uint64_t. More...
|
universe@390: |
universe@390: int | ucx_cmp_float (const void *f1, const void *f2, void *data) |
universe@390: | Compares two real numbers of type float. More...
|
universe@390: |
universe@390: int | ucx_cmp_double (const void *d1, const void *d2, void *data) |
universe@390: | Compares two real numbers of type double. More...
|
universe@390: |
universe@390: int | ucx_cmp_ptr (const void *ptr1, const void *ptr2, void *data) |
universe@390: | Compares two pointers. More...
|
universe@390: |
universe@390: int | ucx_cmp_mem (const void *ptr1, const void *ptr2, void *n) |
universe@390: | Compares two memory areas. More...
|
universe@390: |
universe@390: int | ucx_fprintf (void *stream, write_func wfc, const char *fmt,...) |
universe@390: | A printf() like function which writes the output to a stream by using a write_func(). More...
|
universe@390: |
universe@390: int | ucx_vfprintf (void *stream, write_func wfc, const char *fmt, va_list ap) |
universe@390: | va_list version of ucx_fprintf(). More...
|
universe@390: |
universe@390: sstr_t | ucx_asprintf (UcxAllocator *allocator, const char *fmt,...) |
universe@390: | A printf() like function which allocates space for a sstr_t the result is written to. More...
|
universe@390: |
universe@390: sstr_t | ucx_vasprintf (UcxAllocator *allocator, const char *fmt, va_list ap) |
universe@390: | va_list version of ucx_asprintf(). More...
|
universe@390: |
universe@390:
universe@390:
universe@390:
Compare, copy and printf functions.
universe@390:
- Author
- Mike Becker
universe@390: -
universe@390: Olaf Wintermann
universe@390:
universe@390:
universe@390:
◆ ucx_bprintf
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
universe@390: #define ucx_bprintf |
universe@390: ( |
universe@390: |
universe@390: buffer, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: ... |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
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: buffer | the buffer the data is written to |
universe@390: ... | format string and additional arguments |
universe@390:
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: #define ucx_sprintf |
universe@390: ( |
universe@390: |
universe@390: ... | ) |
universe@390: ucx_asprintf(ucx_default_allocator(), __VA_ARGS__) |
universe@390:
universe@390:
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: #define ucx_stream_bcopy |
universe@390: ( |
universe@390: |
universe@390: src, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: dest, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: rfnc, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: wfnc, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: buf, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: bufsize |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
Value: 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: src | the source stream |
universe@390: dest | the destination stream |
universe@390: rfnc | the read function |
universe@390: wfnc | the write function |
universe@390: buf | a pointer to the copy buffer or NULL if a buffer shall be implicitly created on the heap |
universe@390: bufsize | the 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:
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: #define ucx_stream_copy |
universe@390: ( |
universe@390: |
universe@390: src, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: dest, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: rfnc, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: wfnc |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
Value: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: src | the source stream |
universe@390: dest | the destination stream |
universe@390: rfnc | the read function |
universe@390: wfnc | the write function |
universe@390:
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: #define ucx_stream_ncopy |
universe@390: ( |
universe@390: |
universe@390: src, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: dest, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: rfnc, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: wfnc, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: n |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
Value: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: src | the source stream |
universe@390: dest | the destination stream |
universe@390: rfnc | the read function |
universe@390: wfnc | the write function |
universe@390: n | maximum number of bytes that shall be copied |
universe@390:
universe@390:
universe@390:
universe@390:
- Returns
- total number of bytes copied
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
◆ ucx_asprintf()
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
universe@390: sstr_t ucx_asprintf |
universe@390: ( |
universe@390: UcxAllocator * |
universe@390: allocator, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const char * |
universe@390: fmt, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: ... |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
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: allocator | the UcxAllocator used for allocating the result sstr_t |
universe@390: fmt | format string |
universe@390: ... | additional arguments |
universe@390:
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: int ucx_cmp_double |
universe@390: ( |
universe@390: const void * |
universe@390: d1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: d2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two real numbers of type double.
universe@390:
- Parameters
-
universe@390:
universe@390: d1 | pointer to double one |
universe@390: d2 | pointer to double two |
universe@390: data | if provided: a pointer to precision (default: 1e-14) |
universe@390:
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: int ucx_cmp_float |
universe@390: ( |
universe@390: const void * |
universe@390: f1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: f2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two real numbers of type float.
universe@390:
- Parameters
-
universe@390:
universe@390: f1 | pointer to float one |
universe@390: f2 | pointer to float two |
universe@390: data | if provided: a pointer to precision (default: 1e-6f) |
universe@390:
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: int ucx_cmp_int |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two integers of type int.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to integer one |
universe@390: i2 | pointer to integer two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_int16 |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two integers of type int16_t.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to int16_t one |
universe@390: i2 | pointer to int16_t two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_int32 |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two integers of type int32_t.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to int32_t one |
universe@390: i2 | pointer to int32_t two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_int64 |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two integers of type int64_t.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to int64_t one |
universe@390: i2 | pointer to int64_t two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_longint |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two integers of type long int.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to long integer one |
universe@390: i2 | pointer to long integer two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_longlong |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two integers of type long long.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to long long one |
universe@390: i2 | pointer to long long two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_mem |
universe@390: ( |
universe@390: const void * |
universe@390: ptr1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: ptr2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: n |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two memory areas.
universe@390:
- Parameters
-
universe@390:
universe@390: ptr1 | pointer one |
universe@390: ptr2 | pointer two |
universe@390: n | a pointer to the size_t containing the third parameter for memcmp |
universe@390:
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: int ucx_cmp_ptr |
universe@390: ( |
universe@390: const void * |
universe@390: ptr1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: ptr2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two pointers.
universe@390:
- Parameters
-
universe@390:
universe@390: ptr1 | pointer one |
universe@390: ptr2 | pointer two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_sstr |
universe@390: ( |
universe@390: const void * |
universe@390: s1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: s2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Wraps the sstrcmp function.
universe@390:
- Parameters
-
universe@390:
universe@390: s1 | sstr one |
universe@390: s2 | sstr two |
universe@390: data | ignored |
universe@390:
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: int ucx_cmp_str |
universe@390: ( |
universe@390: const void * |
universe@390: s1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: s2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Wraps the strcmp function.
universe@390:
- Parameters
-
universe@390:
universe@390: s1 | string one |
universe@390: s2 | string two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_strn |
universe@390: ( |
universe@390: const void * |
universe@390: s1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: s2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: n |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Wraps the strncmp function.
universe@390:
- Parameters
-
universe@390:
universe@390: s1 | string one |
universe@390: s2 | string two |
universe@390: n | a pointer to the size_t containing the third strncmp parameter |
universe@390:
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: int ucx_cmp_uint |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two integers of type unsigned int.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to unsigned integer one |
universe@390: i2 | pointer to unsigned integer two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_uint16 |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two integers of type uint16_t.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to uint16_t one |
universe@390: i2 | pointer to uint16_t two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_uint32 |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two integers of type uint32_t.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to uint32_t one |
universe@390: i2 | pointer to uint32_t two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_uint64 |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two integers of type uint64_t.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to uint64_t one |
universe@390: i2 | pointer to uint64_t two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_ulongint |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two integers of type unsigned long int.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to unsigned long integer one |
universe@390: i2 | pointer to unsigned long integer two |
universe@390: data | omitted |
universe@390:
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: int ucx_cmp_ulonglong |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Compares two integers of type unsigned long long.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to unsigned long long one |
universe@390: i2 | pointer to unsigned long long two |
universe@390: data | omitted |
universe@390:
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: intmax_t ucx_dist_int |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Distance function for integers of type int.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to integer one |
universe@390: i2 | pointer to integer two |
universe@390: data | omitted |
universe@390:
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: intmax_t ucx_dist_int16 |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Distance function for integers of type int16_t.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to int16_t one |
universe@390: i2 | pointer to int16_t two |
universe@390: data | omitted |
universe@390:
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: intmax_t ucx_dist_int32 |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Distance function for integers of type int32_t.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to int32_t one |
universe@390: i2 | pointer to int32_t two |
universe@390: data | omitted |
universe@390:
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: intmax_t ucx_dist_int64 |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Distance function for integers of type int64_t.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to int64_t one |
universe@390: i2 | pointer to int64_t two |
universe@390: data | omitted |
universe@390:
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: intmax_t ucx_dist_longint |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Distance function for integers of type long int.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to long integer one |
universe@390: i2 | pointer to long integer two |
universe@390: data | omitted |
universe@390:
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: intmax_t ucx_dist_longlong |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Distance function for integers of type long long.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to long long one |
universe@390: i2 | pointer to long long two |
universe@390: data | omitted |
universe@390:
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: intmax_t ucx_dist_uint |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Distance function for integers of type unsigned int.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to unsigned integer one |
universe@390: i2 | pointer to unsigned integer two |
universe@390: data | omitted |
universe@390:
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: intmax_t ucx_dist_uint16 |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Distance function for integers of type uint16_t.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to uint16_t one |
universe@390: i2 | pointer to uint16_t two |
universe@390: data | omitted |
universe@390:
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: intmax_t ucx_dist_uint32 |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Distance function for integers of type uint32_t.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to uint32_t one |
universe@390: i2 | pointer to uint32_t two |
universe@390: data | omitted |
universe@390:
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: intmax_t ucx_dist_uint64 |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Distance function for integers of type uint64_t.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to uint64_t one |
universe@390: i2 | pointer to uint64_t two |
universe@390: data | omitted |
universe@390:
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: intmax_t ucx_dist_ulongint |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Distance function for integers of type unsigned long int.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to unsigned long integer one |
universe@390: i2 | pointer to unsigned long integer two |
universe@390: data | omitted |
universe@390:
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: intmax_t ucx_dist_ulonglong |
universe@390: ( |
universe@390: const void * |
universe@390: i1, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const void * |
universe@390: i2, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Distance function for integers of type unsigned long long.
universe@390:
- Parameters
-
universe@390:
universe@390: i1 | pointer to unsigned long long one |
universe@390: i2 | pointer to unsigned long long two |
universe@390: data | omitted |
universe@390:
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: int ucx_fprintf |
universe@390: ( |
universe@390: void * |
universe@390: stream, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: write_func |
universe@390: wfc, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const char * |
universe@390: fmt, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: |
universe@390: ... |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
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: stream | the stream the data is written to |
universe@390: wfc | the write function |
universe@390: fmt | format string |
universe@390: ... | additional arguments |
universe@390:
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: void* ucx_memcpy |
universe@390: ( |
universe@390: const void * |
universe@390: m, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: n |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Copies a memory area.
universe@390:
- Parameters
-
universe@390:
universe@390: m | a pointer to the memory area |
universe@390: n | a pointer to the size_t containing the size of the memory area |
universe@390:
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: void* ucx_strcpy |
universe@390: ( |
universe@390: const void * |
universe@390: s, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: data |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Copies a string.
universe@390:
- Parameters
-
universe@390:
universe@390: s | the string to copy |
universe@390: data | omitted |
universe@390:
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: size_t ucx_stream_bncopy |
universe@390: ( |
universe@390: void * |
universe@390: src, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: void * |
universe@390: dest, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: read_func |
universe@390: rfnc, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: write_func |
universe@390: wfnc, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: char * |
universe@390: buf, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: size_t |
universe@390: bufsize, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: size_t |
universe@390: n |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
Reads data from a stream and writes it to another stream.
universe@390:
- Parameters
-
universe@390:
universe@390: src | the source stream |
universe@390: dest | the destination stream |
universe@390: rfnc | the read function |
universe@390: wfnc | the write function |
universe@390: buf | a pointer to the copy buffer or NULL if a buffer shall be implicitly created on the heap |
universe@390: bufsize | the 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: n | the maximum number of bytes that shall be copied |
universe@390:
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: sstr_t ucx_vasprintf |
universe@390: ( |
universe@390: UcxAllocator * |
universe@390: allocator, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const char * |
universe@390: fmt, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: va_list |
universe@390: ap |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
va_list
version of ucx_asprintf().
universe@390:
- Parameters
-
universe@390:
universe@390: allocator | the UcxAllocator used for allocating the result sstr_t |
universe@390: fmt | format string |
universe@390: ap | argument list |
universe@390:
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: int ucx_vfprintf |
universe@390: ( |
universe@390: void * |
universe@390: stream, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: write_func |
universe@390: wfc, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: const char * |
universe@390: fmt, |
universe@390:
universe@390:
universe@390: |
universe@390: |
universe@390: va_list |
universe@390: ap |
universe@390:
universe@390:
universe@390: |
universe@390: ) |
universe@390: | |
universe@390:
universe@390:
universe@390:
universe@390:
universe@390:
va_list
version of ucx_fprintf().
universe@390:
- Parameters
-
universe@390:
universe@390: stream | the stream the data is written to |
universe@390: wfc | the write function |
universe@390: fmt | format string |
universe@390: ap | argument list |
universe@390:
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: