libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit c84dfab73816abe94060b6c784fef551d4bc6084
parent 23616b3c641d36b9faea97278fcfc91ca18f6d24
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 24 Jul 2012 19:48:28 +0000

-getting plugin main to compile

Diffstat:
Msrc/main/TODO | 1-
Msrc/main/extractor.c | 47++++-------------------------------------------
2 files changed, 4 insertions(+), 44 deletions(-)

diff --git a/src/main/TODO b/src/main/TODO @@ -1,4 +1,3 @@ -* extractor_plugin_main (a lot) * extractor_ipc.c (a bit) * extractor.c (a lot) * extractor_ipc_w32.c (a lot) diff --git a/src/main/extractor.c b/src/main/extractor.c @@ -25,55 +25,13 @@ #include <sys/types.h> #include <signal.h> #include <ltdl.h> - #include "extractor_datasource.h" #include "extractor_ipc.h" #include "extractor_plugpath.h" #include "extractor_plugins.h" -/** - * Maximum length of a Mime-Type string. - */ -#define MAX_MIME_LEN 256 - -/** - * Set to 1 to get failure info, - * 2 for actual debug info. - */ -#define DEBUG 1 - - -/** - * 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). - * - * @param fd fd to write into - * @param buf buffer to read from - * @param size number of bytes to write - * @return number of bytes written (that is 'size'), or -1 on error - */ -ssize_t -EXTRACTOR_write_all_ (int fd, - const void *buf, - size_t size) -{ - const char *data = buf; - size_t off = 0; - ssize_t ret; - - while (off < size) - { - ret = write (fd, &data[off], size - off); - if (ret <= 0) - return -1; - off += ret; - } - return size; -} - - +#if 0 /** * Open a file */ @@ -528,6 +486,9 @@ load_in_process_plugin (struct EXTRACTOR_PluginList *plugin) break; } } +#endif + + /**