another unsigned char cast in os2cp.c. code clean-up in os/2 geniconv.

This commit is contained in:
Ozkan Sezer
2021-12-17 07:33:10 +03:00
parent dac6516057
commit 48d1ef8fad
5 changed files with 152 additions and 140 deletions

View File

@@ -58,27 +58,27 @@ size_t libiconv (iconv_t cd, char **inbuf, size_t *inbytesleft,
/* System codepage <-> UTF-8
*
* StrUTF8()
* Coverts string from system cp to UTF-8 (fToUTF8 is not 0) or from UTF-8 to
* the system cp (fToUTF8 is 0). Converted ASCIIZ string will be placed at the
* buffer pcDst, up to cbDst - 1 (for sys->utf8) or 2 (for utf8->sys) bytes.
* Returns the number of bytes written into pcDst, not counting the terminating
* Converts string from system cp to UTF-8 (to_utf8 is not 0) or from UTF-8 to
* the system cp (to_utf8 is 0). Converted ASCIIZ string will be placed at the
* buffer dst, up to c_dst - 1 (for sys->utf8) or 2 (for utf8->sys) bytes.
* Returns the number of bytes written into dst, not counting the terminating
* 0 byte(s) or -1 on error.
*/
int StrUTF8(int fToUTF8, char *pcDst, int cbDst, char *pcSrc, int cbSrc);
int StrUTF8(int to_utf8, char *dst, int c_dst, char *src, int c_src);
/* StrUTF8New()
* Coverts string from system cp to UTF-8 (fToUTF8 is not 0) or from UTF-8 to
* the system cp (fToUTF8 is 0). Memory for the new string is obtained by
* Converts string from system cp to UTF-8 (to_utf8 is not 0) or from UTF-8
* to the system cp (to_utf8 is 0). Memory for the new string is obtained by
* using libc malloc().
* Returns converted string, terminating two bytes 0 is appended to the result.
* Returns null on error.
*/
char *StrUTF8New(int fToUTF8, char *pcStr, int cbStr);
char *StrUTF8New(int to_utf8, char *str, int c_str);
/* StrUTF8Free()
* Deallocates the memory block located by StrUTF8New() (just libc free()).
* Deallocates the memory block allocated by StrUTF8New() (just libc free()).
*/
void StrUTF8Free(char *pszStr);
void StrUTF8Free(char *str);
#endif /* GENICONV_H */