From f1d333ea35a4fed92e2d51aafa4e758f577e5cf1 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 15 Mar 2003 08:03:11 +0000 Subject: Remove an unused function and fix the build. Andrew Bartlett (This used to be commit 67a0319d268dfc0e2154d3ab0f8bf866e3cbb6db) --- source3/lib/charcnv.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 76d77ddd67..fa646573d8 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -646,42 +646,6 @@ size_t pull_ucs2_allocate(void **dest, const smb_ucs2_t *src) return convert_string_allocate(CH_UCS2, CH_UNIX, src, src_len, dest); } -/** - Copy a string from a utf-8 source to a unix char* destination. - Flags can have: - STR_TERMINATE means the string in src is null terminated. - if STR_TERMINATE is set then src_len is ignored. - src_len is the length of the source area in bytes - Return the number of bytes occupied by the string in src. - The resulting string in "dest" is always null terminated. -**/ - -static size_t pull_utf8(char *dest, const void *src, size_t dest_len, size_t src_len, int flags) -{ - size_t ret; - - if (dest_len == (size_t)-1) - dest_len = sizeof(pstring); - - if (flags & STR_TERMINATE) { - if (src_len == (size_t)-1) { - src_len = strlen(src) + 1; - } else { - size_t len = strnlen(src, src_len); - if (len < src_len) - len++; - src_len = len; - } - } - - ret = convert_string(CH_UTF8, CH_UNIX, src, src_len, dest, dest_len); - if (dest_len) - dest[MIN(ret, dest_len-1)] = 0; - - return src_len; -} -#endif - /** * Copy a string from a UTF-8 src to a unix char * destination, allocating a buffer using talloc * -- cgit