summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/charcnv.c41
-rw-r--r--source3/lib/util_str.c41
2 files changed, 41 insertions, 41 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 5c01052d21..bde6510314 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -56,26 +56,6 @@ void init_iconv(void)
true, global_iconv_handle);
}
-bool unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen)
-{
- size_t size;
- smb_ucs2_t *buffer;
- bool ret;
-
- if (!push_ucs2_talloc(talloc_tos(), &buffer, src, &size)) {
- return (size_t)-1;
- }
-
- if (!strupper_w(buffer) && (dest == src)) {
- TALLOC_FREE(buffer);
- return srclen;
- }
-
- ret = convert_string(CH_UTF16LE, CH_UNIX, buffer, size, dest, destlen, &size);
- TALLOC_FREE(buffer);
- return ret;
-}
-
/**
talloc_strdup() a unix string to upper case.
**/
@@ -141,27 +121,6 @@ char *strupper_talloc(TALLOC_CTX *ctx, const char *s) {
}
-bool unix_strlower(const char *src, size_t srclen, char *dest, size_t destlen)
-{
- size_t size;
- smb_ucs2_t *buffer = NULL;
- bool ret;
-
- if (!convert_string_talloc(talloc_tos(), CH_UNIX, CH_UTF16LE, src, srclen,
- (void **)(void *)&buffer, &size))
- {
- smb_panic("failed to create UCS2 buffer");
- }
- if (!strlower_w(buffer) && (dest == src)) {
- TALLOC_FREE(buffer);
- return srclen;
- }
- ret = convert_string(CH_UTF16LE, CH_UNIX, buffer, size, dest, destlen, &size);
- TALLOC_FREE(buffer);
- return ret;
-}
-
-
char *talloc_strdup_lower(TALLOC_CTX *ctx, const char *s)
{
size_t converted_size;
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index a57a53fce2..797e61e40c 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -1060,6 +1060,27 @@ char *strstr_m(const char *src, const char *findstr)
return retp;
}
+static bool unix_strlower(const char *src, size_t srclen, char *dest, size_t destlen)
+{
+ size_t size;
+ smb_ucs2_t *buffer = NULL;
+ bool ret;
+
+ if (!convert_string_talloc(talloc_tos(), CH_UNIX, CH_UTF16LE, src, srclen,
+ (void **)(void *)&buffer, &size))
+ {
+ smb_panic("failed to create UCS2 buffer");
+ }
+ if (!strlower_w(buffer) && (dest == src)) {
+ TALLOC_FREE(buffer);
+ return srclen;
+ }
+ ret = convert_string(CH_UTF16LE, CH_UNIX, buffer, size, dest, destlen, &size);
+ TALLOC_FREE(buffer);
+ return ret;
+}
+
+
/**
Convert a string to lower case.
**/
@@ -1094,6 +1115,26 @@ void strlower_m(char *s)
errno = errno_save;
}
+static bool unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen)
+{
+ size_t size;
+ smb_ucs2_t *buffer;
+ bool ret;
+
+ if (!push_ucs2_talloc(talloc_tos(), &buffer, src, &size)) {
+ return (size_t)-1;
+ }
+
+ if (!strupper_w(buffer) && (dest == src)) {
+ TALLOC_FREE(buffer);
+ return srclen;
+ }
+
+ ret = convert_string(CH_UTF16LE, CH_UNIX, buffer, size, dest, destlen, &size);
+ TALLOC_FREE(buffer);
+ return ret;
+}
+
/**
Convert a string to upper case.
**/