Mercurial > hg > xemacs-beta
comparison src/intl-encap-win32.c @ 4903:70089046adef
fix compile problems in intl-encap* under VS6
-------------------- ChangeLog entries follow: --------------------
lib-src/ChangeLog addition:
2010-01-30 Ben Wing <ben@xemacs.org>
* make-mswin-unicode.pl:
Make it possible to specify an overridden prototype in cases where
either Cygwin or Visual Studio has errors in their headers that
can be corrected by falling back to a less qualified type (typically
without const).
src/ChangeLog addition:
2010-01-30 Ben Wing <ben@xemacs.org>
* intl-auto-encap-win32.c:
* intl-auto-encap-win32.c (qxeExtractAssociatedIcon):
* intl-auto-encap-win32.c (qxeExtractIconEx):
* intl-auto-encap-win32.c (qxeCreateMDIWindow):
* intl-auto-encap-win32.c (qxeCreateWindowStation):
* intl-auto-encap-win32.c (qxeDdeCreateStringHandle):
* intl-auto-encap-win32.c (qxeAbortSystemShutdown):
* intl-auto-encap-win32.c (qxeRegConnectRegistry):
* intl-auto-encap-win32.c (qxeGetICMProfile):
* intl-auto-encap-win32.h:
Rebuild.
* intl-encap-win32.c:
* intl-encap-win32.c (qxeUpdateICMRegKey):
Delete manual definitions of functions with former errors in
Cygwin headers but no longer. Use "override" with some functions
where Cygwin or VS6 accidentally omits a const declaration or
includes an extra one. Use "no" on SendMessageTimeout, which
has an error in the VS6 prototype (you could manually fix this
with an ifdef to split the Cygwin vs. VS6 calls, if we ever
actually used this function).
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 30 Jan 2010 20:34:23 -0600 |
parents | 49de55c09f18 |
children | 7eec2a1f3412 |
comparison
equal
deleted
inserted
replaced
4902:c902301f8b7d | 4903:70089046adef |
---|---|
310 yes LoadKeyboardLayout | 310 yes LoadKeyboardLayout |
311 yes GetKeyboardLayoutName | 311 yes GetKeyboardLayoutName |
312 no CreateDesktop split-sized LPDEVMODE | 312 no CreateDesktop split-sized LPDEVMODE |
313 yes OpenDesktop | 313 yes OpenDesktop |
314 split EnumDesktops DESKTOPENUMPROC // callback fun differs only in string pointer type | 314 split EnumDesktops DESKTOPENUMPROC // callback fun differs only in string pointer type |
315 yes CreateWindowStation | 315 override HWINSTA CreateWindowStationW(LPWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES); error arg 1, VS6 prototype, missing const |
316 yes OpenWindowStation | 316 yes OpenWindowStation |
317 split EnumWindowStations WINSTAENUMPROC // callback fun differs only in string pointer type | 317 split EnumWindowStations WINSTAENUMPROC // callback fun differs only in string pointer type |
318 yes GetUserObjectInformation | 318 yes GetUserObjectInformation |
319 yes SetUserObjectInformation | 319 yes SetUserObjectInformation |
320 yes RegisterWindowMessage | 320 yes RegisterWindowMessage |
321 yes GetMessage | 321 yes GetMessage |
322 yes DispatchMessage | 322 yes DispatchMessage |
323 yes PeekMessage | 323 yes PeekMessage |
324 skip SendMessage split messages and structures | 324 skip SendMessage split messages and structures |
325 yes SendMessageTimeout | 325 no SendMessageTimeout VS6 has erroneous seventh parameter DWORD_PTR instead of PDWORD_PTR |
326 yes SendNotifyMessage | 326 yes SendNotifyMessage |
327 yes SendMessageCallback | 327 yes SendMessageCallback |
328 no BroadcastSystemMessage win95 version not split; NT 4.0+ only | 328 no BroadcastSystemMessage win95 version not split; NT 4.0+ only |
329 no RegisterDeviceNotification NT 5.0+ only | 329 no RegisterDeviceNotification NT 5.0+ only |
330 yes PostMessage | 330 yes PostMessage |
427 yes DlgDirSelectEx | 427 yes DlgDirSelectEx |
428 yes DlgDirListComboBox | 428 yes DlgDirListComboBox |
429 yes DlgDirSelectComboBoxEx | 429 yes DlgDirSelectComboBoxEx |
430 yes DefFrameProc | 430 yes DefFrameProc |
431 no DefMDIChildProc return value is conditionalized on _MAC, messes up parser | 431 no DefMDIChildProc return value is conditionalized on _MAC, messes up parser |
432 yes CreateMDIWindow | 432 override HWND CreateMDIWindowW(LPWSTR,LPCWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM); error arg 1, VS6 prototype, missing const |
433 yes WinHelp | 433 yes WinHelp |
434 no ChangeDisplaySettings split-sized LPDEVMODE | 434 no ChangeDisplaySettings split-sized LPDEVMODE |
435 no ChangeDisplaySettingsEx split-sized LPDEVMODE; NT 5.0/Win98+ only | 435 no ChangeDisplaySettingsEx split-sized LPDEVMODE; NT 5.0/Win98+ only |
436 no EnumDisplaySettings split-sized LPDEVMODE | 436 no EnumDisplaySettings split-sized LPDEVMODE |
437 no EnumDisplayDevices split-sized PDISPLAY_DEVICE; NT 5.0+ only, no Win98 | 437 no EnumDisplayDevices split-sized PDISPLAY_DEVICE; NT 5.0+ only, no Win98 |
514 yes GetTextFace | 514 yes GetTextFace |
515 yes GetKerningPairs | 515 yes GetKerningPairs |
516 // split-simple function pointer ICMENUMPROC | 516 // split-simple function pointer ICMENUMPROC |
517 no GetLogColorSpace split-sized LPLOGCOLORSPACE; NT 4.0+ only | 517 no GetLogColorSpace split-sized LPLOGCOLORSPACE; NT 4.0+ only |
518 no CreateColorSpace split-sized LPLOGCOLORSPACE; NT 4.0+ only | 518 no CreateColorSpace split-sized LPLOGCOLORSPACE; NT 4.0+ only |
519 skip GetICMProfile NT 4.0+ only, error in Cygwin prototype | 519 yes GetICMProfile NT 4.0+ only, former error in Cygwin prototype but no more (Cygwin 1.7, 1-30-10) |
520 yes SetICMProfile NT 4.0+ only | 520 yes SetICMProfile NT 4.0+ only |
521 split EnumICMProfiles ICMENUMPROC NT 4.0+ only | 521 split EnumICMProfiles ICMENUMPROC NT 4.0+ only |
522 skip UpdateICMRegKey NT 4.0+ only, error in Cygwin prototype | 522 skip UpdateICMRegKey NT 4.0+ only, error in Cygwin prototype |
523 // non-split EMREXTTEXTOUT (A and W versions identical) | 523 // non-split EMREXTTEXTOUT (A and W versions identical) |
524 // non-split EMRPOLYTEXTOUT (A and W versions identical) | 524 // non-split EMRPOLYTEXTOUT (A and W versions identical) |
600 yes DragQueryFile | 600 yes DragQueryFile |
601 yes ShellExecute | 601 yes ShellExecute |
602 yes FindExecutable | 602 yes FindExecutable |
603 no CommandLineToArgv Unicode-only | 603 no CommandLineToArgv Unicode-only |
604 yes ShellAbout | 604 yes ShellAbout |
605 yes ExtractAssociatedIcon | 605 override HICON ExtractAssociatedIconW(HINSTANCE, LPWSTR, LPWORD); error arg2, Cygwin prototype, extra const |
606 yes ExtractIcon | 606 yes ExtractIcon |
607 // split-simple DRAGINFO, used ??? (docs say "Not currently supported") | 607 // split-simple DRAGINFO, used ??? (docs say "Not currently supported") |
608 begin-bracket !defined (CYGWIN_HEADERS) | 608 begin-bracket !defined (CYGWIN_HEADERS) |
609 yes DoEnvironmentSubst NT 4.0+ only | 609 yes DoEnvironmentSubst NT 4.0+ only |
610 end-bracket | 610 end-bracket |
611 no FindEnvironmentString causes link error; NT 4.0+ only | 611 no FindEnvironmentString causes link error; NT 4.0+ only |
612 skip ExtractIconEx NT 4.0+ only, error in Cygwin prototype | 612 yes ExtractIconEx NT 4.0+ only, former error in Cygwin prototype but no more (Cygwin 1.7, 1-30-10) |
613 // split-simple SHFILEOPSTRUCT, used in SHFileOperation | 613 // split-simple SHFILEOPSTRUCT, used in SHFileOperation |
614 // split-simple SHNAMEMAPPING, used in SHFileOperation | 614 // split-simple SHNAMEMAPPING, used in SHFileOperation |
615 split SHFileOperation LPSHFILEOPSTRUCT NT 4.0+ only | 615 split SHFileOperation LPSHFILEOPSTRUCT NT 4.0+ only |
616 // split-simple SHELLEXECUTEINFO, used in ShellExecuteEx | 616 // split-simple SHELLEXECUTEINFO, used in ShellExecuteEx |
617 split ShellExecuteEx LPSHELLEXECUTEINFO NT 4.0+ only | 617 split ShellExecuteEx LPSHELLEXECUTEINFO NT 4.0+ only |
851 // nothing | 851 // nothing |
852 | 852 |
853 file DDEML.H | 853 file DDEML.H |
854 | 854 |
855 yes DdeInitialize | 855 yes DdeInitialize |
856 skip DdeCreateStringHandle error in Cygwin prototype | 856 yes DdeCreateStringHandle former error in Cygwin prototype, but no more (Cygwin 1.7, 1-30-10) |
857 yes DdeQueryString | 857 yes DdeQueryString |
858 // #### split-sized (or split-simple??? not completely obvious) structure MONHSZSTRUCT, used when DDE event MF_HSZ_INFO is sent as part of the XTYP_MONITOR transaction sent to a DDE callback; not yet handled | 858 // #### split-sized (or split-simple??? not completely obvious) structure MONHSZSTRUCT, used when DDE event MF_HSZ_INFO is sent as part of the XTYP_MONITOR transaction sent to a DDE callback; not yet handled |
859 | 859 |
860 file IMM.H | 860 file IMM.H |
861 | 861 |
1053 yes ReadConsole | 1053 yes ReadConsole |
1054 yes WriteConsole | 1054 yes WriteConsole |
1055 | 1055 |
1056 file WINREG.H | 1056 file WINREG.H |
1057 | 1057 |
1058 skip RegConnectRegistry error in Cygwin prototype | 1058 yes RegConnectRegistry former error in Cygwin prototype, but no more (Cygwin 1.7, 1-30-10) |
1059 yes RegCreateKey | 1059 yes RegCreateKey |
1060 yes RegCreateKeyEx | 1060 yes RegCreateKeyEx |
1061 yes RegDeleteKey | 1061 yes RegDeleteKey |
1062 yes RegDeleteValue | 1062 yes RegDeleteValue |
1063 yes RegEnumKey | 1063 yes RegEnumKey |
1075 yes RegSaveKey | 1075 yes RegSaveKey |
1076 yes RegSetValue | 1076 yes RegSetValue |
1077 yes RegSetValueEx | 1077 yes RegSetValueEx |
1078 yes RegUnLoadKey | 1078 yes RegUnLoadKey |
1079 yes InitiateSystemShutdown | 1079 yes InitiateSystemShutdown |
1080 yes AbortSystemShutdown | 1080 override BOOL AbortSystemShutdownW(LPWSTR); error arg 1, Cygwin prototype, extra const |
1081 review RegDeleteKeyEx | 1081 review RegDeleteKeyEx |
1082 | 1082 |
1083 file EXCPT.H | 1083 file EXCPT.H |
1084 | 1084 |
1085 // nothing | 1085 // nothing |
1239 | 1239 |
1240 /************************************************************************/ | 1240 /************************************************************************/ |
1241 /* would be encapsulatable but for Cygwin problems */ | 1241 /* would be encapsulatable but for Cygwin problems */ |
1242 /************************************************************************/ | 1242 /************************************************************************/ |
1243 | 1243 |
1244 LONG | |
1245 qxeRegConnectRegistry (const Extbyte * lpMachineName, HKEY hKey, PHKEY phkResult) | |
1246 { | |
1247 /* Cygwin mistakenly omits const in first argument. */ | |
1248 if (XEUNICODE_P) | |
1249 return RegConnectRegistryW ((LPWSTR) lpMachineName, hKey, phkResult); | |
1250 else | |
1251 return RegConnectRegistryA ((LPSTR) lpMachineName, hKey, phkResult); | |
1252 } | |
1253 | |
1254 HSZ | |
1255 qxeDdeCreateStringHandle (DWORD idInst, const Extbyte * psz, int iCodePage) | |
1256 { | |
1257 /* Cygwin mistakenly omits const in second argument. */ | |
1258 if (XEUNICODE_P) | |
1259 return DdeCreateStringHandleW (idInst, (LPWSTR) psz, iCodePage); | |
1260 else | |
1261 return DdeCreateStringHandleA (idInst, (LPSTR) psz, iCodePage); | |
1262 } | |
1263 | |
1264 /* NOTE: NT 4.0+ only */ | |
1265 UINT | |
1266 qxeExtractIconEx (const Extbyte * lpszFile, int nIconIndex, HICON FAR * phiconLarge, HICON FAR * phiconSmall, UINT nIcons) | |
1267 { | |
1268 /* Cygwin mistakenly declares the return type as HICON. */ | |
1269 if (XEUNICODE_P) | |
1270 return (UINT) ExtractIconExW ((LPCWSTR) lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); | |
1271 else | |
1272 return (UINT) ExtractIconExA ((LPCSTR) lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); | |
1273 } | |
1274 | |
1275 #ifdef HAVE_MS_WINDOWS | 1244 #ifdef HAVE_MS_WINDOWS |
1276 | |
1277 /* NOTE: NT 4.0+ only */ | |
1278 BOOL | |
1279 qxeGetICMProfile (HDC arg1, LPDWORD arg2, Extbyte * arg3) | |
1280 { | |
1281 #if 0 /* defined (CYGWIN_HEADERS) */ /* fixed at some point <= GCC 3.4.4 */ | |
1282 /* Cygwin mistakenly declares the second argument as DWORD. */ | |
1283 if (XEUNICODE_P) | |
1284 return GetICMProfileW (arg1, (DWORD) arg2, (LPWSTR) arg3); | |
1285 else | |
1286 return GetICMProfileA (arg1, (DWORD) arg2, (LPSTR) arg3); | |
1287 #else | |
1288 if (XEUNICODE_P) | |
1289 return GetICMProfileW (arg1, arg2, (LPWSTR) arg3); | |
1290 else | |
1291 return GetICMProfileA (arg1, arg2, (LPSTR) arg3); | |
1292 #endif /* CYGWIN_HEADERS */ | |
1293 } | |
1294 | 1245 |
1295 /* NOTE: NT 4.0+ only */ | 1246 /* NOTE: NT 4.0+ only */ |
1296 BOOL | 1247 BOOL |
1297 qxeUpdateICMRegKey (DWORD arg1, Extbyte * arg2, Extbyte * arg3, UINT arg4) | 1248 qxeUpdateICMRegKey (DWORD arg1, Extbyte * arg2, Extbyte * arg3, UINT arg4) |
1298 { | 1249 { |