libextractor

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

commit f9c33234901efb4526a1bbddf43f80afcb9591eb
parent 9a921d630cd8181f302ce1fb026d1dfbb94f1362
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  5 Aug 2012 18:35:58 +0000

-minor cleanups

Diffstat:
Msrc/common/convert.c | 11+++++++++--
Msrc/common/convert.h | 20++++++++++++--------
Msrc/common/pack.h | 9+++++++--
Msrc/plugins/Makefile.am | 3---
4 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/src/common/convert.c b/src/common/convert.c @@ -4,7 +4,7 @@ libextractor is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 2, or (at your + by the Free Software Foundation; either version 3, or (at your option) any later version. libextractor is distributed in the hope that it will be useful, but @@ -26,12 +26,19 @@ * Convert the len characters long character sequence * given in input that is in the given charset * to UTF-8. + * + * @param input string to convert + * @param len number of bytes in input + * @param charset input character set + * @return the converted string (0-terminated), NULL on error * @return the converted string (0-terminated), * if conversion fails, a copy of the orignal * string is returned. */ char * -EXTRACTOR_common_convert_to_utf8 (const char *input, size_t len, const char *charset) +EXTRACTOR_common_convert_to_utf8 (const char *input, + size_t len, + const char *charset) { size_t tmpSize; size_t finSize; diff --git a/src/common/convert.h b/src/common/convert.h @@ -4,7 +4,7 @@ libextractor is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 2, or (at your + by the Free Software Foundation; either version 3, or (at your option) any later version. libextractor is distributed in the hope that it will be useful, but @@ -30,14 +30,18 @@ extern "C" { /** - * Convert the len characters long character sequence - * given in input that is in the given charset - * to UTF-8. - * @return the converted string (0-terminated) + * Convert the 'len' characters long character sequence given in + * 'input' that is in the given 'charset' to UTF-8. + * + * @param input string to convert + * @param len number of bytes in input + * @param charset input character set + * @return the converted string (0-terminated), NULL on error */ -char * EXTRACTOR_common_convert_to_utf8(const char * input, - size_t len, - const char * charset); +char * +EXTRACTOR_common_convert_to_utf8 (const char * input, + size_t len, + const char *charset); #ifdef __cplusplus } diff --git a/src/common/pack.h b/src/common/pack.h @@ -45,13 +45,18 @@ MODIFICATIONS. p - (unpack only) value is a pointer to a pointer. Generate the buffer to hold the data. */ -int EXTRACTOR_common_cat_unpack(const void * buf, const char *fmt, ... ); +int +EXTRACTOR_common_cat_unpack(const void * buf, + const char *fmt, + ...); -struct cat_bvec { +struct cat_bvec +{ unsigned long len; void * data; }; + #endif /* __CAT_PACK_H */ diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am @@ -64,7 +64,6 @@ libextractor_ogg_la_LDFLAGS = \ $(PLUGINFLAGS) libextractor_ogg_la_LIBADD = \ $(top_builddir)/src/main/libextractor.la \ - $(top_builddir)/src/common/libextractor_common.la \ -lvorbisfile -lvorbis $(vorbisflag) -logg test_ogg_SOURCES = \ @@ -79,7 +78,6 @@ libextractor_mime_la_LDFLAGS = \ $(PLUGINFLAGS) libextractor_mime_la_LIBADD = \ $(top_builddir)/src/main/libextractor.la \ - $(top_builddir)/src/common/libextractor_common.la \ -lmagic test_mime_SOURCES = \ @@ -94,7 +92,6 @@ libextractor_gif_la_LDFLAGS = \ $(PLUGINFLAGS) libextractor_gif_la_LIBADD = \ $(top_builddir)/src/main/libextractor.la \ - $(top_builddir)/src/common/libextractor_common.la \ -lgif test_gif_SOURCES = \