Switch to unified view
a/src/utils/transcode.cpp | b/src/utils/transcode.cpp | ||
---|---|---|---|
1 | #ifndef lint |
1 | #ifndef lint |
2 | static char rcsid[] = "@(#$Id: transcode.cpp,v 1.2 2004-12-15 15:00:37 dockes Exp $ (C) 2004 J.F.Dockes"; |
2 | static char rcsid[] = "@(#$Id: transcode.cpp,v 1.3 2005-02-04 14:21:18 dockes Exp $ (C) 2004 J.F.Dockes"; |
3 | #endif |
3 | #endif |
4 | 4 | ||
5 | #ifndef TEST_TRANSCODE |
5 | #ifndef TEST_TRANSCODE |
6 | 6 | ||
7 | #include <errno.h> |
7 | #include <errno.h> |
... |
... |
||
38 | 38 | ||
39 | while (isiz > 0) { |
39 | while (isiz > 0) { |
40 | size_t osiz; |
40 | size_t osiz; |
41 | op = obuf; |
41 | op = obuf; |
42 | osiz = OBSIZ; |
42 | osiz = OBSIZ; |
43 | if(iconv(ic, |
||
44 | #if defined(_LIBICONV_VERSION) |
||
45 | &ip, |
||
46 | #else |
||
47 | (char **)&ip, |
||
48 | #endif |
||
43 | if(iconv(ic, &ip, &isiz, &op, &osiz) == (size_t)-1 && errno != E2BIG){
|
49 | &isiz, &op, &osiz) == (size_t)-1 && errno != E2BIG){
|
44 | out.erase(); |
50 | out.erase(); |
45 | out = string("iconv failed for ") + icode + " -> " + ocode + |
51 | out = string("iconv failed for ") + icode + " -> " + ocode + |
46 | " : " + strerror(errno); |
52 | " : " + strerror(errno); |
47 | goto error; |
53 | goto error; |
48 | } |
54 | } |