Mercurial > dwindows
comparison os2/dw.c @ 1642:e21c70d75cb1
For safety reasons on OS/2 in case the codepage isn't inherited...
Set the codepage for threads created by dw_thread_new() to 1208.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 02 Apr 2012 21:14:53 +0000 |
parents | 5c8a5c894ab0 |
children | 69386c5a8e3e |
comparison
equal
deleted
inserted
replaced
1641:cdbf4cc929fc | 1642:e21c70d75cb1 |
---|---|
10773 * Encapsulate the message queues on OS/2. | 10773 * Encapsulate the message queues on OS/2. |
10774 */ | 10774 */ |
10775 void _dwthreadstart(void *data) | 10775 void _dwthreadstart(void *data) |
10776 { | 10776 { |
10777 HAB thishab = WinInitialize(0); | 10777 HAB thishab = WinInitialize(0); |
10778 HMQ thishmq = WinCreateMsgQueue(dwhab, 0); | 10778 HMQ thishmq = WinCreateMsgQueue(thishab, 0); |
10779 void (API_FUNC threadfunc)(void *) = NULL; | 10779 void (API_FUNC threadfunc)(void *) = NULL; |
10780 void **tmp = (void **)data; | 10780 void **tmp = (void **)data; |
10781 | 10781 |
10782 /* Set the codepage to 1208 (UTF-8) */ | |
10783 WinSetCp(thishmq, 1208); | |
10784 | |
10782 threadfunc = (void (API_FUNC)(void *))tmp[0]; | 10785 threadfunc = (void (API_FUNC)(void *))tmp[0]; |
10783 threadfunc(tmp[1]); | 10786 threadfunc(tmp[1]); |
10784 | 10787 |
10785 free(tmp); | 10788 free(tmp); |
10786 | 10789 |