68 char *buf,
size_t bufsize,
size_t n);
83#define cx_stream_bcopy(src, dest, rfnc, wfnc, buf, bufsize) \
84 cx_stream_bncopy(src, dest, rfnc, wfnc, buf, bufsize, SIZE_MAX)
113#define cx_stream_copy(src, dest, rfnc, wfnc) \
114 cx_stream_ncopy(src, dest, rfnc, wfnc, SIZE_MAX)
Common definitions and feature checks.
#define cx_attr_nonnull
All pointer arguments must be non-NULL.
Definition common.h:141
size_t(* cx_write_func)(const void *, size_t, size_t, void *)
Function pointer compatible with fwrite-like functions.
Definition common.h:304
size_t(* cx_read_func)(void *, size_t, size_t, void *)
Function pointer compatible with fread-like functions.
Definition common.h:309
#define CX_EXPORT
Only used for building Windows DLLs.
Definition common.h:278
#define cx_attr_access_w(...)
Specifies that the function will only write through the given pointer.
Definition common.h:246
#define cx_attr_access_r(...)
Specifies that the function will only read through the given pointer.
Definition common.h:230
#define cx_attr_nonnull_arg(...)
The specified pointer arguments must be non-NULL.
Definition common.h:146
size_t cx_stream_ncopy(void *src, void *dest, cx_read_func rfnc, cx_write_func wfnc, size_t n)
Reads data from a stream and writes it to another stream.
size_t cx_stream_bncopy(void *src, void *dest, cx_read_func rfnc, cx_write_func wfnc, char *buf, size_t bufsize, size_t n)
Reads data from a stream and writes it to another stream.