summaryrefslogtreecommitdiff
path: root/source3/include/charset.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-08-30 21:35:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:32 -0500
commit651daa4b4256455b26b0affcdc45fe328b128c99 (patch)
tree90abd017d3dd931fb128aecef300e6424b9f8179 /source3/include/charset.h
parentf1688d61df13aacb0e512fd16504cc94f803d808 (diff)
downloadsamba-651daa4b4256455b26b0affcdc45fe328b128c99.tar.gz
samba-651daa4b4256455b26b0affcdc45fe328b128c99.tar.bz2
samba-651daa4b4256455b26b0affcdc45fe328b128c99.zip
r2114: Shameless theft of iconv commit from Samba4 to keep the two libs more in sync :-).
try to cope with a wider range of UTF-16 characters when we are using an external libiconv library. Jeremy. (This used to be commit 5d04cd6804f6fc3b556e7c3b53fa0d7af39797c1)
Diffstat (limited to 'source3/include/charset.h')
-rw-r--r--source3/include/charset.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/include/charset.h b/source3/include/charset.h
index 7a9b12ef55..c5d03a62e8 100644
--- a/source3/include/charset.h
+++ b/source3/include/charset.h
@@ -31,9 +31,9 @@ typedef enum {CH_UCS2=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, CH_UTF8=4} charset_t
struct charset_functions {
const char *name;
- size_t (*pull)(void *, char **inbuf, size_t *inbytesleft,
+ size_t (*pull)(void *, const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
- size_t (*push)(void *, char **inbuf, size_t *inbytesleft,
+ size_t (*push)(void *, const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
struct charset_functions *prev, *next;
};
@@ -57,7 +57,7 @@ struct charset_gap_table {
*
* */
#define SMB_GENERATE_CHARSET_MODULE_8_BIT_GAP(CHARSETNAME) \
-static size_t CHARSETNAME ## _push(void *cd, char **inbuf, size_t *inbytesleft, \
+static size_t CHARSETNAME ## _push(void *cd, const char **inbuf, size_t *inbytesleft, \
char **outbuf, size_t *outbytesleft) \
{ \
while (*inbytesleft >= 2 && *outbytesleft >= 1) { \
@@ -97,7 +97,7 @@ static size_t CHARSETNAME ## _push(void *cd, char **inbuf, size_t *inbytesleft,
return 0; \
} \
\
-static size_t CHARSETNAME ## _pull(void *cd, char **inbuf, size_t *inbytesleft, \
+static size_t CHARSETNAME ## _pull(void *cd, const char **inbuf, size_t *inbytesleft, \
char **outbuf, size_t *outbytesleft) \
{ \
while (*inbytesleft >= 1 && *outbytesleft >= 2) { \
@@ -124,4 +124,3 @@ NTSTATUS charset_ ## CHARSETNAME ## _init(void) \
return smb_register_charset(& CHARSETNAME ## _functions); \
} \
-