summaryrefslogtreecommitdiff
path: root/source3/lib/util_unistr.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-15 00:49:13 +0000
committerJeremy Allison <jra@samba.org>2001-03-15 00:49:13 +0000
commit4ab6182a0ffdbe92a01dd6533e0862aa8d0f6d83 (patch)
treef2de94060b573c3ec8d38449db373e546ea1db20 /source3/lib/util_unistr.c
parent2335c1d1783cab97419eb13542526411c08be869 (diff)
downloadsamba-4ab6182a0ffdbe92a01dd6533e0862aa8d0f6d83.tar.gz
samba-4ab6182a0ffdbe92a01dd6533e0862aa8d0f6d83.tar.bz2
samba-4ab6182a0ffdbe92a01dd6533e0862aa8d0f6d83.zip
AS/U on a sparc now joins and authenticates against a Samba PDC !
Jeremy. (This used to be commit 28a0bc5f5710aa732db662caa38f9da2138b5db2)
Diffstat (limited to 'source3/lib/util_unistr.c')
-rw-r--r--source3/lib/util_unistr.c70
1 files changed, 1 insertions, 69 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index b1cb9ec410..3ab4bdca9f 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -161,42 +161,6 @@ char *dos_unistrn2(uint16 *src, int len)
return lbuf;
}
-/*******************************************************************
- Return a DOS codepage version of a big or little endian unicode string.
- len is the filename length (ignoring any terminating zero) in uin16
- units. Always null terminates. Endian is 1 if it's big endian.
- Hack alert: uses fixed buffer(s).
-********************************************************************/
-
-char *rpc_unistrn2(uint16 *src, int len, BOOL endian)
-{
- static char lbufs[8][MAXUNI];
- static int nexti;
- char *lbuf = lbufs[nexti];
- char *p;
-
- nexti = (nexti+1)%8;
-
- for (p = lbuf; (len > 0) && (p-lbuf < MAXUNI-3) && *src; len--, src++) {
- uint16 ucs2_val;
- uint16 cp_val;
-
- RW_SVAL(True,endian,src,ucs2_val,0);
-
- cp_val = ucs2_to_doscp[ucs2_val];
-
- if (cp_val < 256)
- *p++ = (char)cp_val;
- else {
- *p++ = (cp_val >> 8) & 0xff;
- *p++ = (cp_val & 0xff);
- }
- }
-
- *p = 0;
- return lbuf;
-}
-
static char lbufs[8][MAXUNI];
static int nexti;
@@ -258,38 +222,6 @@ char *dos_unistr2_to_str(UNISTR2 *str)
}
/*******************************************************************
-Return a DOS codepage version of a big or little-endian unicode string
-********************************************************************/
-
-char *rpc_unistr2_to_str(UNISTR2 *str, BOOL endian)
-{
- char *lbuf = lbufs[nexti];
- char *p;
- uint16 *src = str->buffer;
- int max_size = MIN(MAXUNI-3, str->uni_str_len);
-
- nexti = (nexti+1)%8;
-
- for (p = lbuf; (p-lbuf < max_size) && *src; src++) {
- uint16 ucs2_val;
- uint16 cp_val;
-
- RW_SVAL(True,endian,src,ucs2_val,0);
- cp_val = ucs2_to_doscp[ucs2_val];
-
- if (cp_val < 256)
- *p++ = (char)cp_val;
- else {
- *p++ = (cp_val >> 8) & 0xff;
- *p++ = (cp_val & 0xff);
- }
- }
-
- *p = 0;
- return lbuf;
-}
-
-/*******************************************************************
Put an ASCII string into a UNICODE array (uint16's).
use little-endian ucs2
********************************************************************/
@@ -347,7 +279,7 @@ void unistr_to_ascii(char *dest, const uint16 *src, int len)
}
/*******************************************************************
- Convert a UNISTR2 structure to an ASCII string
+ Convert a (little-endian) UNISTR2 structure to an ASCII string
Warning: this version does DOS codepage.
********************************************************************/