From fd96929ec1fa27e0affd4c4e9ba307c4ee30b978 Mon Sep 17 00:00:00 2001 From: Matthew Chapman Date: Fri, 12 Feb 1999 00:16:09 +0000 Subject: UNICODE cleanup (see lib/util_unistr.c). No more ugly static library buffers and all functions take a destination string length (especially unistrcpy was rather dangerous; we were only saved by the fact that datagrams are limited in size). (This used to be commit a1d39af1ce1d451b811dbd7c2ba391214851b87e) --- source3/include/proto.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index c408545907..1d3b041e4d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -564,18 +564,15 @@ void split_at_last_component(char *path, char *front, char sep, char *back); /*The following definitions come from lib/util_unistr.c */ -int PutUniCode(char *dst,char *src); -char *skip_unicode_string(char *buf,int n); -char *unistrn2(char *src, int len); -char *unistr2(char *src); -char *unistr2_to_str(UNISTR2 *str); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *buffer2_to_str(BUFFER2 *str); -char *buffer2_to_multistr(BUFFER2 *str); -int str_to_unistr16(uint16 *dst, const char *src); -int str_to_unistr8(char *dst, const char *src); -char *unistr(char *buf); -int unistrcpy(char *dst, char *src); +char *ascii_to_unibuf(char *dest, const char *src, int maxlen); +void unibuf_to_ascii(char *dest, const char *src, int maxlen); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, int destlen); +char *skip_unibuf(char *srcbuf, int len); +char *uni_strncpy(char *destbuf, const char *srcbuf, int len); +uint32 buffer2_to_uint32(const BUFFER2 *str); +void buffer2_to_multistr(char *dest, const BUFFER2 *str, int destlen); /*The following definitions come from libsmb/clientgen.c */ -- cgit