| 27 */ |
27 */ |
| 28 |
28 |
| 29 #include "cx/streams.h" |
29 #include "cx/streams.h" |
| 30 #include "cx/allocator.h" |
30 #include "cx/allocator.h" |
| 31 |
31 |
| 32 #ifndef CX_STREAM_BCOPY_BUF_SIZE |
32 #ifndef cx_strEAM_BCOPY_BUF_SIZE |
| 33 #define CX_STREAM_BCOPY_BUF_SIZE 8192 |
33 #define cx_strEAM_BCOPY_BUF_SIZE 8192 |
| 34 #endif |
34 #endif |
| 35 |
35 |
| 36 #ifndef CX_STREAM_COPY_BUF_SIZE |
36 #ifndef cx_strEAM_COPY_BUF_SIZE |
| 37 #define CX_STREAM_COPY_BUF_SIZE 1024 |
37 #define cx_strEAM_COPY_BUF_SIZE 1024 |
| 38 #endif |
38 #endif |
| 39 |
39 |
| 40 size_t cx_stream_bncopy( |
40 size_t cx_stream_bncopy( |
| 41 void *src, |
41 void *src, |
| 42 void *dest, |
42 void *dest, |
| 86 void *dest, |
86 void *dest, |
| 87 cx_read_func rfnc, |
87 cx_read_func rfnc, |
| 88 cx_write_func wfnc, |
88 cx_write_func wfnc, |
| 89 size_t n |
89 size_t n |
| 90 ) { |
90 ) { |
| 91 char buf[CX_STREAM_COPY_BUF_SIZE]; |
91 char buf[cx_strEAM_COPY_BUF_SIZE]; |
| 92 return cx_stream_bncopy(src, dest, rfnc, wfnc, |
92 return cx_stream_bncopy(src, dest, rfnc, wfnc, |
| 93 buf, CX_STREAM_COPY_BUF_SIZE, n); |
93 buf, cx_strEAM_COPY_BUF_SIZE, n); |
| 94 } |
94 } |