From f9acf770e9c121aa495cb7e19175a4a6e45ff3d9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 19 Sep 2011 19:13:21 -0700 Subject: lib/util/charset: remove charset module loading Now that the 'table' modules are gone, there is no reason for there to be charset modules at all. This builds the macosxfs and weird modules into the binary at the appropriate times, and changes the tests to test instead the difference between the remaining internal handlers and iconv(). Andrew Bartlett Autobuild-User: Andrew Bartlett Autobuild-Date: Tue Sep 20 06:27:06 CEST 2011 on sn-devel-104 --- lib/util/charset/weird.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'lib/util/charset/weird.c') diff --git a/lib/util/charset/weird.c b/lib/util/charset/weird.c index 5db8cdcecd..7f766417dc 100644 --- a/lib/util/charset/weird.c +++ b/lib/util/charset/weird.c @@ -19,6 +19,9 @@ */ #include "includes.h" +#include "charset_proto.h" + +#ifdef DEVELOPER static struct { char from; @@ -30,8 +33,8 @@ static struct { {0, NULL} }; -static size_t weird_pull(void *cd, const char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft) +size_t weird_pull(void *cd, const char **inbuf, size_t *inbytesleft, + char **outbuf, size_t *outbytesleft) { while (*inbytesleft >= 1 && *outbytesleft >= 2) { int i; @@ -73,8 +76,8 @@ static size_t weird_pull(void *cd, const char **inbuf, size_t *inbytesleft, return 0; } -static size_t weird_push(void *cd, const char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft) +size_t weird_push(void *cd, const char **inbuf, size_t *inbytesleft, + char **outbuf, size_t *outbytesleft) { int ir_count=0; @@ -122,13 +125,11 @@ static size_t weird_push(void *cd, const char **inbuf, size_t *inbytesleft, return ir_count; } -struct charset_functions weird_functions = {"WEIRD", weird_pull, weird_push}; - -NTSTATUS charset_weird_init(void); -NTSTATUS charset_weird_init(void) +#else +void charset_weird_dummy(void); +void charset_weird_dummy(void) { - if (!smb_register_charset(&weird_functions)) { - return NT_STATUS_INTERNAL_ERROR; - } - return NT_STATUS_OK; + return; } + +#endif -- cgit