diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-12-01 00:17:30 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-12-01 00:17:30 +0000 |
commit | 7602aa50fd591e63393def79d55302a22e77c387 (patch) | |
tree | 9233e0963192d8c6e9ee704a18cd2d3ca133392a /source4/lib | |
parent | fa062af11ada2cf1c58465447ea711ec4b9b3a12 (diff) | |
download | samba-7602aa50fd591e63393def79d55302a22e77c387.tar.gz samba-7602aa50fd591e63393def79d55302a22e77c387.tar.xz samba-7602aa50fd591e63393def79d55302a22e77c387.zip |
* got rid of UNISTR2 and everything that depends on it
* removed a bunch of code that needs to be rewritten using the new
interfaces
(This used to be commit 9b02b486ef5906516f8cad79dbff5e3dd54cde66)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/util_unistr.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/source4/lib/util_unistr.c b/source4/lib/util_unistr.c index 3e3430d147..5e48d716b9 100644 --- a/source4/lib/util_unistr.c +++ b/source4/lib/util_unistr.c @@ -159,46 +159,6 @@ void init_valid_table(void) /******************************************************************* - Convert a (little-endian) UNISTR2 structure to an ASCII string -********************************************************************/ -static void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen) -{ - if (str == NULL) { - *dest='\0'; - return; - } - pull_ucs2(NULL, dest, str->buffer, maxlen, str->uni_str_len*2, STR_NOALIGN); -} - -/******************************************************************* -give a static string for displaying a UNISTR2 -********************************************************************/ -const char *unistr2_static(TALLOC_CTX *mem_ctx, const UNISTR2 *str) -{ - pstring ret; - unistr2_to_ascii(ret, str, sizeof(ret)); - return talloc_strdup(mem_ctx, ret); -} - - -/******************************************************************* - duplicate a UNISTR2 string into a null terminated char* - using a talloc context -********************************************************************/ -char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str) -{ - char *s; - int maxlen = (str->uni_str_len+1)*4; - if (!str->buffer) return NULL; - s = (char *)talloc(ctx, maxlen); /* convervative */ - if (!s) return NULL; - pull_ucs2(NULL, s, str->buffer, maxlen, str->uni_str_len*2, - STR_NOALIGN); - return s; -} - - -/******************************************************************* Convert a wchar to upper case. ********************************************************************/ |