[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-734-g5f6c730
Michael Adam
obnox at samba.org
Wed Apr 9 23:28:34 GMT 2008
The branch, v3-2-test has been updated
via 5f6c730cbeddd1ac2f515bd985c08ceb4ca9bc47 (commit)
from a8cedfef27a0400c6aa05ddb5e51308ce0b789bd (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 5f6c730cbeddd1ac2f515bd985c08ceb4ca9bc47
Author: Michael Adam <obnox at samba.org>
Date: Wed Apr 9 15:36:55 2008 +0200
charcnv: add talloc_strdup_lower() - talloc variant of strdup_lower().
Michael
-----------------------------------------------------------------------
Summary of changes:
source/lib/charcnv.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c
index d11620e..69d1db0 100644
--- a/source/lib/charcnv.c
+++ b/source/lib/charcnv.c
@@ -945,6 +945,32 @@ char *strdup_lower(const char *s)
return out_buffer;
}
+char *talloc_strdup_lower(TALLOC_CTX *ctx, const char *s)
+{
+ size_t size;
+ smb_ucs2_t *buffer = NULL;
+ char *out_buffer;
+
+ size = push_ucs2_talloc(ctx, &buffer, s);
+ if (size == -1 || !buffer) {
+ TALLOC_FREE(buffer);
+ return NULL;
+ }
+
+ strlower_w(buffer);
+
+ size = pull_ucs2_talloc(ctx, &out_buffer, buffer);
+ TALLOC_FREE(buffer);
+
+ if (size == (size_t)-1) {
+ TALLOC_FREE(out_buffer);
+ return NULL;
+ }
+
+ return out_buffer;
+}
+
+
size_t ucs2_align(const void *base_ptr, const void *p, int flags)
{
if (flags & (STR_NOALIGN|STR_ASCII))
--
Samba Shared Repository
More information about the samba-cvs
mailing list