summaryrefslogtreecommitdiff
path: root/src/internal.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-05 23:49:51 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-05 23:49:51 +0000
commitce231ac3f456d2e92730d344cda1578eaf1d8add (patch)
treead227ae870e2ce38beae910b159de41f79e7d842 /src/internal.h
parent5946e302829ff1ebd4905dbf2fa8021ed24cbedc (diff)
downloadiconv-ce231ac3f456d2e92730d344cda1578eaf1d8add.tar.gz
iconv-ce231ac3f456d2e92730d344cda1578eaf1d8add.tar.bz2
Improve error reporting from iconv_eightbit_new. This means we correctly return EINVAL if we can't find a mapping table, rather than assuming ENOMEM.
Bump version number while we're at it. svn path=/trunk/iconv/; revision=5962
Diffstat (limited to 'src/internal.h')
-rw-r--r--src/internal.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/internal.h b/src/internal.h
index eb11589..42efefe 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -34,13 +34,18 @@ struct encoding_context {
};
/* in eightbit.c */
+typedef enum eightbit_ret {
+ EIGHTBIT_OK,
+ EIGHTBIT_UNKNOWN,
+ EIGHTBIT_NOMEM
+} eightbit_ret;
int iconv_eightbit_number_from_name(const char *name);
unsigned iconv_eightbit_read(struct encoding_context *e,
int (*callback)(void *handle, UCS4 c), const char *s,
unsigned int n, void *handle);
int iconv_eightbit_write(struct encoding_context *e, UCS4 c,
char **buf, int *bufsize);
-unsigned short *iconv_eightbit_new(int enc_num);
+eightbit_ret iconv_eightbit_new(int enc_num, unsigned short **table);
void iconv_eightbit_delete(struct encoding_context *e);
/* in alias.c */