| 60 * If this is larger than @p bufsize, the content is copied over multiple |
60 * If this is larger than @p bufsize, the content is copied over multiple |
| 61 * iterations. |
61 * iterations. |
| 62 * @return the total number of bytes copied |
62 * @return the total number of bytes copied |
| 63 */ |
63 */ |
| 64 cx_attr_nonnull_arg(1, 2, 3, 4) |
64 cx_attr_nonnull_arg(1, 2, 3, 4) |
| 65 cx_attr_access_r(1) |
65 cx_attr_access_r(1) cx_attr_access_w(2) cx_attr_access_w(5) |
| 66 cx_attr_access_w(2) |
66 CX_EXPORT size_t cx_stream_bncopy(void *src, void *dest, |
| 67 cx_attr_access_w(5) |
67 cx_read_func rfnc, cx_write_func wfnc, |
| 68 cx_attr_export |
68 char *buf, size_t bufsize, size_t n); |
| 69 size_t cx_stream_bncopy( |
|
| 70 void *src, |
|
| 71 void *dest, |
|
| 72 cx_read_func rfnc, |
|
| 73 cx_write_func wfnc, |
|
| 74 char *buf, |
|
| 75 size_t bufsize, |
|
| 76 size_t n |
|
| 77 ); |
|
| 78 |
69 |
| 79 /** |
70 /** |
| 80 * Reads data from a stream and writes it to another stream. |
71 * Reads data from a stream and writes it to another stream. |
| 81 * |
72 * |
| 82 * @param src (@c void*) the source stream |
73 * @param src (@c void*) the source stream |
| 102 * @param rfnc the read function |
93 * @param rfnc the read function |
| 103 * @param wfnc the write function |
94 * @param wfnc the write function |
| 104 * @param n the maximum number of bytes that shall be copied. |
95 * @param n the maximum number of bytes that shall be copied. |
| 105 * @return total number of bytes copied |
96 * @return total number of bytes copied |
| 106 */ |
97 */ |
| 107 cx_attr_nonnull |
98 cx_attr_nonnull cx_attr_access_r(1) cx_attr_access_w(2) |
| 108 cx_attr_access_r(1) |
99 CX_EXPORT size_t cx_stream_ncopy(void *src, void *dest, |
| 109 cx_attr_access_w(2) |
100 cx_read_func rfnc, cx_write_func wfnc, size_t n); |
| 110 cx_attr_export |
|
| 111 size_t cx_stream_ncopy( |
|
| 112 void *src, |
|
| 113 void *dest, |
|
| 114 cx_read_func rfnc, |
|
| 115 cx_write_func wfnc, |
|
| 116 size_t n |
|
| 117 ); |
|
| 118 |
101 |
| 119 /** |
102 /** |
| 120 * Reads data from a stream and writes it to another stream. |
103 * Reads data from a stream and writes it to another stream. |
| 121 * |
104 * |
| 122 * The data is temporarily stored in a stack-allocated buffer. |
105 * The data is temporarily stored in a stack-allocated buffer. |