summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-03-30 13:08:31 -0700
committerJeremy Allison <jra@samba.org>2011-03-30 23:59:37 +0200
commitc109a70531de72eef30a695248b91704bd0c7c24 (patch)
tree29182afa1ae334e8aee0e71e59aa1a0e5de65f6a /source3/include
parent9ede19fdccaf09303012208129a093197403ef2c (diff)
downloadsamba-c109a70531de72eef30a695248b91704bd0c7c24.tar.gz
samba-c109a70531de72eef30a695248b91704bd0c7c24.tar.bz2
samba-c109a70531de72eef30a695248b91704bd0c7c24.zip
Fix convert_string() to take a *converted_size arg. and return a bool.
Makes these interfaces much harder to misuse and easier to ensure error checking. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Mar 30 23:59:37 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 94c924591f..a85b2f9e60 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -74,17 +74,18 @@ int bitmap_find(struct bitmap *bm, unsigned ofs);
void gfree_charcnv(void);
void init_iconv(void);
-size_t convert_string(charset_t from, charset_t to,
+bool convert_string(charset_t from, charset_t to,
void const *src, size_t srclen,
- void *dest, size_t destlen);
+ void *dest, size_t destlen,
+ size_t *converted_size);
bool convert_string_error(charset_t from, charset_t to,
void const *src, size_t srclen,
void *dest, size_t destlen,
size_t *converted_size);
-size_t unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen);
+bool unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen);
char *talloc_strdup_upper(TALLOC_CTX *ctx, const char *s);
char *strupper_talloc(TALLOC_CTX *ctx, const char *s);
-size_t unix_strlower(const char *src, size_t srclen, char *dest, size_t destlen);
+bool unix_strlower(const char *src, size_t srclen, char *dest, size_t destlen);
char *talloc_strdup_lower(TALLOC_CTX *ctx, const char *s);
char *strlower_talloc(TALLOC_CTX *ctx, const char *s);
size_t ucs2_align(const void *base_ptr, const void *p, int flags);