libextractor  1.11
About: GNU libextractor is a library used to extract meta-data from files of arbitrary type.
  Fossies Dox: libextractor-1.11.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

extractor_common.h File Reference

commonly used functions within the library More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ssize_t EXTRACTOR_write_all_ (int fd, const void *buf, size_t size)
 
ssize_t EXTRACTOR_read_all_ (int fd, void *buf, size_t size)
 

Detailed Description

commonly used functions within the library

Author
Christian Grothoff

Definition in file extractor_common.h.

Function Documentation

◆ EXTRACTOR_read_all_()

ssize_t EXTRACTOR_read_all_ ( int  fd,
void *  buf,
size_t  size 
)

Read a buffer from a given descriptor.

Parameters
fddescriptor to read from
bufbuffer to fill
sizenumber of bytes to read into 'buf'
Returns
-1 on error, size on success

Definition at line 76 of file extractor_common.c.

References LOG_STRERROR.

Referenced by handle_init_message(), handle_start_message(), plugin_env_seek(), plugin_env_send_proc(), and process_requests().

◆ EXTRACTOR_write_all_()

ssize_t EXTRACTOR_write_all_ ( int  fd,
const void *  buf,
size_t  size 
)

Writes 'size' bytes from 'buf' to 'fd', returns only when writing is not possible, or when all 'size' bytes were written (never does partial writes).

Parameters
fdfd to write into
bufbuffer to read from
sizenumber of bytes to write
Returns
number of bytes written (that is 'size'), or -1 on error

Definition at line 44 of file extractor_common.c.

References LOG_STRERROR.

Referenced by handle_start_message(), plugin_env_seek(), and plugin_env_send_proc().