From a834a73e341059be154426390304a42e4a011f72 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 25 Sep 2002 15:19:00 +0000 Subject: sync'ing up for 3.0alpha20 release (This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139) --- source3/lib/util_unistr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/lib/util_unistr.c') diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index ba02819bdc..eb47252413 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -218,6 +218,16 @@ void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen) 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(const UNISTR2 *str) +{ + static pstring ret; + unistr2_to_ascii(ret, str, sizeof(ret)); + return ret; +} + /******************************************************************* duplicate a UNISTR2 string into a null terminated char* -- cgit