diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2002-03-26 09:50:06 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2002-03-26 09:50:06 +0000 |
commit | 859ba2a012d5a23d1c3c68d8941dd68566da97ce (patch) | |
tree | 4ba991e27d55a4dd1cc7b0ea9d2414c77493663a /charset.c | |
parent | 80e70c3e02d9570c22f4dbddc4efcb2d03676528 (diff) |
Fix iconv warnings; from Edmund Grimley Evans.
Diffstat (limited to 'charset.c')
-rw-r--r-- | charset.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -286,7 +286,7 @@ iconv_t iconv_open (const char *tocode, const char *fromcode) return (iconv_t)(-1); } -size_t iconv (iconv_t cd, const char **inbuf, size_t *inbytesleft, +size_t iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) { return 0; @@ -336,12 +336,12 @@ iconv_t mutt_iconv_open (const char *tocode, const char *fromcode, int flags) * if you're supplying an outrepl, the target charset should be. */ -size_t mutt_iconv (iconv_t cd, const char **inbuf, size_t *inbytesleft, +size_t mutt_iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft, - const char **inrepls, const char *outrepl) + ICONV_CONST char **inrepls, const char *outrepl) { size_t ret = 0, ret1; - const char *ib = *inbuf; + ICONV_CONST char *ib = *inbuf; size_t ibl = *inbytesleft; char *ob = *outbuf; size_t obl = *outbytesleft; @@ -356,10 +356,10 @@ size_t mutt_iconv (iconv_t cd, const char **inbuf, size_t *inbytesleft, if (inrepls) { /* Try replacing the input */ - const char **t; + ICONV_CONST char **t; for (t = inrepls; *t; t++) { - const char *ib1 = *t; + ICONV_CONST char *ib1 = *t; size_t ibl1 = strlen (*t); char *ob1 = ob; size_t obl1 = obl; @@ -404,7 +404,7 @@ size_t mutt_iconv (iconv_t cd, const char **inbuf, size_t *inbytesleft, int mutt_convert_string (char **ps, const char *from, const char *to, int flags) { iconv_t cd; - const char *repls[] = { "\357\277\275", "?", 0 }; + ICONV_CONST char *repls[] = { "\357\277\275", "?", 0 }; char *s = *ps; if (!s || !*s) @@ -413,10 +413,10 @@ int mutt_convert_string (char **ps, const char *from, const char *to, int flags) if (to && from && (cd = mutt_iconv_open (to, from, flags)) != (iconv_t)-1) { int len; - const char *ib; + ICONV_CONST char *ib; char *buf, *ob; size_t ibl, obl; - const char **inrepls = 0; + ICONV_CONST char **inrepls = 0; char *outrepl = 0; if (mutt_is_utf8 (to)) @@ -462,7 +462,7 @@ struct fgetconv_s char *ob; char *ib; size_t ibl; - const char **inrepls; + ICONV_CONST char **inrepls; }; struct fgetconv_not @@ -475,7 +475,7 @@ FGETCONV *fgetconv_open (FILE *file, const char *from, const char *to, int flags { struct fgetconv_s *fc; iconv_t cd = (iconv_t)-1; - static const char *repls[] = { "\357\277\275", "?", 0 }; + static ICONV_CONST char *repls[] = { "\357\277\275", "?", 0 }; if (from && to) cd = mutt_iconv_open (to, from, flags); @@ -513,7 +513,7 @@ int fgetconv (FGETCONV *_fc) if (fc->ibl) { size_t obl = sizeof (fc->bufo); - iconv (fc->cd, (const char **)&fc->ib, &fc->ibl, &fc->ob, &obl); + iconv (fc->cd, (ICONV_CONST char **)&fc->ib, &fc->ibl, &fc->ob, &obl); if (fc->p < fc->ob) return (unsigned char)*(fc->p)++; } @@ -537,7 +537,7 @@ int fgetconv (FGETCONV *_fc) if (fc->ibl) { size_t obl = sizeof (fc->bufo); - mutt_iconv (fc->cd, (const char **)&fc->ib, &fc->ibl, &fc->ob, &obl, + mutt_iconv (fc->cd, (ICONV_CONST char **)&fc->ib, &fc->ibl, &fc->ob, &obl, fc->inrepls, 0); if (fc->p < fc->ob) return (unsigned char)*(fc->p)++; |