/trunk/TODO.md |
---|
5,7 → 5,7 |
ToDo for the next release |
------------------------- |
(None) |
* OpenWatcom (32 bit) build cannot handle German characters, see bug report: https://github.com/open-watcom/open-watcom-v2/issues/863 |
Known problems |
/trunk/language.c |
---|
21,22 → 21,52 |
#include "ff.h" |
void strcpy_advance_id(TCHAR** str, int msgid) { |
TCHAR tmp[1000]; |
//TCHAR tmp[1000]; |
int len; |
FF_GetMsg(*str, msgid); |
len = FF_GetMsg(*str, msgid); |
FF_GetMsg(&tmp[0], msgid); |
*str += xstrlen(&tmp[0]); |
*str += len; |
//FF_GetMsg(&tmp[0], msgid); |
//len = xstrlen(&tmp[0]); |
if (len == 0) { |
simplealert(TEXT("strcpy_advance_id ist len=0!")); |
} |
} |
// Attention: No bounds checking! |
void FF_GetMsg(TCHAR* ret, int MsgId) { |
int FF_GetMsg(TCHAR* ret, int MsgId) { |
#ifdef WIN_ENV |
#ifdef UNICODE |
TCHAR* szMsg; |
int len; |
len = LoadString(hDllInstance, MsgId, (LPTSTR)&szMsg, 0); |
if (len == 0) return 0; // resource not found |
if (ret != NULL) { |
LoadString(hDllInstance, MsgId, ret, len+1); |
} |
return len; |
#else |
// LoadStringA is either broken or badly documented! |
// The documentation says that you receive a read-only string reference as well as the length as return value if cchBufferMax==0. |
// Reality shows that return value is -1 if cchBufferMax==0. |
// https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/8d8c5382-1867-460a-a18f-70dc425ffe2f/loadstring-not-behaving-as-documented?forum=windowssdk |
// We cannot receive a read-only memory using LoadStringA, because the WinAPI needs to do a Unicode-to-ANSI convertion, |
// so we must define some max limit. |
TCHAR szMsg[4096]; |
int len; |
len = LoadString(hDllInstance, MsgId, (LPTSTR)&szMsg, 4096); |
if (len == 0) return 0; // resource not found |
if (ret != NULL) { |
LoadString(hDllInstance, MsgId, ret, len + 1); |
} |
return len; |
#endif |
#else |
Str255 msg; |
GetIndString(msg, 1000, MsgId); |
myp2cstrcpy(ret, msg); |
49,7 → 79,8 |
TCHAR* szMsg; |
int len; |
TCHAR* ret; |
len = LoadString(hDllInstance, MsgId, (LPTSTR)&szMsg, 0); |
len = FF_GetMsg(NULL, MsgId); |
if (len == 0) return NULL; // resource not found |
ret = (TCHAR*)malloc((len+1) * sizeof(TCHAR)); |
if (ret == NULL) return NULL; |
LoadString(hDllInstance, MsgId, ret, len+1); |
/trunk/language.h |
---|
18,11 → 18,6 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
*/ |
// TODO: Deutsche Umlaute sind kaputt (UTF8 Zeichen werden gezeigt) |
// Hiermit geht es aber... |
// Meldung "Unbekanntes Pragma" (trotzdem bringt es was?!) |
#pragma code_page(65001) |
#define MSG_PREMIERE_COMPAT_ID 1 |
#define MSG_PREMIERE_COMPAT_ENUS "This version of Filter Foundry is not compatible with Adobe Premiere!"; |
#define MSG_PREMIERE_COMPAT_DEDE "Diese Version von Filter Foundry ist mit Adobe Premiere nicht kompatibel!" |
253,6 → 248,6 |
void strcpy_advance_id(TCHAR** str, int msgid); |
void FF_GetMsg(TCHAR* ret, int MsgId); |
int FF_GetMsg(TCHAR* ret, int MsgId); |
TCHAR* FF_GetMsg_Cpy(int MsgId); |
void FF_GetMsg_Free(TCHAR* str); |
/trunk/language_win.rc |
---|
23,7 → 23,8 |
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US |
STRINGTABLE |
{ |
// TODO: mingw windres does not want the MSG_* defines here :-( Why?! Even Watcom can do it! |
// TODO: mingw windres does not want the MSG_* defines here :-( |
// Bugreport: https://sourceware.org/bugzilla/show_bug.cgi?id=29133 |
MSG_PREMIERE_COMPAT_ID, MSG_PREMIERE_COMPAT_ENUS |
MSG_RUNDLL_ERR_ID, MSG_RUNDLL_ERR_ENUS |
MSG_INCOMPATIBLE_OBFUSCATION_ID, MSG_INCOMPATIBLE_OBFUSCATION_ENUS |
86,7 → 87,8 |
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN |
STRINGTABLE |
{ |
// TODO: mingw windres does not want the MSG_* defines here :-( Why?! Even Watcom can do it! |
// TODO: mingw windres does not want the MSG_* defines here :-( |
// Bugreport: https://sourceware.org/bugzilla/show_bug.cgi?id=29133 |
MSG_PREMIERE_COMPAT_ID, MSG_PREMIERE_COMPAT_DEDE |
MSG_RUNDLL_ERR_ID, MSG_RUNDLL_ERR_DEDE |
MSG_INCOMPATIBLE_OBFUSCATION_ID, MSG_INCOMPATIBLE_OBFUSCATION_DEDE |
/trunk/ui_win.rc |
---|
24,11 → 24,6 |
#include "commctrl.h" |
#include "ui.h" |
// TODO: Deutsche Umlaute sind kaputt (UTF8 Zeichen werden gezeigt) |
// Hiermit geht es aber... |
// Meldung "Unbekanntes Pragma" (trotzdem bringt es was?!) |
#pragma code_page(65001) |
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL |
CAUTION_ICO ICON "caution.ico" |
/trunk/win_res.rc |
---|
20,6 → 20,10 |
/* wrapper file for Windows resource compiler input */ |
// TODO: OpenWatcom doesn't like this! |
// Bugreport: https://github.com/open-watcom/open-watcom-v2/issues/863 |
#pragma code_page(65001) |
#include "Scripting.rc" |
#include "PiPL.rc" |
#include "ui_win.rc" |