mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
common: Add a function for copying data from one iobuf to another.
* common/iobuf.c (iobuf_copy): New function. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
parent
2b0e0a53b4
commit
fd4b9e2328
2 changed files with 43 additions and 0 deletions
|
@ -552,6 +552,14 @@ int iobuf_write_temp (iobuf_t dest, iobuf_t source);
|
|||
BUFFER. Returns the number of bytes actually copied. */
|
||||
size_t iobuf_temp_to_buffer (iobuf_t a, byte * buffer, size_t buflen);
|
||||
|
||||
/* Copies the data from the input iobuf SOURCE to the output iobuf
|
||||
DEST until either an error is encountered or EOF is reached.
|
||||
Returns the number of bytes successfully written. If an error
|
||||
occured, then any buffered bytes are not returned to SOURCE and are
|
||||
effectively lost. To check if an error occured, use
|
||||
iobuf_error. */
|
||||
size_t iobuf_copy (iobuf_t dest, iobuf_t source);
|
||||
|
||||
/* Return the size of any underlying file. This only works with
|
||||
file_filter based pipelines.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue