summaryrefslogtreecommitdiffstats
path: root/source/rpc_parse/parse_misc.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-07-04 07:15:53 +0000
committerAndrew Tridgell <tridge@samba.org>2001-07-04 07:15:53 +0000
commitdebb471267960e56005a741817ebd227ecfc512a (patch)
treef8c3793c025aadf809d8a8b3126c05fcd442ec70 /source/rpc_parse/parse_misc.c
parentcfd81e62c81dcb114e2c9f917a01168273bf75b0 (diff)
downloadsamba-debb471267960e56005a741817ebd227ecfc512a.tar.gz
samba-debb471267960e56005a741817ebd227ecfc512a.tar.xz
samba-debb471267960e56005a741817ebd227ecfc512a.zip
The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation.
Diffstat (limited to 'source/rpc_parse/parse_misc.c')
-rw-r--r--source/rpc_parse/parse_misc.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/source/rpc_parse/parse_misc.c b/source/rpc_parse/parse_misc.c
index 4b118dd2b45..216a6e2ecae 100644
--- a/source/rpc_parse/parse_misc.c
+++ b/source/rpc_parse/parse_misc.c
@@ -539,8 +539,7 @@ void init_unistr(UNISTR *str, const char *buf)
if (str->buffer == NULL)
smb_panic("init_unistr: malloc fail\n");
- /* store the string (null-terminated copy) */
- dos_struni2((char *)str->buffer, buf, len);
+ rpcstr_push(str->buffer, buf, len, STR_TERMINATE);
}
/*******************************************************************
@@ -605,12 +604,12 @@ void init_buffer3_str(BUFFER3 *str, char *buf, int len)
/* set up string lengths. */
str->buf_max_len = len * 2;
- str->buf_len = len * 2;
+ str->buf_len = len * 2;
create_buffer3(str, str->buf_max_len);
- /* store the string (null-terminated 8 bit chars into 16 bit chars) */
- dos_struni2((char *)str->buffer, buf, str->buf_max_len);
+ rpcstr_push(str->buffer, buf, str->buf_max_len, STR_TERMINATE);
+
}
/*******************************************************************
@@ -911,8 +910,7 @@ void init_unistr2(UNISTR2 *str, const char *buf, size_t len)
return;
}
- /* store the string (null-terminated 8 bit chars into 16 bit chars) */
- dos_struni2((char *)str->buffer, buf, len);
+ rpcstr_push((char *)str->buffer, buf, len, STR_TERMINATE);
}
/*******************************************************************
@@ -1483,8 +1481,7 @@ void init_unistr3(UNISTR3 *str, const char *buf)
if (str->str.buffer == NULL)
smb_panic("init_unistr3: malloc fail\n");
- /* store the string (null-terminated copy) */
- dos_struni2((char *)str->str.buffer, buf, len);
+ rpcstr_push((char *)str->str.buffer, buf, len, STR_TERMINATE);
}
/*******************************************************************