mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
RJK's OS X portability patch:
- initialise blank mbstate_t using memset rather than an ad-hoc initialiser. - expand the OMIT_UTMP ifdefs to enclose a load of entire functions that would generate `static function never called' warnings if left as empty shells. - couple of other fiddly things. [originally from svn r4896]
This commit is contained in:
@ -26,8 +26,9 @@ int mb_to_wc(int codepage, int flags, char *mbstr, int mblen,
|
||||
{
|
||||
if (codepage == DEFAULT_CODEPAGE) {
|
||||
int n = 0;
|
||||
mbstate_t state = { 0 };
|
||||
mbstate_t state;
|
||||
|
||||
memset(&state, 0, sizeof state);
|
||||
setlocale(LC_CTYPE, "");
|
||||
|
||||
while (mblen > 0) {
|
||||
@ -68,9 +69,10 @@ int wc_to_mb(int codepage, int flags, wchar_t *wcstr, int wclen,
|
||||
|
||||
if (codepage == DEFAULT_CODEPAGE) {
|
||||
char output[MB_LEN_MAX];
|
||||
mbstate_t state = { 0 };
|
||||
mbstate_t state;
|
||||
int n = 0;
|
||||
|
||||
memset(&state, 0, sizeof state);
|
||||
setlocale(LC_CTYPE, "");
|
||||
|
||||
while (wclen > 0) {
|
||||
|
Reference in New Issue
Block a user