diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-09-19 19:13:21 -0700 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-09-20 06:27:06 +0200 |
commit | f9acf770e9c121aa495cb7e19175a4a6e45ff3d9 (patch) | |
tree | b64283a8a0f929f28de73f84ef207f5f5018f8f9 /lib/util/charset/weird.c | |
parent | 8316577b7538f7204c5fd6328756c4c3f171b36e (diff) | |
download | samba-f9acf770e9c121aa495cb7e19175a4a6e45ff3d9.tar.gz samba-f9acf770e9c121aa495cb7e19175a4a6e45ff3d9.tar.bz2 samba-f9acf770e9c121aa495cb7e19175a4a6e45ff3d9.zip |
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 <abartlet@samba.org>
Autobuild-Date: Tue Sep 20 06:27:06 CEST 2011 on sn-devel-104
Diffstat (limited to 'lib/util/charset/weird.c')
-rw-r--r-- | lib/util/charset/weird.c | 25 |
1 files changed, 13 insertions, 12 deletions
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 |