summaryrefslogtreecommitdiff
path: root/lib/util/charset/util_unistr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util/charset/util_unistr.c')
-rw-r--r--lib/util/charset/util_unistr.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/lib/util/charset/util_unistr.c b/lib/util/charset/util_unistr.c
index 284863a71c..41549bff87 100644
--- a/lib/util/charset/util_unistr.c
+++ b/lib/util/charset/util_unistr.c
@@ -134,11 +134,11 @@ _PUBLIC_ char *alpha_strcpy(char *dest, const char *src, const char *other_safe_
/**
Convert a string to lower case, allocated with talloc
**/
-_PUBLIC_ char *strlower_talloc(TALLOC_CTX *ctx, const char *src)
+_PUBLIC_ char *strlower_talloc_handle(struct smb_iconv_handle *iconv_handle,
+ TALLOC_CTX *ctx, const char *src)
{
size_t size=0;
char *dest;
- struct smb_iconv_handle *iconv_handle = get_iconv_handle();
if(src == NULL) {
return NULL;
@@ -176,15 +176,21 @@ _PUBLIC_ char *strlower_talloc(TALLOC_CTX *ctx, const char *src)
return dest;
}
+_PUBLIC_ char *strlower_talloc(TALLOC_CTX *ctx, const char *src)
+{
+ struct smb_iconv_handle *iconv_handle = get_iconv_handle();
+ return strlower_talloc_handle(iconv_handle, ctx, src);
+}
+
/**
Convert a string to UPPER case, allocated with talloc
- source length limited to n bytes
+ source length limited to n bytes, iconv handle supplied
**/
-_PUBLIC_ char *strupper_talloc_n(TALLOC_CTX *ctx, const char *src, size_t n)
+_PUBLIC_ char *strupper_talloc_n_handle(struct smb_iconv_handle *iconv_handle,
+ TALLOC_CTX *ctx, const char *src, size_t n)
{
size_t size=0;
char *dest;
- struct smb_iconv_handle *iconv_handle = get_iconv_handle();
if (!src) {
return NULL;
@@ -224,6 +230,15 @@ _PUBLIC_ char *strupper_talloc_n(TALLOC_CTX *ctx, const char *src, size_t n)
/**
Convert a string to UPPER case, allocated with talloc
+ source length limited to n bytes
+**/
+_PUBLIC_ char *strupper_talloc_n(TALLOC_CTX *ctx, const char *src, size_t n)
+{
+ struct smb_iconv_handle *iconv_handle = get_iconv_handle();
+ return strupper_talloc_n_handle(iconv_handle, ctx, src, n);
+}
+/**
+ Convert a string to UPPER case, allocated with talloc
**/
_PUBLIC_ char *strupper_talloc(TALLOC_CTX *ctx, const char *src)
{