os2: a _lot_ of coding style cleanup, sot that they match the SDL style.

also renamed the 'debug' macro to debug_os2: the former was dangerously
a common name.

the binary (dll) output is precisely the same as before.
This commit is contained in:
Ozkan Sezer
2020-10-15 21:37:30 +03:00
parent bdc5129f13
commit a90f0400a5
29 changed files with 3536 additions and 3806 deletions

View File

@@ -47,34 +47,39 @@
#define iconv_clean libiconv_clean
// Non-standard function for iconv to unload the used dynamic library.
void libiconv_clean();
/* Non-standard function for iconv to unload the used dynamic library */
void libiconv_clean(void);
iconv_t libiconv_open(const char* tocode, const char* fromcode);
size_t libiconv(iconv_t cd, char* * inbuf, size_t *inbytesleft,
char* * outbuf, size_t *outbytesleft);
int libiconv_close(iconv_t cd);
iconv_t libiconv_open (const char *tocode, const char *fromcode);
int libiconv_close(iconv_t cd);
size_t libiconv (iconv_t cd, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
// 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
// 0 byte(s) or -1 on error.
/* 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
* 0 byte(s) or -1 on error.
*/
int StrUTF8(int fToUTF8, char *pcDst, int cbDst, char *pcSrc, int cbSrc);
// 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
// using libc malloc().
// Returns converted string, terminating two bytes 0 is appended to the result.
// Returns null on error.
/* 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
* 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);
// StrUTF8Free()
// Deallocates the memory block located by StrUTF8New() (just libc free()).
/* StrUTF8Free()
* Deallocates the memory block located by StrUTF8New() (just libc free()).
*/
void StrUTF8Free(char *pszStr);
#endif // GENICONV_H
#endif /* GENICONV_H */
/* vi: set ts=4 sw=4 expandtab: */