diff options
author | Matthew Chapman <matty@samba.org> | 1999-02-12 00:16:09 +0000 |
---|---|---|
committer | Matthew Chapman <matty@samba.org> | 1999-02-12 00:16:09 +0000 |
commit | fd96929ec1fa27e0affd4c4e9ba307c4ee30b978 (patch) | |
tree | 6bfb5226bc58be39aaf7cfb954dcb472ea256a11 /source3/include | |
parent | f38bfc7d9aa07c4e21448aa846956bd89a259a65 (diff) | |
download | samba-fd96929ec1fa27e0affd4c4e9ba307c4ee30b978.tar.gz samba-fd96929ec1fa27e0affd4c4e9ba307c4ee30b978.tar.bz2 samba-fd96929ec1fa27e0affd4c4e9ba307c4ee30b978.zip |
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)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/proto.h | 21 |
1 files changed, 9 insertions, 12 deletions
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 */ |