diff options
-rw-r--r-- | lib/util/charset/charset.h | 3 | ||||
-rw-r--r-- | lib/util/charset/util_unistr.c | 2 | ||||
-rw-r--r-- | source3/include/includes.h | 2 | ||||
-rw-r--r-- | source3/include/proto.h | 9 | ||||
-rw-r--r-- | source3/include/smb.h | 16 |
5 files changed, 4 insertions, 28 deletions
diff --git a/lib/util/charset/charset.h b/lib/util/charset/charset.h index 82484b7805..3acdde30ad 100644 --- a/lib/util/charset/charset.h +++ b/lib/util/charset/charset.h @@ -61,6 +61,7 @@ typedef struct smb_iconv_s { size_t (*push)(void *cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); void *cd_direct, *cd_pull, *cd_push; + char *from_name, *to_name; } *smb_iconv_t; /* string manipulation flags */ @@ -119,7 +120,7 @@ ssize_t convert_string_talloc(TALLOC_CTX *ctx, void const *src, size_t srclen, void **dest, bool allow_badcharcnv); -ssize_t convert_string(charset_t from, charset_t to, +size_t convert_string(charset_t from, charset_t to, void const *src, size_t srclen, void *dest, size_t destlen, bool allow_badcharcnv); diff --git a/lib/util/charset/util_unistr.c b/lib/util/charset/util_unistr.c index e6c6c3f466..96c987393f 100644 --- a/lib/util/charset/util_unistr.c +++ b/lib/util/charset/util_unistr.c @@ -950,7 +950,7 @@ _PUBLIC_ ssize_t pull_string(char *dest, const void *src, size_t dest_len, size_ * @param destlen maximal length allowed for string * @returns the number of bytes occupied in the destination **/ -_PUBLIC_ ssize_t convert_string(charset_t from, charset_t to, +_PUBLIC_ size_t convert_string(charset_t from, charset_t to, void const *src, size_t srclen, void *dest, size_t destlen, bool allow_badcharcnv) { diff --git a/source3/include/includes.h b/source3/include/includes.h index 523a11e255..7f8c408265 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -594,7 +594,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx); #include "trans2.h" #include "../libcli/util/error.h" #include "ntioctl.h" -#include "charset.h" +#include "../lib/util/charset/charset.h" #include "dynconfig.h" #include "util_getent.h" #include "debugparse.h" diff --git a/source3/include/proto.h b/source3/include/proto.h index 5bae973c3d..eeb6f1928d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -528,15 +528,6 @@ void gencache_iterate(void (*fn)(const char* key, const char *value, time_t time int gencache_lock_entry( const char *key ); void gencache_unlock_entry( const char *key ); -/* The following definitions come from lib/iconv.c */ - -NTSTATUS smb_register_charset(struct charset_functions *funcs) ; -size_t smb_iconv(smb_iconv_t cd, - const char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft); -smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode); -int smb_iconv_close (smb_iconv_t cd); - /* The following definitions come from lib/interface.c */ bool ismyaddr(const struct sockaddr *ip); diff --git a/source3/include/smb.h b/source3/include/smb.h index f02088731d..189e370496 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -167,10 +167,6 @@ typedef uint16 smb_ucs2_t; #define COPY_UCS2_CHAR(dest,src) (((unsigned char *)(dest))[0] = ((unsigned char *)(src))[0],\ ((unsigned char *)(dest))[1] = ((unsigned char *)(src))[1], (dest)) -/* Large data type for manipulating uint32 unicode codepoints */ -typedef uint32 codepoint_t; -#define INVALID_CODEPOINT ((codepoint_t)-1) - /* pipe string names */ #define PIPE_LANMAN "\\PIPE\\LANMAN" @@ -1831,18 +1827,6 @@ struct unix_error_map { #define SAFE_NETBIOS_CHARS ". -_" -/* generic iconv conversion structure */ -typedef struct _smb_iconv_t { - size_t (*direct)(void *cd, const char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft); - size_t (*pull)(void *cd, const char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft); - size_t (*push)(void *cd, const char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft); - void *cd_direct, *cd_pull, *cd_push; - char *from_name, *to_name; -} *smb_iconv_t; - /* The maximum length of a trust account password. Used when we randomly create it, 15 char passwords exceed NT4's max password length */ |