-/*
+/*
Unix SMB/CIFS implementation.
charset defines
Copyright (C) Andrew Tridgell 2001
Copyright (C) Jelmer Vernooij 2002
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* This is a public header file that is installed as part of Samba.
- * If you remove any functions or change their signature, update
+/* This is a public header file that is installed as part of Samba.
+ * If you remove any functions or change their signature, update
* the so version number. */
#ifndef __CHARSET_H__
ssize_t push_string(void *dest, const char *src, size_t dest_len, int flags);
ssize_t pull_string(char *dest, const void *src, size_t dest_len, size_t src_len, int flags);
-bool convert_string_talloc(TALLOC_CTX *ctx,
- charset_t from, charset_t to,
- void const *src, size_t srclen,
+bool convert_string_talloc(TALLOC_CTX *ctx,
+ charset_t from, charset_t to,
+ void const *src, size_t srclen,
void *dest, size_t *converted_size);
bool convert_string(charset_t from, charset_t to,
- void const *src, size_t srclen,
+ void const *src, size_t srclen,
void *dest, size_t destlen,
size_t *converted_size);
bool convert_string_error(charset_t from, charset_t to,
size_t *converted_size);
struct smb_iconv_handle *get_iconv_handle(void);
-struct smb_iconv_handle *get_iconv_testing_handle(TALLOC_CTX *mem_ctx,
- const char *dos_charset,
+struct smb_iconv_handle *get_iconv_testing_handle(TALLOC_CTX *mem_ctx,
+ const char *dos_charset,
const char *unix_charset,
bool use_builtin_handlers);
struct smb_iconv_handle *reinit_iconv_handle(TALLOC_CTX *mem_ctx,
bool convert_string_handle(struct smb_iconv_handle *ic,
charset_t from, charset_t to,
- void const *src, size_t srclen,
+ void const *src, size_t srclen,
void *dest, size_t destlen, size_t *converted_size);
bool convert_string_error_handle(struct smb_iconv_handle *ic,
charset_t from, charset_t to,
bool convert_string_talloc_handle(TALLOC_CTX *ctx,
struct smb_iconv_handle *ic,
- charset_t from, charset_t to,
- void const *src, size_t srclen,
+ charset_t from, charset_t to,
+ void const *src, size_t srclen,
void *dest, size_t *converted_size);
/* iconv */
smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode);
int smb_iconv_close(smb_iconv_t cd);
-size_t smb_iconv(smb_iconv_t cd,
+size_t smb_iconv(smb_iconv_t cd,
const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
-smb_iconv_t smb_iconv_open_ex(TALLOC_CTX *mem_ctx, const char *tocode,
+smb_iconv_t smb_iconv_open_ex(TALLOC_CTX *mem_ctx, const char *tocode,
const char *fromcode, bool use_builtin_handlers);
void smb_init_locale(void);
-/*
+/*
Unix SMB/CIFS implementation.
Samba utility functions
Copyright (C) Andrew Tridgell 1992-2001
Copyright (C) Simo Sorce 2001
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
Copy a string from a char* src to a unicode or ascii
- dos codepage destination choosing unicode or ascii based on the
+ dos codepage destination choosing unicode or ascii based on the
flags in the SMB buffer starting at base_ptr.
Return the number of bytes occupied by the string in the destination.
flags can have: