From 3b3e21bd9ba701a97e752205263a7903619541c7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 19 Mar 2009 12:20:11 +1100 Subject: Convert Samba3 to use the common lib/util/charset API This removes calls to push_*_allocate() and pull_*_allocate(), as well as convert_string_allocate, as they are not in the common API To allow transition to a common charcnv in future, provide Samba4-like strupper functions in source3/lib/charcnv.c (the actual implementation remains distinct, but the API is now shared) Andrew Bartlett --- source3/include/proto.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index 5a168380a7..718c6b400b 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -348,30 +348,23 @@ void init_iconv(void); size_t convert_string(charset_t from, charset_t to, void const *src, size_t srclen, void *dest, size_t destlen, bool allow_bad_conv); -bool convert_string_allocate(TALLOC_CTX *ctx, charset_t from, charset_t to, - void const *src, size_t srclen, void *dst, - size_t *converted_size, bool allow_bad_conv); size_t unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen); -char *strdup_upper(const char *s); char *talloc_strdup_upper(TALLOC_CTX *ctx, const char *s); +char *strupper_talloc(TALLOC_CTX *ctx, const char *s); size_t unix_strlower(const char *src, size_t srclen, char *dest, size_t destlen); -char *strdup_lower(const char *s); char *talloc_strdup_lower(TALLOC_CTX *ctx, const char *s); +char *strlower_talloc(TALLOC_CTX *ctx, const char *s); size_t ucs2_align(const void *base_ptr, const void *p, int flags); size_t push_ascii(void *dest, const char *src, size_t dest_len, int flags); size_t push_ascii_fstring(void *dest, const char *src); size_t push_ascii_nstring(void *dest, const char *src); -bool push_ascii_allocate(char **dest, const char *src, size_t *converted_size); size_t pull_ascii(char *dest, const void *src, size_t dest_len, size_t src_len, int flags); size_t pull_ascii_fstring(char *dest, const void *src); size_t pull_ascii_nstring(char *dest, size_t dest_len, const void *src); size_t push_ucs2(const void *base_ptr, void *dest, const char *src, size_t dest_len, int flags); -bool push_ucs2_allocate(smb_ucs2_t **dest, const char *src, - size_t *converted_size); size_t push_utf8_fstring(void *dest, const char *src); bool push_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src, size_t *converted_size); -bool push_utf8_allocate(char **dest, const char *src, size_t *converted_size); size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_len, size_t src_len, int flags); size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx, const void *base_ptr, -- cgit